management/front/dkha-web-sz-main/node_modules/echarts/dist/echarts-en.js.map

1 line
5.2 MiB
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{"version":3,"file":"echarts-en.js","sources":["../src/config.js","../node_modules/zrender/src/core/guid.js","../node_modules/zrender/src/core/env.js","../node_modules/zrender/src/core/util.js","../node_modules/zrender/src/core/vector.js","../node_modules/zrender/src/mixin/Draggable.js","../node_modules/zrender/src/mixin/Eventful.js","../node_modules/zrender/src/core/fourPointsTransform.js","../node_modules/zrender/src/core/dom.js","../node_modules/zrender/src/core/event.js","../node_modules/zrender/src/core/GestureMgr.js","../node_modules/zrender/src/Handler.js","../node_modules/zrender/src/core/matrix.js","../node_modules/zrender/src/mixin/Transformable.js","../node_modules/zrender/src/animation/easing.js","../node_modules/zrender/src/animation/Clip.js","../node_modules/zrender/src/core/LRU.js","../node_modules/zrender/src/tool/color.js","../node_modules/zrender/src/animation/Animator.js","../node_modules/zrender/src/config.js","../node_modules/zrender/src/core/log.js","../node_modules/zrender/src/mixin/Animatable.js","../node_modules/zrender/src/Element.js","../node_modules/zrender/src/core/BoundingRect.js","../node_modules/zrender/src/container/Group.js","../node_modules/zrender/src/core/timsort.js","../node_modules/zrender/src/Storage.js","../node_modules/zrender/src/graphic/helper/fixShadow.js","../node_modules/zrender/src/graphic/constant.js","../node_modules/zrender/src/graphic/Style.js","../node_modules/zrender/src/graphic/Pattern.js","../node_modules/zrender/src/Layer.js","../node_modules/zrender/src/animation/requestAnimationFrame.js","../node_modules/zrender/src/graphic/helper/image.js","../node_modules/zrender/src/contain/text.js","../node_modules/zrender/src/graphic/helper/roundRect.js","../node_modules/zrender/src/graphic/helper/text.js","../node_modules/zrender/src/graphic/mixin/RectText.js","../node_modules/zrender/src/graphic/Displayable.js","../node_modules/zrender/src/graphic/Image.js","../node_modules/zrender/src/Painter.js","../node_modules/zrender/src/animation/Animation.js","../node_modules/zrender/src/dom/HandlerProxy.js","../node_modules/zrender/src/zrender.js","../src/util/model.js","../src/util/clazz.js","../src/model/mixin/makeStyleMapper.js","../src/model/mixin/lineStyle.js","../src/model/mixin/areaStyle.js","../node_modules/zrender/src/core/curve.js","../node_modules/zrender/src/core/bbox.js","../node_modules/zrender/src/core/PathProxy.js","../node_modules/zrender/src/contain/line.js","../node_modules/zrender/src/contain/cubic.js","../node_modules/zrender/src/contain/quadratic.js","../node_modules/zrender/src/contain/util.js","../node_modules/zrender/src/contain/arc.js","../node_modules/zrender/src/contain/windingLine.js","../node_modules/zrender/src/contain/path.js","../node_modules/zrender/src/graphic/Path.js","../node_modules/zrender/src/tool/transformPath.js","../node_modules/zrender/src/tool/path.js","../node_modules/zrender/src/graphic/Text.js","../node_modules/zrender/src/graphic/shape/Circle.js","../node_modules/zrender/src/graphic/helper/fixClipWithShadow.js","../node_modules/zrender/src/graphic/shape/Sector.js","../node_modules/zrender/src/graphic/shape/Ring.js","../node_modules/zrender/src/graphic/helper/smoothSpline.js","../node_modules/zrender/src/graphic/helper/smoothBezier.js","../node_modules/zrender/src/graphic/helper/poly.js","../node_modules/zrender/src/graphic/shape/Polygon.js","../node_modules/zrender/src/graphic/shape/Polyline.js","../node_modules/zrender/src/graphic/helper/subPixelOptimize.js","../node_modules/zrender/src/graphic/shape/Rect.js","../node_modules/zrender/src/graphic/shape/Line.js","../node_modules/zrender/src/graphic/shape/BezierCurve.js","../node_modules/zrender/src/graphic/shape/Arc.js","../node_modules/zrender/src/graphic/CompoundPath.js","../node_modules/zrender/src/graphic/Gradient.js","../node_modules/zrender/src/graphic/LinearGradient.js","../node_modules/zrender/src/graphic/RadialGradient.js","../node_modules/zrender/src/graphic/IncrementalDisplayable.js","../src/util/graphic.js","../src/model/mixin/textStyle.js","../src/model/mixin/itemStyle.js","../src/model/Model.js","../src/util/component.js","../src/util/number.js","../src/util/format.js","../src/util/layout.js","../src/model/mixin/boxLayout.js","../src/model/Component.js","../src/model/globalDefault.js","../src/model/mixin/colorPalette.js","../src/data/helper/sourceType.js","../src/data/Source.js","../src/data/helper/sourceHelper.js","../src/model/Global.js","../src/ExtensionAPI.js","../src/CoordinateSystem.js","../src/model/OptionManager.js","../src/preprocessor/helper/compatStyle.js","../src/preprocessor/backwardCompat.js","../src/processor/dataStack.js","../src/data/helper/dataProvider.js","../src/model/mixin/dataFormat.js","../src/stream/task.js","../src/model/Series.js","../src/view/Component.js","../src/chart/helper/createRenderPlanner.js","../src/view/Chart.js","../src/util/throttle.js","../src/visual/seriesColor.js","../src/lang.js","../src/visual/aria.js","../src/loading/default.js","../src/stream/Scheduler.js","../src/theme/light.js","../src/theme/dark.js","../src/component/dataset.js","../node_modules/zrender/src/graphic/shape/Ellipse.js","../node_modules/zrender/src/tool/parseSVG.js","../src/coord/geo/mapDataStorage.js","../src/echarts.js","../src/data/DataDiffer.js","../src/data/helper/dimensionHelper.js","../src/data/DataDimensionInfo.js","../src/data/List.js","../src/data/helper/completeDimensions.js","../src/data/helper/createDimensions.js","../src/model/referHelper.js","../src/data/helper/dataStackHelper.js","../src/chart/helper/createListFromArray.js","../src/scale/Scale.js","../src/data/OrdinalMeta.js","../src/scale/Ordinal.js","../src/scale/helper.js","../src/scale/Interval.js","../src/layout/barGrid.js","../src/scale/Time.js","../src/scale/Log.js","../src/coord/axisHelper.js","../src/coord/axisModelCommonMixin.js","../src/util/symbol.js","../src/helper.js","../node_modules/zrender/src/contain/polygon.js","../src/coord/geo/Region.js","../src/coord/geo/parseGeoJson.js","../src/coord/axisTickLabelBuilder.js","../src/coord/Axis.js","../src/export.js","../src/chart/line/LineSeries.js","../src/chart/helper/labelHelper.js","../src/chart/helper/Symbol.js","../src/chart/helper/SymbolDraw.js","../src/chart/line/helper.js","../src/chart/line/lineAnimationDiff.js","../src/chart/line/poly.js","../src/chart/helper/createClipPathFromCoordSys.js","../src/chart/line/LineView.js","../src/visual/symbol.js","../src/layout/points.js","../src/processor/dataSample.js","../src/coord/cartesian/Cartesian.js","../src/coord/cartesian/Cartesian2D.js","../src/coord/cartesian/Axis2D.js","../src/coord/axisDefault.js","../src/coord/axisModelCreator.js","../src/coord/cartesian/AxisModel.js","../src/coord/cartesian/GridModel.js","../src/coord/cartesian/Grid.js","../src/component/axis/AxisBuilder.js","../src/component/axisPointer/modelHelper.js","../src/component/axis/AxisView.js","../src/coord/cartesian/cartesianAxisHelper.js","../src/component/axis/axisSplitHelper.js","../src/component/axis/CartesianAxisView.js","../src/component/axis.js","../src/component/gridSimple.js","../src/chart/line.js","../src/chart/bar/BaseBarSeries.js","../src/chart/bar/BarSeries.js","../src/chart/bar/helper.js","../src/chart/bar/barItemStyle.js","../src/util/shape/sausage.js","../src/chart/bar/BarView.js","../src/chart/bar.js","../src/chart/helper/createListSimply.js","../src/component/helper/selectableMixin.js","../src/visual/LegendVisualProvider.js","../src/chart/pie/PieSeries.js","../src/chart/pie/PieView.js","../src/action/createDataSelectAction.js","../src/visual/dataColor.js","../src/chart/pie/labelLayout.js","../src/chart/pie/pieLayout.js","../src/processor/dataFilter.js","../src/chart/pie.js","../src/chart/scatter/ScatterSeries.js","../src/chart/helper/LargeSymbolDraw.js","../src/chart/scatter/ScatterView.js","../src/chart/scatter.js","../src/coord/radar/IndicatorAxis.js","../src/coord/radar/Radar.js","../src/coord/radar/RadarModel.js","../src/component/radar/RadarView.js","../src/component/radar.js","../src/chart/radar/RadarSeries.js","../src/chart/radar/RadarView.js","../src/chart/radar/radarLayout.js","../src/chart/radar/backwardCompat.js","../src/chart/radar.js","../src/coord/geo/fix/nanhai.js","../src/coord/geo/fix/textCoord.js","../src/coord/geo/fix/geoCoord.js","../src/coord/geo/fix/diaoyuIsland.js","../src/coord/geo/geoJSONLoader.js","../src/coord/geo/geoSVGLoader.js","../src/coord/geo/geoSourceManager.js","../src/chart/map/MapSeries.js","../src/component/helper/interactionMutex.js","../src/component/helper/RoamController.js","../src/component/helper/roamHelper.js","../src/component/helper/cursorHelper.js","../src/component/helper/MapDraw.js","../src/chart/map/MapView.js","../src/action/roamHelper.js","../src/action/geoRoam.js","../src/coord/View.js","../src/coord/geo/Geo.js","../src/coord/geo/geoCreator.js","../src/chart/map/mapSymbolLayout.js","../src/chart/map/mapVisual.js","../src/chart/map/mapDataStatistic.js","../src/chart/map/backwardCompat.js","../src/chart/map.js","../src/data/helper/linkList.js","../src/data/Tree.js","../src/chart/tree/TreeSeries.js","../src/chart/tree/layoutHelper.js","../src/chart/tree/TreeView.js","../src/chart/tree/treeAction.js","../src/chart/tree/traversalHelper.js","../src/chart/tree/treeLayout.js","../src/chart/tree.js","../src/chart/helper/treeHelper.js","../src/chart/treemap/TreemapSeries.js","../src/chart/treemap/Breadcrumb.js","../src/util/animation.js","../src/chart/treemap/TreemapView.js","../src/chart/treemap/treemapAction.js","../src/visual/VisualMapping.js","../src/chart/treemap/treemapVisual.js","../src/chart/treemap/treemapLayout.js","../src/chart/treemap.js","../src/data/Graph.js","../src/chart/helper/createGraphFromNodeEdge.js","../src/chart/helper/multipleGraphEdgeHelper.js","../src/chart/graph/GraphSeries.js","../src/chart/helper/LinePath.js","../src/chart/helper/Line.js","../src/chart/helper/LineDraw.js","../src/chart/graph/graphHelper.js","../src/chart/graph/adjustEdge.js","../src/chart/graph/GraphView.js","../src/chart/helper/focusNodeAdjacencyAction.js","../src/chart/graph/graphAction.js","../src/chart/graph/categoryFilter.js","../src/chart/graph/categoryVisual.js","../src/chart/graph/edgeVisual.js","../src/chart/graph/simpleLayoutHelper.js","../src/chart/graph/simpleLayout.js","../src/chart/graph/circularLayoutHelper.js","../src/chart/graph/circularLayout.js","../src/chart/graph/forceHelper.js","../src/chart/graph/forceLayout.js","../src/chart/graph/createView.js","../src/chart/graph.js","../src/chart/gauge/GaugeSeries.js","../src/chart/gauge/PointerPath.js","../src/chart/gauge/GaugeView.js","../src/chart/gauge.js","../src/chart/funnel/FunnelSeries.js","../src/chart/funnel/FunnelView.js","../src/chart/funnel/funnelLayout.js","../src/chart/funnel.js","../src/coord/parallel/parallelPreprocessor.js","../src/coord/parallel/ParallelAxis.js","../src/component/helper/sliderMove.js","../src/coord/parallel/Parallel.js","../src/coord/parallel/parallelCreator.js","../src/coord/parallel/AxisModel.js","../src/coord/parallel/ParallelModel.js","../src/component/axis/parallelAxisAction.js","../src/component/helper/BrushController.js","../src/component/helper/brushHelper.js","../src/component/axis/ParallelAxisView.js","../src/component/parallelAxis.js","../src/component/parallel.js","../src/chart/parallel/ParallelSeries.js","../src/chart/parallel/ParallelView.js","../src/chart/parallel/parallelVisual.js","../src/chart/parallel.js","../src/chart/sankey/SankeySeries.js","../src/chart/sankey/SankeyView.js","../src/chart/sankey/sankeyAction.js","../src/chart/sankey/sankeyLayout.js","../src/chart/sankey/sankeyVisual.js","../src/chart/sankey.js","../src/chart/helper/whiskerBoxCommon.js","../src/chart/boxplot/BoxplotSeries.js","../src/chart/boxplot/BoxplotView.js","../src/chart/boxplot/boxplotVisual.js","../src/chart/boxplot/boxplotLayout.js","../src/chart/boxplot.js","../src/chart/candlestick/CandlestickSeries.js","../src/chart/candlestick/CandlestickView.js","../src/chart/candlestick/preprocessor.js","../src/chart/candlestick/candlestickVisual.js","../src/chart/candlestick/candlestickLayout.js","../src/chart/candlestick.js","../src/chart/effectScatter/EffectScatterSeries.js","../src/chart/helper/EffectSymbol.js","../src/chart/effectScatter/EffectScatterView.js","../src/chart/effectScatter.js","../src/chart/lines/LinesSeries.js","../src/chart/helper/EffectLine.js","../src/chart/helper/Polyline.js","../src/chart/helper/EffectPolyline.js","../src/chart/helper/LargeLineDraw.js","../src/chart/lines/linesLayout.js","../src/chart/lines/LinesView.js","../src/chart/lines/linesVisual.js","../src/chart/lines.js","../src/chart/heatmap/HeatmapSeries.js","../src/chart/heatmap/HeatmapLayer.js","../src/chart/heatmap/HeatmapView.js","../src/chart/heatmap.js","../src/chart/bar/PictorialBarSeries.js","../src/chart/bar/PictorialBarView.js","../src/chart/pictorialBar.js","../src/coord/single/SingleAxis.js","../src/coord/single/Single.js","../src/coord/single/singleCreator.js","../src/coord/single/singleAxisHelper.js","../src/component/axis/SingleAxisView.js","../src/coord/single/AxisModel.js","../src/component/axisPointer/findPointFromSeries.js","../src/component/axisPointer/axisTrigger.js","../src/component/axisPointer/AxisPointerModel.js","../src/component/axisPointer/globalListener.js","../src/component/axisPointer/AxisPointerView.js","../src/component/axisPointer/BaseAxisPointer.js","../src/component/axisPointer/viewHelper.js","../src/component/axisPointer/CartesianAxisPointer.js","../src/component/axisPointer.js","../src/component/axisPointer/SingleAxisPointer.js","../src/component/singleAxis.js","../src/chart/themeRiver/ThemeRiverSeries.js","../src/chart/themeRiver/ThemeRiverView.js","../src/chart/themeRiver/themeRiverLayout.js","../src/chart/themeRiver/themeRiverVisual.js","../src/chart/themeRiver.js","../src/chart/sunburst/SunburstSeries.js","../src/chart/sunburst/SunburstPiece.js","../src/chart/sunburst/SunburstView.js","../src/chart/sunburst/sunburstAction.js","../src/chart/sunburst/sunburstLayout.js","../src/chart/sunburst.js","../src/coord/cartesian/prepareCustom.js","../src/coord/geo/prepareCustom.js","../src/coord/single/prepareCustom.js","../src/coord/polar/prepareCustom.js","../src/coord/calendar/prepareCustom.js","../src/chart/custom.js","../src/component/grid.js","../src/layout/barPolar.js","../src/coord/polar/RadiusAxis.js","../src/coord/polar/AngleAxis.js","../src/coord/polar/Polar.js","../src/coord/polar/AxisModel.js","../src/coord/polar/PolarModel.js","../src/coord/polar/polarCreator.js","../src/component/axis/AngleAxisView.js","../src/component/angleAxis.js","../src/component/axis/RadiusAxisView.js","../src/component/radiusAxis.js","../src/component/axisPointer/PolarAxisPointer.js","../src/component/polar.js","../src/coord/geo/GeoModel.js","../src/component/geo/GeoView.js","../src/component/geo.js","../src/coord/calendar/Calendar.js","../src/coord/calendar/CalendarModel.js","../src/component/calendar/CalendarView.js","../src/component/calendar.js","../src/component/graphic.js","../src/component/toolbox/featureManager.js","../src/component/toolbox/ToolboxModel.js","../src/component/helper/listComponent.js","../src/component/toolbox/ToolboxView.js","../src/component/toolbox/feature/SaveAsImage.js","../src/component/toolbox/feature/MagicType.js","../src/component/toolbox/feature/DataView.js","../src/component/helper/BrushTargetManager.js","../src/component/dataZoom/history.js","../src/component/dataZoom/typeDefaulter.js","../src/component/dataZoom/helper.js","../src/component/dataZoom/AxisProxy.js","../src/component/dataZoom/DataZoomModel.js","../src/component/dataZoom/DataZoomView.js","../src/component/dataZoom/SelectZoomModel.js","../src/component/dataZoom/SelectZoomView.js","../src/component/dataZoom/dataZoomProcessor.js","../src/component/dataZoom/dataZoomAction.js","../src/component/dataZoomSelect.js","../src/component/toolbox/feature/DataZoom.js","../src/component/toolbox/feature/Restore.js","../src/component/toolbox.js","../src/component/tooltip/TooltipModel.js","../src/component/tooltip/TooltipContent.js","../src/component/tooltip/TooltipRichContent.js","../src/component/tooltip/TooltipView.js","../src/component/tooltip.js","../src/component/brush/preprocessor.js","../src/visual/visualSolution.js","../src/component/brush/selector.js","../src/component/brush/visualEncoding.js","../src/component/brush/BrushModel.js","../src/component/brush/BrushView.js","../src/component/brush/brushAction.js","../src/component/toolbox/feature/Brush.js","../src/component/brush.js","../src/component/title.js","../src/component/timeline/preprocessor.js","../src/component/timeline/typeDefaulter.js","../src/component/timeline/timelineAction.js","../src/component/timeline/TimelineModel.js","../src/component/timeline/SliderTimelineModel.js","../src/component/timeline/TimelineView.js","../src/component/timeline/TimelineAxis.js","../src/component/timeline/SliderTimelineView.js","../src/component/timeline.js","../src/component/marker/MarkerModel.js","../src/component/marker/MarkPointModel.js","../src/component/marker/markerHelper.js","../src/component/marker/MarkerView.js","../src/component/marker/MarkPointView.js","../src/component/markPoint.js","../src/component/marker/MarkLineModel.js","../src/component/marker/MarkLineView.js","../src/component/markLine.js","../src/component/marker/MarkAreaModel.js","../src/component/marker/MarkAreaView.js","../src/component/markArea.js","../src/component/legend/LegendModel.js","../src/component/legend/legendAction.js","../src/component/legend/LegendView.js","../src/component/legend/legendFilter.js","../src/component/legend.js","../src/component/legend/ScrollableLegendModel.js","../src/component/legend/ScrollableLegendView.js","../src/component/legend/scrollableLegendAction.js","../src/component/legendScroll.js","../src/component/dataZoom/SliderZoomModel.js","../src/component/dataZoom/SliderZoomView.js","../src/component/dataZoomSlider.js","../src/component/dataZoom/InsideZoomModel.js","../src/component/dataZoom/roams.js","../src/component/dataZoom/InsideZoomView.js","../src/component/dataZoomInside.js","../src/component/dataZoom.js","../src/component/visualMap/preprocessor.js","../src/component/visualMap/typeDefaulter.js","../src/component/visualMap/visualEncoding.js","../src/visual/visualDefault.js","../src/component/visualMap/VisualMapModel.js","../src/component/visualMap/ContinuousModel.js","../src/component/visualMap/VisualMapView.js","../src/component/visualMap/helper.js","../src/component/visualMap/ContinuousView.js","../src/component/visualMap/visualMapAction.js","../src/component/visualMapContinuous.js","../src/component/visualMap/PiecewiseModel.js","../src/component/visualMap/PiecewiseView.js","../src/component/visualMapPiecewise.js","../src/component/visualMap.js","../node_modules/zrender/src/vml/core.js","../node_modules/zrender/src/vml/graphic.js","../node_modules/zrender/src/vml/Painter.js","../node_modules/zrender/src/vml/vml.js","../node_modules/zrender/src/svg/core.js","../node_modules/zrender/src/svg/graphic.js","../node_modules/zrender/src/core/arrayDiff2.js","../node_modules/zrender/src/svg/helper/Definable.js","../node_modules/zrender/src/svg/helper/GradientManager.js","../node_modules/zrender/src/svg/helper/ClippathManager.js","../node_modules/zrender/src/svg/helper/ShadowManager.js","../node_modules/zrender/src/svg/Painter.js","../node_modules/zrender/src/svg/svg.js","../echarts.all.js"],"sourcesContent":["/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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// (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).\n\nvar dev;\n\n// In browser\nif (typeof window !== 'undefined') {\n dev = window.__DEV__;\n}\n// In node\nelse if (typeof global !== 'undefined') {\n dev = global.__DEV__;\n}\n\nif (typeof dev === 'undefined') {\n dev = true;\n}\n\nexport var __DEV__ = dev;\n","/**\n * zrender: 生成唯一id\n *\n * @author errorrik (errorrik@gmail.com)\n */\n\nvar idStart = 0x0907;\n\nexport default function () {\n return idStart++;\n}","/**\n * echarts设备环境识别\n *\n * @desc echarts基于Canvas纯Javascript图表库提供直观生动可交互可个性化定制的数据统计图表。\n * @author firede[firede@firede.us]\n * @desc thanks zepto.\n */\n\n/* global wx */\n\nvar env = {};\n\nif (typeof wx === 'object' && typeof wx.getSystemInfoSync === 'function') {\n // In Weixin Application\n env = {\n browser: {},\n os: {},\n node: false,\n wxa: true, // Weixin Application\n canvasSupported: true,\n svgSupported: false,\n touchEventsSupported: true,\n domSupported: false\n };\n}\nelse if (typeof document === 'undefined' && typeof self !== 'undefined') {\n // In worker\n env = {\n browser: {},\n os: {},\n node: false,\n worker: true,\n canvasSupported: true,\n domSupported: false\n };\n}\nelse if (typeof navigator === 'undefined') {\n // In node\n env = {\n browser: {},\n os: {},\n node: true,\n worker: false,\n // Assume canvas is supported\n canvasSupported: true,\n svgSupported: true,\n domSupported: false\n };\n}\nelse {\n env = detect(navigator.userAgent);\n}\n\nexport default env;\n\n// Zepto.js\n// (c) 2010-2013 Thomas Fuchs\n// Zepto.js may be freely distributed under the MIT license.\n\nfunction detect(ua) {\n var os = {};\n var browser = {};\n // var webkit = ua.match(/Web[kK]it[\\/]{0,1}([\\d.]+)/);\n // var android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/);\n // var ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n // var ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n // var iphone = !ipad && ua.match(/(iPhone\\sOS)\\s([\\d_]+)/);\n // var webos = ua.match(/(webOS|hpwOS)[\\s\\/]([\\d.]+)/);\n // var touchpad = webos && ua.match(/TouchPad/);\n // var kindle = ua.match(/Kindle\\/([\\d.]+)/);\n // var silk = ua.match(/Silk\\/([\\d._]+)/);\n // var blackberry = ua.match(/(BlackBerry).*Version\\/([\\d.]+)/);\n // var bb10 = ua.match(/(BB10).*Version\\/([\\d.]+)/);\n // var rimtabletos = ua.match(/(RIM\\sTablet\\sOS)\\s([\\d.]+)/);\n // var playbook = ua.match(/PlayBook/);\n // var chrome = ua.match(/Chrome\\/([\\d.]+)/) || ua.match(/CriOS\\/([\\d.]+)/);\n var firefox = ua.match(/Firefox\\/([\\d.]+)/);\n // var safari = webkit && ua.match(/Mobile\\//) && !chrome;\n // var webview = ua.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/) && !chrome;\n var ie = ua.match(/MSIE\\s([\\d.]+)/)\n // IE 11 Trident/7.0; rv:11.0\n || ua.match(/Trident\\/.+?rv:(([\\d.]+))/);\n var edge = ua.match(/Edge\\/([\\d.]+)/); // IE 12 and 12+\n\n var weChat = (/micromessenger/i).test(ua);\n\n // Todo: clean this up with a better OS/browser seperation:\n // - discern (more) between multiple browsers on android\n // - decide if kindle fire in silk mode is android or not\n // - Firefox on Android doesn't specify the Android version\n // - possibly devide in os, device and browser hashes\n\n // if (browser.webkit = !!webkit) browser.version = webkit[1];\n\n // if (android) os.android = true, os.version = android[2];\n // if (iphone && !ipod) os.ios = os.iphone = true, os.version = iphone[2].replace(/_/g, '.');\n // if (ipad) os.ios = os.ipad = true, os.version = ipad[2].replace(/_/g, '.');\n // if (ipod) os.ios = os.ipod = true, os.version = ipod[3] ? ipod[3].replace(/_/g, '.') : null;\n // if (webos) os.webos = true, os.version = webos[2];\n // if (touchpad) os.touchpad = true;\n // if (blackberry) os.blackberry = true, os.version = blackberry[2];\n // if (bb10) os.bb10 = true, os.version = bb10[2];\n // if (rimtabletos) os.rimtabletos = true, os.version = rimtabletos[2];\n // if (playbook) browser.playbook = true;\n // if (kindle) os.kindle = true, os.version = kindle[1];\n // if (silk) browser.silk = true, browser.version = silk[1];\n // if (!silk && os.android && ua.match(/Kindle Fire/)) browser.silk = true;\n // if (chrome) browser.chrome = true, browser.version = chrome[1];\n if (firefox) {\n browser.firefox = true;\n browser.version = firefox[1];\n }\n // if (safari && (ua.match(/Safari/) || !!os.ios)) browser.safari = true;\n // if (webview) browser.webview = true;\n\n if (ie) {\n browser.ie = true;\n browser.version = ie[1];\n }\n\n if (edge) {\n browser.edge = true;\n browser.version = edge[1];\n }\n\n // It is difficult to detect WeChat in Win Phone precisely, because ua can\n // not be set on win phone. So we do not consider Win Phone.\n if (weChat) {\n browser.weChat = true;\n }\n\n // os.tablet = !!(ipad || playbook || (android && !ua.match(/Mobile/)) ||\n // (firefox && ua.match(/Tablet/)) || (ie && !ua.match(/Phone/) && ua.match(/Touch/)));\n // os.phone = !!(!os.tablet && !os.ipod && (android || iphone || webos ||\n // (chrome && ua.match(/Android/)) || (chrome && ua.match(/CriOS\\/([\\d.]+)/)) ||\n // (firefox && ua.match(/Mobile/)) || (ie && ua.match(/Touch/))));\n\n return {\n browser: browser,\n os: os,\n node: false,\n // 原生canvas支持改极端点了\n // canvasSupported : !(browser.ie && parseFloat(browser.version) < 9)\n canvasSupported: !!document.createElement('canvas').getContext,\n svgSupported: typeof SVGRect !== 'undefined',\n // works on most browsers\n // IE10/11 does not support touch event, and MS Edge supports them but not by\n // default, so we dont check navigator.maxTouchPoints for them here.\n touchEventsSupported: 'ontouchstart' in window && !browser.ie && !browser.edge,\n // <http://caniuse.com/#search=pointer%20event>.\n pointerEventsSupported:\n // (1) Firefox supports pointer but not by default, only MS browsers are reliable on pointer\n // events currently. So we dont use that on other browsers unless tested sufficiently.\n // For example, in iOS 13 Mobile Chromium 78, if the touching behavior starts page\n // scroll, the `pointermove` event can not be fired any more. That will break some\n // features like \"pan horizontally to move something and pan vertically to page scroll\".\n // The horizontal pan probably be interrupted by the casually triggered page scroll.\n // (2) Although IE 10 supports pointer event, it use old style and is different from the\n // standard. So we exclude that. (IE 10 is hardly used on touch device)\n 'onpointerdown' in window\n && (browser.edge || (browser.ie && browser.version >= 11)),\n // passiveSupported: detectPassiveSupport()\n domSupported: typeof document !== 'undefined'\n };\n}\n\n// See https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection\n// function detectPassiveSupport() {\n// // Test via a getter in the options object to see if the passive property is accessed\n// var supportsPassive = false;\n// try {\n// var opts = Object.defineProperty({}, 'passive', {\n// get: function() {\n// supportsPassive = true;\n// }\n// });\n// window.addEventListener('testPassive', function() {}, opts);\n// } catch (e) {\n// }\n// return supportsPassive;\n// }\n","/**\n * @module zrender/core/util\n */\n\n// 用于处理merge时无法遍历Date等对象的问题\nvar BUILTIN_OBJECT = {\n '[object Function]': 1,\n '[object RegExp]': 1,\n '[object Date]': 1,\n '[object Error]': 1,\n '[object CanvasGradient]': 1,\n '[object CanvasPattern]': 1,\n // For node-canvas\n '[object Image]': 1,\n '[object Canvas]': 1\n};\n\nvar TYPED_ARRAY = {\n '[object Int8Array]': 1,\n '[object Uint8Array]': 1,\n '[object Uint8ClampedArray]': 1,\n '[object Int16Array]': 1,\n '[object Uint16Array]': 1,\n '[object Int32Array]': 1,\n '[object Uint32Array]': 1,\n '[object Float32Array]': 1,\n '[object Float64Array]': 1\n};\n\nvar objToString = Object.prototype.toString;\n\nvar arrayProto = Array.prototype;\nvar nativeForEach = arrayProto.forEach;\nvar nativeFilter = arrayProto.filter;\nvar nativeSlice = arrayProto.slice;\nvar nativeMap = arrayProto.map;\nvar nativeReduce = arrayProto.reduce;\n\n// Avoid assign to an exported variable, for transforming to cjs.\nvar methods = {};\n\nexport function $override(name, fn) {\n // Clear ctx instance for different environment\n if (name === 'createCanvas') {\n _ctx = null;\n }\n\n methods[name] = fn;\n}\n\n/**\n * Those data types can be cloned:\n * Plain object, Array, TypedArray, number, string, null, undefined.\n * Those data types will be assgined using the orginal data:\n * BUILTIN_OBJECT\n * Instance of user defined class will be cloned to a plain object, without\n * properties in prototype.\n * Other data types is not supported (not sure what will happen).\n *\n * Caution: do not support clone Date, for performance consideration.\n * (There might be a large number of date in `series.data`).\n * So date should not be modified in and out of echarts.\n *\n * @param {*} source\n * @return {*} new\n */\nexport function clone(source) {\n if (source == null || typeof source !== 'object') {\n return source;\n }\n\n var result = source;\n var typeStr = objToString.call(source);\n\n if (typeStr === '[object Array]') {\n if (!isPrimitive(source)) {\n result = [];\n for (var i = 0, len = source.length; i < len; i++) {\n result[i] = clone(source[i]);\n }\n }\n }\n else if (TYPED_ARRAY[typeStr]) {\n if (!isPrimitive(source)) {\n var Ctor = source.constructor;\n if (source.constructor.from) {\n result = Ctor.from(source);\n }\n else {\n result = new Ctor(source.length);\n for (var i = 0, len = source.length; i < len; i++) {\n result[i] = clone(source[i]);\n }\n }\n }\n }\n else if (!BUILTIN_OBJECT[typeStr] && !isPrimitive(source) && !isDom(source)) {\n result = {};\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n result[key] = clone(source[key]);\n }\n }\n }\n\n return result;\n}\n\n/**\n * @memberOf module:zrender/core/util\n * @param {*} target\n * @param {*} source\n * @param {boolean} [overwrite=false]\n */\nexport function merge(target, source, overwrite) {\n // We should escapse that source is string\n // and enter for ... in ...\n if (!isObject(source) || !isObject(target)) {\n return overwrite ? clone(source) : target;\n }\n\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n var targetProp = target[key];\n var sourceProp = source[key];\n\n if (isObject(sourceProp)\n && isObject(targetProp)\n && !isArray(sourceProp)\n && !isArray(targetProp)\n && !isDom(sourceProp)\n && !isDom(targetProp)\n && !isBuiltInObject(sourceProp)\n && !isBuiltInObject(targetProp)\n && !isPrimitive(sourceProp)\n && !isPrimitive(targetProp)\n ) {\n // 如果需要递归覆盖就递归调用merge\n merge(targetProp, sourceProp, overwrite);\n }\n else if (overwrite || !(key in target)) {\n // 否则只处理overwrite为true或者在目标对象中没有此属性的情况\n // NOTE在 target[key] 不存在的时候也是直接覆盖\n target[key] = clone(source[key], true);\n }\n }\n }\n\n return target;\n}\n\n/**\n * @param {Array} targetAndSources The first item is target, and the rests are source.\n * @param {boolean} [overwrite=false]\n * @return {*} target\n */\nexport function mergeAll(targetAndSources, overwrite) {\n var result = targetAndSources[0];\n for (var i = 1, len = targetAndSources.length; i < len; i++) {\n result = merge(result, targetAndSources[i], overwrite);\n }\n return result;\n}\n\n/**\n * @param {*} target\n * @param {*} source\n * @memberOf module:zrender/core/util\n */\nexport function extend(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n return target;\n}\n\n/**\n * @param {*} target\n * @param {*} source\n * @param {boolean} [overlay=false]\n * @memberOf module:zrender/core/util\n */\nexport function defaults(target, source, overlay) {\n for (var key in source) {\n if (source.hasOwnProperty(key)\n && (overlay ? source[key] != null : target[key] == null)\n ) {\n target[key] = source[key];\n }\n }\n return target;\n}\n\nexport var createCanvas = function () {\n return methods.createCanvas();\n};\n\nmethods.createCanvas = function () {\n return document.createElement('canvas');\n};\n\n// FIXME\nvar _ctx;\n\nexport function getContext() {\n if (!_ctx) {\n // Use util.createCanvas instead of createCanvas\n // because createCanvas may be overwritten in different environment\n _ctx = createCanvas().getContext('2d');\n }\n return _ctx;\n}\n\n/**\n * 查询数组中元素的index\n * @memberOf module:zrender/core/util\n */\nexport function indexOf(array, value) {\n if (array) {\n if (array.indexOf) {\n return array.indexOf(value);\n }\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n }\n return -1;\n}\n\n/**\n * 构造类继承关系\n *\n * @memberOf module:zrender/core/util\n * @param {Function} clazz 源类\n * @param {Function} baseClazz 基类\n */\nexport function inherits(clazz, baseClazz) {\n var clazzPrototype = clazz.prototype;\n function F() {}\n F.prototype = baseClazz.prototype;\n clazz.prototype = new F();\n\n for (var prop in clazzPrototype) {\n if (clazzPrototype.hasOwnProperty(prop)) {\n clazz.prototype[prop] = clazzPrototype[prop];\n }\n }\n clazz.prototype.constructor = clazz;\n clazz.superClass = baseClazz;\n}\n\n/**\n * @memberOf module:zrender/core/util\n * @param {Object|Function} target\n * @param {Object|Function} sorce\n * @param {boolean} overlay\n */\nexport function mixin(target, source, overlay) {\n target = 'prototype' in target ? target.prototype : target;\n source = 'prototype' in source ? source.prototype : source;\n\n defaults(target, source, overlay);\n}\n\n/**\n * Consider typed array.\n * @param {Array|TypedArray} data\n */\nexport function isArrayLike(data) {\n if (!data) {\n return;\n }\n if (typeof data === 'string') {\n return false;\n }\n return typeof data.length === 'number';\n}\n\n/**\n * 数组或对象遍历\n * @memberOf module:zrender/core/util\n * @param {Object|Array} obj\n * @param {Function} cb\n * @param {*} [context]\n */\nexport function each(obj, cb, context) {\n if (!(obj && cb)) {\n return;\n }\n if (obj.forEach && obj.forEach === nativeForEach) {\n obj.forEach(cb, context);\n }\n else if (obj.length === +obj.length) {\n for (var i = 0, len = obj.length; i < len; i++) {\n cb.call(context, obj[i], i, obj);\n }\n }\n else {\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n cb.call(context, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * 数组映射\n * @memberOf module:zrender/core/util\n * @param {Array} obj\n * @param {Function} cb\n * @param {*} [context]\n * @return {Array}\n */\nexport function map(obj, cb, context) {\n if (!(obj && cb)) {\n return;\n }\n if (obj.map && obj.map === nativeMap) {\n return obj.map(cb, context);\n }\n else {\n var result = [];\n for (var i = 0, len = obj.length; i < len; i++) {\n result.push(cb.call(context, obj[i], i, obj));\n }\n return result;\n }\n}\n\n/**\n * @memberOf module:zrender/core/util\n * @param {Array} obj\n * @param {Function} cb\n * @param {Object} [memo]\n * @param {*} [context]\n * @return {Array}\n */\nexport function reduce(obj, cb, memo, context) {\n if (!(obj && cb)) {\n return;\n }\n if (obj.reduce && obj.reduce === nativeReduce) {\n return obj.reduce(cb, memo, context);\n }\n else {\n for (var i = 0, len = obj.length; i < len; i++) {\n memo = cb.call(context, memo, obj[i], i, obj);\n }\n return memo;\n }\n}\n\n/**\n * 数组过滤\n * @memberOf module:zrender/core/util\n * @param {Array} obj\n * @param {Function} cb\n * @param {*} [context]\n * @return {Array}\n */\nexport function filter(obj, cb, context) {\n if (!(obj && cb)) {\n return;\n }\n if (obj.filter && obj.filter === nativeFilter) {\n return obj.filter(cb, context);\n }\n else {\n var result = [];\n for (var i = 0, len = obj.length; i < len; i++) {\n if (cb.call(context, obj[i], i, obj)) {\n result.push(obj[i]);\n }\n }\n return result;\n }\n}\n\n/**\n * 数组项查找\n * @memberOf module:zrender/core/util\n * @param {Array} obj\n * @param {Function} cb\n * @param {*} [context]\n * @return {*}\n */\nexport function find(obj, cb, context) {\n if (!(obj && cb)) {\n return;\n }\n for (var i = 0, len = obj.length; i < len; i++) {\n if (cb.call(context, obj[i], i, obj)) {\n return obj[i];\n }\n }\n}\n\n/**\n * @memberOf module:zrender/core/util\n * @param {Function} func\n * @param {*} context\n * @return {Function}\n */\nexport function bind(func, context) {\n var args = nativeSlice.call(arguments, 2);\n return function () {\n return func.apply(context, args.concat(nativeSlice.call(arguments)));\n };\n}\n\n/**\n * @memberOf module:zrender/core/util\n * @param {Function} func\n * @return {Function}\n */\nexport function curry(func) {\n var args = nativeSlice.call(arguments, 1);\n return function () {\n return func.apply(this, args.concat(nativeSlice.call(arguments)));\n };\n}\n\n/**\n * @memberOf module:zrender/core/util\n * @param {*} value\n * @return {boolean}\n */\nexport function isArray(value) {\n return objToString.call(value) === '[object Array]';\n}\n\n/**\n * @memberOf module:zrender/core/util\n * @param {*} value\n * @return {boolean}\n */\nexport function isFunction(value) {\n return typeof value === 'function';\n}\n\n/**\n * @memberOf module:zrender/core/util\n * @param {*} value\n * @return {boolean}\n */\nexport function isString(value) {\n return objToString.call(value) === '[object String]';\n}\n\n/**\n * @memberOf module:zrender/core/util\n * @param {*} value\n * @return {boolean}\n */\nexport function isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return type === 'function' || (!!value && type === 'object');\n}\n\n/**\n * @memberOf module:zrender/core/util\n * @param {*} value\n * @return {boolean}\n */\nexport function isBuiltInObject(value) {\n return !!BUILTIN_OBJECT[objToString.call(value)];\n}\n\n/**\n * @memberOf module:zrender/core/util\n * @param {*} value\n * @return {boolean}\n */\nexport function isTypedArray(value) {\n return !!TYPED_ARRAY[objToString.call(value)];\n}\n\n/**\n * @memberOf module:zrender/core/util\n * @param {*} value\n * @return {boolean}\n */\nexport function isDom(value) {\n return typeof value === 'object'\n && typeof value.nodeType === 'number'\n && typeof value.ownerDocument === 'object';\n}\n\n/**\n * Whether is exactly NaN. Notice isNaN('a') returns true.\n * @param {*} value\n * @return {boolean}\n */\nexport function eqNaN(value) {\n /* eslint-disable-next-line no-self-compare */\n return value !== value;\n}\n\n/**\n * If value1 is not null, then return value1, otherwise judget rest of values.\n * Low performance.\n * @memberOf module:zrender/core/util\n * @return {*} Final value\n */\nexport function retrieve(values) {\n for (var i = 0, len = arguments.length; i < len; i++) {\n if (arguments[i] != null) {\n return arguments[i];\n }\n }\n}\n\nexport function retrieve2(value0, value1) {\n return value0 != null\n ? value0\n : value1;\n}\n\nexport function retrieve3(value0, value1, value2) {\n return value0 != null\n ? value0\n : value1 != null\n ? value1\n : value2;\n}\n\n/**\n * @memberOf module:zrender/core/util\n * @param {Array} arr\n * @param {number} startIndex\n * @param {number} endIndex\n * @return {Array}\n */\nexport function slice() {\n return Function.call.apply(nativeSlice, arguments);\n}\n\n/**\n * Normalize css liked array configuration\n * e.g.\n * 3 => [3, 3, 3, 3]\n * [4, 2] => [4, 2, 4, 2]\n * [4, 3, 2] => [4, 3, 2, 3]\n * @param {number|Array.<number>} val\n * @return {Array.<number>}\n */\nexport function normalizeCssArray(val) {\n if (typeof (val) === 'number') {\n return [val, val, val, val];\n }\n var len = val.length;\n if (len === 2) {\n // vertical | horizontal\n return [val[0], val[1], val[0], val[1]];\n }\n else if (len === 3) {\n // top | horizontal | bottom\n return [val[0], val[1], val[2], val[1]];\n }\n return val;\n}\n\n/**\n * @memberOf module:zrender/core/util\n * @param {boolean} condition\n * @param {string} message\n */\nexport function assert(condition, message) {\n if (!condition) {\n throw new Error(message);\n }\n}\n\n/**\n * @memberOf module:zrender/core/util\n * @param {string} str string to be trimed\n * @return {string} trimed string\n */\nexport function trim(str) {\n if (str == null) {\n return null;\n }\n else if (typeof str.trim === 'function') {\n return str.trim();\n }\n else {\n return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n }\n}\n\nvar primitiveKey = '__ec_primitive__';\n/**\n * Set an object as primitive to be ignored traversing children in clone or merge\n */\nexport function setAsPrimitive(obj) {\n obj[primitiveKey] = true;\n}\n\nexport function isPrimitive(obj) {\n return obj[primitiveKey];\n}\n\n/**\n * @constructor\n * @param {Object} obj Only apply `ownProperty`.\n */\nfunction HashMap(obj) {\n var isArr = isArray(obj);\n // Key should not be set on this, otherwise\n // methods get/set/... may be overrided.\n this.data = {};\n var thisMap = this;\n\n (obj instanceof HashMap)\n ? obj.each(visit)\n : (obj && each(obj, visit));\n\n function visit(value, key) {\n isArr ? thisMap.set(value, key) : thisMap.set(key, value);\n }\n}\n\nHashMap.prototype = {\n constructor: HashMap,\n // Do not provide `has` method to avoid defining what is `has`.\n // (We usually treat `null` and `undefined` as the same, different\n // from ES6 Map).\n get: function (key) {\n return this.data.hasOwnProperty(key) ? this.data[key] : null;\n },\n set: function (key, value) {\n // Comparing with invocation chaining, `return value` is more commonly\n // used in this case: `var someVal = map.set('a', genVal());`\n return (this.data[key] = value);\n },\n // Although util.each can be performed on this hashMap directly, user\n // should not use the exposed keys, who are prefixed.\n each: function (cb, context) {\n context !== void 0 && (cb = bind(cb, context));\n /* eslint-disable guard-for-in */\n for (var key in this.data) {\n this.data.hasOwnProperty(key) && cb(this.data[key], key);\n }\n /* eslint-enable guard-for-in */\n },\n // Do not use this method if performance sensitive.\n removeKey: function (key) {\n delete this.data[key];\n }\n};\n\nexport function createHashMap(obj) {\n return new HashMap(obj);\n}\n\nexport function concatArray(a, b) {\n var newArray = new a.constructor(a.length + b.length);\n for (var i = 0; i < a.length; i++) {\n newArray[i] = a[i];\n }\n var offset = a.length;\n for (i = 0; i < b.length; i++) {\n newArray[i + offset] = b[i];\n }\n return newArray;\n}\n\n\nexport function noop() {}\n","/* global Float32Array */\n\nvar ArrayCtor = typeof Float32Array === 'undefined'\n ? Array\n : Float32Array;\n\n/**\n * 创建一个向量\n * @param {number} [x=0]\n * @param {number} [y=0]\n * @return {Vector2}\n */\nexport function create(x, y) {\n var out = new ArrayCtor(2);\n if (x == null) {\n x = 0;\n }\n if (y == null) {\n y = 0;\n }\n out[0] = x;\n out[1] = y;\n return out;\n}\n\n/**\n * 复制向量数据\n * @param {Vector2} out\n * @param {Vector2} v\n * @return {Vector2}\n */\nexport function copy(out, v) {\n out[0] = v[0];\n out[1] = v[1];\n return out;\n}\n\n/**\n * 克隆一个向量\n * @param {Vector2} v\n * @return {Vector2}\n */\nexport function clone(v) {\n var out = new ArrayCtor(2);\n out[0] = v[0];\n out[1] = v[1];\n return out;\n}\n\n/**\n * 设置向量的两个项\n * @param {Vector2} out\n * @param {number} a\n * @param {number} b\n * @return {Vector2} 结果\n */\nexport function set(out, a, b) {\n out[0] = a;\n out[1] = b;\n return out;\n}\n\n/**\n * 向量相加\n * @param {Vector2} out\n * @param {Vector2} v1\n * @param {Vector2} v2\n */\nexport function add(out, v1, v2) {\n out[0] = v1[0] + v2[0];\n out[1] = v1[1] + v2[1];\n return out;\n}\n\n/**\n * 向量缩放后相加\n * @param {Vector2} out\n * @param {Vector2} v1\n * @param {Vector2} v2\n * @param {number} a\n */\nexport function scaleAndAdd(out, v1, v2, a) {\n out[0] = v1[0] + v2[0] * a;\n out[1] = v1[1] + v2[1] * a;\n return out;\n}\n\n/**\n * 向量相减\n * @param {Vector2} out\n * @param {Vector2} v1\n * @param {Vector2} v2\n */\nexport function sub(out, v1, v2) {\n out[0] = v1[0] - v2[0];\n out[1] = v1[1] - v2[1];\n return out;\n}\n\n/**\n * 向量长度\n * @param {Vector2} v\n * @return {number}\n */\nexport function len(v) {\n return Math.sqrt(lenSquare(v));\n}\nexport var length = len; // jshint ignore:line\n\n/**\n * 向量长度平方\n * @param {Vector2} v\n * @return {number}\n */\nexport function lenSquare(v) {\n return v[0] * v[0] + v[1] * v[1];\n}\nexport var lengthSquare = lenSquare;\n\n/**\n * 向量乘法\n * @param {Vector2} out\n * @param {Vector2} v1\n * @param {Vector2} v2\n */\nexport function mul(out, v1, v2) {\n out[0] = v1[0] * v2[0];\n out[1] = v1[1] * v2[1];\n return out;\n}\n\n/**\n * 向量除法\n * @param {Vector2} out\n * @param {Vector2} v1\n * @param {Vector2} v2\n */\nexport function div(out, v1, v2) {\n out[0] = v1[0] / v2[0];\n out[1] = v1[1] / v2[1];\n return out;\n}\n\n/**\n * 向量点乘\n * @param {Vector2} v1\n * @param {Vector2} v2\n * @return {number}\n */\nexport function dot(v1, v2) {\n return v1[0] * v2[0] + v1[1] * v2[1];\n}\n\n/**\n * 向量缩放\n * @param {Vector2} out\n * @param {Vector2} v\n * @param {number} s\n */\nexport function scale(out, v, s) {\n out[0] = v[0] * s;\n out[1] = v[1] * s;\n return out;\n}\n\n/**\n * 向量归一化\n * @param {Vector2} out\n * @param {Vector2} v\n */\nexport function normalize(out, v) {\n var d = len(v);\n if (d === 0) {\n out[0] = 0;\n out[1] = 0;\n }\n else {\n out[0] = v[0] / d;\n out[1] = v[1] / d;\n }\n return out;\n}\n\n/**\n * 计算向量间距离\n * @param {Vector2} v1\n * @param {Vector2} v2\n * @return {number}\n */\nexport function distance(v1, v2) {\n return Math.sqrt(\n (v1[0] - v2[0]) * (v1[0] - v2[0])\n + (v1[1] - v2[1]) * (v1[1] - v2[1])\n );\n}\nexport var dist = distance;\n\n/**\n * 向量距离平方\n * @param {Vector2} v1\n * @param {Vector2} v2\n * @return {number}\n */\nexport function distanceSquare(v1, v2) {\n return (v1[0] - v2[0]) * (v1[0] - v2[0])\n + (v1[1] - v2[1]) * (v1[1] - v2[1]);\n}\nexport var distSquare = distanceSquare;\n\n/**\n * 求负向量\n * @param {Vector2} out\n * @param {Vector2} v\n */\nexport function negate(out, v) {\n out[0] = -v[0];\n out[1] = -v[1];\n return out;\n}\n\n/**\n * 插值两个点\n * @param {Vector2} out\n * @param {Vector2} v1\n * @param {Vector2} v2\n * @param {number} t\n */\nexport function lerp(out, v1, v2, t) {\n out[0] = v1[0] + t * (v2[0] - v1[0]);\n out[1] = v1[1] + t * (v2[1] - v1[1]);\n return out;\n}\n\n/**\n * 矩阵左乘向量\n * @param {Vector2} out\n * @param {Vector2} v\n * @param {Vector2} m\n */\nexport function applyTransform(out, v, m) {\n var x = v[0];\n var y = v[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n}\n\n/**\n * 求两个向量最小值\n * @param {Vector2} out\n * @param {Vector2} v1\n * @param {Vector2} v2\n */\nexport function min(out, v1, v2) {\n out[0] = Math.min(v1[0], v2[0]);\n out[1] = Math.min(v1[1], v2[1]);\n return out;\n}\n\n/**\n * 求两个向量最大值\n * @param {Vector2} out\n * @param {Vector2} v1\n * @param {Vector2} v2\n */\nexport function max(out, v1, v2) {\n out[0] = Math.max(v1[0], v2[0]);\n out[1] = Math.max(v1[1], v2[1]);\n return out;\n}\n","// TODO Draggable for group\n// FIXME Draggable on element which has parent rotation or scale\nfunction Draggable() {\n\n this.on('mousedown', this._dragStart, this);\n this.on('mousemove', this._drag, this);\n this.on('mouseup', this._dragEnd, this);\n // `mosuemove` and `mouseup` can be continue to fire when dragging.\n // See [Drag outside] in `Handler.js`. So we do not need to trigger\n // `_dragEnd` when globalout. That would brings better user experience.\n // this.on('globalout', this._dragEnd, this);\n\n // this._dropTarget = null;\n // this._draggingTarget = null;\n\n // this._x = 0;\n // this._y = 0;\n}\n\nDraggable.prototype = {\n\n constructor: Draggable,\n\n _dragStart: function (e) {\n var draggingTarget = e.target;\n // Find if there is draggable in the ancestor\n while (draggingTarget && !draggingTarget.draggable) {\n draggingTarget = draggingTarget.parent;\n }\n if (draggingTarget) {\n this._draggingTarget = draggingTarget;\n draggingTarget.dragging = true;\n this._x = e.offsetX;\n this._y = e.offsetY;\n\n this.dispatchToElement(param(draggingTarget, e), 'dragstart', e.event);\n }\n },\n\n _drag: function (e) {\n var draggingTarget = this._draggingTarget;\n if (draggingTarget) {\n\n var x = e.offsetX;\n var y = e.offsetY;\n\n var dx = x - this._x;\n var dy = y - this._y;\n this._x = x;\n this._y = y;\n\n draggingTarget.drift(dx, dy, e);\n this.dispatchToElement(param(draggingTarget, e), 'drag', e.event);\n\n var dropTarget = this.findHover(x, y, draggingTarget).target;\n var lastDropTarget = this._dropTarget;\n this._dropTarget = dropTarget;\n\n if (draggingTarget !== dropTarget) {\n if (lastDropTarget && dropTarget !== lastDropTarget) {\n this.dispatchToElement(param(lastDropTarget, e), 'dragleave', e.event);\n }\n if (dropTarget && dropTarget !== lastDropTarget) {\n this.dispatchToElement(param(dropTarget, e), 'dragenter', e.event);\n }\n }\n }\n },\n\n _dragEnd: function (e) {\n var draggingTarget = this._draggingTarget;\n\n if (draggingTarget) {\n draggingTarget.dragging = false;\n }\n\n this.dispatchToElement(param(draggingTarget, e), 'dragend', e.event);\n\n if (this._dropTarget) {\n this.dispatchToElement(param(this._dropTarget, e), 'drop', e.event);\n }\n\n this._draggingTarget = null;\n this._dropTarget = null;\n }\n\n};\n\nfunction param(target, e) {\n return {target: target, topTarget: e && e.topTarget};\n}\n\nexport default Draggable;","/**\n * Event Mixin\n * @module zrender/mixin/Eventful\n * @author Kener (@Kener-林峰, kener.linfeng@gmail.com)\n * pissang (https://www.github.com/pissang)\n */\n\nvar arrySlice = Array.prototype.slice;\n\n/**\n * Event dispatcher.\n *\n * @alias module:zrender/mixin/Eventful\n * @constructor\n * @param {Object} [eventProcessor] The object eventProcessor is the scope when\n * `eventProcessor.xxx` called.\n * @param {Function} [eventProcessor.normalizeQuery]\n * param: {string|Object} Raw query.\n * return: {string|Object} Normalized query.\n * @param {Function} [eventProcessor.filter] Event will be dispatched only\n * if it returns `true`.\n * param: {string} eventType\n * param: {string|Object} query\n * return: {boolean}\n * @param {Function} [eventProcessor.afterTrigger] Called after all handlers called.\n * param: {string} eventType\n */\nvar Eventful = function (eventProcessor) {\n this._$handlers = {};\n this._$eventProcessor = eventProcessor;\n};\n\nEventful.prototype = {\n\n constructor: Eventful,\n\n /**\n * The handler can only be triggered once, then removed.\n *\n * @param {string} event The event name.\n * @param {string|Object} [query] Condition used on event filter.\n * @param {Function} handler The event handler.\n * @param {Object} context\n */\n one: function (event, query, handler, context) {\n return on(this, event, query, handler, context, true);\n },\n\n /**\n * Bind a handler.\n *\n * @param {string} event The event name.\n * @param {string|Object} [query] Condition used on event filter.\n * @param {Function} handler The event handler.\n * @param {Object} [context]\n */\n on: function (event, query, handler, context) {\n return on(this, event, query, handler, context, false);\n },\n\n /**\n * Whether any handler has bound.\n *\n * @param {string} event\n * @return {boolean}\n */\n isSilent: function (event) {\n var _h = this._$handlers;\n return !_h[event] || !_h[event].length;\n },\n\n /**\n * Unbind a event.\n *\n * @param {string} [event] The event name.\n * If no `event` input, \"off\" all listeners.\n * @param {Function} [handler] The event handler.\n * If no `handler` input, \"off\" all listeners of the `event`.\n */\n off: function (event, handler) {\n var _h = this._$handlers;\n\n if (!event) {\n this._$handlers = {};\n return this;\n }\n\n if (handler) {\n if (_h[event]) {\n var newList = [];\n for (var i = 0, l = _h[event].length; i < l; i++) {\n if (_h[event][i].h !== handler) {\n newList.push(_h[event][i]);\n }\n }\n _h[event] = newList;\n }\n\n if (_h[event] && _h[event].length === 0) {\n delete _h[event];\n }\n }\n else {\n delete _h[event];\n }\n\n return this;\n },\n\n /**\n * Dispatch a event.\n *\n * @param {string} type The event name.\n */\n trigger: function (type) {\n var _h = this._$handlers[type];\n var eventProcessor = this._$eventProcessor;\n\n if (_h) {\n var args = arguments;\n var argLen = args.length;\n\n if (argLen > 3) {\n args = arrySlice.call(args, 1);\n }\n\n var len = _h.length;\n for (var i = 0; i < len;) {\n var hItem = _h[i];\n if (eventProcessor\n && eventProcessor.filter\n && hItem.query != null\n && !eventProcessor.filter(type, hItem.query)\n ) {\n i++;\n continue;\n }\n\n // Optimize advise from backbone\n switch (argLen) {\n case 1:\n hItem.h.call(hItem.ctx);\n break;\n case 2:\n hItem.h.call(hItem.ctx, args[1]);\n break;\n case 3:\n hItem.h.call(hItem.ctx, args[1], args[2]);\n break;\n default:\n // have more than 2 given arguments\n hItem.h.apply(hItem.ctx, args);\n break;\n }\n\n if (hItem.one) {\n _h.splice(i, 1);\n len--;\n }\n else {\n i++;\n }\n }\n }\n\n eventProcessor && eventProcessor.afterTrigger\n && eventProcessor.afterTrigger(type);\n\n return this;\n },\n\n /**\n * Dispatch a event with context, which is specified at the last parameter.\n *\n * @param {string} type The event name.\n */\n triggerWithContext: function (type) {\n var _h = this._$handlers[type];\n var eventProcessor = this._$eventProcessor;\n\n if (_h) {\n var args = arguments;\n var argLen = args.length;\n\n if (argLen > 4) {\n args = arrySlice.call(args, 1, args.length - 1);\n }\n var ctx = args[args.length - 1];\n\n var len = _h.length;\n for (var i = 0; i < len;) {\n var hItem = _h[i];\n if (eventProcessor\n && eventProcessor.filter\n && hItem.query != null\n && !eventProcessor.filter(type, hItem.query)\n ) {\n i++;\n continue;\n }\n\n // Optimize advise from backbone\n switch (argLen) {\n case 1:\n hItem.h.call(ctx);\n break;\n case 2:\n hItem.h.call(ctx, args[1]);\n break;\n case 3:\n hItem.h.call(ctx, args[1], args[2]);\n break;\n default:\n // have more than 2 given arguments\n hItem.h.apply(ctx, args);\n break;\n }\n\n if (hItem.one) {\n _h.splice(i, 1);\n len--;\n }\n else {\n i++;\n }\n }\n }\n\n eventProcessor && eventProcessor.afterTrigger\n && eventProcessor.afterTrigger(type);\n\n return this;\n }\n};\n\n\nfunction normalizeQuery(host, query) {\n var eventProcessor = host._$eventProcessor;\n if (query != null && eventProcessor && eventProcessor.normalizeQuery) {\n query = eventProcessor.normalizeQuery(query);\n }\n return query;\n}\n\nfunction on(eventful, event, query, handler, context, isOnce) {\n var _h = eventful._$handlers;\n\n if (typeof query === 'function') {\n context = handler;\n handler = query;\n query = null;\n }\n\n if (!handler || !event) {\n return eventful;\n }\n\n query = normalizeQuery(eventful, query);\n\n if (!_h[event]) {\n _h[event] = [];\n }\n\n for (var i = 0; i < _h[event].length; i++) {\n if (_h[event][i].h === handler) {\n return eventful;\n }\n }\n\n var wrap = {\n h: handler,\n one: isOnce,\n query: query,\n ctx: context || eventful,\n // FIXME\n // Do not publish this feature util it is proved that it makes sense.\n callAtLast: handler.zrEventfulCallAtLast\n };\n\n var lastIndex = _h[event].length - 1;\n var lastWrap = _h[event][lastIndex];\n (lastWrap && lastWrap.callAtLast)\n ? _h[event].splice(lastIndex, 0, wrap)\n : _h[event].push(wrap);\n\n return eventful;\n}\n\n// ----------------------\n// The events in zrender\n// ----------------------\n\n/**\n * @event module:zrender/mixin/Eventful#onclick\n * @type {Function}\n * @default null\n */\n/**\n * @event module:zrender/mixin/Eventful#onmouseover\n * @type {Function}\n * @default null\n */\n/**\n * @event module:zrender/mixin/Eventful#onmouseout\n * @type {Function}\n * @default null\n */\n/**\n * @event module:zrender/mixin/Eventful#onmousemove\n * @type {Function}\n * @default null\n */\n/**\n * @event module:zrender/mixin/Eventful#onmousewheel\n * @type {Function}\n * @default null\n */\n/**\n * @event module:zrender/mixin/Eventful#onmousedown\n * @type {Function}\n * @default null\n */\n/**\n * @event module:zrender/mixin/Eventful#onmouseup\n * @type {Function}\n * @default null\n */\n/**\n * @event module:zrender/mixin/Eventful#ondrag\n * @type {Function}\n * @default null\n */\n/**\n * @event module:zrender/mixin/Eventful#ondragstart\n * @type {Function}\n * @default null\n */\n/**\n * @event module:zrender/mixin/Eventful#ondragend\n * @type {Function}\n * @default null\n */\n/**\n * @event module:zrender/mixin/Eventful#ondragenter\n * @type {Function}\n * @default null\n */\n/**\n * @event module:zrender/mixin/Eventful#ondragleave\n * @type {Function}\n * @default null\n */\n/**\n * @event module:zrender/mixin/Eventful#ondragover\n * @type {Function}\n * @default null\n */\n/**\n * @event module:zrender/mixin/Eventful#ondrop\n * @type {Function}\n * @default null\n */\n\nexport default Eventful;","/**\n * The algoritm is learnt from\n * https://franklinta.com/2014/09/08/computing-css-matrix3d-transforms/\n * And we made some optimization for matrix inversion.\n * Other similar approaches:\n * \"cv::getPerspectiveTransform\", \"Direct Linear Transformation\".\n */\n\nvar LN2 = Math.log(2);\n\nfunction determinant(rows, rank, rowStart, rowMask, colMask, detCache) {\n var cacheKey = rowMask + '-' + colMask;\n var fullRank = rows.length;\n\n if (detCache.hasOwnProperty(cacheKey)) {\n return detCache[cacheKey];\n }\n\n if (rank === 1) {\n // In this case the colMask must be like: `11101111`. We can find the place of `0`.\n var colStart = Math.round(Math.log(((1 << fullRank) - 1) & ~colMask) / LN2);\n return rows[rowStart][colStart];\n }\n\n var subRowMask = rowMask | (1 << rowStart);\n var subRowStart = rowStart + 1;\n while (rowMask & (1 << subRowStart)) {\n subRowStart++;\n }\n\n var sum = 0;\n for (var j = 0, colLocalIdx = 0; j < fullRank; j++) {\n var colTag = 1 << j;\n if (!(colTag & colMask)) {\n sum += (colLocalIdx % 2 ? -1 : 1) * rows[rowStart][j]\n // det(subMatrix(0, j))\n * determinant(rows, rank - 1, subRowStart, subRowMask, colMask | colTag, detCache);\n colLocalIdx++;\n }\n }\n\n detCache[cacheKey] = sum;\n\n return sum;\n}\n\n/**\n * Usage:\n * ```js\n * var transformer = buildTransformer(\n * [10, 44, 100, 44, 100, 300, 10, 300],\n * [50, 54, 130, 14, 140, 330, 14, 220]\n * );\n * var out = [];\n * transformer && transformer([11, 33], out);\n * ```\n *\n * Notice: `buildTransformer` may take more than 10ms in some Android device.\n *\n * @param {Array.<number>} src source four points, [x0, y0, x1, y1, x2, y2, x3, y3]\n * @param {Array.<number>} dest destination four points, [x0, y0, x1, y1, x2, y2, x3, y3]\n * @return {Function} transformer If fail, return null/undefined.\n */\nexport function buildTransformer(src, dest) {\n var mA = [\n [src[0], src[1], 1, 0, 0, 0, -dest[0] * src[0], -dest[0] * src[1]],\n [0, 0, 0, src[0], src[1], 1, -dest[1] * src[0], -dest[1] * src[1]],\n [src[2], src[3], 1, 0, 0, 0, -dest[2] * src[2], -dest[2] * src[3]],\n [0, 0, 0, src[2], src[3], 1, -dest[3] * src[2], -dest[3] * src[3]],\n [src[4], src[5], 1, 0, 0, 0, -dest[4] * src[4], -dest[4] * src[5]],\n [0, 0, 0, src[4], src[5], 1, -dest[5] * src[4], -dest[5] * src[5]],\n [src[6], src[7], 1, 0, 0, 0, -dest[6] * src[6], -dest[6] * src[7]],\n [0, 0, 0, src[6], src[7], 1, -dest[7] * src[6], -dest[7] * src[7]]\n ];\n\n var detCache = {};\n var det = determinant(mA, 8, 0, 0, 0, detCache);\n if (det === 0) {\n // can not make transformer when and only when\n // any three of the markers are collinear.\n return;\n }\n\n // `invert(mA) * dest`, that is, `adj(mA) / det * dest`.\n var vh = [];\n for (var i = 0; i < 8; i++) {\n for (var j = 0; j < 8; j++) {\n vh[j] == null && (vh[j] = 0);\n vh[j] += ((i + j) % 2 ? -1 : 1)\n // det(subMatrix(i, j))\n * determinant(mA, 7, i === 0 ? 1 : 0, 1 << i, 1 << j, detCache)\n / det * dest[i];\n }\n }\n\n return function (out, srcPointX, srcPointY) {\n var pk = srcPointX * vh[6] + srcPointY * vh[7] + 1;\n out[0] = (srcPointX * vh[0] + srcPointY * vh[1] + vh[2]) / pk;\n out[1] = (srcPointX * vh[3] + srcPointY * vh[4] + vh[5]) / pk;\n };\n}\n","\nimport env from './env';\nimport {buildTransformer} from './fourPointsTransform';\n\nvar EVENT_SAVED_PROP = '___zrEVENTSAVED';\nvar _calcOut = [];\n\n/**\n * Transform \"local coord\" from `elFrom` to `elTarget`.\n * \"local coord\": the coord based on the input `el`. The origin point is at\n * the position of \"left: 0; top: 0;\" in the `el`.\n *\n * Support when CSS transform is used.\n *\n * Having the `out` (that is, `[outX, outY]`), we can create an DOM element\n * and set the CSS style as \"left: outX; top: outY;\" and append it to `elTarge`\n * to locate the element.\n *\n * For example, this code below positions a child of `document.body` on the event\n * point, no matter whether `body` has `margin`/`paddin`/`transfrom`/... :\n * ```js\n * transformLocalCoord(out, container, document.body, event.offsetX, event.offsetY);\n * if (!eqNaN(out[0])) {\n * // Then locate the tip element on the event point.\n * var tipEl = document.createElement('div');\n * tipEl.style.cssText = 'position: absolute; left:' + out[0] + ';top:' + out[1] + ';';\n * document.body.appendChild(tipEl);\n * }\n * ```\n *\n * Notice: In some env this method is not supported. If called, `out` will be `[NaN, NaN]`.\n *\n * @param {Array.<number>} out [inX: number, inY: number] The output..\n * If can not transform, `out` will not be modified but return `false`.\n * @param {HTMLElement} elFrom The `[inX, inY]` is based on elFrom.\n * @param {HTMLElement} elTarget The `out` is based on elTarget.\n * @param {number} inX\n * @param {number} inY\n * @return {boolean} Whether transform successfully.\n */\nexport function transformLocalCoord(out, elFrom, elTarget, inX, inY) {\n return transformCoordWithViewport(_calcOut, elFrom, inX, inY, true)\n && transformCoordWithViewport(out, elTarget, _calcOut[0], _calcOut[1]);\n}\n\n/**\n * Transform between a \"viewport coord\" and a \"local coord\".\n * \"viewport coord\": the coord based on the left-top corner of the viewport\n * of the browser.\n * \"local coord\": the coord based on the input `el`. The origin point is at\n * the position of \"left: 0; top: 0;\" in the `el`.\n *\n * Support the case when CSS transform is used on el.\n *\n * @param {Array.<number>} out [inX: number, inY: number] The output. If `inverse: false`,\n * it represents \"local coord\", otherwise \"vireport coord\".\n * If can not transform, `out` will not be modified but return `false`.\n * @param {HTMLElement} el The \"local coord\" is based on the `el`, see comment above.\n * @param {number} inX If `inverse: false`,\n * it represents \"vireport coord\", otherwise \"local coord\".\n * @param {number} inY If `inverse: false`,\n * it represents \"vireport coord\", otherwise \"local coord\".\n * @param {boolean} [inverse=false]\n * `true`: from \"viewport coord\" to \"local coord\".\n * `false`: from \"local coord\" to \"viewport coord\".\n * @return {boolean} Whether transform successfully.\n */\nexport function transformCoordWithViewport(out, el, inX, inY, inverse) {\n if (el.getBoundingClientRect && env.domSupported && !isCanvasEl(el)) {\n var saved = el[EVENT_SAVED_PROP] || (el[EVENT_SAVED_PROP] = {});\n var markers = prepareCoordMarkers(el, saved);\n var transformer = preparePointerTransformer(markers, saved, inverse);\n if (transformer) {\n transformer(out, inX, inY);\n return true;\n }\n }\n return false;\n}\n\nfunction prepareCoordMarkers(el, saved) {\n var markers = saved.markers;\n if (markers) {\n return markers;\n }\n\n markers = saved.markers = [];\n var propLR = ['left', 'right'];\n var propTB = ['top', 'bottom'];\n\n for (var i = 0; i < 4; i++) {\n var marker = document.createElement('div');\n var stl = marker.style;\n var idxLR = i % 2;\n var idxTB = (i >> 1) % 2;\n stl.cssText = [\n 'position: absolute',\n 'visibility: hidden',\n 'padding: 0',\n 'margin: 0',\n 'border-width: 0',\n 'user-select: none',\n 'width:0',\n 'height:0',\n // 'width: 5px',\n // 'height: 5px',\n propLR[idxLR] + ':0',\n propTB[idxTB] + ':0',\n propLR[1 - idxLR] + ':auto',\n propTB[1 - idxTB] + ':auto',\n ''\n ].join('!important;');\n el.appendChild(marker);\n markers.push(marker);\n }\n\n return markers;\n}\n\nfunction preparePointerTransformer(markers, saved, inverse) {\n var transformerName = inverse ? 'invTrans' : 'trans';\n var transformer = saved[transformerName];\n var oldSrcCoords = saved.srcCoords;\n var oldCoordTheSame = true;\n var srcCoords = [];\n var destCoords = [];\n\n for (var i = 0; i < 4; i++) {\n var rect = markers[i].getBoundingClientRect();\n var ii = 2 * i;\n var x = rect.left;\n var y = rect.top;\n srcCoords.push(x, y);\n oldCoordTheSame = oldCoordTheSame && oldSrcCoords && x === oldSrcCoords[ii] && y === oldSrcCoords[ii + 1];\n destCoords.push(markers[i].offsetLeft, markers[i].offsetTop);\n }\n // Cache to avoid time consuming of `buildTransformer`.\n return (oldCoordTheSame && transformer)\n ? transformer\n : (\n saved.srcCoords = srcCoords,\n saved[transformerName] = inverse\n ? buildTransformer(destCoords, srcCoords)\n : buildTransformer(srcCoords, destCoords)\n );\n}\n\nexport function isCanvasEl(el) {\n return el.nodeName.toUpperCase() === 'CANVAS';\n}\n","/**\n * Utilities for mouse or touch events.\n */\n\nimport Eventful from '../mixin/Eventful';\nimport env from './env';\nimport {isCanvasEl, transformCoordWithViewport} from './dom';\n\nvar isDomLevel2 = (typeof window !== 'undefined') && !!window.addEventListener;\n\nvar MOUSE_EVENT_REG = /^(?:mouse|pointer|contextmenu|drag|drop)|click/;\nvar _calcOut = [];\n\n/**\n * Get the `zrX` and `zrY`, which are relative to the top-left of\n * the input `el`.\n * CSS transform (2D & 3D) is supported.\n *\n * The strategy to fetch the coords:\n * + If `calculate` is not set as `true`, users of this method should\n * ensure that `el` is the same or the same size & location as `e.target`.\n * Otherwise the result coords are probably not expected. Because we\n * firstly try to get coords from e.offsetX/e.offsetY.\n * + If `calculate` is set as `true`, the input `el` can be any element\n * and we force to calculate the coords based on `el`.\n * + The input `el` should be positionable (not position:static).\n *\n * The force `calculate` can be used in case like:\n * When mousemove event triggered on ec tooltip, `e.target` is not `el`(zr painter.dom).\n *\n * @param {HTMLElement} el DOM element.\n * @param {Event} e Mouse event or touch event.\n * @param {Object} out Get `out.zrX` and `out.zrY` as the result.\n * @param {boolean} [calculate=false] Whether to force calculate\n * the coordinates but not use ones provided by browser.\n */\nexport function clientToLocal(el, e, out, calculate) {\n out = out || {};\n\n // According to the W3C Working Draft, offsetX and offsetY should be relative\n // to the padding edge of the target element. The only browser using this convention\n // is IE. Webkit uses the border edge, Opera uses the content edge, and FireFox does\n // not support the properties.\n // (see http://www.jacklmoore.com/notes/mouse-position/)\n // In zr painter.dom, padding edge equals to border edge.\n\n if (calculate || !env.canvasSupported) {\n calculateZrXY(el, e, out);\n }\n // Caution: In FireFox, layerX/layerY Mouse position relative to the closest positioned\n // ancestor element, so we should make sure el is positioned (e.g., not position:static).\n // BTW1, Webkit don't return the same results as FF in non-simple cases (like add\n // zoom-factor, overflow / opacity layers, transforms ...)\n // BTW2, (ev.offsetY || ev.pageY - $(ev.target).offset().top) is not correct in preserve-3d.\n // <https://bugs.jquery.com/ticket/8523#comment:14>\n // BTW3, In ff, offsetX/offsetY is always 0.\n else if (env.browser.firefox && e.layerX != null && e.layerX !== e.offsetX) {\n out.zrX = e.layerX;\n out.zrY = e.layerY;\n }\n // For IE6+, chrome, safari, opera. (When will ff support offsetX?)\n else if (e.offsetX != null) {\n out.zrX = e.offsetX;\n out.zrY = e.offsetY;\n }\n // For some other device, e.g., IOS safari.\n else {\n calculateZrXY(el, e, out);\n }\n\n return out;\n}\n\nfunction calculateZrXY(el, e, out) {\n // BlackBerry 5, iOS 3 (original iPhone) don't have getBoundingRect.\n if (env.domSupported && el.getBoundingClientRect) {\n var ex = e.clientX;\n var ey = e.clientY;\n\n if (isCanvasEl(el)) {\n // Original approach, which do not support CSS transform.\n // marker can not be locationed in a canvas container\n // (getBoundingClientRect is always 0). We do not support\n // that input a pre-created canvas to zr while using css\n // transform in iOS.\n var box = el.getBoundingClientRect();\n out.zrX = ex - box.left;\n out.zrY = ey - box.top;\n return;\n }\n else {\n if (transformCoordWithViewport(_calcOut, el, ex, ey)) {\n out.zrX = _calcOut[0];\n out.zrY = _calcOut[1];\n return;\n }\n }\n }\n out.zrX = out.zrY = 0;\n}\n\n/**\n * Find native event compat for legency IE.\n * Should be called at the begining of a native event listener.\n *\n * @param {Event} [e] Mouse event or touch event or pointer event.\n * For lagency IE, we use `window.event` is used.\n * @return {Event} The native event.\n */\nexport function getNativeEvent(e) {\n return e || window.event;\n}\n\n/**\n * Normalize the coordinates of the input event.\n *\n * Get the `e.zrX` and `e.zrY`, which are relative to the top-left of\n * the input `el`.\n * Get `e.zrDelta` if using mouse wheel.\n * Get `e.which`, see the comment inside this function.\n *\n * Do not calculate repeatly if `zrX` and `zrY` already exist.\n *\n * Notice: see comments in `clientToLocal`. check the relationship\n * between the result coords and the parameters `el` and `calculate`.\n *\n * @param {HTMLElement} el DOM element.\n * @param {Event} [e] See `getNativeEvent`.\n * @param {boolean} [calculate=false] Whether to force calculate\n * the coordinates but not use ones provided by browser.\n * @return {UIEvent} The normalized native UIEvent.\n */\nexport function normalizeEvent(el, e, calculate) {\n\n e = getNativeEvent(e);\n\n if (e.zrX != null) {\n return e;\n }\n\n var eventType = e.type;\n var isTouch = eventType && eventType.indexOf('touch') >= 0;\n\n if (!isTouch) {\n clientToLocal(el, e, e, calculate);\n e.zrDelta = (e.wheelDelta) ? e.wheelDelta / 120 : -(e.detail || 0) / 3;\n }\n else {\n var touch = eventType !== 'touchend'\n ? e.targetTouches[0]\n : e.changedTouches[0];\n touch && clientToLocal(el, touch, e, calculate);\n }\n\n // Add which for click: 1 === left; 2 === middle; 3 === right; otherwise: 0;\n // See jQuery: https://github.com/jquery/jquery/blob/master/src/event.js\n // If e.which has been defined, it may be readonly,\n // see: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/which\n var button = e.button;\n if (e.which == null && button !== undefined && MOUSE_EVENT_REG.test(e.type)) {\n e.which = (button & 1 ? 1 : (button & 2 ? 3 : (button & 4 ? 2 : 0)));\n }\n // [Caution]: `e.which` from browser is not always reliable. For example,\n // when press left button and `mousemove (pointermove)` in Edge, the `e.which`\n // is 65536 and the `e.button` is -1. But the `mouseup (pointerup)` and\n // `mousedown (pointerdown)` is the same as Chrome does.\n\n return e;\n}\n\n/**\n * @param {HTMLElement} el\n * @param {string} name\n * @param {Function} handler\n * @param {Object|boolean} opt If boolean, means `opt.capture`\n * @param {boolean} [opt.capture=false]\n * @param {boolean} [opt.passive=false]\n */\nexport function addEventListener(el, name, handler, opt) {\n if (isDomLevel2) {\n // Reproduct the console warning:\n // [Violation] Added non-passive event listener to a scroll-blocking <some> event.\n // Consider marking event handler as 'passive' to make the page more responsive.\n // Just set console log level: verbose in chrome dev tool.\n // then the warning log will be printed when addEventListener called.\n // See https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n // We have not yet found a neat way to using passive. Because in zrender the dom event\n // listener delegate all of the upper events of element. Some of those events need\n // to prevent default. For example, the feature `preventDefaultMouseMove` of echarts.\n // Before passive can be adopted, these issues should be considered:\n // (1) Whether and how a zrender user specifies an event listener passive. And by default,\n // passive or not.\n // (2) How to tread that some zrender event listener is passive, and some is not. If\n // we use other way but not preventDefault of mousewheel and touchmove, browser\n // compatibility should be handled.\n\n // var opts = (env.passiveSupported && name === 'mousewheel')\n // ? {passive: true}\n // // By default, the third param of el.addEventListener is `capture: false`.\n // : void 0;\n // el.addEventListener(name, handler /* , opts */);\n el.addEventListener(name, handler, opt);\n }\n else {\n // For simplicity, do not implement `setCapture` for IE9-.\n el.attachEvent('on' + name, handler);\n }\n}\n\n/**\n * Parameter are the same as `addEventListener`.\n *\n * Notice that if a listener is registered twice, one with capture and one without,\n * remove each one separately. Removal of a capturing listener does not affect a\n * non-capturing version of the same listener, and vice versa.\n */\nexport function removeEventListener(el, name, handler, opt) {\n if (isDomLevel2) {\n el.removeEventListener(name, handler, opt);\n }\n else {\n el.detachEvent('on' + name, handler);\n }\n}\n\n/**\n * preventDefault and stopPropagation.\n * Notice: do not use this method in zrender. It can only be\n * used by upper applications if necessary.\n *\n * @param {Event} e A mouse or touch event.\n */\nexport var stop = isDomLevel2\n ? function (e) {\n e.preventDefault();\n e.stopPropagation();\n e.cancelBubble = true;\n }\n : function (e) {\n e.returnValue = false;\n e.cancelBubble = true;\n };\n\n/**\n * This method only works for mouseup and mousedown. The functionality is restricted\n * for fault tolerance, See the `e.which` compatibility above.\n *\n * @param {MouseEvent} e\n * @return {boolean}\n */\nexport function isMiddleOrRightButtonOnMouseUpDown(e) {\n return e.which === 2 || e.which === 3;\n}\n\n/**\n * To be removed.\n * @deprecated\n */\nexport function notLeftMouse(e) {\n // If e.which is undefined, considered as left mouse event.\n return e.which > 1;\n}\n\n\n// For backward compatibility\nexport {Eventful as Dispatcher};\n","/**\n * Only implements needed gestures for mobile.\n */\n\nimport * as eventUtil from './event';\n\nvar GestureMgr = function () {\n\n /**\n * @private\n * @type {Array.<Object>}\n */\n this._track = [];\n};\n\nGestureMgr.prototype = {\n\n constructor: GestureMgr,\n\n recognize: function (event, target, root) {\n this._doTrack(event, target, root);\n return this._recognize(event);\n },\n\n clear: function () {\n this._track.length = 0;\n return this;\n },\n\n _doTrack: function (event, target, root) {\n var touches = event.touches;\n\n if (!touches) {\n return;\n }\n\n var trackItem = {\n points: [],\n touches: [],\n target: target,\n event: event\n };\n\n for (var i = 0, len = touches.length; i < len; i++) {\n var touch = touches[i];\n var pos = eventUtil.clientToLocal(root, touch, {});\n trackItem.points.push([pos.zrX, pos.zrY]);\n trackItem.touches.push(touch);\n }\n\n this._track.push(trackItem);\n },\n\n _recognize: function (event) {\n for (var eventName in recognizers) {\n if (recognizers.hasOwnProperty(eventName)) {\n var gestureInfo = recognizers[eventName](this._track, event);\n if (gestureInfo) {\n return gestureInfo;\n }\n }\n }\n }\n};\n\nfunction dist(pointPair) {\n var dx = pointPair[1][0] - pointPair[0][0];\n var dy = pointPair[1][1] - pointPair[0][1];\n\n return Math.sqrt(dx * dx + dy * dy);\n}\n\nfunction center(pointPair) {\n return [\n (pointPair[0][0] + pointPair[1][0]) / 2,\n (pointPair[0][1] + pointPair[1][1]) / 2\n ];\n}\n\nvar recognizers = {\n\n pinch: function (track, event) {\n var trackLen = track.length;\n\n if (!trackLen) {\n return;\n }\n\n var pinchEnd = (track[trackLen - 1] || {}).points;\n var pinchPre = (track[trackLen - 2] || {}).points || pinchEnd;\n\n if (pinchPre\n && pinchPre.length > 1\n && pinchEnd\n && pinchEnd.length > 1\n ) {\n var pinchScale = dist(pinchEnd) / dist(pinchPre);\n !isFinite(pinchScale) && (pinchScale = 1);\n\n event.pinchScale = pinchScale;\n\n var pinchCenter = center(pinchEnd);\n event.pinchX = pinchCenter[0];\n event.pinchY = pinchCenter[1];\n\n return {\n type: 'pinch',\n target: track[0].target,\n event: event\n };\n }\n }\n\n // Only pinch currently.\n};\n\nexport default GestureMgr;","import * as util from './core/util';\nimport * as vec2 from './core/vector';\nimport Draggable from './mixin/Draggable';\nimport Eventful from './mixin/Eventful';\nimport * as eventTool from './core/event';\nimport GestureMgr from './core/GestureMgr';\n\n\n/**\n * [The interface between `Handler` and `HandlerProxy`]:\n *\n * The default `HandlerProxy` only support the common standard web environment\n * (e.g., standalone browser, headless browser, embed browser in mobild APP, ...).\n * But `HandlerProxy` can be replaced to support more non-standard environment\n * (e.g., mini app), or to support more feature that the default `HandlerProxy`\n * not provided (like echarts-gl did).\n * So the interface between `Handler` and `HandlerProxy` should be stable. Do not\n * make break changes util inevitable. The interface include the public methods\n * of `Handler` and the events listed in `handlerNames` below, by which `HandlerProxy`\n * drives `Handler`.\n */\n\n/**\n * [Drag outside]:\n *\n * That is, triggering `mousemove` and `mouseup` event when the pointer is out of the\n * zrender area when dragging. That is important for the improvement of the user experience\n * when dragging something near the boundary without being terminated unexpectedly.\n *\n * We originally consider to introduce new events like `pagemovemove` and `pagemouseup`\n * to resolve this issue. But some drawbacks of it is described in\n * https://github.com/ecomfe/zrender/pull/536#issuecomment-560286899\n *\n * Instead, we referenced the specifications:\n * https://www.w3.org/TR/touch-events/#the-touchmove-event\n * https://www.w3.org/TR/2014/WD-DOM-Level-3-Events-20140925/#event-type-mousemove\n * where the the mousemove/touchmove can be continue to fire if the user began a drag\n * operation and the pointer has left the boundary. (for the mouse event, browsers\n * only do it on `document` and when the pointer has left the boundary of the browser.)\n *\n * So the default `HandlerProxy` supports this feature similarly: if it is in the dragging\n * state (see `pointerCapture` in `HandlerProxy`), the `mousemove` and `mouseup` continue\n * to fire until release the pointer. That is implemented by listen to those event on\n * `document`.\n * If we implement some other `HandlerProxy` only for touch device, that would be easier.\n * The touch event support this feature by default.\n *\n * Note:\n * There might be some cases that the mouse event can not be\n * received on `document`. For example,\n * (A) `useCapture` is not supported and some user defined event listeners on the ancestor\n * of zr dom throw Error .\n * (B) `useCapture` is not supported Some user defined event listeners on the ancestor of\n * zr dom call `stopPropagation`.\n * In these cases, the `mousemove` event might be keep triggered event\n * if the mouse is released. We try to reduce the side-effect in those cases.\n * That is, do nothing (especially, `findHover`) in those cases. See `isOutsideBoundary`.\n *\n * Note:\n * If `HandlerProxy` listens to `document` with `useCapture`, `HandlerProxy` needs to\n * make sure `stopPropagation` and `preventDefault` doing nothing if and only if the event\n * target is not zrender dom. Becuase it is dangerous to enable users to call them in\n * `document` capture phase to prevent the propagation to any listener of the webpage.\n * But they are needed to work when the pointer inside the zrender dom.\n */\n\n\nvar SILENT = 'silent';\n\nfunction makeEventPacket(eveType, targetInfo, event) {\n return {\n type: eveType,\n event: event,\n // target can only be an element that is not silent.\n target: targetInfo.target,\n // topTarget can be a silent element.\n topTarget: targetInfo.topTarget,\n cancelBubble: false,\n offsetX: event.zrX,\n offsetY: event.zrY,\n gestureEvent: event.gestureEvent,\n pinchX: event.pinchX,\n pinchY: event.pinchY,\n pinchScale: event.pinchScale,\n wheelDelta: event.zrDelta,\n zrByTouch: event.zrByTouch,\n which: event.which,\n stop: stopEvent\n };\n}\n\nfunction stopEvent() {\n eventTool.stop(this.event);\n}\n\nfunction EmptyProxy() {}\nEmptyProxy.prototype.dispose = function () {};\n\n\nvar handlerNames = [\n 'click', 'dblclick', 'mousewheel', 'mouseout',\n 'mouseup', 'mousedown', 'mousemove', 'contextmenu'\n];\n\n/**\n * @alias module:zrender/Handler\n * @constructor\n * @extends module:zrender/mixin/Eventful\n * @param {module:zrender/Storage} storage Storage instance.\n * @param {module:zrender/Painter} painter Painter instance.\n * @param {module:zrender/dom/HandlerProxy} proxy HandlerProxy instance.\n * @param {HTMLElement} painterRoot painter.root (not painter.getViewportRoot()).\n */\nvar Handler = function (storage, painter, proxy, painterRoot) {\n Eventful.call(this);\n\n this.storage = storage;\n\n this.painter = painter;\n\n this.painterRoot = painterRoot;\n\n proxy = proxy || new EmptyProxy();\n\n /**\n * Proxy of event. can be Dom, WebGLSurface, etc.\n */\n this.proxy = null;\n\n /**\n * {target, topTarget, x, y}\n * @private\n * @type {Object}\n */\n this._hovered = {};\n\n /**\n * @private\n * @type {Date}\n */\n this._lastTouchMoment;\n\n /**\n * @private\n * @type {number}\n */\n this._lastX;\n\n /**\n * @private\n * @type {number}\n */\n this._lastY;\n\n /**\n * @private\n * @type {module:zrender/core/GestureMgr}\n */\n this._gestureMgr;\n\n Draggable.call(this);\n\n this.setHandlerProxy(proxy);\n};\n\nHandler.prototype = {\n\n constructor: Handler,\n\n setHandlerProxy: function (proxy) {\n if (this.proxy) {\n this.proxy.dispose();\n }\n\n if (proxy) {\n util.each(handlerNames, function (name) {\n proxy.on && proxy.on(name, this[name], this);\n }, this);\n // Attach handler\n proxy.handler = this;\n }\n this.proxy = proxy;\n },\n\n mousemove: function (event) {\n var x = event.zrX;\n var y = event.zrY;\n\n var isOutside = isOutsideBoundary(this, x, y);\n\n var lastHovered = this._hovered;\n var lastHoveredTarget = lastHovered.target;\n\n // If lastHoveredTarget is removed from zr (detected by '__zr') by some API call\n // (like 'setOption' or 'dispatchAction') in event handlers, we should find\n // lastHovered again here. Otherwise 'mouseout' can not be triggered normally.\n // See #6198.\n if (lastHoveredTarget && !lastHoveredTarget.__zr) {\n lastHovered = this.findHover(lastHovered.x, lastHovered.y);\n lastHoveredTarget = lastHovered.target;\n }\n\n var hovered = this._hovered = isOutside ? {x: x, y: y} : this.findHover(x, y);\n var hoveredTarget = hovered.target;\n\n var proxy = this.proxy;\n proxy.setCursor && proxy.setCursor(hoveredTarget ? hoveredTarget.cursor : 'default');\n\n // Mouse out on previous hovered element\n if (lastHoveredTarget && hoveredTarget !== lastHoveredTarget) {\n this.dispatchToElement(lastHovered, 'mouseout', event);\n }\n\n // Mouse moving on one element\n this.dispatchToElement(hovered, 'mousemove', event);\n\n // Mouse over on a new element\n if (hoveredTarget && hoveredTarget !== lastHoveredTarget) {\n this.dispatchToElement(hovered, 'mouseover', event);\n }\n },\n\n mouseout: function (event) {\n var eventControl = event.zrEventControl;\n var zrIsToLocalDOM = event.zrIsToLocalDOM;\n\n if (eventControl !== 'only_globalout') {\n this.dispatchToElement(this._hovered, 'mouseout', event);\n }\n\n if (eventControl !== 'no_globalout') {\n // FIXME: if the pointer moving from the extra doms to realy \"outside\",\n // the `globalout` should have been triggered. But currently not.\n !zrIsToLocalDOM && this.trigger('globalout', {type: 'globalout', event: event});\n }\n },\n\n /**\n * Resize\n */\n resize: function (event) {\n this._hovered = {};\n },\n\n /**\n * Dispatch event\n * @param {string} eventName\n * @param {event=} eventArgs\n */\n dispatch: function (eventName, eventArgs) {\n var handler = this[eventName];\n handler && handler.call(this, eventArgs);\n },\n\n /**\n * Dispose\n */\n dispose: function () {\n\n this.proxy.dispose();\n\n this.storage =\n this.proxy =\n this.painter = null;\n },\n\n /**\n * 设置默认的cursor style\n * @param {string} [cursorStyle='default'] 例如 crosshair\n */\n setCursorStyle: function (cursorStyle) {\n var proxy = this.proxy;\n proxy.setCursor && proxy.setCursor(cursorStyle);\n },\n\n /**\n * 事件分发代理\n *\n * @private\n * @param {Object} targetInfo {target, topTarget} 目标图形元素\n * @param {string} eventName 事件名称\n * @param {Object} event 事件对象\n */\n dispatchToElement: function (targetInfo, eventName, event) {\n targetInfo = targetInfo || {};\n var el = targetInfo.target;\n if (el && el.silent) {\n return;\n }\n var eventHandler = 'on' + eventName;\n var eventPacket = makeEventPacket(eventName, targetInfo, event);\n\n while (el) {\n el[eventHandler]\n && (eventPacket.cancelBubble = el[eventHandler].call(el, eventPacket));\n\n el.trigger(eventName, eventPacket);\n\n el = el.parent;\n\n if (eventPacket.cancelBubble) {\n break;\n }\n }\n\n if (!eventPacket.cancelBubble) {\n // 冒泡到顶级 zrender 对象\n this.trigger(eventName, eventPacket);\n // 分发事件到用户自定义层\n // 用户有可能在全局 click 事件中 dispose所以需要判断下 painter 是否存在\n this.painter && this.painter.eachOtherLayer(function (layer) {\n if (typeof (layer[eventHandler]) === 'function') {\n layer[eventHandler].call(layer, eventPacket);\n }\n if (layer.trigger) {\n layer.trigger(eventName, eventPacket);\n }\n });\n }\n },\n\n /**\n * @private\n * @param {number} x\n * @param {number} y\n * @param {module:zrender/graphic/Displayable} exclude\n * @return {model:zrender/Element}\n * @method\n */\n findHover: function (x, y, exclude) {\n var list = this.storage.getDisplayList();\n var out = {x: x, y: y};\n\n for (var i = list.length - 1; i >= 0; i--) {\n var hoverCheckResult;\n if (list[i] !== exclude\n // getDisplayList may include ignored item in VML mode\n && !list[i].ignore\n && (hoverCheckResult = isHover(list[i], x, y))\n ) {\n !out.topTarget && (out.topTarget = list[i]);\n if (hoverCheckResult !== SILENT) {\n out.target = list[i];\n break;\n }\n }\n }\n\n return out;\n },\n\n processGesture: function (event, stage) {\n if (!this._gestureMgr) {\n this._gestureMgr = new GestureMgr();\n }\n var gestureMgr = this._gestureMgr;\n\n stage === 'start' && gestureMgr.clear();\n\n var gestureInfo = gestureMgr.recognize(\n event,\n this.findHover(event.zrX, event.zrY, null).target,\n this.proxy.dom\n );\n\n stage === 'end' && gestureMgr.clear();\n\n // Do not do any preventDefault here. Upper application do that if necessary.\n if (gestureInfo) {\n var type = gestureInfo.type;\n event.gestureEvent = type;\n\n this.dispatchToElement({target: gestureInfo.target}, type, gestureInfo.event);\n }\n }\n};\n\n// Common handlers\nutil.each(['click', 'mousedown', 'mouseup', 'mousewheel', 'dblclick', 'contextmenu'], function (name) {\n Handler.prototype[name] = function (event) {\n var x = event.zrX;\n var y = event.zrY;\n var isOutside = isOutsideBoundary(this, x, y);\n\n var hovered;\n var hoveredTarget;\n\n if (name !== 'mouseup' || !isOutside) {\n // Find hover again to avoid click event is dispatched manually. Or click is triggered without mouseover\n hovered = this.findHover(x, y);\n hoveredTarget = hovered.target;\n }\n\n if (name === 'mousedown') {\n this._downEl = hoveredTarget;\n this._downPoint = [event.zrX, event.zrY];\n // In case click triggered before mouseup\n this._upEl = hoveredTarget;\n }\n else if (name === 'mouseup') {\n this._upEl = hoveredTarget;\n }\n else if (name === 'click') {\n if (this._downEl !== this._upEl\n // Original click event is triggered on the whole canvas element,\n // including the case that `mousedown` - `mousemove` - `mouseup`,\n // which should be filtered, otherwise it will bring trouble to\n // pan and zoom.\n || !this._downPoint\n // Arbitrary value\n || vec2.dist(this._downPoint, [event.zrX, event.zrY]) > 4\n ) {\n return;\n }\n this._downPoint = null;\n }\n\n this.dispatchToElement(hovered, name, event);\n };\n});\n\nfunction isHover(displayable, x, y) {\n if (displayable[displayable.rectHover ? 'rectContain' : 'contain'](x, y)) {\n var el = displayable;\n var isSilent;\n while (el) {\n // If clipped by ancestor.\n // FIXME: If clipPath has neither stroke nor fill,\n // el.clipPath.contain(x, y) will always return false.\n if (el.clipPath && !el.clipPath.contain(x, y)) {\n return false;\n }\n if (el.silent) {\n isSilent = true;\n }\n el = el.parent;\n }\n return isSilent ? SILENT : true;\n }\n\n return false;\n}\n\n/**\n * See [Drag outside].\n */\nfunction isOutsideBoundary(handlerInstance, x, y) {\n var painter = handlerInstance.painter;\n return x < 0 || x > painter.getWidth() || y < 0 || y > painter.getHeight();\n}\n\nutil.mixin(Handler, Eventful);\nutil.mixin(Handler, Draggable);\n\nexport default Handler;\n","/**\n * 3x2矩阵操作类\n * @exports zrender/tool/matrix\n */\n\n/* global Float32Array */\n\nvar ArrayCtor = typeof Float32Array === 'undefined'\n ? Array\n : Float32Array;\n\n/**\n * Create a identity matrix.\n * @return {Float32Array|Array.<number>}\n */\nexport function create() {\n var out = new ArrayCtor(6);\n identity(out);\n\n return out;\n}\n\n/**\n * 设置矩阵为单位矩阵\n * @param {Float32Array|Array.<number>} out\n */\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n return out;\n}\n\n/**\n * 复制矩阵\n * @param {Float32Array|Array.<number>} out\n * @param {Float32Array|Array.<number>} m\n */\nexport function copy(out, m) {\n out[0] = m[0];\n out[1] = m[1];\n out[2] = m[2];\n out[3] = m[3];\n out[4] = m[4];\n out[5] = m[5];\n return out;\n}\n\n/**\n * 矩阵相乘\n * @param {Float32Array|Array.<number>} out\n * @param {Float32Array|Array.<number>} m1\n * @param {Float32Array|Array.<number>} m2\n */\nexport function mul(out, m1, m2) {\n // Consider matrix.mul(m, m2, m);\n // where out is the same as m2.\n // So use temp variable to escape error.\n var out0 = m1[0] * m2[0] + m1[2] * m2[1];\n var out1 = m1[1] * m2[0] + m1[3] * m2[1];\n var out2 = m1[0] * m2[2] + m1[2] * m2[3];\n var out3 = m1[1] * m2[2] + m1[3] * m2[3];\n var out4 = m1[0] * m2[4] + m1[2] * m2[5] + m1[4];\n var out5 = m1[1] * m2[4] + m1[3] * m2[5] + m1[5];\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = out3;\n out[4] = out4;\n out[5] = out5;\n return out;\n}\n\n/**\n * 平移变换\n * @param {Float32Array|Array.<number>} out\n * @param {Float32Array|Array.<number>} a\n * @param {Float32Array|Array.<number>} v\n */\nexport function translate(out, a, v) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4] + v[0];\n out[5] = a[5] + v[1];\n return out;\n}\n\n/**\n * 旋转变换\n * @param {Float32Array|Array.<number>} out\n * @param {Float32Array|Array.<number>} a\n * @param {number} rad\n */\nexport function rotate(out, a, rad) {\n var aa = a[0];\n var ac = a[2];\n var atx = a[4];\n var ab = a[1];\n var ad = a[3];\n var aty = a[5];\n var st = Math.sin(rad);\n var ct = Math.cos(rad);\n\n out[0] = aa * ct + ab * st;\n out[1] = -aa * st + ab * ct;\n out[2] = ac * ct + ad * st;\n out[3] = -ac * st + ct * ad;\n out[4] = ct * atx + st * aty;\n out[5] = ct * aty - st * atx;\n return out;\n}\n\n/**\n * 缩放变换\n * @param {Float32Array|Array.<number>} out\n * @param {Float32Array|Array.<number>} a\n * @param {Float32Array|Array.<number>} v\n */\nexport function scale(out, a, v) {\n var vx = v[0];\n var vy = v[1];\n out[0] = a[0] * vx;\n out[1] = a[1] * vy;\n out[2] = a[2] * vx;\n out[3] = a[3] * vy;\n out[4] = a[4] * vx;\n out[5] = a[5] * vy;\n return out;\n}\n\n/**\n * 求逆矩阵\n * @param {Float32Array|Array.<number>} out\n * @param {Float32Array|Array.<number>} a\n */\nexport function invert(out, a) {\n\n var aa = a[0];\n var ac = a[2];\n var atx = a[4];\n var ab = a[1];\n var ad = a[3];\n var aty = a[5];\n\n var det = aa * ad - ab * ac;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n\n out[0] = ad * det;\n out[1] = -ab * det;\n out[2] = -ac * det;\n out[3] = aa * det;\n out[4] = (ac * aty - ad * atx) * det;\n out[5] = (ab * atx - aa * aty) * det;\n return out;\n}\n\n/**\n * Clone a new matrix.\n * @param {Float32Array|Array.<number>} a\n */\nexport function clone(a) {\n var b = create();\n copy(b, a);\n return b;\n}","/**\n * 提供变换扩展\n * @module zrender/mixin/Transformable\n * @author pissang (https://www.github.com/pissang)\n */\n\nimport * as matrix from '../core/matrix';\nimport * as vector from '../core/vector';\n\nvar mIdentity = matrix.identity;\n\nvar EPSILON = 5e-5;\n\nfunction isNotAroundZero(val) {\n return val > EPSILON || val < -EPSILON;\n}\n\n/**\n * @alias module:zrender/mixin/Transformable\n * @constructor\n */\nvar Transformable = function (opts) {\n opts = opts || {};\n // If there are no given position, rotation, scale\n if (!opts.position) {\n /**\n * 平移\n * @type {Array.<number>}\n * @default [0, 0]\n */\n this.position = [0, 0];\n }\n if (opts.rotation == null) {\n /**\n * 旋转\n * @type {Array.<number>}\n * @default 0\n */\n this.rotation = 0;\n }\n if (!opts.scale) {\n /**\n * 缩放\n * @type {Array.<number>}\n * @default [1, 1]\n */\n this.scale = [1, 1];\n }\n /**\n * 旋转和缩放的原点\n * @type {Array.<number>}\n * @default null\n */\n this.origin = this.origin || null;\n};\n\nvar transformableProto = Transformable.prototype;\ntransformableProto.transform = null;\n\n/**\n * 判断是否需要有坐标变换\n * 如果有坐标变换, 则从position, rotation, scale以及父节点的transform计算出自身的transform矩阵\n */\ntransformableProto.needLocalTransform = function () {\n return isNotAroundZero(this.rotation)\n || isNotAroundZero(this.position[0])\n || isNotAroundZero(this.position[1])\n || isNotAroundZero(this.scale[0] - 1)\n || isNotAroundZero(this.scale[1] - 1);\n};\n\nvar scaleTmp = [];\ntransformableProto.updateTransform = function () {\n var parent = this.parent;\n var parentHasTransform = parent && parent.transform;\n var needLocalTransform = this.needLocalTransform();\n\n var m = this.transform;\n if (!(needLocalTransform || parentHasTransform)) {\n m && mIdentity(m);\n return;\n }\n\n m = m || matrix.create();\n\n if (needLocalTransform) {\n this.getLocalTransform(m);\n }\n else {\n mIdentity(m);\n }\n\n // 应用父节点变换\n if (parentHasTransform) {\n if (needLocalTransform) {\n matrix.mul(m, parent.transform, m);\n }\n else {\n matrix.copy(m, parent.transform);\n }\n }\n // 保存这个变换矩阵\n this.transform = m;\n\n var globalScaleRatio = this.globalScaleRatio;\n if (globalScaleRatio != null && globalScaleRatio !== 1) {\n this.getGlobalScale(scaleTmp);\n var relX = scaleTmp[0] < 0 ? -1 : 1;\n var relY = scaleTmp[1] < 0 ? -1 : 1;\n var sx = ((scaleTmp[0] - relX) * globalScaleRatio + relX) / scaleTmp[0] || 0;\n var sy = ((scaleTmp[1] - relY) * globalScaleRatio + relY) / scaleTmp[1] || 0;\n\n m[0] *= sx;\n m[1] *= sx;\n m[2] *= sy;\n m[3] *= sy;\n }\n\n this.invTransform = this.invTransform || matrix.create();\n matrix.invert(this.invTransform, m);\n};\n\ntransformableProto.getLocalTransform = function (m) {\n return Transformable.getLocalTransform(this, m);\n};\n\n/**\n * 将自己的transform应用到context上\n * @param {CanvasRenderingContext2D} ctx\n */\ntransformableProto.setTransform = function (ctx) {\n var m = this.transform;\n var dpr = ctx.dpr || 1;\n if (m) {\n ctx.setTransform(dpr * m[0], dpr * m[1], dpr * m[2], dpr * m[3], dpr * m[4], dpr * m[5]);\n }\n else {\n ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n }\n};\n\ntransformableProto.restoreTransform = function (ctx) {\n var dpr = ctx.dpr || 1;\n ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n};\n\nvar tmpTransform = [];\nvar originTransform = matrix.create();\n\ntransformableProto.setLocalTransform = function (m) {\n if (!m) {\n // TODO return or set identity?\n return;\n }\n var sx = m[0] * m[0] + m[1] * m[1];\n var sy = m[2] * m[2] + m[3] * m[3];\n var position = this.position;\n var scale = this.scale;\n if (isNotAroundZero(sx - 1)) {\n sx = Math.sqrt(sx);\n }\n if (isNotAroundZero(sy - 1)) {\n sy = Math.sqrt(sy);\n }\n if (m[0] < 0) {\n sx = -sx;\n }\n if (m[3] < 0) {\n sy = -sy;\n }\n\n position[0] = m[4];\n position[1] = m[5];\n scale[0] = sx;\n scale[1] = sy;\n this.rotation = Math.atan2(-m[1] / sy, m[0] / sx);\n};\n/**\n * 分解`transform`矩阵到`position`, `rotation`, `scale`\n */\ntransformableProto.decomposeTransform = function () {\n if (!this.transform) {\n return;\n }\n var parent = this.parent;\n var m = this.transform;\n if (parent && parent.transform) {\n // Get local transform and decompose them to position, scale, rotation\n matrix.mul(tmpTransform, parent.invTransform, m);\n m = tmpTransform;\n }\n var origin = this.origin;\n if (origin && (origin[0] || origin[1])) {\n originTransform[4] = origin[0];\n originTransform[5] = origin[1];\n matrix.mul(tmpTransform, m, originTransform);\n tmpTransform[4] -= origin[0];\n tmpTransform[5] -= origin[1];\n m = tmpTransform;\n }\n\n this.setLocalTransform(m);\n};\n\n/**\n * Get global scale\n * @return {Array.<number>}\n */\ntransformableProto.getGlobalScale = function (out) {\n var m = this.transform;\n out = out || [];\n if (!m) {\n out[0] = 1;\n out[1] = 1;\n return out;\n }\n out[0] = Math.sqrt(m[0] * m[0] + m[1] * m[1]);\n out[1] = Math.sqrt(m[2] * m[2] + m[3] * m[3]);\n if (m[0] < 0) {\n out[0] = -out[0];\n }\n if (m[3] < 0) {\n out[1] = -out[1];\n }\n return out;\n};\n/**\n * 变换坐标位置到 shape 的局部坐标空间\n * @method\n * @param {number} x\n * @param {number} y\n * @return {Array.<number>}\n */\ntransformableProto.transformCoordToLocal = function (x, y) {\n var v2 = [x, y];\n var invTransform = this.invTransform;\n if (invTransform) {\n vector.applyTransform(v2, v2, invTransform);\n }\n return v2;\n};\n\n/**\n * 变换局部坐标位置到全局坐标空间\n * @method\n * @param {number} x\n * @param {number} y\n * @return {Array.<number>}\n */\ntransformableProto.transformCoordToGlobal = function (x, y) {\n var v2 = [x, y];\n var transform = this.transform;\n if (transform) {\n vector.applyTransform(v2, v2, transform);\n }\n return v2;\n};\n\n/**\n * @static\n * @param {Object} target\n * @param {Array.<number>} target.origin\n * @param {number} target.rotation\n * @param {Array.<number>} target.position\n * @param {Array.<number>} [m]\n */\nTransformable.getLocalTransform = function (target, m) {\n m = m || [];\n mIdentity(m);\n\n var origin = target.origin;\n var scale = target.scale || [1, 1];\n var rotation = target.rotation || 0;\n var position = target.position || [0, 0];\n\n if (origin) {\n // Translate to origin\n m[4] -= origin[0];\n m[5] -= origin[1];\n }\n matrix.scale(m, m, scale);\n if (rotation) {\n matrix.rotate(m, m, rotation);\n }\n if (origin) {\n // Translate back from origin\n m[4] += origin[0];\n m[5] += origin[1];\n }\n\n m[4] += position[0];\n m[5] += position[1];\n\n return m;\n};\n\nexport default Transformable;","/**\n * 缓动代码来自 https://github.com/sole/tween.js/blob/master/src/Tween.js\n * @see http://sole.github.io/tween.js/examples/03_graphs.html\n * @exports zrender/animation/easing\n */\nvar easing = {\n /**\n * @param {number} k\n * @return {number}\n */\n linear: function (k) {\n return k;\n },\n\n /**\n * @param {number} k\n * @return {number}\n */\n quadraticIn: function (k) {\n return k * k;\n },\n /**\n * @param {number} k\n * @return {number}\n */\n quadraticOut: function (k) {\n return k * (2 - k);\n },\n /**\n * @param {number} k\n * @return {number}\n */\n quadraticInOut: function (k) {\n if ((k *= 2) < 1) {\n return 0.5 * k * k;\n }\n return -0.5 * (--k * (k - 2) - 1);\n },\n\n // 三次方的缓动t^3\n /**\n * @param {number} k\n * @return {number}\n */\n cubicIn: function (k) {\n return k * k * k;\n },\n /**\n * @param {number} k\n * @return {number}\n */\n cubicOut: function (k) {\n return --k * k * k + 1;\n },\n /**\n * @param {number} k\n * @return {number}\n */\n cubicInOut: function (k) {\n if ((k *= 2) < 1) {\n return 0.5 * k * k * k;\n }\n return 0.5 * ((k -= 2) * k * k + 2);\n },\n\n // 四次方的缓动t^4\n /**\n * @param {number} k\n * @return {number}\n */\n quarticIn: function (k) {\n return k * k * k * k;\n },\n /**\n * @param {number} k\n * @return {number}\n */\n quarticOut: function (k) {\n return 1 - (--k * k * k * k);\n },\n /**\n * @param {number} k\n * @return {number}\n */\n quarticInOut: function (k) {\n if ((k *= 2) < 1) {\n return 0.5 * k * k * k * k;\n }\n return -0.5 * ((k -= 2) * k * k * k - 2);\n },\n\n // 五次方的缓动t^5\n /**\n * @param {number} k\n * @return {number}\n */\n quinticIn: function (k) {\n return k * k * k * k * k;\n },\n /**\n * @param {number} k\n * @return {number}\n */\n quinticOut: function (k) {\n return --k * k * k * k * k + 1;\n },\n /**\n * @param {number} k\n * @return {number}\n */\n quinticInOut: function (k) {\n if ((k *= 2) < 1) {\n return 0.5 * k * k * k * k * k;\n }\n return 0.5 * ((k -= 2) * k * k * k * k + 2);\n },\n\n // 正弦曲线的缓动sin(t)\n /**\n * @param {number} k\n * @return {number}\n */\n sinusoidalIn: function (k) {\n return 1 - Math.cos(k * Math.PI / 2);\n },\n /**\n * @param {number} k\n * @return {number}\n */\n sinusoidalOut: function (k) {\n return Math.sin(k * Math.PI / 2);\n },\n /**\n * @param {number} k\n * @return {number}\n */\n sinusoidalInOut: function (k) {\n return 0.5 * (1 - Math.cos(Math.PI * k));\n },\n\n // 指数曲线的缓动2^t\n /**\n * @param {number} k\n * @return {number}\n */\n exponentialIn: function (k) {\n return k === 0 ? 0 : Math.pow(1024, k - 1);\n },\n /**\n * @param {number} k\n * @return {number}\n */\n exponentialOut: function (k) {\n return k === 1 ? 1 : 1 - Math.pow(2, -10 * k);\n },\n /**\n * @param {number} k\n * @return {number}\n */\n exponentialInOut: function (k) {\n if (k === 0) {\n return 0;\n }\n if (k === 1) {\n return 1;\n }\n if ((k *= 2) < 1) {\n return 0.5 * Math.pow(1024, k - 1);\n }\n return 0.5 * (-Math.pow(2, -10 * (k - 1)) + 2);\n },\n\n // 圆形曲线的缓动sqrt(1-t^2)\n /**\n * @param {number} k\n * @return {number}\n */\n circularIn: function (k) {\n return 1 - Math.sqrt(1 - k * k);\n },\n /**\n * @param {number} k\n * @return {number}\n */\n circularOut: function (k) {\n return Math.sqrt(1 - (--k * k));\n },\n /**\n * @param {number} k\n * @return {number}\n */\n circularInOut: function (k) {\n if ((k *= 2) < 1) {\n return -0.5 * (Math.sqrt(1 - k * k) - 1);\n }\n return 0.5 * (Math.sqrt(1 - (k -= 2) * k) + 1);\n },\n\n // 创建类似于弹簧在停止前来回振荡的动画\n /**\n * @param {number} k\n * @return {number}\n */\n elasticIn: function (k) {\n var s;\n var a = 0.1;\n var p = 0.4;\n if (k === 0) {\n return 0;\n }\n if (k === 1) {\n return 1;\n }\n if (!a || a < 1) {\n a = 1;\n s = p / 4;\n }\n else {\n s = p * Math.asin(1 / a) / (2 * Math.PI);\n }\n return -(a * Math.pow(2, 10 * (k -= 1))\n * Math.sin((k - s) * (2 * Math.PI) / p));\n },\n /**\n * @param {number} k\n * @return {number}\n */\n elasticOut: function (k) {\n var s;\n var a = 0.1;\n var p = 0.4;\n if (k === 0) {\n return 0;\n }\n if (k === 1) {\n return 1;\n }\n if (!a || a < 1) {\n a = 1;\n s = p / 4;\n }\n else {\n s = p * Math.asin(1 / a) / (2 * Math.PI);\n }\n return (a * Math.pow(2, -10 * k)\n * Math.sin((k - s) * (2 * Math.PI) / p) + 1);\n },\n /**\n * @param {number} k\n * @return {number}\n */\n elasticInOut: function (k) {\n var s;\n var a = 0.1;\n var p = 0.4;\n if (k === 0) {\n return 0;\n }\n if (k === 1) {\n return 1;\n }\n if (!a || a < 1) {\n a = 1;\n s = p / 4;\n }\n else {\n s = p * Math.asin(1 / a) / (2 * Math.PI);\n }\n if ((k *= 2) < 1) {\n return -0.5 * (a * Math.pow(2, 10 * (k -= 1))\n * Math.sin((k - s) * (2 * Math.PI) / p));\n }\n return a * Math.pow(2, -10 * (k -= 1))\n * Math.sin((k - s) * (2 * Math.PI) / p) * 0.5 + 1;\n\n },\n\n // 在某一动画开始沿指示的路径进行动画处理前稍稍收回该动画的移动\n /**\n * @param {number} k\n * @return {number}\n */\n backIn: function (k) {\n var s = 1.70158;\n return k * k * ((s + 1) * k - s);\n },\n /**\n * @param {number} k\n * @return {number}\n */\n backOut: function (k) {\n var s = 1.70158;\n return --k * k * ((s + 1) * k + s) + 1;\n },\n /**\n * @param {number} k\n * @return {number}\n */\n backInOut: function (k) {\n var s = 1.70158 * 1.525;\n if ((k *= 2) < 1) {\n return 0.5 * (k * k * ((s + 1) * k - s));\n }\n return 0.5 * ((k -= 2) * k * ((s + 1) * k + s) + 2);\n },\n\n // 创建弹跳效果\n /**\n * @param {number} k\n * @return {number}\n */\n bounceIn: function (k) {\n return 1 - easing.bounceOut(1 - k);\n },\n /**\n * @param {number} k\n * @return {number}\n */\n bounceOut: function (k) {\n if (k < (1 / 2.75)) {\n return 7.5625 * k * k;\n }\n else if (k < (2 / 2.75)) {\n return 7.5625 * (k -= (1.5 / 2.75)) * k + 0.75;\n }\n else if (k < (2.5 / 2.75)) {\n return 7.5625 * (k -= (2.25 / 2.75)) * k + 0.9375;\n }\n else {\n return 7.5625 * (k -= (2.625 / 2.75)) * k + 0.984375;\n }\n },\n /**\n * @param {number} k\n * @return {number}\n */\n bounceInOut: function (k) {\n if (k < 0.5) {\n return easing.bounceIn(k * 2) * 0.5;\n }\n return easing.bounceOut(k * 2 - 1) * 0.5 + 0.5;\n }\n};\n\nexport default easing;","/**\n * 动画主控制器\n * @config target 动画对象可以是数组如果是数组的话会批量分发onframe等事件\n * @config life(1000) 动画时长\n * @config delay(0) 动画延迟时间\n * @config loop(true)\n * @config gap(0) 循环的间隔时间\n * @config onframe\n * @config easing(optional)\n * @config ondestroy(optional)\n * @config onrestart(optional)\n *\n * TODO pause\n */\n\nimport easingFuncs from './easing';\n\nfunction Clip(options) {\n\n this._target = options.target;\n\n // 生命周期\n this._life = options.life || 1000;\n // 延时\n this._delay = options.delay || 0;\n // 开始时间\n // this._startTime = new Date().getTime() + this._delay;// 单位毫秒\n this._initialized = false;\n\n // 是否循环\n this.loop = options.loop == null ? false : options.loop;\n\n this.gap = options.gap || 0;\n\n this.easing = options.easing || 'Linear';\n\n this.onframe = options.onframe;\n this.ondestroy = options.ondestroy;\n this.onrestart = options.onrestart;\n\n this._pausedTime = 0;\n this._paused = false;\n}\n\nClip.prototype = {\n\n constructor: Clip,\n\n step: function (globalTime, deltaTime) {\n // Set startTime on first step, or _startTime may has milleseconds different between clips\n // PENDING\n if (!this._initialized) {\n this._startTime = globalTime + this._delay;\n this._initialized = true;\n }\n\n if (this._paused) {\n this._pausedTime += deltaTime;\n return;\n }\n\n var percent = (globalTime - this._startTime - this._pausedTime) / this._life;\n\n // 还没开始\n if (percent < 0) {\n return;\n }\n\n percent = Math.min(percent, 1);\n\n var easing = this.easing;\n var easingFunc = typeof easing === 'string' ? easingFuncs[easing] : easing;\n var schedule = typeof easingFunc === 'function'\n ? easingFunc(percent)\n : percent;\n\n this.fire('frame', schedule);\n\n // 结束\n if (percent === 1) {\n if (this.loop) {\n this.restart(globalTime);\n // 重新开始周期\n // 抛出而不是直接调用事件直到 stage.update 后再统一调用这些事件\n return 'restart';\n }\n\n // 动画完成将这个控制器标识为待删除\n // 在Animation.update中进行批量删除\n this._needsRemove = true;\n return 'destroy';\n }\n\n return null;\n },\n\n restart: function (globalTime) {\n var remainder = (globalTime - this._startTime - this._pausedTime) % this._life;\n this._startTime = globalTime - remainder + this.gap;\n this._pausedTime = 0;\n\n this._needsRemove = false;\n },\n\n fire: function (eventType, arg) {\n eventType = 'on' + eventType;\n if (this[eventType]) {\n this[eventType](this._target, arg);\n }\n },\n\n pause: function () {\n this._paused = true;\n },\n\n resume: function () {\n this._paused = false;\n }\n};\n\nexport default Clip;","// Simple LRU cache use doubly linked list\n// @module zrender/core/LRU\n\n/**\n * Simple double linked list. Compared with array, it has O(1) remove operation.\n * @constructor\n */\nvar LinkedList = function () {\n\n /**\n * @type {module:zrender/core/LRU~Entry}\n */\n this.head = null;\n\n /**\n * @type {module:zrender/core/LRU~Entry}\n */\n this.tail = null;\n\n this._len = 0;\n};\n\nvar linkedListProto = LinkedList.prototype;\n/**\n * Insert a new value at the tail\n * @param {} val\n * @return {module:zrender/core/LRU~Entry}\n */\nlinkedListProto.insert = function (val) {\n var entry = new Entry(val);\n this.insertEntry(entry);\n return entry;\n};\n\n/**\n * Insert an entry at the tail\n * @param {module:zrender/core/LRU~Entry} entry\n */\nlinkedListProto.insertEntry = function (entry) {\n if (!this.head) {\n this.head = this.tail = entry;\n }\n else {\n this.tail.next = entry;\n entry.prev = this.tail;\n entry.next = null;\n this.tail = entry;\n }\n this._len++;\n};\n\n/**\n * Remove entry.\n * @param {module:zrender/core/LRU~Entry} entry\n */\nlinkedListProto.remove = function (entry) {\n var prev = entry.prev;\n var next = entry.next;\n if (prev) {\n prev.next = next;\n }\n else {\n // Is head\n this.head = next;\n }\n if (next) {\n next.prev = prev;\n }\n else {\n // Is tail\n this.tail = prev;\n }\n entry.next = entry.prev = null;\n this._len--;\n};\n\n/**\n * @return {number}\n */\nlinkedListProto.len = function () {\n return this._len;\n};\n\n/**\n * Clear list\n */\nlinkedListProto.clear = function () {\n this.head = this.tail = null;\n this._len = 0;\n};\n\n/**\n * @constructor\n * @param {} val\n */\nvar Entry = function (val) {\n /**\n * @type {}\n */\n this.value = val;\n\n /**\n * @type {module:zrender/core/LRU~Entry}\n */\n this.next;\n\n /**\n * @type {module:zrender/core/LRU~Entry}\n */\n this.prev;\n};\n\n/**\n * LRU Cache\n * @constructor\n * @alias module:zrender/core/LRU\n */\nvar LRU = function (maxSize) {\n\n this._list = new LinkedList();\n\n this._map = {};\n\n this._maxSize = maxSize || 10;\n\n this._lastRemovedEntry = null;\n};\n\nvar LRUProto = LRU.prototype;\n\n/**\n * @param {string} key\n * @param {} value\n * @return {} Removed value\n */\nLRUProto.put = function (key, value) {\n var list = this._list;\n var map = this._map;\n var removed = null;\n if (map[key] == null) {\n var len = list.len();\n // Reuse last removed entry\n var entry = this._lastRemovedEntry;\n\n if (len >= this._maxSize && len > 0) {\n // Remove the least recently used\n var leastUsedEntry = list.head;\n list.remove(leastUsedEntry);\n delete map[leastUsedEntry.key];\n\n removed = leastUsedEntry.value;\n this._lastRemovedEntry = leastUsedEntry;\n }\n\n if (entry) {\n entry.value = value;\n }\n else {\n entry = new Entry(value);\n }\n entry.key = key;\n list.insertEntry(entry);\n map[key] = entry;\n }\n\n return removed;\n};\n\n/**\n * @param {string} key\n * @return {}\n */\nLRUProto.get = function (key) {\n var entry = this._map[key];\n var list = this._list;\n if (entry != null) {\n // Put the latest used entry in the tail\n if (entry !== list.tail) {\n list.remove(entry);\n list.insertEntry(entry);\n }\n\n return entry.value;\n }\n};\n\n/**\n * Clear the cache\n */\nLRUProto.clear = function () {\n this._list.clear();\n this._map = {};\n};\n\nexport default LRU;","import LRU from '../core/LRU';\n\nvar kCSSColorTable = {\n 'transparent': [0, 0, 0, 0], 'aliceblue': [240, 248, 255, 1],\n 'antiquewhite': [250, 235, 215, 1], 'aqua': [0, 255, 255, 1],\n 'aquamarine': [127, 255, 212, 1], 'azure': [240, 255, 255, 1],\n 'beige': [245, 245, 220, 1], 'bisque': [255, 228, 196, 1],\n 'black': [0, 0, 0, 1], 'blanchedalmond': [255, 235, 205, 1],\n 'blue': [0, 0, 255, 1], 'blueviolet': [138, 43, 226, 1],\n 'brown': [165, 42, 42, 1], 'burlywood': [222, 184, 135, 1],\n 'cadetblue': [95, 158, 160, 1], 'chartreuse': [127, 255, 0, 1],\n 'chocolate': [210, 105, 30, 1], 'coral': [255, 127, 80, 1],\n 'cornflowerblue': [100, 149, 237, 1], 'cornsilk': [255, 248, 220, 1],\n 'crimson': [220, 20, 60, 1], 'cyan': [0, 255, 255, 1],\n 'darkblue': [0, 0, 139, 1], 'darkcyan': [0, 139, 139, 1],\n 'darkgoldenrod': [184, 134, 11, 1], 'darkgray': [169, 169, 169, 1],\n 'darkgreen': [0, 100, 0, 1], 'darkgrey': [169, 169, 169, 1],\n 'darkkhaki': [189, 183, 107, 1], 'darkmagenta': [139, 0, 139, 1],\n 'darkolivegreen': [85, 107, 47, 1], 'darkorange': [255, 140, 0, 1],\n 'darkorchid': [153, 50, 204, 1], 'darkred': [139, 0, 0, 1],\n 'darksalmon': [233, 150, 122, 1], 'darkseagreen': [143, 188, 143, 1],\n 'darkslateblue': [72, 61, 139, 1], 'darkslategray': [47, 79, 79, 1],\n 'darkslategrey': [47, 79, 79, 1], 'darkturquoise': [0, 206, 209, 1],\n 'darkviolet': [148, 0, 211, 1], 'deeppink': [255, 20, 147, 1],\n 'deepskyblue': [0, 191, 255, 1], 'dimgray': [105, 105, 105, 1],\n 'dimgrey': [105, 105, 105, 1], 'dodgerblue': [30, 144, 255, 1],\n 'firebrick': [178, 34, 34, 1], 'floralwhite': [255, 250, 240, 1],\n 'forestgreen': [34, 139, 34, 1], 'fuchsia': [255, 0, 255, 1],\n 'gainsboro': [220, 220, 220, 1], 'ghostwhite': [248, 248, 255, 1],\n 'gold': [255, 215, 0, 1], 'goldenrod': [218, 165, 32, 1],\n 'gray': [128, 128, 128, 1], 'green': [0, 128, 0, 1],\n 'greenyellow': [173, 255, 47, 1], 'grey': [128, 128, 128, 1],\n 'honeydew': [240, 255, 240, 1], 'hotpink': [255, 105, 180, 1],\n 'indianred': [205, 92, 92, 1], 'indigo': [75, 0, 130, 1],\n 'ivory': [255, 255, 240, 1], 'khaki': [240, 230, 140, 1],\n 'lavender': [230, 230, 250, 1], 'lavenderblush': [255, 240, 245, 1],\n 'lawngreen': [124, 252, 0, 1], 'lemonchiffon': [255, 250, 205, 1],\n 'lightblue': [173, 216, 230, 1], 'lightcoral': [240, 128, 128, 1],\n 'lightcyan': [224, 255, 255, 1], 'lightgoldenrodyellow': [250, 250, 210, 1],\n 'lightgray': [211, 211, 211, 1], 'lightgreen': [144, 238, 144, 1],\n 'lightgrey': [211, 211, 211, 1], 'lightpink': [255, 182, 193, 1],\n 'lightsalmon': [255, 160, 122, 1], 'lightseagreen': [32, 178, 170, 1],\n 'lightskyblue': [135, 206, 250, 1], 'lightslategray': [119, 136, 153, 1],\n 'lightslategrey': [119, 136, 153, 1], 'lightsteelblue': [176, 196, 222, 1],\n 'lightyellow': [255, 255, 224, 1], 'lime': [0, 255, 0, 1],\n 'limegreen': [50, 205, 50, 1], 'linen': [250, 240, 230, 1],\n 'magenta': [255, 0, 255, 1], 'maroon': [128, 0, 0, 1],\n 'mediumaquamarine': [102, 205, 170, 1], 'mediumblue': [0, 0, 205, 1],\n 'mediumorchid': [186, 85, 211, 1], 'mediumpurple': [147, 112, 219, 1],\n 'mediumseagreen': [60, 179, 113, 1], 'mediumslateblue': [123, 104, 238, 1],\n 'mediumspringgreen': [0, 250, 154, 1], 'mediumturquoise': [72, 209, 204, 1],\n 'mediumvioletred': [199, 21, 133, 1], 'midnightblue': [25, 25, 112, 1],\n 'mintcream': [245, 255, 250, 1], 'mistyrose': [255, 228, 225, 1],\n 'moccasin': [255, 228, 181, 1], 'navajowhite': [255, 222, 173, 1],\n 'navy': [0, 0, 128, 1], 'oldlace': [253, 245, 230, 1],\n 'olive': [128, 128, 0, 1], 'olivedrab': [107, 142, 35, 1],\n 'orange': [255, 165, 0, 1], 'orangered': [255, 69, 0, 1],\n 'orchid': [218, 112, 214, 1], 'palegoldenrod': [238, 232, 170, 1],\n 'palegreen': [152, 251, 152, 1], 'paleturquoise': [175, 238, 238, 1],\n 'palevioletred': [219, 112, 147, 1], 'papayawhip': [255, 239, 213, 1],\n 'peachpuff': [255, 218, 185, 1], 'peru': [205, 133, 63, 1],\n 'pink': [255, 192, 203, 1], 'plum': [221, 160, 221, 1],\n 'powderblue': [176, 224, 230, 1], 'purple': [128, 0, 128, 1],\n 'red': [255, 0, 0, 1], 'rosybrown': [188, 143, 143, 1],\n 'royalblue': [65, 105, 225, 1], 'saddlebrown': [139, 69, 19, 1],\n 'salmon': [250, 128, 114, 1], 'sandybrown': [244, 164, 96, 1],\n 'seagreen': [46, 139, 87, 1], 'seashell': [255, 245, 238, 1],\n 'sienna': [160, 82, 45, 1], 'silver': [192, 192, 192, 1],\n 'skyblue': [135, 206, 235, 1], 'slateblue': [106, 90, 205, 1],\n 'slategray': [112, 128, 144, 1], 'slategrey': [112, 128, 144, 1],\n 'snow': [255, 250, 250, 1], 'springgreen': [0, 255, 127, 1],\n 'steelblue': [70, 130, 180, 1], 'tan': [210, 180, 140, 1],\n 'teal': [0, 128, 128, 1], 'thistle': [216, 191, 216, 1],\n 'tomato': [255, 99, 71, 1], 'turquoise': [64, 224, 208, 1],\n 'violet': [238, 130, 238, 1], 'wheat': [245, 222, 179, 1],\n 'white': [255, 255, 255, 1], 'whitesmoke': [245, 245, 245, 1],\n 'yellow': [255, 255, 0, 1], 'yellowgreen': [154, 205, 50, 1]\n};\n\nfunction clampCssByte(i) { // Clamp to integer 0 .. 255.\n i = Math.round(i); // Seems to be what Chrome does (vs truncation).\n return i < 0 ? 0 : i > 255 ? 255 : i;\n}\n\nfunction clampCssAngle(i) { // Clamp to integer 0 .. 360.\n i = Math.round(i); // Seems to be what Chrome does (vs truncation).\n return i < 0 ? 0 : i > 360 ? 360 : i;\n}\n\nfunction clampCssFloat(f) { // Clamp to float 0.0 .. 1.0.\n return f < 0 ? 0 : f > 1 ? 1 : f;\n}\n\nfunction parseCssInt(str) { // int or percentage.\n if (str.length && str.charAt(str.length - 1) === '%') {\n return clampCssByte(parseFloat(str) / 100 * 255);\n }\n return clampCssByte(parseInt(str, 10));\n}\n\nfunction parseCssFloat(str) { // float or percentage.\n if (str.length && str.charAt(str.length - 1) === '%') {\n return clampCssFloat(parseFloat(str) / 100);\n }\n return clampCssFloat(parseFloat(str));\n}\n\nfunction cssHueToRgb(m1, m2, h) {\n if (h < 0) {\n h += 1;\n }\n else if (h > 1) {\n h -= 1;\n }\n\n if (h * 6 < 1) {\n return m1 + (m2 - m1) * h * 6;\n }\n if (h * 2 < 1) {\n return m2;\n }\n if (h * 3 < 2) {\n return m1 + (m2 - m1) * (2 / 3 - h) * 6;\n }\n return m1;\n}\n\nfunction lerpNumber(a, b, p) {\n return a + (b - a) * p;\n}\n\nfunction setRgba(out, r, g, b, a) {\n out[0] = r;\n out[1] = g;\n out[2] = b;\n out[3] = a;\n return out;\n}\nfunction copyRgba(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n\nvar colorCache = new LRU(20);\nvar lastRemovedArr = null;\n\nfunction putToCache(colorStr, rgbaArr) {\n // Reuse removed array\n if (lastRemovedArr) {\n copyRgba(lastRemovedArr, rgbaArr);\n }\n lastRemovedArr = colorCache.put(colorStr, lastRemovedArr || (rgbaArr.slice()));\n}\n\n/**\n * @param {string} colorStr\n * @param {Array.<number>} out\n * @return {Array.<number>}\n * @memberOf module:zrender/util/color\n */\nexport function parse(colorStr, rgbaArr) {\n if (!colorStr) {\n return;\n }\n rgbaArr = rgbaArr || [];\n\n var cached = colorCache.get(colorStr);\n if (cached) {\n return copyRgba(rgbaArr, cached);\n }\n\n // colorStr may be not string\n colorStr = colorStr + '';\n // Remove all whitespace, not compliant, but should just be more accepting.\n var str = colorStr.replace(/ /g, '').toLowerCase();\n\n // Color keywords (and transparent) lookup.\n if (str in kCSSColorTable) {\n copyRgba(rgbaArr, kCSSColorTable[str]);\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n }\n\n // #abc and #abc123 syntax.\n if (str.charAt(0) === '#') {\n if (str.length === 4) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xfff)) {\n setRgba(rgbaArr, 0, 0, 0, 1);\n return; // Covers NaN.\n }\n setRgba(rgbaArr,\n ((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n (iv & 0xf0) | ((iv & 0xf0) >> 4),\n (iv & 0xf) | ((iv & 0xf) << 4),\n 1\n );\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n }\n else if (str.length === 7) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xffffff)) {\n setRgba(rgbaArr, 0, 0, 0, 1);\n return; // Covers NaN.\n }\n setRgba(rgbaArr,\n (iv & 0xff0000) >> 16,\n (iv & 0xff00) >> 8,\n iv & 0xff,\n 1\n );\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n }\n\n return;\n }\n var op = str.indexOf('(');\n var ep = str.indexOf(')');\n if (op !== -1 && ep + 1 === str.length) {\n var fname = str.substr(0, op);\n var params = str.substr(op + 1, ep - (op + 1)).split(',');\n var alpha = 1; // To allow case fallthrough.\n switch (fname) {\n case 'rgba':\n if (params.length !== 4) {\n setRgba(rgbaArr, 0, 0, 0, 1);\n return;\n }\n alpha = parseCssFloat(params.pop()); // jshint ignore:line\n // Fall through.\n case 'rgb':\n if (params.length !== 3) {\n setRgba(rgbaArr, 0, 0, 0, 1);\n return;\n }\n setRgba(rgbaArr,\n parseCssInt(params[0]),\n parseCssInt(params[1]),\n parseCssInt(params[2]),\n alpha\n );\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n case 'hsla':\n if (params.length !== 4) {\n setRgba(rgbaArr, 0, 0, 0, 1);\n return;\n }\n params[3] = parseCssFloat(params[3]);\n hsla2rgba(params, rgbaArr);\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n case 'hsl':\n if (params.length !== 3) {\n setRgba(rgbaArr, 0, 0, 0, 1);\n return;\n }\n hsla2rgba(params, rgbaArr);\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n default:\n return;\n }\n }\n\n setRgba(rgbaArr, 0, 0, 0, 1);\n return;\n}\n\n/**\n * @param {Array.<number>} hsla\n * @param {Array.<number>} rgba\n * @return {Array.<number>} rgba\n */\nfunction hsla2rgba(hsla, rgba) {\n var h = (((parseFloat(hsla[0]) % 360) + 360) % 360) / 360; // 0 .. 1\n // NOTE(deanm): According to the CSS spec s/l should only be\n // percentages, but we don't bother and let float or percentage.\n var s = parseCssFloat(hsla[1]);\n var l = parseCssFloat(hsla[2]);\n var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n var m1 = l * 2 - m2;\n\n rgba = rgba || [];\n setRgba(rgba,\n clampCssByte(cssHueToRgb(m1, m2, h + 1 / 3) * 255),\n clampCssByte(cssHueToRgb(m1, m2, h) * 255),\n clampCssByte(cssHueToRgb(m1, m2, h - 1 / 3) * 255),\n 1\n );\n\n if (hsla.length === 4) {\n rgba[3] = hsla[3];\n }\n\n return rgba;\n}\n\n/**\n * @param {Array.<number>} rgba\n * @return {Array.<number>} hsla\n */\nfunction rgba2hsla(rgba) {\n if (!rgba) {\n return;\n }\n\n // RGB from 0 to 255\n var R = rgba[0] / 255;\n var G = rgba[1] / 255;\n var B = rgba[2] / 255;\n\n var vMin = Math.min(R, G, B); // Min. value of RGB\n var vMax = Math.max(R, G, B); // Max. value of RGB\n var delta = vMax - vMin; // Delta RGB value\n\n var L = (vMax + vMin) / 2;\n var H;\n var S;\n // HSL results from 0 to 1\n if (delta === 0) {\n H = 0;\n S = 0;\n }\n else {\n if (L < 0.5) {\n S = delta / (vMax + vMin);\n }\n else {\n S = delta / (2 - vMax - vMin);\n }\n\n var deltaR = (((vMax - R) / 6) + (delta / 2)) / delta;\n var deltaG = (((vMax - G) / 6) + (delta / 2)) / delta;\n var deltaB = (((vMax - B) / 6) + (delta / 2)) / delta;\n\n if (R === vMax) {\n H = deltaB - deltaG;\n }\n else if (G === vMax) {\n H = (1 / 3) + deltaR - deltaB;\n }\n else if (B === vMax) {\n H = (2 / 3) + deltaG - deltaR;\n }\n\n if (H < 0) {\n H += 1;\n }\n\n if (H > 1) {\n H -= 1;\n }\n }\n\n var hsla = [H * 360, S, L];\n\n if (rgba[3] != null) {\n hsla.push(rgba[3]);\n }\n\n return hsla;\n}\n\n/**\n * @param {string} color\n * @param {number} level\n * @return {string}\n * @memberOf module:zrender/util/color\n */\nexport function lift(color, level) {\n var colorArr = parse(color);\n if (colorArr) {\n for (var i = 0; i < 3; i++) {\n if (level < 0) {\n colorArr[i] = colorArr[i] * (1 - level) | 0;\n }\n else {\n colorArr[i] = ((255 - colorArr[i]) * level + colorArr[i]) | 0;\n }\n if (colorArr[i] > 255) {\n colorArr[i] = 255;\n }\n else if (color[i] < 0) {\n colorArr[i] = 0;\n }\n }\n return stringify(colorArr, colorArr.length === 4 ? 'rgba' : 'rgb');\n }\n}\n\n/**\n * @param {string} color\n * @return {string}\n * @memberOf module:zrender/util/color\n */\nexport function toHex(color) {\n var colorArr = parse(color);\n if (colorArr) {\n return ((1 << 24) + (colorArr[0] << 16) + (colorArr[1] << 8) + (+colorArr[2])).toString(16).slice(1);\n }\n}\n\n/**\n * Map value to color. Faster than lerp methods because color is represented by rgba array.\n * @param {number} normalizedValue A float between 0 and 1.\n * @param {Array.<Array.<number>>} colors List of rgba color array\n * @param {Array.<number>} [out] Mapped gba color array\n * @return {Array.<number>} will be null/undefined if input illegal.\n */\nexport function fastLerp(normalizedValue, colors, out) {\n if (!(colors && colors.length)\n || !(normalizedValue >= 0 && normalizedValue <= 1)\n ) {\n return;\n }\n\n out = out || [];\n\n var value = normalizedValue * (colors.length - 1);\n var leftIndex = Math.floor(value);\n var rightIndex = Math.ceil(value);\n var leftColor = colors[leftIndex];\n var rightColor = colors[rightIndex];\n var dv = value - leftIndex;\n out[0] = clampCssByte(lerpNumber(leftColor[0], rightColor[0], dv));\n out[1] = clampCssByte(lerpNumber(leftColor[1], rightColor[1], dv));\n out[2] = clampCssByte(lerpNumber(leftColor[2], rightColor[2], dv));\n out[3] = clampCssFloat(lerpNumber(leftColor[3], rightColor[3], dv));\n\n return out;\n}\n\n/**\n * @deprecated\n */\nexport var fastMapToColor = fastLerp;\n\n/**\n * @param {number} normalizedValue A float between 0 and 1.\n * @param {Array.<string>} colors Color list.\n * @param {boolean=} fullOutput Default false.\n * @return {(string|Object)} Result color. If fullOutput,\n * return {color: ..., leftIndex: ..., rightIndex: ..., value: ...},\n * @memberOf module:zrender/util/color\n */\nexport function lerp(normalizedValue, colors, fullOutput) {\n if (!(colors && colors.length)\n || !(normalizedValue >= 0 && normalizedValue <= 1)\n ) {\n return;\n }\n\n var value = normalizedValue * (colors.length - 1);\n var leftIndex = Math.floor(value);\n var rightIndex = Math.ceil(value);\n var leftColor = parse(colors[leftIndex]);\n var rightColor = parse(colors[rightIndex]);\n var dv = value - leftIndex;\n\n var color = stringify(\n [\n clampCssByte(lerpNumber(leftColor[0], rightColor[0], dv)),\n clampCssByte(lerpNumber(leftColor[1], rightColor[1], dv)),\n clampCssByte(lerpNumber(leftColor[2], rightColor[2], dv)),\n clampCssFloat(lerpNumber(leftColor[3], rightColor[3], dv))\n ],\n 'rgba'\n );\n\n return fullOutput\n ? {\n color: color,\n leftIndex: leftIndex,\n rightIndex: rightIndex,\n value: value\n }\n : color;\n}\n\n/**\n * @deprecated\n */\nexport var mapToColor = lerp;\n\n/**\n * @param {string} color\n * @param {number=} h 0 ~ 360, ignore when null.\n * @param {number=} s 0 ~ 1, ignore when null.\n * @param {number=} l 0 ~ 1, ignore when null.\n * @return {string} Color string in rgba format.\n * @memberOf module:zrender/util/color\n */\nexport function modifyHSL(color, h, s, l) {\n color = parse(color);\n\n if (color) {\n color = rgba2hsla(color);\n h != null && (color[0] = clampCssAngle(h));\n s != null && (color[1] = parseCssFloat(s));\n l != null && (color[2] = parseCssFloat(l));\n\n return stringify(hsla2rgba(color), 'rgba');\n }\n}\n\n/**\n * @param {string} color\n * @param {number=} alpha 0 ~ 1\n * @return {string} Color string in rgba format.\n * @memberOf module:zrender/util/color\n */\nexport function modifyAlpha(color, alpha) {\n color = parse(color);\n\n if (color && alpha != null) {\n color[3] = clampCssFloat(alpha);\n return stringify(color, 'rgba');\n }\n}\n\n/**\n * @param {Array.<number>} arrColor like [12,33,44,0.4]\n * @param {string} type 'rgba', 'hsva', ...\n * @return {string} Result color. (If input illegal, return undefined).\n */\nexport function stringify(arrColor, type) {\n if (!arrColor || !arrColor.length) {\n return;\n }\n var colorStr = arrColor[0] + ',' + arrColor[1] + ',' + arrColor[2];\n if (type === 'rgba' || type === 'hsva' || type === 'hsla') {\n colorStr += ',' + arrColor[3];\n }\n return type + '(' + colorStr + ')';\n}\n","/**\n * @module echarts/animation/Animator\n */\n\nimport Clip from './Clip';\nimport * as color from '../tool/color';\nimport {isArrayLike} from '../core/util';\n\nvar arraySlice = Array.prototype.slice;\n\nfunction defaultGetter(target, key) {\n return target[key];\n}\n\nfunction defaultSetter(target, key, value) {\n target[key] = value;\n}\n\n/**\n * @param {number} p0\n * @param {number} p1\n * @param {number} percent\n * @return {number}\n */\nfunction interpolateNumber(p0, p1, percent) {\n return (p1 - p0) * percent + p0;\n}\n\n/**\n * @param {string} p0\n * @param {string} p1\n * @param {number} percent\n * @return {string}\n */\nfunction interpolateString(p0, p1, percent) {\n return percent > 0.5 ? p1 : p0;\n}\n\n/**\n * @param {Array} p0\n * @param {Array} p1\n * @param {number} percent\n * @param {Array} out\n * @param {number} arrDim\n */\nfunction interpolateArray(p0, p1, percent, out, arrDim) {\n var len = p0.length;\n if (arrDim === 1) {\n for (var i = 0; i < len; i++) {\n out[i] = interpolateNumber(p0[i], p1[i], percent);\n }\n }\n else {\n var len2 = len && p0[0].length;\n for (var i = 0; i < len; i++) {\n for (var j = 0; j < len2; j++) {\n out[i][j] = interpolateNumber(\n p0[i][j], p1[i][j], percent\n );\n }\n }\n }\n}\n\n// arr0 is source array, arr1 is target array.\n// Do some preprocess to avoid error happened when interpolating from arr0 to arr1\nfunction fillArr(arr0, arr1, arrDim) {\n var arr0Len = arr0.length;\n var arr1Len = arr1.length;\n if (arr0Len !== arr1Len) {\n // FIXME Not work for TypedArray\n var isPreviousLarger = arr0Len > arr1Len;\n if (isPreviousLarger) {\n // Cut the previous\n arr0.length = arr1Len;\n }\n else {\n // Fill the previous\n for (var i = arr0Len; i < arr1Len; i++) {\n arr0.push(\n arrDim === 1 ? arr1[i] : arraySlice.call(arr1[i])\n );\n }\n }\n }\n // Handling NaN value\n var len2 = arr0[0] && arr0[0].length;\n for (var i = 0; i < arr0.length; i++) {\n if (arrDim === 1) {\n if (isNaN(arr0[i])) {\n arr0[i] = arr1[i];\n }\n }\n else {\n for (var j = 0; j < len2; j++) {\n if (isNaN(arr0[i][j])) {\n arr0[i][j] = arr1[i][j];\n }\n }\n }\n }\n}\n\n/**\n * @param {Array} arr0\n * @param {Array} arr1\n * @param {number} arrDim\n * @return {boolean}\n */\nfunction isArraySame(arr0, arr1, arrDim) {\n if (arr0 === arr1) {\n return true;\n }\n var len = arr0.length;\n if (len !== arr1.length) {\n return false;\n }\n if (arrDim === 1) {\n for (var i = 0; i < len; i++) {\n if (arr0[i] !== arr1[i]) {\n return false;\n }\n }\n }\n else {\n var len2 = arr0[0].length;\n for (var i = 0; i < len; i++) {\n for (var j = 0; j < len2; j++) {\n if (arr0[i][j] !== arr1[i][j]) {\n return false;\n }\n }\n }\n }\n return true;\n}\n\n/**\n * Catmull Rom interpolate array\n * @param {Array} p0\n * @param {Array} p1\n * @param {Array} p2\n * @param {Array} p3\n * @param {number} t\n * @param {number} t2\n * @param {number} t3\n * @param {Array} out\n * @param {number} arrDim\n */\nfunction catmullRomInterpolateArray(\n p0, p1, p2, p3, t, t2, t3, out, arrDim\n) {\n var len = p0.length;\n if (arrDim === 1) {\n for (var i = 0; i < len; i++) {\n out[i] = catmullRomInterpolate(\n p0[i], p1[i], p2[i], p3[i], t, t2, t3\n );\n }\n }\n else {\n var len2 = p0[0].length;\n for (var i = 0; i < len; i++) {\n for (var j = 0; j < len2; j++) {\n out[i][j] = catmullRomInterpolate(\n p0[i][j], p1[i][j], p2[i][j], p3[i][j],\n t, t2, t3\n );\n }\n }\n }\n}\n\n/**\n * Catmull Rom interpolate number\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} p3\n * @param {number} t\n * @param {number} t2\n * @param {number} t3\n * @return {number}\n */\nfunction catmullRomInterpolate(p0, p1, p2, p3, t, t2, t3) {\n var v0 = (p2 - p0) * 0.5;\n var v1 = (p3 - p1) * 0.5;\n return (2 * (p1 - p2) + v0 + v1) * t3\n + (-3 * (p1 - p2) - 2 * v0 - v1) * t2\n + v0 * t + p1;\n}\n\nfunction cloneValue(value) {\n if (isArrayLike(value)) {\n var len = value.length;\n if (isArrayLike(value[0])) {\n var ret = [];\n for (var i = 0; i < len; i++) {\n ret.push(arraySlice.call(value[i]));\n }\n return ret;\n }\n\n return arraySlice.call(value);\n }\n\n return value;\n}\n\nfunction rgba2String(rgba) {\n rgba[0] = Math.floor(rgba[0]);\n rgba[1] = Math.floor(rgba[1]);\n rgba[2] = Math.floor(rgba[2]);\n\n return 'rgba(' + rgba.join(',') + ')';\n}\n\nfunction getArrayDim(keyframes) {\n var lastValue = keyframes[keyframes.length - 1].value;\n return isArrayLike(lastValue && lastValue[0]) ? 2 : 1;\n}\n\nfunction createTrackClip(animator, easing, oneTrackDone, keyframes, propName, forceAnimate) {\n var getter = animator._getter;\n var setter = animator._setter;\n var useSpline = easing === 'spline';\n\n var trackLen = keyframes.length;\n if (!trackLen) {\n return;\n }\n // Guess data type\n var firstVal = keyframes[0].value;\n var isValueArray = isArrayLike(firstVal);\n var isValueColor = false;\n var isValueString = false;\n\n // For vertices morphing\n var arrDim = isValueArray ? getArrayDim(keyframes) : 0;\n\n var trackMaxTime;\n // Sort keyframe as ascending\n keyframes.sort(function (a, b) {\n return a.time - b.time;\n });\n\n trackMaxTime = keyframes[trackLen - 1].time;\n // Percents of each keyframe\n var kfPercents = [];\n // Value of each keyframe\n var kfValues = [];\n var prevValue = keyframes[0].value;\n var isAllValueEqual = true;\n for (var i = 0; i < trackLen; i++) {\n kfPercents.push(keyframes[i].time / trackMaxTime);\n // Assume value is a color when it is a string\n var value = keyframes[i].value;\n\n // Check if value is equal, deep check if value is array\n if (!((isValueArray && isArraySame(value, prevValue, arrDim))\n || (!isValueArray && value === prevValue))) {\n isAllValueEqual = false;\n }\n prevValue = value;\n\n // Try converting a string to a color array\n if (typeof value === 'string') {\n var colorArray = color.parse(value);\n if (colorArray) {\n value = colorArray;\n isValueColor = true;\n }\n else {\n isValueString = true;\n }\n }\n kfValues.push(value);\n }\n if (!forceAnimate && isAllValueEqual) {\n return;\n }\n\n var lastValue = kfValues[trackLen - 1];\n // Polyfill array and NaN value\n for (var i = 0; i < trackLen - 1; i++) {\n if (isValueArray) {\n fillArr(kfValues[i], lastValue, arrDim);\n }\n else {\n if (isNaN(kfValues[i]) && !isNaN(lastValue) && !isValueString && !isValueColor) {\n kfValues[i] = lastValue;\n }\n }\n }\n isValueArray && fillArr(getter(animator._target, propName), lastValue, arrDim);\n\n // Cache the key of last frame to speed up when\n // animation playback is sequency\n var lastFrame = 0;\n var lastFramePercent = 0;\n var start;\n var w;\n var p0;\n var p1;\n var p2;\n var p3;\n\n if (isValueColor) {\n var rgba = [0, 0, 0, 0];\n }\n\n var onframe = function (target, percent) {\n // Find the range keyframes\n // kf1-----kf2---------current--------kf3\n // find kf2 and kf3 and do interpolation\n var frame;\n // In the easing function like elasticOut, percent may less than 0\n if (percent < 0) {\n frame = 0;\n }\n else if (percent < lastFramePercent) {\n // Start from next key\n // PENDING start from lastFrame ?\n start = Math.min(lastFrame + 1, trackLen - 1);\n for (frame = start; frame >= 0; frame--) {\n if (kfPercents[frame] <= percent) {\n break;\n }\n }\n // PENDING really need to do this ?\n frame = Math.min(frame, trackLen - 2);\n }\n else {\n for (frame = lastFrame; frame < trackLen; frame++) {\n if (kfPercents[frame] > percent) {\n break;\n }\n }\n frame = Math.min(frame - 1, trackLen - 2);\n }\n lastFrame = frame;\n lastFramePercent = percent;\n\n var range = (kfPercents[frame + 1] - kfPercents[frame]);\n if (range === 0) {\n return;\n }\n else {\n w = (percent - kfPercents[frame]) / range;\n }\n if (useSpline) {\n p1 = kfValues[frame];\n p0 = kfValues[frame === 0 ? frame : frame - 1];\n p2 = kfValues[frame > trackLen - 2 ? trackLen - 1 : frame + 1];\n p3 = kfValues[frame > trackLen - 3 ? trackLen - 1 : frame + 2];\n if (isValueArray) {\n catmullRomInterpolateArray(\n p0, p1, p2, p3, w, w * w, w * w * w,\n getter(target, propName),\n arrDim\n );\n }\n else {\n var value;\n if (isValueColor) {\n value = catmullRomInterpolateArray(\n p0, p1, p2, p3, w, w * w, w * w * w,\n rgba, 1\n );\n value = rgba2String(rgba);\n }\n else if (isValueString) {\n // String is step(0.5)\n return interpolateString(p1, p2, w);\n }\n else {\n value = catmullRomInterpolate(\n p0, p1, p2, p3, w, w * w, w * w * w\n );\n }\n setter(\n target,\n propName,\n value\n );\n }\n }\n else {\n if (isValueArray) {\n interpolateArray(\n kfValues[frame], kfValues[frame + 1], w,\n getter(target, propName),\n arrDim\n );\n }\n else {\n var value;\n if (isValueColor) {\n interpolateArray(\n kfValues[frame], kfValues[frame + 1], w,\n rgba, 1\n );\n value = rgba2String(rgba);\n }\n else if (isValueString) {\n // String is step(0.5)\n return interpolateString(kfValues[frame], kfValues[frame + 1], w);\n }\n else {\n value = interpolateNumber(kfValues[frame], kfValues[frame + 1], w);\n }\n setter(\n target,\n propName,\n value\n );\n }\n }\n };\n\n var clip = new Clip({\n target: animator._target,\n life: trackMaxTime,\n loop: animator._loop,\n delay: animator._delay,\n onframe: onframe,\n ondestroy: oneTrackDone\n });\n\n if (easing && easing !== 'spline') {\n clip.easing = easing;\n }\n\n return clip;\n}\n\n/**\n * @alias module:zrender/animation/Animator\n * @constructor\n * @param {Object} target\n * @param {boolean} loop\n * @param {Function} getter\n * @param {Function} setter\n */\nvar Animator = function (target, loop, getter, setter) {\n this._tracks = {};\n this._target = target;\n\n this._loop = loop || false;\n\n this._getter = getter || defaultGetter;\n this._setter = setter || defaultSetter;\n\n this._clipCount = 0;\n\n this._delay = 0;\n\n this._doneList = [];\n\n this._onframeList = [];\n\n this._clipList = [];\n};\n\nAnimator.prototype = {\n /**\n * Set Animation keyframe\n * @param {number} time 关键帧时间单位是ms\n * @param {Object} props 关键帧的属性值key-value表示\n * @return {module:zrender/animation/Animator}\n */\n when: function (time /* ms */, props) {\n var tracks = this._tracks;\n for (var propName in props) {\n if (!props.hasOwnProperty(propName)) {\n continue;\n }\n\n if (!tracks[propName]) {\n tracks[propName] = [];\n // Invalid value\n var value = this._getter(this._target, propName);\n if (value == null) {\n // zrLog('Invalid property ' + propName);\n continue;\n }\n // If time is 0\n // Then props is given initialize value\n // Else\n // Initialize value from current prop value\n if (time !== 0) {\n tracks[propName].push({\n time: 0,\n value: cloneValue(value)\n });\n }\n }\n tracks[propName].push({\n time: time,\n value: props[propName]\n });\n }\n return this;\n },\n /**\n * 添加动画每一帧的回调函数\n * @param {Function} callback\n * @return {module:zrender/animation/Animator}\n */\n during: function (callback) {\n this._onframeList.push(callback);\n return this;\n },\n\n pause: function () {\n for (var i = 0; i < this._clipList.length; i++) {\n this._clipList[i].pause();\n }\n this._paused = true;\n },\n\n resume: function () {\n for (var i = 0; i < this._clipList.length; i++) {\n this._clipList[i].resume();\n }\n this._paused = false;\n },\n\n isPaused: function () {\n return !!this._paused;\n },\n\n _doneCallback: function () {\n // Clear all tracks\n this._tracks = {};\n // Clear all clips\n this._clipList.length = 0;\n\n var doneList = this._doneList;\n var len = doneList.length;\n for (var i = 0; i < len; i++) {\n doneList[i].call(this);\n }\n },\n /**\n * Start the animation\n * @param {string|Function} [easing]\n * 动画缓动函数,详见{@link module:zrender/animation/easing}\n * @param {boolean} forceAnimate\n * @return {module:zrender/animation/Animator}\n */\n start: function (easing, forceAnimate) {\n\n var self = this;\n var clipCount = 0;\n\n var oneTrackDone = function () {\n clipCount--;\n if (!clipCount) {\n self._doneCallback();\n }\n };\n\n var lastClip;\n for (var propName in this._tracks) {\n if (!this._tracks.hasOwnProperty(propName)) {\n continue;\n }\n var clip = createTrackClip(\n this, easing, oneTrackDone,\n this._tracks[propName], propName, forceAnimate\n );\n if (clip) {\n this._clipList.push(clip);\n clipCount++;\n\n // If start after added to animation\n if (this.animation) {\n this.animation.addClip(clip);\n }\n\n lastClip = clip;\n }\n }\n\n // Add during callback on the last clip\n if (lastClip) {\n var oldOnFrame = lastClip.onframe;\n lastClip.onframe = function (target, percent) {\n oldOnFrame(target, percent);\n\n for (var i = 0; i < self._onframeList.length; i++) {\n self._onframeList[i](target, percent);\n }\n };\n }\n\n // This optimization will help the case that in the upper application\n // the view may be refreshed frequently, where animation will be\n // called repeatly but nothing changed.\n if (!clipCount) {\n this._doneCallback();\n }\n return this;\n },\n /**\n * Stop animation\n * @param {boolean} forwardToLast If move to last frame before stop\n */\n stop: function (forwardToLast) {\n var clipList = this._clipList;\n var animation = this.animation;\n for (var i = 0; i < clipList.length; i++) {\n var clip = clipList[i];\n if (forwardToLast) {\n // Move to last frame before stop\n clip.onframe(this._target, 1);\n }\n animation && animation.removeClip(clip);\n }\n clipList.length = 0;\n },\n /**\n * Set when animation delay starts\n * @param {number} time 单位ms\n * @return {module:zrender/animation/Animator}\n */\n delay: function (time) {\n this._delay = time;\n return this;\n },\n /**\n * Add callback for animation end\n * @param {Function} cb\n * @return {module:zrender/animation/Animator}\n */\n done: function (cb) {\n if (cb) {\n this._doneList.push(cb);\n }\n return this;\n },\n\n /**\n * @return {Array.<module:zrender/animation/Clip>}\n */\n getClips: function () {\n return this._clipList;\n }\n};\n\nexport default Animator;","var dpr = 1;\n\n// If in browser environment\nif (typeof window !== 'undefined') {\n dpr = Math.max(window.devicePixelRatio || 1, 1);\n}\n\n/**\n * config默认配置项\n * @exports zrender/config\n * @author Kener (@Kener-林峰, kener.linfeng@gmail.com)\n */\n\n/**\n * Debug log mode:\n * 0: Do nothing, for release.\n * 1: console.error, for debug.\n */\nexport var debugMode = 0;\n\n// retina 屏幕优化\nexport var devicePixelRatio = dpr;\n","import {debugMode} from '../config';\n\nvar logError = function () {\n};\n\nif (debugMode === 1) {\n logError = console.error;\n}\n\nexport default logError;\n","import Animator from '../animation/Animator';\nimport logError from '../core/log';\nimport {\n isString,\n isFunction,\n isObject,\n isArrayLike,\n indexOf\n} from '../core/util';\n\n/**\n * @alias module:zrender/mixin/Animatable\n * @constructor\n */\nvar Animatable = function () {\n\n /**\n * @type {Array.<module:zrender/animation/Animator>}\n * @readOnly\n */\n this.animators = [];\n};\n\nAnimatable.prototype = {\n\n constructor: Animatable,\n\n /**\n * 动画\n *\n * @param {string} path The path to fetch value from object, like 'a.b.c'.\n * @param {boolean} [loop] Whether to loop animation.\n * @return {module:zrender/animation/Animator}\n * @example:\n * el.animate('style', false)\n * .when(1000, {x: 10} )\n * .done(function(){ // Animation done })\n * .start()\n */\n animate: function (path, loop) {\n var target;\n var animatingShape = false;\n var el = this;\n var zr = this.__zr;\n if (path) {\n var pathSplitted = path.split('.');\n var prop = el;\n // If animating shape\n animatingShape = pathSplitted[0] === 'shape';\n for (var i = 0, l = pathSplitted.length; i < l; i++) {\n if (!prop) {\n continue;\n }\n prop = prop[pathSplitted[i]];\n }\n if (prop) {\n target = prop;\n }\n }\n else {\n target = el;\n }\n\n if (!target) {\n logError(\n 'Property \"'\n + path\n + '\" is not existed in element '\n + el.id\n );\n return;\n }\n\n var animators = el.animators;\n\n var animator = new Animator(target, loop);\n\n animator.during(function (target) {\n el.dirty(animatingShape);\n })\n .done(function () {\n // FIXME Animator will not be removed if use `Animator#stop` to stop animation\n animators.splice(indexOf(animators, animator), 1);\n });\n\n animators.push(animator);\n\n // If animate after added to the zrender\n if (zr) {\n zr.animation.addAnimator(animator);\n }\n\n return animator;\n },\n\n /**\n * 停止动画\n * @param {boolean} forwardToLast If move to last frame before stop\n */\n stopAnimation: function (forwardToLast) {\n var animators = this.animators;\n var len = animators.length;\n for (var i = 0; i < len; i++) {\n animators[i].stop(forwardToLast);\n }\n animators.length = 0;\n\n return this;\n },\n\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 * @param {Object} target\n * @param {number} [time=500] Time in ms\n * @param {string} [easing='linear']\n * @param {number} [delay=0]\n * @param {Function} [callback]\n * @param {Function} [forceAnimate] Prevent stop animation and callback\n * immediently when target values are the same as current values.\n *\n * @example\n * // Animate position\n * el.animateTo({\n * position: [10, 10]\n * }, function () { // done })\n *\n * // Animate shape, style and position in 100ms, delayed 100ms, with cubicOut easing\n * el.animateTo({\n * shape: {\n * width: 500\n * },\n * style: {\n * fill: 'red'\n * }\n * position: [10, 10]\n * }, 100, 100, 'cubicOut', function () { // done })\n */\n // TODO Return animation key\n animateTo: function (target, time, delay, easing, callback, forceAnimate) {\n animateTo(this, target, time, delay, easing, callback, forceAnimate);\n },\n\n /**\n * Animate from the target state to current state.\n * The params and the return value are the same as `this.animateTo`.\n */\n animateFrom: function (target, time, delay, easing, callback, forceAnimate) {\n animateTo(this, target, time, delay, easing, callback, forceAnimate, true);\n }\n};\n\nfunction animateTo(animatable, target, time, delay, easing, callback, forceAnimate, reverse) {\n // animateTo(target, time, easing, callback);\n if (isString(delay)) {\n callback = easing;\n easing = delay;\n delay = 0;\n }\n // animateTo(target, time, delay, callback);\n else if (isFunction(easing)) {\n callback = easing;\n easing = 'linear';\n delay = 0;\n }\n // animateTo(target, time, callback);\n else if (isFunction(delay)) {\n callback = delay;\n delay = 0;\n }\n // animateTo(target, callback)\n else if (isFunction(time)) {\n callback = time;\n time = 500;\n }\n // animateTo(target)\n else if (!time) {\n time = 500;\n }\n // Stop all previous animations\n animatable.stopAnimation();\n animateToShallow(animatable, '', animatable, target, time, delay, reverse);\n\n // Animators may be removed immediately after start\n // if there is nothing to animate\n var animators = animatable.animators.slice();\n var count = animators.length;\n function done() {\n count--;\n if (!count) {\n callback && callback();\n }\n }\n\n // No animators. This should be checked before animators[i].start(),\n // because 'done' may be executed immediately if no need to animate.\n if (!count) {\n callback && callback();\n }\n // Start after all animators created\n // Incase any animator is done immediately when all animation properties are not changed\n for (var i = 0; i < animators.length; i++) {\n animators[i]\n .done(done)\n .start(easing, forceAnimate);\n }\n}\n\n/**\n * @param {string} path=''\n * @param {Object} source=animatable\n * @param {Object} target\n * @param {number} [time=500]\n * @param {number} [delay=0]\n * @param {boolean} [reverse] If `true`, animate\n * from the `target` to current state.\n *\n * @example\n * // Animate position\n * el._animateToShallow({\n * position: [10, 10]\n * })\n *\n * // Animate shape, style and position in 100ms, delayed 100ms\n * el._animateToShallow({\n * shape: {\n * width: 500\n * },\n * style: {\n * fill: 'red'\n * }\n * position: [10, 10]\n * }, 100, 100)\n */\nfunction animateToShallow(animatable, path, source, target, time, delay, reverse) {\n var objShallow = {};\n var propertyCount = 0;\n for (var name in target) {\n if (!target.hasOwnProperty(name)) {\n continue;\n }\n\n if (source[name] != null) {\n if (isObject(target[name]) && !isArrayLike(target[name])) {\n animateToShallow(\n animatable,\n path ? path + '.' + name : name,\n source[name],\n target[name],\n time,\n delay,\n reverse\n );\n }\n else {\n if (reverse) {\n objShallow[name] = source[name];\n setAttrByPath(animatable, path, name, target[name]);\n }\n else {\n objShallow[name] = target[name];\n }\n propertyCount++;\n }\n }\n else if (target[name] != null && !reverse) {\n setAttrByPath(animatable, path, name, target[name]);\n }\n }\n\n if (propertyCount > 0) {\n animatable.animate(path, false)\n .when(time == null ? 500 : time, objShallow)\n .delay(delay || 0);\n }\n}\n\nfunction setAttrByPath(el, path, name, value) {\n // Attr directly if not has property\n // FIXME, if some property not needed for element ?\n if (!path) {\n el.attr(name, value);\n }\n else {\n // Only support set shape or style\n var props = {};\n props[path] = {};\n props[path][name] = value;\n el.attr(props);\n }\n}\n\nexport default Animatable;","import guid from './core/guid';\nimport Eventful from './mixin/Eventful';\nimport Transformable from './mixin/Transformable';\nimport Animatable from './mixin/Animatable';\nimport * as zrUtil from './core/util';\n\n/**\n * @alias module:zrender/Element\n * @constructor\n * @extends {module:zrender/mixin/Animatable}\n * @extends {module:zrender/mixin/Transformable}\n * @extends {module:zrender/mixin/Eventful}\n */\nvar Element = function (opts) { // jshint ignore:line\n\n Transformable.call(this, opts);\n Eventful.call(this, opts);\n Animatable.call(this, opts);\n\n /**\n * 画布元素ID\n * @type {string}\n */\n this.id = opts.id || guid();\n};\n\nElement.prototype = {\n\n /**\n * 元素类型\n * Element type\n * @type {string}\n */\n type: 'element',\n\n /**\n * 元素名字\n * Element name\n * @type {string}\n */\n name: '',\n\n /**\n * ZRender 实例对象,会在 element 添加到 zrender 实例中后自动赋值\n * ZRender instance will be assigned when element is associated with zrender\n * @name module:/zrender/Element#__zr\n * @type {module:zrender/ZRender}\n */\n __zr: null,\n\n /**\n * 图形是否忽略为true时忽略图形的绘制以及事件触发\n * If ignore drawing and events of the element object\n * @name module:/zrender/Element#ignore\n * @type {boolean}\n * @default false\n */\n ignore: false,\n\n /**\n * 用于裁剪的路径(shape),所有 Group 内的路径在绘制时都会被这个路径裁剪\n * 该路径会继承被裁减对象的变换\n * @type {module:zrender/graphic/Path}\n * @see http://www.w3.org/TR/2dcontext/#clipping-region\n * @readOnly\n */\n clipPath: null,\n\n /**\n * 是否是 Group\n * @type {boolean}\n */\n isGroup: false,\n\n /**\n * Drift element\n * @param {number} dx dx on the global space\n * @param {number} dy dy on the global space\n */\n drift: function (dx, dy) {\n switch (this.draggable) {\n case 'horizontal':\n dy = 0;\n break;\n case 'vertical':\n dx = 0;\n break;\n }\n\n var m = this.transform;\n if (!m) {\n m = this.transform = [1, 0, 0, 1, 0, 0];\n }\n m[4] += dx;\n m[5] += dy;\n\n this.decomposeTransform();\n this.dirty(false);\n },\n\n /**\n * Hook before update\n */\n beforeUpdate: function () {},\n /**\n * Hook after update\n */\n afterUpdate: function () {},\n /**\n * Update each frame\n */\n update: function () {\n this.updateTransform();\n },\n\n /**\n * @param {Function} cb\n * @param {} context\n */\n traverse: function (cb, context) {},\n\n /**\n * @protected\n */\n attrKV: function (key, value) {\n if (key === 'position' || key === 'scale' || key === 'origin') {\n // Copy the array\n if (value) {\n var target = this[key];\n if (!target) {\n target = this[key] = [];\n }\n target[0] = value[0];\n target[1] = value[1];\n }\n }\n else {\n this[key] = value;\n }\n },\n\n /**\n * Hide the element\n */\n hide: function () {\n this.ignore = true;\n this.__zr && this.__zr.refresh();\n },\n\n /**\n * Show the element\n */\n show: function () {\n this.ignore = false;\n this.__zr && this.__zr.refresh();\n },\n\n /**\n * @param {string|Object} key\n * @param {*} value\n */\n attr: function (key, value) {\n if (typeof key === 'string') {\n this.attrKV(key, value);\n }\n else if (zrUtil.isObject(key)) {\n for (var name in key) {\n if (key.hasOwnProperty(name)) {\n this.attrKV(name, key[name]);\n }\n }\n }\n\n this.dirty(false);\n\n return this;\n },\n\n /**\n * @param {module:zrender/graphic/Path} clipPath\n */\n setClipPath: function (clipPath) {\n var zr = this.__zr;\n if (zr) {\n clipPath.addSelfToZr(zr);\n }\n\n // Remove previous clip path\n if (this.clipPath && this.clipPath !== clipPath) {\n this.removeClipPath();\n }\n\n this.clipPath = clipPath;\n clipPath.__zr = zr;\n clipPath.__clipTarget = this;\n\n this.dirty(false);\n },\n\n /**\n */\n removeClipPath: function () {\n var clipPath = this.clipPath;\n if (clipPath) {\n if (clipPath.__zr) {\n clipPath.removeSelfFromZr(clipPath.__zr);\n }\n\n clipPath.__zr = null;\n clipPath.__clipTarget = null;\n this.clipPath = null;\n\n this.dirty(false);\n }\n },\n\n /**\n * Add self from zrender instance.\n * Not recursively because it will be invoked when element added to storage.\n * @param {module:zrender/ZRender} zr\n */\n addSelfToZr: function (zr) {\n this.__zr = zr;\n // 添加动画\n var animators = this.animators;\n if (animators) {\n for (var i = 0; i < animators.length; i++) {\n zr.animation.addAnimator(animators[i]);\n }\n }\n\n if (this.clipPath) {\n this.clipPath.addSelfToZr(zr);\n }\n },\n\n /**\n * Remove self from zrender instance.\n * Not recursively because it will be invoked when element added to storage.\n * @param {module:zrender/ZRender} zr\n */\n removeSelfFromZr: function (zr) {\n this.__zr = null;\n // 移除动画\n var animators = this.animators;\n if (animators) {\n for (var i = 0; i < animators.length; i++) {\n zr.animation.removeAnimator(animators[i]);\n }\n }\n\n if (this.clipPath) {\n this.clipPath.removeSelfFromZr(zr);\n }\n }\n};\n\nzrUtil.mixin(Element, Animatable);\nzrUtil.mixin(Element, Transformable);\nzrUtil.mixin(Element, Eventful);\n\nexport default Element;","/**\n * @module echarts/core/BoundingRect\n */\n\nimport * as vec2 from './vector';\nimport * as matrix from './matrix';\n\nvar v2ApplyTransform = vec2.applyTransform;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\n\n/**\n * @alias module:echarts/core/BoundingRect\n */\nfunction BoundingRect(x, y, width, height) {\n\n if (width < 0) {\n x = x + width;\n width = -width;\n }\n if (height < 0) {\n y = y + height;\n height = -height;\n }\n\n /**\n * @type {number}\n */\n this.x = x;\n /**\n * @type {number}\n */\n this.y = y;\n /**\n * @type {number}\n */\n this.width = width;\n /**\n * @type {number}\n */\n this.height = height;\n}\n\nBoundingRect.prototype = {\n\n constructor: BoundingRect,\n\n /**\n * @param {module:echarts/core/BoundingRect} other\n */\n union: function (other) {\n var x = mathMin(other.x, this.x);\n var y = mathMin(other.y, this.y);\n\n this.width = mathMax(\n other.x + other.width,\n this.x + this.width\n ) - x;\n this.height = mathMax(\n other.y + other.height,\n this.y + this.height\n ) - y;\n this.x = x;\n this.y = y;\n },\n\n /**\n * @param {Array.<number>} m\n * @methods\n */\n applyTransform: (function () {\n var lt = [];\n var rb = [];\n var lb = [];\n var rt = [];\n return function (m) {\n // In case usage like this\n // el.getBoundingRect().applyTransform(el.transform)\n // And element has no transform\n if (!m) {\n return;\n }\n lt[0] = lb[0] = this.x;\n lt[1] = rt[1] = this.y;\n rb[0] = rt[0] = this.x + this.width;\n rb[1] = lb[1] = this.y + this.height;\n\n v2ApplyTransform(lt, lt, m);\n v2ApplyTransform(rb, rb, m);\n v2ApplyTransform(lb, lb, m);\n v2ApplyTransform(rt, rt, m);\n\n this.x = mathMin(lt[0], rb[0], lb[0], rt[0]);\n this.y = mathMin(lt[1], rb[1], lb[1], rt[1]);\n var maxX = mathMax(lt[0], rb[0], lb[0], rt[0]);\n var maxY = mathMax(lt[1], rb[1], lb[1], rt[1]);\n this.width = maxX - this.x;\n this.height = maxY - this.y;\n };\n })(),\n\n /**\n * Calculate matrix of transforming from self to target rect\n * @param {module:zrender/core/BoundingRect} b\n * @return {Array.<number>}\n */\n calculateTransform: function (b) {\n var a = this;\n var sx = b.width / a.width;\n var sy = b.height / a.height;\n\n var m = matrix.create();\n\n // 矩阵右乘\n matrix.translate(m, m, [-a.x, -a.y]);\n matrix.scale(m, m, [sx, sy]);\n matrix.translate(m, m, [b.x, b.y]);\n\n return m;\n },\n\n /**\n * @param {(module:echarts/core/BoundingRect|Object)} b\n * @return {boolean}\n */\n intersect: function (b) {\n if (!b) {\n return false;\n }\n\n if (!(b instanceof BoundingRect)) {\n // Normalize negative width/height.\n b = BoundingRect.create(b);\n }\n\n var a = this;\n var ax0 = a.x;\n var ax1 = a.x + a.width;\n var ay0 = a.y;\n var ay1 = a.y + a.height;\n\n var bx0 = b.x;\n var bx1 = b.x + b.width;\n var by0 = b.y;\n var by1 = b.y + b.height;\n\n return !(ax1 < bx0 || bx1 < ax0 || ay1 < by0 || by1 < ay0);\n },\n\n contain: function (x, y) {\n var rect = this;\n return x >= rect.x\n && x <= (rect.x + rect.width)\n && y >= rect.y\n && y <= (rect.y + rect.height);\n },\n\n /**\n * @return {module:echarts/core/BoundingRect}\n */\n clone: function () {\n return new BoundingRect(this.x, this.y, this.width, this.height);\n },\n\n /**\n * Copy from another rect\n */\n copy: function (other) {\n this.x = other.x;\n this.y = other.y;\n this.width = other.width;\n this.height = other.height;\n },\n\n plain: function () {\n return {\n x: this.x,\n y: this.y,\n width: this.width,\n height: this.height\n };\n }\n};\n\n/**\n * @param {Object|module:zrender/core/BoundingRect} rect\n * @param {number} rect.x\n * @param {number} rect.y\n * @param {number} rect.width\n * @param {number} rect.height\n * @return {module:zrender/core/BoundingRect}\n */\nBoundingRect.create = function (rect) {\n return new BoundingRect(rect.x, rect.y, rect.width, rect.height);\n};\n\nexport default BoundingRect;","/**\n * Group是一个容器可以插入子节点Group的变换也会被应用到子节点上\n * @module zrender/graphic/Group\n * @example\n * var Group = require('zrender/container/Group');\n * var Circle = require('zrender/graphic/shape/Circle');\n * var g = new Group();\n * g.position[0] = 100;\n * g.position[1] = 100;\n * g.add(new Circle({\n * style: {\n * x: 100,\n * y: 100,\n * r: 20,\n * }\n * }));\n * zr.add(g);\n */\n\nimport * as zrUtil from '../core/util';\nimport Element from '../Element';\nimport BoundingRect from '../core/BoundingRect';\n\n/**\n * @alias module:zrender/graphic/Group\n * @constructor\n * @extends module:zrender/mixin/Transformable\n * @extends module:zrender/mixin/Eventful\n */\nvar Group = function (opts) {\n\n opts = opts || {};\n\n Element.call(this, opts);\n\n for (var key in opts) {\n if (opts.hasOwnProperty(key)) {\n this[key] = opts[key];\n }\n }\n\n this._children = [];\n\n this.__storage = null;\n\n this.__dirty = true;\n};\n\nGroup.prototype = {\n\n constructor: Group,\n\n isGroup: true,\n\n /**\n * @type {string}\n */\n type: 'group',\n\n /**\n * 所有子孙元素是否响应鼠标事件\n * @name module:/zrender/container/Group#silent\n * @type {boolean}\n * @default false\n */\n silent: false,\n\n /**\n * @return {Array.<module:zrender/Element>}\n */\n children: function () {\n return this._children.slice();\n },\n\n /**\n * 获取指定 index 的儿子节点\n * @param {number} idx\n * @return {module:zrender/Element}\n */\n childAt: function (idx) {\n return this._children[idx];\n },\n\n /**\n * 获取指定名字的儿子节点\n * @param {string} name\n * @return {module:zrender/Element}\n */\n childOfName: function (name) {\n var children = this._children;\n for (var i = 0; i < children.length; i++) {\n if (children[i].name === name) {\n return children[i];\n }\n }\n },\n\n /**\n * @return {number}\n */\n childCount: function () {\n return this._children.length;\n },\n\n /**\n * 添加子节点到最后\n * @param {module:zrender/Element} child\n */\n add: function (child) {\n if (child && child !== this && child.parent !== this) {\n\n this._children.push(child);\n\n this._doAdd(child);\n }\n\n return this;\n },\n\n /**\n * 添加子节点在 nextSibling 之前\n * @param {module:zrender/Element} child\n * @param {module:zrender/Element} nextSibling\n */\n addBefore: function (child, nextSibling) {\n if (child && child !== this && child.parent !== this\n && nextSibling && nextSibling.parent === this) {\n\n var children = this._children;\n var idx = children.indexOf(nextSibling);\n\n if (idx >= 0) {\n children.splice(idx, 0, child);\n this._doAdd(child);\n }\n }\n\n return this;\n },\n\n _doAdd: function (child) {\n if (child.parent) {\n child.parent.remove(child);\n }\n\n child.parent = this;\n\n var storage = this.__storage;\n var zr = this.__zr;\n if (storage && storage !== child.__storage) {\n\n storage.addToStorage(child);\n\n if (child instanceof Group) {\n child.addChildrenToStorage(storage);\n }\n }\n\n zr && zr.refresh();\n },\n\n /**\n * 移除子节点\n * @param {module:zrender/Element} child\n */\n remove: function (child) {\n var zr = this.__zr;\n var storage = this.__storage;\n var children = this._children;\n\n var idx = zrUtil.indexOf(children, child);\n if (idx < 0) {\n return this;\n }\n children.splice(idx, 1);\n\n child.parent = null;\n\n if (storage) {\n\n storage.delFromStorage(child);\n\n if (child instanceof Group) {\n child.delChildrenFromStorage(storage);\n }\n }\n\n zr && zr.refresh();\n\n return this;\n },\n\n /**\n * 移除所有子节点\n */\n removeAll: function () {\n var children = this._children;\n var storage = this.__storage;\n var child;\n var i;\n for (i = 0; i < children.length; i++) {\n child = children[i];\n if (storage) {\n storage.delFromStorage(child);\n if (child instanceof Group) {\n child.delChildrenFromStorage(storage);\n }\n }\n child.parent = null;\n }\n children.length = 0;\n\n return this;\n },\n\n /**\n * 遍历所有子节点\n * @param {Function} cb\n * @param {} context\n */\n eachChild: function (cb, context) {\n var children = this._children;\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n cb.call(context, child, i);\n }\n return this;\n },\n\n /**\n * 深度优先遍历所有子孙节点\n * @param {Function} cb\n * @param {} context\n */\n traverse: function (cb, context) {\n for (var i = 0; i < this._children.length; i++) {\n var child = this._children[i];\n cb.call(context, child);\n\n if (child.type === 'group') {\n child.traverse(cb, context);\n }\n }\n return this;\n },\n\n addChildrenToStorage: function (storage) {\n for (var i = 0; i < this._children.length; i++) {\n var child = this._children[i];\n storage.addToStorage(child);\n if (child instanceof Group) {\n child.addChildrenToStorage(storage);\n }\n }\n },\n\n delChildrenFromStorage: function (storage) {\n for (var i = 0; i < this._children.length; i++) {\n var child = this._children[i];\n storage.delFromStorage(child);\n if (child instanceof Group) {\n child.delChildrenFromStorage(storage);\n }\n }\n },\n\n dirty: function () {\n this.__dirty = true;\n this.__zr && this.__zr.refresh();\n return this;\n },\n\n /**\n * @return {module:zrender/core/BoundingRect}\n */\n getBoundingRect: function (includeChildren) {\n // TODO Caching\n var rect = null;\n var tmpRect = new BoundingRect(0, 0, 0, 0);\n var children = includeChildren || this._children;\n var tmpMat = [];\n\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (child.ignore || child.invisible) {\n continue;\n }\n\n var childRect = child.getBoundingRect();\n var transform = child.getLocalTransform(tmpMat);\n // TODO\n // The boundingRect cacluated by transforming original\n // rect may be bigger than the actual bundingRect when rotation\n // is used. (Consider a circle rotated aginst its center, where\n // the actual boundingRect should be the same as that not be\n // rotated.) But we can not find better approach to calculate\n // actual boundingRect yet, considering performance.\n if (transform) {\n tmpRect.copy(childRect);\n tmpRect.applyTransform(transform);\n rect = rect || tmpRect.clone();\n rect.union(tmpRect);\n }\n else {\n rect = rect || childRect.clone();\n rect.union(childRect);\n }\n }\n return rect || tmpRect;\n }\n};\n\nzrUtil.inherits(Group, Element);\n\nexport default Group;","// https://github.com/mziccard/node-timsort\nvar DEFAULT_MIN_MERGE = 32;\n\nvar DEFAULT_MIN_GALLOPING = 7;\n\nvar DEFAULT_TMP_STORAGE_LENGTH = 256;\n\nfunction minRunLength(n) {\n var r = 0;\n\n while (n >= DEFAULT_MIN_MERGE) {\n r |= n & 1;\n n >>= 1;\n }\n\n return n + r;\n}\n\nfunction makeAscendingRun(array, lo, hi, compare) {\n var runHi = lo + 1;\n\n if (runHi === hi) {\n return 1;\n }\n\n if (compare(array[runHi++], array[lo]) < 0) {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) < 0) {\n runHi++;\n }\n\n reverseRun(array, lo, runHi);\n }\n else {\n while (runHi < hi && compare(array[runHi], array[runHi - 1]) >= 0) {\n runHi++;\n }\n }\n\n return runHi - lo;\n}\n\nfunction reverseRun(array, lo, hi) {\n hi--;\n\n while (lo < hi) {\n var t = array[lo];\n array[lo++] = array[hi];\n array[hi--] = t;\n }\n}\n\nfunction binaryInsertionSort(array, lo, hi, start, compare) {\n if (start === lo) {\n start++;\n }\n\n for (; start < hi; start++) {\n var pivot = array[start];\n\n var left = lo;\n var right = start;\n var mid;\n\n while (left < right) {\n mid = left + right >>> 1;\n\n if (compare(pivot, array[mid]) < 0) {\n right = mid;\n }\n else {\n left = mid + 1;\n }\n }\n\n var n = start - left;\n\n switch (n) {\n case 3:\n array[left + 3] = array[left + 2];\n\n case 2:\n array[left + 2] = array[left + 1];\n\n case 1:\n array[left + 1] = array[left];\n break;\n default:\n while (n > 0) {\n array[left + n] = array[left + n - 1];\n n--;\n }\n }\n\n array[left] = pivot;\n }\n}\n\nfunction gallopLeft(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n\n if (compare(value, array[start + hint]) > 0) {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) > 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n lastOffset += hint;\n offset += hint;\n }\n else {\n maxOffset = hint + 1;\n while (offset < maxOffset && compare(value, array[start + hint - offset]) <= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n }\n\n lastOffset++;\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n\n if (compare(value, array[start + m]) > 0) {\n lastOffset = m + 1;\n }\n else {\n offset = m;\n }\n }\n return offset;\n}\n\nfunction gallopRight(value, array, start, length, hint, compare) {\n var lastOffset = 0;\n var maxOffset = 0;\n var offset = 1;\n\n if (compare(value, array[start + hint]) < 0) {\n maxOffset = hint + 1;\n\n while (offset < maxOffset && compare(value, array[start + hint - offset]) < 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n var tmp = lastOffset;\n lastOffset = hint - offset;\n offset = hint - tmp;\n }\n else {\n maxOffset = length - hint;\n\n while (offset < maxOffset && compare(value, array[start + hint + offset]) >= 0) {\n lastOffset = offset;\n offset = (offset << 1) + 1;\n\n if (offset <= 0) {\n offset = maxOffset;\n }\n }\n\n if (offset > maxOffset) {\n offset = maxOffset;\n }\n\n lastOffset += hint;\n offset += hint;\n }\n\n lastOffset++;\n\n while (lastOffset < offset) {\n var m = lastOffset + (offset - lastOffset >>> 1);\n\n if (compare(value, array[start + m]) < 0) {\n offset = m;\n }\n else {\n lastOffset = m + 1;\n }\n }\n\n return offset;\n}\n\nfunction TimSort(array, compare) {\n var minGallop = DEFAULT_MIN_GALLOPING;\n var length = 0;\n var tmpStorageLength = DEFAULT_TMP_STORAGE_LENGTH;\n var stackLength = 0;\n var runStart;\n var runLength;\n var stackSize = 0;\n\n length = array.length;\n\n if (length < 2 * DEFAULT_TMP_STORAGE_LENGTH) {\n tmpStorageLength = length >>> 1;\n }\n\n var tmp = [];\n\n stackLength = length < 120 ? 5 : length < 1542 ? 10 : length < 119151 ? 19 : 40;\n\n runStart = [];\n runLength = [];\n\n function pushRun(_runStart, _runLength) {\n runStart[stackSize] = _runStart;\n runLength[stackSize] = _runLength;\n stackSize += 1;\n }\n\n function mergeRuns() {\n while (stackSize > 1) {\n var n = stackSize - 2;\n\n if (\n (n >= 1 && runLength[n - 1] <= runLength[n] + runLength[n + 1])\n || (n >= 2 && runLength[n - 2] <= runLength[n] + runLength[n - 1])\n ) {\n if (runLength[n - 1] < runLength[n + 1]) {\n n--;\n }\n }\n else if (runLength[n] > runLength[n + 1]) {\n break;\n }\n mergeAt(n);\n }\n }\n\n function forceMergeRuns() {\n while (stackSize > 1) {\n var n = stackSize - 2;\n\n if (n > 0 && runLength[n - 1] < runLength[n + 1]) {\n n--;\n }\n\n mergeAt(n);\n }\n }\n\n function mergeAt(i) {\n var start1 = runStart[i];\n var length1 = runLength[i];\n var start2 = runStart[i + 1];\n var length2 = runLength[i + 1];\n\n runLength[i] = length1 + length2;\n\n if (i === stackSize - 3) {\n runStart[i + 1] = runStart[i + 2];\n runLength[i + 1] = runLength[i + 2];\n }\n\n stackSize--;\n\n var k = gallopRight(array[start2], array, start1, length1, 0, compare);\n start1 += k;\n length1 -= k;\n\n if (length1 === 0) {\n return;\n }\n\n length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare);\n\n if (length2 === 0) {\n return;\n }\n\n if (length1 <= length2) {\n mergeLow(start1, length1, start2, length2);\n }\n else {\n mergeHigh(start1, length1, start2, length2);\n }\n }\n\n function mergeLow(start1, length1, start2, length2) {\n var i = 0;\n\n for (i = 0; i < length1; i++) {\n tmp[i] = array[start1 + i];\n }\n\n var cursor1 = 0;\n var cursor2 = start2;\n var dest = start1;\n\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n return;\n }\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n array[dest + length2] = tmp[cursor1];\n return;\n }\n\n var _minGallop = minGallop;\n var count1;\n var count2;\n var exit;\n\n while (1) {\n count1 = 0;\n count2 = 0;\n exit = false;\n\n do {\n if (compare(array[cursor2], tmp[cursor1]) < 0) {\n array[dest++] = array[cursor2++];\n count2++;\n count1 = 0;\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n }\n else {\n array[dest++] = tmp[cursor1++];\n count1++;\n count2 = 0;\n if (--length1 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < _minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = gallopRight(array[cursor2], tmp, cursor1, length1, 0, compare);\n\n if (count1 !== 0) {\n for (i = 0; i < count1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n\n dest += count1;\n cursor1 += count1;\n length1 -= count1;\n if (length1 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest++] = array[cursor2++];\n\n if (--length2 === 0) {\n exit = true;\n break;\n }\n\n count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare);\n\n if (count2 !== 0) {\n for (i = 0; i < count2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n\n dest += count2;\n cursor2 += count2;\n length2 -= count2;\n\n if (length2 === 0) {\n exit = true;\n break;\n }\n }\n array[dest++] = tmp[cursor1++];\n\n if (--length1 === 1) {\n exit = true;\n break;\n }\n\n _minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (_minGallop < 0) {\n _minGallop = 0;\n }\n\n _minGallop += 2;\n }\n\n minGallop = _minGallop;\n\n minGallop < 1 && (minGallop = 1);\n\n if (length1 === 1) {\n for (i = 0; i < length2; i++) {\n array[dest + i] = array[cursor2 + i];\n }\n array[dest + length2] = tmp[cursor1];\n }\n else if (length1 === 0) {\n throw new Error();\n // throw new Error('mergeLow preconditions were not respected');\n }\n else {\n for (i = 0; i < length1; i++) {\n array[dest + i] = tmp[cursor1 + i];\n }\n }\n }\n\n function mergeHigh(start1, length1, start2, length2) {\n var i = 0;\n\n for (i = 0; i < length2; i++) {\n tmp[i] = array[start2 + i];\n }\n\n var cursor1 = start1 + length1 - 1;\n var cursor2 = length2 - 1;\n var dest = start2 + length2 - 1;\n var customCursor = 0;\n var customDest = 0;\n\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n customCursor = dest - (length2 - 1);\n\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n\n return;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n return;\n }\n\n var _minGallop = minGallop;\n\n while (true) {\n var count1 = 0;\n var count2 = 0;\n var exit = false;\n\n do {\n if (compare(tmp[cursor2], array[cursor1]) < 0) {\n array[dest--] = array[cursor1--];\n count1++;\n count2 = 0;\n if (--length1 === 0) {\n exit = true;\n break;\n }\n }\n else {\n array[dest--] = tmp[cursor2--];\n count2++;\n count1 = 0;\n if (--length2 === 1) {\n exit = true;\n break;\n }\n }\n } while ((count1 | count2) < _minGallop);\n\n if (exit) {\n break;\n }\n\n do {\n count1 = length1 - gallopRight(tmp[cursor2], array, start1, length1, length1 - 1, compare);\n\n if (count1 !== 0) {\n dest -= count1;\n cursor1 -= count1;\n length1 -= count1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = count1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n if (length1 === 0) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = tmp[cursor2--];\n\n if (--length2 === 1) {\n exit = true;\n break;\n }\n\n count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare);\n\n if (count2 !== 0) {\n dest -= count2;\n cursor2 -= count2;\n length2 -= count2;\n customDest = dest + 1;\n customCursor = cursor2 + 1;\n\n for (i = 0; i < count2; i++) {\n array[customDest + i] = tmp[customCursor + i];\n }\n\n if (length2 <= 1) {\n exit = true;\n break;\n }\n }\n\n array[dest--] = array[cursor1--];\n\n if (--length1 === 0) {\n exit = true;\n break;\n }\n\n _minGallop--;\n } while (count1 >= DEFAULT_MIN_GALLOPING || count2 >= DEFAULT_MIN_GALLOPING);\n\n if (exit) {\n break;\n }\n\n if (_minGallop < 0) {\n _minGallop = 0;\n }\n\n _minGallop += 2;\n }\n\n minGallop = _minGallop;\n\n if (minGallop < 1) {\n minGallop = 1;\n }\n\n if (length2 === 1) {\n dest -= length1;\n cursor1 -= length1;\n customDest = dest + 1;\n customCursor = cursor1 + 1;\n\n for (i = length1 - 1; i >= 0; i--) {\n array[customDest + i] = array[customCursor + i];\n }\n\n array[dest] = tmp[cursor2];\n }\n else if (length2 === 0) {\n throw new Error();\n // throw new Error('mergeHigh preconditions were not respected');\n }\n else {\n customCursor = dest - (length2 - 1);\n for (i = 0; i < length2; i++) {\n array[customCursor + i] = tmp[i];\n }\n }\n }\n\n this.mergeRuns = mergeRuns;\n this.forceMergeRuns = forceMergeRuns;\n this.pushRun = pushRun;\n}\n\nexport default function sort(array, compare, lo, hi) {\n if (!lo) {\n lo = 0;\n }\n if (!hi) {\n hi = array.length;\n }\n\n var remaining = hi - lo;\n\n if (remaining < 2) {\n return;\n }\n\n var runLength = 0;\n\n if (remaining < DEFAULT_MIN_MERGE) {\n runLength = makeAscendingRun(array, lo, hi, compare);\n binaryInsertionSort(array, lo, hi, lo + runLength, compare);\n return;\n }\n\n var ts = new TimSort(array, compare);\n\n var minRun = minRunLength(remaining);\n\n do {\n runLength = makeAscendingRun(array, lo, hi, compare);\n if (runLength < minRun) {\n var force = remaining;\n if (force > minRun) {\n force = minRun;\n }\n\n binaryInsertionSort(array, lo, lo + force, lo + runLength, compare);\n runLength = force;\n }\n\n ts.pushRun(lo, runLength);\n ts.mergeRuns();\n\n remaining -= runLength;\n lo += runLength;\n } while (remaining !== 0);\n\n ts.forceMergeRuns();\n}\n","import * as util from './core/util';\nimport env from './core/env';\nimport Group from './container/Group';\n\n// Use timsort because in most case elements are partially sorted\n// https://jsfiddle.net/pissang/jr4x7mdm/8/\nimport timsort from './core/timsort';\n\nfunction shapeCompareFunc(a, b) {\n if (a.zlevel === b.zlevel) {\n if (a.z === b.z) {\n // if (a.z2 === b.z2) {\n // // FIXME Slow has renderidx compare\n // // http://stackoverflow.com/questions/20883421/sorting-in-javascript-should-every-compare-function-have-a-return-0-statement\n // // https://github.com/v8/v8/blob/47cce544a31ed5577ffe2963f67acb4144ee0232/src/js/array.js#L1012\n // return a.__renderidx - b.__renderidx;\n // }\n return a.z2 - b.z2;\n }\n return a.z - b.z;\n }\n return a.zlevel - b.zlevel;\n}\n/**\n * 内容仓库 (M)\n * @alias module:zrender/Storage\n * @constructor\n */\nvar Storage = function () { // jshint ignore:line\n this._roots = [];\n\n this._displayList = [];\n\n this._displayListLen = 0;\n};\n\nStorage.prototype = {\n\n constructor: Storage,\n\n /**\n * @param {Function} cb\n *\n */\n traverse: function (cb, context) {\n for (var i = 0; i < this._roots.length; i++) {\n this._roots[i].traverse(cb, context);\n }\n },\n\n /**\n * 返回所有图形的绘制队列\n * @param {boolean} [update=false] 是否在返回前更新该数组\n * @param {boolean} [includeIgnore=false] 是否包含 ignore 的数组, 在 update 为 true 的时候有效\n *\n * 详见{@link module:zrender/graphic/Displayable.prototype.updateDisplayList}\n * @return {Array.<module:zrender/graphic/Displayable>}\n */\n getDisplayList: function (update, includeIgnore) {\n includeIgnore = includeIgnore || false;\n if (update) {\n this.updateDisplayList(includeIgnore);\n }\n return this._displayList;\n },\n\n /**\n * 更新图形的绘制队列。\n * 每次绘制前都会调用该方法会先深度优先遍历整个树更新所有Group和Shape的变换并且把所有可见的Shape保存到数组中\n * 最后根据绘制的优先级zlevel > z > 插入顺序)排序得到绘制队列\n * @param {boolean} [includeIgnore=false] 是否包含 ignore 的数组\n */\n updateDisplayList: function (includeIgnore) {\n this._displayListLen = 0;\n\n var roots = this._roots;\n var displayList = this._displayList;\n for (var i = 0, len = roots.length; i < len; i++) {\n this._updateAndAddDisplayable(roots[i], null, includeIgnore);\n }\n\n displayList.length = this._displayListLen;\n\n env.canvasSupported && timsort(displayList, shapeCompareFunc);\n },\n\n _updateAndAddDisplayable: function (el, clipPaths, includeIgnore) {\n\n if (el.ignore && !includeIgnore) {\n return;\n }\n\n el.beforeUpdate();\n\n if (el.__dirty) {\n\n el.update();\n\n }\n\n el.afterUpdate();\n\n var userSetClipPath = el.clipPath;\n if (userSetClipPath) {\n\n // FIXME 效率影响\n if (clipPaths) {\n clipPaths = clipPaths.slice();\n }\n else {\n clipPaths = [];\n }\n\n var currentClipPath = userSetClipPath;\n var parentClipPath = el;\n // Recursively add clip path\n while (currentClipPath) {\n // clipPath 的变换是基于使用这个 clipPath 的元素\n currentClipPath.parent = parentClipPath;\n currentClipPath.updateTransform();\n\n clipPaths.push(currentClipPath);\n\n parentClipPath = currentClipPath;\n currentClipPath = currentClipPath.clipPath;\n }\n }\n\n if (el.isGroup) {\n var children = el._children;\n\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n\n // Force to mark as dirty if group is dirty\n // FIXME __dirtyPath ?\n if (el.__dirty) {\n child.__dirty = true;\n }\n\n this._updateAndAddDisplayable(child, clipPaths, includeIgnore);\n }\n\n // Mark group clean here\n el.__dirty = false;\n\n }\n else {\n el.__clipPaths = clipPaths;\n\n this._displayList[this._displayListLen++] = el;\n }\n },\n\n /**\n * 添加图形(Shape)或者组(Group)到根节点\n * @param {module:zrender/Element} el\n */\n addRoot: function (el) {\n if (el.__storage === this) {\n return;\n }\n\n if (el instanceof Group) {\n el.addChildrenToStorage(this);\n }\n\n this.addToStorage(el);\n this._roots.push(el);\n },\n\n /**\n * 删除指定的图形(Shape)或者组(Group)\n * @param {string|Array.<string>} [el] 如果为空清空整个Storage\n */\n delRoot: function (el) {\n if (el == null) {\n // 不指定el清空\n for (var i = 0; i < this._roots.length; i++) {\n var root = this._roots[i];\n if (root instanceof Group) {\n root.delChildrenFromStorage(this);\n }\n }\n\n this._roots = [];\n this._displayList = [];\n this._displayListLen = 0;\n\n return;\n }\n\n if (el instanceof Array) {\n for (var i = 0, l = el.length; i < l; i++) {\n this.delRoot(el[i]);\n }\n return;\n }\n\n\n var idx = util.indexOf(this._roots, el);\n if (idx >= 0) {\n this.delFromStorage(el);\n this._roots.splice(idx, 1);\n if (el instanceof Group) {\n el.delChildrenFromStorage(this);\n }\n }\n },\n\n addToStorage: function (el) {\n if (el) {\n el.__storage = this;\n el.dirty(false);\n }\n return this;\n },\n\n delFromStorage: function (el) {\n if (el) {\n el.__storage = null;\n }\n\n return this;\n },\n\n /**\n * 清空并且释放Storage\n */\n dispose: function () {\n this._renderList =\n this._roots = null;\n },\n\n displayableSortFunc: shapeCompareFunc\n};\n\nexport default Storage;","\nvar SHADOW_PROPS = {\n 'shadowBlur': 1,\n 'shadowOffsetX': 1,\n 'shadowOffsetY': 1,\n 'textShadowBlur': 1,\n 'textShadowOffsetX': 1,\n 'textShadowOffsetY': 1,\n 'textBoxShadowBlur': 1,\n 'textBoxShadowOffsetX': 1,\n 'textBoxShadowOffsetY': 1\n};\n\nexport default function (ctx, propName, value) {\n if (SHADOW_PROPS.hasOwnProperty(propName)) {\n return value *= ctx.dpr;\n }\n return value;\n}\n","\nexport var ContextCachedBy = {\n NONE: 0,\n STYLE_BIND: 1,\n PLAIN_TEXT: 2\n};\n\n// Avoid confused with 0/false.\nexport var WILL_BE_RESTORED = 9;\n","\nimport fixShadow from './helper/fixShadow';\nimport {ContextCachedBy} from './constant';\n\nvar STYLE_COMMON_PROPS = [\n ['shadowBlur', 0], ['shadowOffsetX', 0], ['shadowOffsetY', 0], ['shadowColor', '#000'],\n ['lineCap', 'butt'], ['lineJoin', 'miter'], ['miterLimit', 10]\n];\n\n// var SHADOW_PROPS = STYLE_COMMON_PROPS.slice(0, 4);\n// var LINE_PROPS = STYLE_COMMON_PROPS.slice(4);\n\nvar Style = function (opts) {\n this.extendFrom(opts, false);\n};\n\nfunction createLinearGradient(ctx, obj, rect) {\n var x = obj.x == null ? 0 : obj.x;\n var x2 = obj.x2 == null ? 1 : obj.x2;\n var y = obj.y == null ? 0 : obj.y;\n var y2 = obj.y2 == null ? 0 : obj.y2;\n\n if (!obj.global) {\n x = x * rect.width + rect.x;\n x2 = x2 * rect.width + rect.x;\n y = y * rect.height + rect.y;\n y2 = y2 * rect.height + rect.y;\n }\n\n // Fix NaN when rect is Infinity\n x = isNaN(x) ? 0 : x;\n x2 = isNaN(x2) ? 1 : x2;\n y = isNaN(y) ? 0 : y;\n y2 = isNaN(y2) ? 0 : y2;\n\n var canvasGradient = ctx.createLinearGradient(x, y, x2, y2);\n\n return canvasGradient;\n}\n\nfunction createRadialGradient(ctx, obj, rect) {\n var width = rect.width;\n var height = rect.height;\n var min = Math.min(width, height);\n\n var x = obj.x == null ? 0.5 : obj.x;\n var y = obj.y == null ? 0.5 : obj.y;\n var r = obj.r == null ? 0.5 : obj.r;\n if (!obj.global) {\n x = x * width + rect.x;\n y = y * height + rect.y;\n r = r * min;\n }\n\n var canvasGradient = ctx.createRadialGradient(x, y, 0, x, y, r);\n\n return canvasGradient;\n}\n\n\nStyle.prototype = {\n\n constructor: Style,\n\n /**\n * @type {string}\n */\n fill: '#000',\n\n /**\n * @type {string}\n */\n stroke: null,\n\n /**\n * @type {number}\n */\n opacity: 1,\n\n /**\n * @type {number}\n */\n fillOpacity: null,\n\n /**\n * @type {number}\n */\n strokeOpacity: null,\n\n /**\n * `true` is not supported.\n * `false`/`null`/`undefined` are the same.\n * `false` is used to remove lineDash in some\n * case that `null`/`undefined` can not be set.\n * (e.g., emphasis.lineStyle in echarts)\n * @type {Array.<number>|boolean}\n */\n lineDash: null,\n\n /**\n * @type {number}\n */\n lineDashOffset: 0,\n\n /**\n * @type {number}\n */\n shadowBlur: 0,\n\n /**\n * @type {number}\n */\n shadowOffsetX: 0,\n\n /**\n * @type {number}\n */\n shadowOffsetY: 0,\n\n /**\n * @type {number}\n */\n lineWidth: 1,\n\n /**\n * If stroke ignore scale\n * @type {Boolean}\n */\n strokeNoScale: false,\n\n // Bounding rect text configuration\n // Not affected by element transform\n /**\n * @type {string}\n */\n text: null,\n\n /**\n * If `fontSize` or `fontFamily` exists, `font` will be reset by\n * `fontSize`, `fontStyle`, `fontWeight`, `fontFamily`.\n * So do not visit it directly in upper application (like echarts),\n * but use `contain/text#makeFont` instead.\n * @type {string}\n */\n font: null,\n\n /**\n * The same as font. Use font please.\n * @deprecated\n * @type {string}\n */\n textFont: null,\n\n /**\n * It helps merging respectively, rather than parsing an entire font string.\n * @type {string}\n */\n fontStyle: null,\n\n /**\n * It helps merging respectively, rather than parsing an entire font string.\n * @type {string}\n */\n fontWeight: null,\n\n /**\n * It helps merging respectively, rather than parsing an entire font string.\n * Should be 12 but not '12px'.\n * @type {number}\n */\n fontSize: null,\n\n /**\n * It helps merging respectively, rather than parsing an entire font string.\n * @type {string}\n */\n fontFamily: null,\n\n /**\n * Reserved for special functinality, like 'hr'.\n * @type {string}\n */\n textTag: null,\n\n /**\n * @type {string}\n */\n textFill: '#000',\n\n /**\n * @type {string}\n */\n textStroke: null,\n\n /**\n * @type {number}\n */\n textWidth: null,\n\n /**\n * Only for textBackground.\n * @type {number}\n */\n textHeight: null,\n\n /**\n * textStroke may be set as some color as a default\n * value in upper applicaion, where the default value\n * of textStrokeWidth should be 0 to make sure that\n * user can choose to do not use text stroke.\n * @type {number}\n */\n textStrokeWidth: 0,\n\n /**\n * @type {number}\n */\n textLineHeight: null,\n\n /**\n * 'inside', 'left', 'right', 'top', 'bottom'\n * [x, y]\n * Based on x, y of rect.\n * @type {string|Array.<number>}\n * @default 'inside'\n */\n textPosition: 'inside',\n\n /**\n * If not specified, use the boundingRect of a `displayable`.\n * @type {Object}\n */\n textRect: null,\n\n /**\n * [x, y]\n * @type {Array.<number>}\n */\n textOffset: null,\n\n /**\n * @type {string}\n */\n textAlign: null,\n\n /**\n * @type {string}\n */\n textVerticalAlign: null,\n\n /**\n * @type {number}\n */\n textDistance: 5,\n\n /**\n * @type {string}\n */\n textShadowColor: 'transparent',\n\n /**\n * @type {number}\n */\n textShadowBlur: 0,\n\n /**\n * @type {number}\n */\n textShadowOffsetX: 0,\n\n /**\n * @type {number}\n */\n textShadowOffsetY: 0,\n\n /**\n * @type {string}\n */\n textBoxShadowColor: 'transparent',\n\n /**\n * @type {number}\n */\n textBoxShadowBlur: 0,\n\n /**\n * @type {number}\n */\n textBoxShadowOffsetX: 0,\n\n /**\n * @type {number}\n */\n textBoxShadowOffsetY: 0,\n\n /**\n * Whether transform text.\n * Only available in Path and Image element,\n * where the text is called as `RectText`.\n * @type {boolean}\n */\n transformText: false,\n\n /**\n * Text rotate around position of Path or Image.\n * The origin of the rotation can be specified by `textOrigin`.\n * Only available in Path and Image element,\n * where the text is called as `RectText`.\n */\n textRotation: 0,\n\n /**\n * Text origin of text rotation.\n * Useful in the case like label rotation of circular symbol.\n * Only available in Path and Image element, where the text is called\n * as `RectText` and the element is called as \"host element\".\n * The value can be:\n * + If specified as a coordinate like `[10, 40]`, it is the `[x, y]`\n * base on the left-top corner of the rect of its host element.\n * + If specified as a string `center`, it is the center of the rect of\n * its host element.\n * + By default, this origin is the `textPosition`.\n * @type {string|Array.<number>}\n */\n textOrigin: null,\n\n /**\n * @type {string}\n */\n textBackgroundColor: null,\n\n /**\n * @type {string}\n */\n textBorderColor: null,\n\n /**\n * @type {number}\n */\n textBorderWidth: 0,\n\n /**\n * @type {number}\n */\n textBorderRadius: 0,\n\n /**\n * Can be `2` or `[2, 4]` or `[2, 3, 4, 5]`\n * @type {number|Array.<number>}\n */\n textPadding: null,\n\n /**\n * Text styles for rich text.\n * @type {Object}\n */\n rich: null,\n\n /**\n * {outerWidth, outerHeight, ellipsis, placeholder}\n * @type {Object}\n */\n truncate: null,\n\n /**\n * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation\n * @type {string}\n */\n blend: null,\n\n /**\n * @param {CanvasRenderingContext2D} ctx\n */\n bind: function (ctx, el, prevEl) {\n var style = this;\n var prevStyle = prevEl && prevEl.style;\n // If no prevStyle, it means first draw.\n // Only apply cache if the last time cachced by this function.\n var notCheckCache = !prevStyle || ctx.__attrCachedBy !== ContextCachedBy.STYLE_BIND;\n\n ctx.__attrCachedBy = ContextCachedBy.STYLE_BIND;\n\n for (var i = 0; i < STYLE_COMMON_PROPS.length; i++) {\n var prop = STYLE_COMMON_PROPS[i];\n var styleName = prop[0];\n\n if (notCheckCache || style[styleName] !== prevStyle[styleName]) {\n // FIXME Invalid property value will cause style leak from previous element.\n ctx[styleName] =\n fixShadow(ctx, styleName, style[styleName] || prop[1]);\n }\n }\n\n if ((notCheckCache || style.fill !== prevStyle.fill)) {\n ctx.fillStyle = style.fill;\n }\n if ((notCheckCache || style.stroke !== prevStyle.stroke)) {\n ctx.strokeStyle = style.stroke;\n }\n if ((notCheckCache || style.opacity !== prevStyle.opacity)) {\n ctx.globalAlpha = style.opacity == null ? 1 : style.opacity;\n }\n\n if ((notCheckCache || style.blend !== prevStyle.blend)) {\n ctx.globalCompositeOperation = style.blend || 'source-over';\n }\n if (this.hasStroke()) {\n var lineWidth = style.lineWidth;\n ctx.lineWidth = lineWidth / (\n (this.strokeNoScale && el && el.getLineScale) ? el.getLineScale() : 1\n );\n }\n },\n\n hasFill: function () {\n var fill = this.fill;\n return fill != null && fill !== 'none';\n },\n\n hasStroke: function () {\n var stroke = this.stroke;\n return stroke != null && stroke !== 'none' && this.lineWidth > 0;\n },\n\n /**\n * Extend from other style\n * @param {zrender/graphic/Style} otherStyle\n * @param {boolean} overwrite true: overwrirte any way.\n * false: overwrite only when !target.hasOwnProperty\n * others: overwrite when property is not null/undefined.\n */\n extendFrom: function (otherStyle, overwrite) {\n if (otherStyle) {\n for (var name in otherStyle) {\n if (otherStyle.hasOwnProperty(name)\n && (overwrite === true\n || (\n overwrite === false\n ? !this.hasOwnProperty(name)\n : otherStyle[name] != null\n )\n )\n ) {\n this[name] = otherStyle[name];\n }\n }\n }\n },\n\n /**\n * Batch setting style with a given object\n * @param {Object|string} obj\n * @param {*} [obj]\n */\n set: function (obj, value) {\n if (typeof obj === 'string') {\n this[obj] = value;\n }\n else {\n this.extendFrom(obj, true);\n }\n },\n\n /**\n * Clone\n * @return {zrender/graphic/Style} [description]\n */\n clone: function () {\n var newStyle = new this.constructor();\n newStyle.extendFrom(this, true);\n return newStyle;\n },\n\n getGradient: function (ctx, obj, rect) {\n var method = obj.type === 'radial' ? createRadialGradient : createLinearGradient;\n var canvasGradient = method(ctx, obj, rect);\n var colorStops = obj.colorStops;\n for (var i = 0; i < colorStops.length; i++) {\n canvasGradient.addColorStop(\n colorStops[i].offset, colorStops[i].color\n );\n }\n return canvasGradient;\n }\n\n};\n\nvar styleProto = Style.prototype;\nfor (var i = 0; i < STYLE_COMMON_PROPS.length; i++) {\n var prop = STYLE_COMMON_PROPS[i];\n if (!(prop[0] in styleProto)) {\n styleProto[prop[0]] = prop[1];\n }\n}\n\n// Provide for others\nStyle.getGradient = styleProto.getGradient;\n\nexport default Style;","\nvar Pattern = function (image, repeat) {\n // Should do nothing more in this constructor. Because gradient can be\n // declard by `color: {image: ...}`, where this constructor will not be called.\n\n this.image = image;\n this.repeat = repeat;\n\n // Can be cloned\n this.type = 'pattern';\n};\n\nPattern.prototype.getCanvasPattern = function (ctx) {\n return ctx.createPattern(this.image, this.repeat || 'repeat');\n};\n\nexport default Pattern;","/**\n * @module zrender/Layer\n * @author pissang(https://www.github.com/pissang)\n */\n\nimport * as util from './core/util';\nimport {devicePixelRatio} from './config';\nimport Style from './graphic/Style';\nimport Pattern from './graphic/Pattern';\n\nfunction returnFalse() {\n return false;\n}\n\n/**\n * 创建dom\n *\n * @inner\n * @param {string} id dom id 待用\n * @param {Painter} painter painter instance\n * @param {number} number\n */\nfunction createDom(id, painter, dpr) {\n var newDom = util.createCanvas();\n var width = painter.getWidth();\n var height = painter.getHeight();\n\n var newDomStyle = newDom.style;\n if (newDomStyle) { // In node or some other non-browser environment\n newDomStyle.position = 'absolute';\n newDomStyle.left = 0;\n newDomStyle.top = 0;\n newDomStyle.width = width + 'px';\n newDomStyle.height = height + 'px';\n\n newDom.setAttribute('data-zr-dom-id', id);\n }\n\n newDom.width = width * dpr;\n newDom.height = height * dpr;\n\n return newDom;\n}\n\n/**\n * @alias module:zrender/Layer\n * @constructor\n * @extends module:zrender/mixin/Transformable\n * @param {string} id\n * @param {module:zrender/Painter} painter\n * @param {number} [dpr]\n */\nvar Layer = function (id, painter, dpr) {\n var dom;\n dpr = dpr || devicePixelRatio;\n if (typeof id === 'string') {\n dom = createDom(id, painter, dpr);\n }\n // Not using isDom because in node it will return false\n else if (util.isObject(id)) {\n dom = id;\n id = dom.id;\n }\n this.id = id;\n this.dom = dom;\n\n var domStyle = dom.style;\n if (domStyle) { // Not in node\n dom.onselectstart = returnFalse; // 避免页面选中的尴尬\n domStyle['-webkit-user-select'] = 'none';\n domStyle['user-select'] = 'none';\n domStyle['-webkit-touch-callout'] = 'none';\n domStyle['-webkit-tap-highlight-color'] = 'rgba(0,0,0,0)';\n domStyle['padding'] = 0; // eslint-disable-line dot-notation\n domStyle['margin'] = 0; // eslint-disable-line dot-notation\n domStyle['border-width'] = 0;\n }\n\n this.domBack = null;\n this.ctxBack = null;\n\n this.painter = painter;\n\n this.config = null;\n\n // Configs\n /**\n * 每次清空画布的颜色\n * @type {string}\n * @default 0\n */\n this.clearColor = 0;\n /**\n * 是否开启动态模糊\n * @type {boolean}\n * @default false\n */\n this.motionBlur = false;\n /**\n * 在开启动态模糊的时候使用与上一帧混合的alpha值值越大尾迹越明显\n * @type {number}\n * @default 0.7\n */\n this.lastFrameAlpha = 0.7;\n\n /**\n * Layer dpr\n * @type {number}\n */\n this.dpr = dpr;\n};\n\nLayer.prototype = {\n\n constructor: Layer,\n\n __dirty: true,\n\n __used: false,\n\n __drawIndex: 0,\n __startIndex: 0,\n __endIndex: 0,\n\n incremental: false,\n\n getElementCount: function () {\n return this.__endIndex - this.__startIndex;\n },\n\n initContext: function () {\n this.ctx = this.dom.getContext('2d');\n this.ctx.dpr = this.dpr;\n },\n\n createBackBuffer: function () {\n var dpr = this.dpr;\n\n this.domBack = createDom('back-' + this.id, this.painter, dpr);\n this.ctxBack = this.domBack.getContext('2d');\n\n if (dpr !== 1) {\n this.ctxBack.scale(dpr, dpr);\n }\n },\n\n /**\n * @param {number} width\n * @param {number} height\n */\n resize: function (width, height) {\n var dpr = this.dpr;\n\n var dom = this.dom;\n var domStyle = dom.style;\n var domBack = this.domBack;\n\n if (domStyle) {\n domStyle.width = width + 'px';\n domStyle.height = height + 'px';\n }\n\n dom.width = width * dpr;\n dom.height = height * dpr;\n\n if (domBack) {\n domBack.width = width * dpr;\n domBack.height = height * dpr;\n\n if (dpr !== 1) {\n this.ctxBack.scale(dpr, dpr);\n }\n }\n },\n\n /**\n * 清空该层画布\n * @param {boolean} [clearAll]=false Clear all with out motion blur\n * @param {Color} [clearColor]\n */\n clear: function (clearAll, clearColor) {\n var dom = this.dom;\n var ctx = this.ctx;\n var width = dom.width;\n var height = dom.height;\n\n var clearColor = clearColor || this.clearColor;\n var haveMotionBLur = this.motionBlur && !clearAll;\n var lastFrameAlpha = this.lastFrameAlpha;\n\n var dpr = this.dpr;\n\n if (haveMotionBLur) {\n if (!this.domBack) {\n this.createBackBuffer();\n }\n\n this.ctxBack.globalCompositeOperation = 'copy';\n this.ctxBack.drawImage(\n dom, 0, 0,\n width / dpr,\n height / dpr\n );\n }\n\n ctx.clearRect(0, 0, width, height);\n if (clearColor && clearColor !== 'transparent') {\n var clearColorGradientOrPattern;\n // Gradient\n if (clearColor.colorStops) {\n // Cache canvas gradient\n clearColorGradientOrPattern = clearColor.__canvasGradient || Style.getGradient(ctx, clearColor, {\n x: 0,\n y: 0,\n width: width,\n height: height\n });\n\n clearColor.__canvasGradient = clearColorGradientOrPattern;\n }\n // Pattern\n else if (clearColor.image) {\n clearColorGradientOrPattern = Pattern.prototype.getCanvasPattern.call(clearColor, ctx);\n }\n ctx.save();\n ctx.fillStyle = clearColorGradientOrPattern || clearColor;\n ctx.fillRect(0, 0, width, height);\n ctx.restore();\n }\n\n if (haveMotionBLur) {\n var domBack = this.domBack;\n ctx.save();\n ctx.globalAlpha = lastFrameAlpha;\n ctx.drawImage(domBack, 0, 0, width, height);\n ctx.restore();\n }\n }\n};\n\nexport default Layer;","\nexport default (\n typeof window !== 'undefined'\n && (\n (window.requestAnimationFrame && window.requestAnimationFrame.bind(window))\n // https://github.com/ecomfe/zrender/issues/189#issuecomment-224919809\n || (window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window))\n || window.mozRequestAnimationFrame\n || window.webkitRequestAnimationFrame\n )\n) || function (func) {\n setTimeout(func, 16);\n};","\nimport LRU from '../../core/LRU';\n\nvar globalImageCache = new LRU(50);\n\n/**\n * @param {string|HTMLImageElement|HTMLCanvasElement|Canvas} newImageOrSrc\n * @return {HTMLImageElement|HTMLCanvasElement|Canvas} image\n */\nexport function findExistImage(newImageOrSrc) {\n if (typeof newImageOrSrc === 'string') {\n var cachedImgObj = globalImageCache.get(newImageOrSrc);\n return cachedImgObj && cachedImgObj.image;\n }\n else {\n return newImageOrSrc;\n }\n}\n\n/**\n * Caution: User should cache loaded images, but not just count on LRU.\n * Consider if required images more than LRU size, will dead loop occur?\n *\n * @param {string|HTMLImageElement|HTMLCanvasElement|Canvas} newImageOrSrc\n * @param {HTMLImageElement|HTMLCanvasElement|Canvas} image Existent image.\n * @param {module:zrender/Element} [hostEl] For calling `dirty`.\n * @param {Function} [cb] params: (image, cbPayload)\n * @param {Object} [cbPayload] Payload on cb calling.\n * @return {HTMLImageElement|HTMLCanvasElement|Canvas} image\n */\nexport function createOrUpdateImage(newImageOrSrc, image, hostEl, cb, cbPayload) {\n if (!newImageOrSrc) {\n return image;\n }\n else if (typeof newImageOrSrc === 'string') {\n\n // Image should not be loaded repeatly.\n if ((image && image.__zrImageSrc === newImageOrSrc) || !hostEl) {\n return image;\n }\n\n // Only when there is no existent image or existent image src\n // is different, this method is responsible for load.\n var cachedImgObj = globalImageCache.get(newImageOrSrc);\n\n var pendingWrap = {hostEl: hostEl, cb: cb, cbPayload: cbPayload};\n\n if (cachedImgObj) {\n image = cachedImgObj.image;\n !isImageReady(image) && cachedImgObj.pending.push(pendingWrap);\n }\n else {\n image = new Image();\n image.onload = image.onerror = imageOnLoad;\n\n globalImageCache.put(\n newImageOrSrc,\n image.__cachedImgObj = {\n image: image,\n pending: [pendingWrap]\n }\n );\n\n image.src = image.__zrImageSrc = newImageOrSrc;\n }\n\n return image;\n }\n // newImageOrSrc is an HTMLImageElement or HTMLCanvasElement or Canvas\n else {\n return newImageOrSrc;\n }\n}\n\nfunction imageOnLoad() {\n var cachedImgObj = this.__cachedImgObj;\n this.onload = this.onerror = this.__cachedImgObj = null;\n\n for (var i = 0; i < cachedImgObj.pending.length; i++) {\n var pendingWrap = cachedImgObj.pending[i];\n var cb = pendingWrap.cb;\n cb && cb(this, pendingWrap.cbPayload);\n pendingWrap.hostEl.dirty();\n }\n cachedImgObj.pending.length = 0;\n}\n\nexport function isImageReady(image) {\n return image && image.width && image.height;\n}\n\n","import BoundingRect from '../core/BoundingRect';\nimport * as imageHelper from '../graphic/helper/image';\nimport {\n getContext,\n extend,\n retrieve2,\n retrieve3,\n trim\n} from '../core/util';\n\nvar textWidthCache = {};\nvar textWidthCacheCounter = 0;\n\nvar TEXT_CACHE_MAX = 5000;\nvar STYLE_REG = /\\{([a-zA-Z0-9_]+)\\|([^}]*)\\}/g;\n\nexport var DEFAULT_FONT = '12px sans-serif';\n\n// Avoid assign to an exported variable, for transforming to cjs.\nvar methods = {};\n\nexport function $override(name, fn) {\n methods[name] = fn;\n}\n\n/**\n * @public\n * @param {string} text\n * @param {string} font\n * @return {number} width\n */\nexport function getWidth(text, font) {\n font = font || DEFAULT_FONT;\n var key = text + ':' + font;\n if (textWidthCache[key]) {\n return textWidthCache[key];\n }\n\n var textLines = (text + '').split('\\n');\n var width = 0;\n\n for (var i = 0, l = textLines.length; i < l; i++) {\n // textContain.measureText may be overrided in SVG or VML\n width = Math.max(measureText(textLines[i], font).width, width);\n }\n\n if (textWidthCacheCounter > TEXT_CACHE_MAX) {\n textWidthCacheCounter = 0;\n textWidthCache = {};\n }\n textWidthCacheCounter++;\n textWidthCache[key] = width;\n\n return width;\n}\n\n/**\n * @public\n * @param {string} text\n * @param {string} font\n * @param {string} [textAlign='left']\n * @param {string} [textVerticalAlign='top']\n * @param {Array.<number>} [textPadding]\n * @param {Object} [rich]\n * @param {Object} [truncate]\n * @return {Object} {x, y, width, height, lineHeight}\n */\nexport function getBoundingRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate) {\n return rich\n ? getRichTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate)\n : getPlainTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, truncate);\n}\n\nfunction getPlainTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, truncate) {\n var contentBlock = parsePlainText(text, font, textPadding, textLineHeight, truncate);\n var outerWidth = getWidth(text, font);\n if (textPadding) {\n outerWidth += textPadding[1] + textPadding[3];\n }\n var outerHeight = contentBlock.outerHeight;\n\n var x = adjustTextX(0, outerWidth, textAlign);\n var y = adjustTextY(0, outerHeight, textVerticalAlign);\n\n var rect = new BoundingRect(x, y, outerWidth, outerHeight);\n rect.lineHeight = contentBlock.lineHeight;\n\n return rect;\n}\n\nfunction getRichTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate) {\n var contentBlock = parseRichText(text, {\n rich: rich,\n truncate: truncate,\n font: font,\n textAlign: textAlign,\n textPadding: textPadding,\n textLineHeight: textLineHeight\n });\n var outerWidth = contentBlock.outerWidth;\n var outerHeight = contentBlock.outerHeight;\n\n var x = adjustTextX(0, outerWidth, textAlign);\n var y = adjustTextY(0, outerHeight, textVerticalAlign);\n\n return new BoundingRect(x, y, outerWidth, outerHeight);\n}\n\n/**\n * @public\n * @param {number} x\n * @param {number} width\n * @param {string} [textAlign='left']\n * @return {number} Adjusted x.\n */\nexport function adjustTextX(x, width, textAlign) {\n // FIXME Right to left language\n if (textAlign === 'right') {\n x -= width;\n }\n else if (textAlign === 'center') {\n x -= width / 2;\n }\n return x;\n}\n\n/**\n * @public\n * @param {number} y\n * @param {number} height\n * @param {string} [textVerticalAlign='top']\n * @return {number} Adjusted y.\n */\nexport function adjustTextY(y, height, textVerticalAlign) {\n if (textVerticalAlign === 'middle') {\n y -= height / 2;\n }\n else if (textVerticalAlign === 'bottom') {\n y -= height;\n }\n return y;\n}\n\n/**\n * Follow same interface to `Displayable.prototype.calculateTextPosition`.\n * @public\n * @param {Obejct} [out] Prepared out object. If not input, auto created in the method.\n * @param {module:zrender/graphic/Style} style where `textPosition` and `textDistance` are visited.\n * @param {Object} rect {x, y, width, height} Rect of the host elment, according to which the text positioned.\n * @return {Object} The input `out`. Set: {x, y, textAlign, textVerticalAlign}\n */\nexport function calculateTextPosition(out, style, rect) {\n var textPosition = style.textPosition;\n var distance = style.textDistance;\n\n var x = rect.x;\n var y = rect.y;\n distance = distance || 0;\n\n var height = rect.height;\n var width = rect.width;\n var halfHeight = height / 2;\n\n var textAlign = 'left';\n var textVerticalAlign = 'top';\n\n switch (textPosition) {\n case 'left':\n x -= distance;\n y += halfHeight;\n textAlign = 'right';\n textVerticalAlign = 'middle';\n break;\n case 'right':\n x += distance + width;\n y += halfHeight;\n textVerticalAlign = 'middle';\n break;\n case 'top':\n x += width / 2;\n y -= distance;\n textAlign = 'center';\n textVerticalAlign = 'bottom';\n break;\n case 'bottom':\n x += width / 2;\n y += height + distance;\n textAlign = 'center';\n break;\n case 'inside':\n x += width / 2;\n y += halfHeight;\n textAlign = 'center';\n textVerticalAlign = 'middle';\n break;\n case 'insideLeft':\n x += distance;\n y += halfHeight;\n textVerticalAlign = 'middle';\n break;\n case 'insideRight':\n x += width - distance;\n y += halfHeight;\n textAlign = 'right';\n textVerticalAlign = 'middle';\n break;\n case 'insideTop':\n x += width / 2;\n y += distance;\n textAlign = 'center';\n break;\n case 'insideBottom':\n x += width / 2;\n y += height - distance;\n textAlign = 'center';\n textVerticalAlign = 'bottom';\n break;\n case 'insideTopLeft':\n x += distance;\n y += distance;\n break;\n case 'insideTopRight':\n x += width - distance;\n y += distance;\n textAlign = 'right';\n break;\n case 'insideBottomLeft':\n x += distance;\n y += height - distance;\n textVerticalAlign = 'bottom';\n break;\n case 'insideBottomRight':\n x += width - distance;\n y += height - distance;\n textAlign = 'right';\n textVerticalAlign = 'bottom';\n break;\n }\n\n out = out || {};\n out.x = x;\n out.y = y;\n out.textAlign = textAlign;\n out.textVerticalAlign = textVerticalAlign;\n\n return out;\n}\n\n/**\n * To be removed. But still do not remove in case that some one has imported it.\n * @deprecated\n * @public\n * @param {stirng} textPosition\n * @param {Object} rect {x, y, width, height}\n * @param {number} distance\n * @return {Object} {x, y, textAlign, textVerticalAlign}\n */\nexport function adjustTextPositionOnRect(textPosition, rect, distance) {\n var dummyStyle = {textPosition: textPosition, textDistance: distance};\n return calculateTextPosition({}, dummyStyle, rect);\n}\n\n/**\n * Show ellipsis if overflow.\n *\n * @public\n * @param {string} text\n * @param {string} containerWidth\n * @param {string} font\n * @param {number} [ellipsis='...']\n * @param {Object} [options]\n * @param {number} [options.maxIterations=3]\n * @param {number} [options.minChar=0] If truncate result are less\n * then minChar, ellipsis will not show, which is\n * better for user hint in some cases.\n * @param {number} [options.placeholder=''] When all truncated, use the placeholder.\n * @return {string}\n */\nexport function truncateText(text, containerWidth, font, ellipsis, options) {\n if (!containerWidth) {\n return '';\n }\n\n var textLines = (text + '').split('\\n');\n options = prepareTruncateOptions(containerWidth, font, ellipsis, options);\n\n // FIXME\n // It is not appropriate that every line has '...' when truncate multiple lines.\n for (var i = 0, len = textLines.length; i < len; i++) {\n textLines[i] = truncateSingleLine(textLines[i], options);\n }\n\n return textLines.join('\\n');\n}\n\nfunction prepareTruncateOptions(containerWidth, font, ellipsis, options) {\n options = extend({}, options);\n\n options.font = font;\n var ellipsis = retrieve2(ellipsis, '...');\n options.maxIterations = retrieve2(options.maxIterations, 2);\n var minChar = options.minChar = retrieve2(options.minChar, 0);\n // FIXME\n // Other languages?\n options.cnCharWidth = getWidth('国', font);\n // FIXME\n // Consider proportional font?\n var ascCharWidth = options.ascCharWidth = getWidth('a', font);\n options.placeholder = retrieve2(options.placeholder, '');\n\n // Example 1: minChar: 3, text: 'asdfzxcv', truncate result: 'asdf', but not: 'a...'.\n // Example 2: minChar: 3, text: '维度', truncate result: '维', but not: '...'.\n var contentWidth = containerWidth = Math.max(0, containerWidth - 1); // Reserve some gap.\n for (var i = 0; i < minChar && contentWidth >= ascCharWidth; i++) {\n contentWidth -= ascCharWidth;\n }\n\n var ellipsisWidth = getWidth(ellipsis, font);\n if (ellipsisWidth > contentWidth) {\n ellipsis = '';\n ellipsisWidth = 0;\n }\n\n contentWidth = containerWidth - ellipsisWidth;\n\n options.ellipsis = ellipsis;\n options.ellipsisWidth = ellipsisWidth;\n options.contentWidth = contentWidth;\n options.containerWidth = containerWidth;\n\n return options;\n}\n\nfunction truncateSingleLine(textLine, options) {\n var containerWidth = options.containerWidth;\n var font = options.font;\n var contentWidth = options.contentWidth;\n\n if (!containerWidth) {\n return '';\n }\n\n var lineWidth = getWidth(textLine, font);\n\n if (lineWidth <= containerWidth) {\n return textLine;\n }\n\n for (var j = 0; ; j++) {\n if (lineWidth <= contentWidth || j >= options.maxIterations) {\n textLine += options.ellipsis;\n break;\n }\n\n var subLength = j === 0\n ? estimateLength(textLine, contentWidth, options.ascCharWidth, options.cnCharWidth)\n : lineWidth > 0\n ? Math.floor(textLine.length * contentWidth / lineWidth)\n : 0;\n\n textLine = textLine.substr(0, subLength);\n lineWidth = getWidth(textLine, font);\n }\n\n if (textLine === '') {\n textLine = options.placeholder;\n }\n\n return textLine;\n}\n\nfunction estimateLength(text, contentWidth, ascCharWidth, cnCharWidth) {\n var width = 0;\n var i = 0;\n for (var len = text.length; i < len && width < contentWidth; i++) {\n var charCode = text.charCodeAt(i);\n width += (0 <= charCode && charCode <= 127) ? ascCharWidth : cnCharWidth;\n }\n return i;\n}\n\n/**\n * @public\n * @param {string} font\n * @return {number} line height\n */\nexport function getLineHeight(font) {\n // FIXME A rough approach.\n return getWidth('国', font);\n}\n\n/**\n * @public\n * @param {string} text\n * @param {string} font\n * @return {Object} width\n */\nexport function measureText(text, font) {\n return methods.measureText(text, font);\n}\n\n// Avoid assign to an exported variable, for transforming to cjs.\nmethods.measureText = function (text, font) {\n var ctx = getContext();\n ctx.font = font || DEFAULT_FONT;\n return ctx.measureText(text);\n};\n\n/**\n * @public\n * @param {string} text\n * @param {string} font\n * @param {Object} [truncate]\n * @return {Object} block: {lineHeight, lines, height, outerHeight, canCacheByTextString}\n * Notice: for performance, do not calculate outerWidth util needed.\n * `canCacheByTextString` means the result `lines` is only determined by the input `text`.\n * Thus we can simply comparing the `input` text to determin whether the result changed,\n * without travel the result `lines`.\n */\nexport function parsePlainText(text, font, padding, textLineHeight, truncate) {\n text != null && (text += '');\n\n var lineHeight = retrieve2(textLineHeight, getLineHeight(font));\n var lines = text ? text.split('\\n') : [];\n var height = lines.length * lineHeight;\n var outerHeight = height;\n var canCacheByTextString = true;\n\n if (padding) {\n outerHeight += padding[0] + padding[2];\n }\n\n if (text && truncate) {\n canCacheByTextString = false;\n var truncOuterHeight = truncate.outerHeight;\n var truncOuterWidth = truncate.outerWidth;\n if (truncOuterHeight != null && outerHeight > truncOuterHeight) {\n text = '';\n lines = [];\n }\n else if (truncOuterWidth != null) {\n var options = prepareTruncateOptions(\n truncOuterWidth - (padding ? padding[1] + padding[3] : 0),\n font,\n truncate.ellipsis,\n {minChar: truncate.minChar, placeholder: truncate.placeholder}\n );\n\n // FIXME\n // It is not appropriate that every line has '...' when truncate multiple lines.\n for (var i = 0, len = lines.length; i < len; i++) {\n lines[i] = truncateSingleLine(lines[i], options);\n }\n }\n }\n\n return {\n lines: lines,\n height: height,\n outerHeight: outerHeight,\n lineHeight: lineHeight,\n canCacheByTextString: canCacheByTextString\n };\n}\n\n/**\n * For example: 'some text {a|some text}other text{b|some text}xxx{c|}xxx'\n * Also consider 'bbbb{a|xxx\\nzzz}xxxx\\naaaa'.\n *\n * @public\n * @param {string} text\n * @param {Object} style\n * @return {Object} block\n * {\n * width,\n * height,\n * lines: [{\n * lineHeight,\n * width,\n * tokens: [[{\n * styleName,\n * text,\n * width, // include textPadding\n * height, // include textPadding\n * textWidth, // pure text width\n * textHeight, // pure text height\n * lineHeihgt,\n * font,\n * textAlign,\n * textVerticalAlign\n * }], [...], ...]\n * }, ...]\n * }\n * If styleName is undefined, it is plain text.\n */\nexport function parseRichText(text, style) {\n var contentBlock = {lines: [], width: 0, height: 0};\n\n text != null && (text += '');\n if (!text) {\n return contentBlock;\n }\n\n var lastIndex = STYLE_REG.lastIndex = 0;\n var result;\n while ((result = STYLE_REG.exec(text)) != null) {\n var matchedIndex = result.index;\n if (matchedIndex > lastIndex) {\n pushTokens(contentBlock, text.substring(lastIndex, matchedIndex));\n }\n pushTokens(contentBlock, result[2], result[1]);\n lastIndex = STYLE_REG.lastIndex;\n }\n\n if (lastIndex < text.length) {\n pushTokens(contentBlock, text.substring(lastIndex, text.length));\n }\n\n var lines = contentBlock.lines;\n var contentHeight = 0;\n var contentWidth = 0;\n // For `textWidth: 100%`\n var pendingList = [];\n\n var stlPadding = style.textPadding;\n\n var truncate = style.truncate;\n var truncateWidth = truncate && truncate.outerWidth;\n var truncateHeight = truncate && truncate.outerHeight;\n if (stlPadding) {\n truncateWidth != null && (truncateWidth -= stlPadding[1] + stlPadding[3]);\n truncateHeight != null && (truncateHeight -= stlPadding[0] + stlPadding[2]);\n }\n\n // Calculate layout info of tokens.\n for (var i = 0; i < lines.length; i++) {\n var line = lines[i];\n var lineHeight = 0;\n var lineWidth = 0;\n\n for (var j = 0; j < line.tokens.length; j++) {\n var token = line.tokens[j];\n var tokenStyle = token.styleName && style.rich[token.styleName] || {};\n // textPadding should not inherit from style.\n var textPadding = token.textPadding = tokenStyle.textPadding;\n\n // textFont has been asigned to font by `normalizeStyle`.\n var font = token.font = tokenStyle.font || style.font;\n\n // textHeight can be used when textVerticalAlign is specified in token.\n var tokenHeight = token.textHeight = retrieve2(\n // textHeight should not be inherited, consider it can be specified\n // as box height of the block.\n tokenStyle.textHeight, getLineHeight(font)\n );\n textPadding && (tokenHeight += textPadding[0] + textPadding[2]);\n token.height = tokenHeight;\n token.lineHeight = retrieve3(\n tokenStyle.textLineHeight, style.textLineHeight, tokenHeight\n );\n\n token.textAlign = tokenStyle && tokenStyle.textAlign || style.textAlign;\n token.textVerticalAlign = tokenStyle && tokenStyle.textVerticalAlign || 'middle';\n\n if (truncateHeight != null && contentHeight + token.lineHeight > truncateHeight) {\n return {lines: [], width: 0, height: 0};\n }\n\n token.textWidth = getWidth(token.text, font);\n var tokenWidth = tokenStyle.textWidth;\n var tokenWidthNotSpecified = tokenWidth == null || tokenWidth === 'auto';\n\n // Percent width, can be `100%`, can be used in drawing separate\n // line when box width is needed to be auto.\n if (typeof tokenWidth === 'string' && tokenWidth.charAt(tokenWidth.length - 1) === '%') {\n token.percentWidth = tokenWidth;\n pendingList.push(token);\n tokenWidth = 0;\n // Do not truncate in this case, because there is no user case\n // and it is too complicated.\n }\n else {\n if (tokenWidthNotSpecified) {\n tokenWidth = token.textWidth;\n\n // FIXME: If image is not loaded and textWidth is not specified, calling\n // `getBoundingRect()` will not get correct result.\n var textBackgroundColor = tokenStyle.textBackgroundColor;\n var bgImg = textBackgroundColor && textBackgroundColor.image;\n\n // Use cases:\n // (1) If image is not loaded, it will be loaded at render phase and call\n // `dirty()` and `textBackgroundColor.image` will be replaced with the loaded\n // image, and then the right size will be calculated here at the next tick.\n // See `graphic/helper/text.js`.\n // (2) If image loaded, and `textBackgroundColor.image` is image src string,\n // use `imageHelper.findExistImage` to find cached image.\n // `imageHelper.findExistImage` will always be called here before\n // `imageHelper.createOrUpdateImage` in `graphic/helper/text.js#renderRichText`\n // which ensures that image will not be rendered before correct size calcualted.\n if (bgImg) {\n bgImg = imageHelper.findExistImage(bgImg);\n if (imageHelper.isImageReady(bgImg)) {\n tokenWidth = Math.max(tokenWidth, bgImg.width * tokenHeight / bgImg.height);\n }\n }\n }\n\n var paddingW = textPadding ? textPadding[1] + textPadding[3] : 0;\n tokenWidth += paddingW;\n\n var remianTruncWidth = truncateWidth != null ? truncateWidth - lineWidth : null;\n\n if (remianTruncWidth != null && remianTruncWidth < tokenWidth) {\n if (!tokenWidthNotSpecified || remianTruncWidth < paddingW) {\n token.text = '';\n token.textWidth = tokenWidth = 0;\n }\n else {\n token.text = truncateText(\n token.text, remianTruncWidth - paddingW, font, truncate.ellipsis,\n {minChar: truncate.minChar}\n );\n token.textWidth = getWidth(token.text, font);\n tokenWidth = token.textWidth + paddingW;\n }\n }\n }\n\n lineWidth += (token.width = tokenWidth);\n tokenStyle && (lineHeight = Math.max(lineHeight, token.lineHeight));\n }\n\n line.width = lineWidth;\n line.lineHeight = lineHeight;\n contentHeight += lineHeight;\n contentWidth = Math.max(contentWidth, lineWidth);\n }\n\n contentBlock.outerWidth = contentBlock.width = retrieve2(style.textWidth, contentWidth);\n contentBlock.outerHeight = contentBlock.height = retrieve2(style.textHeight, contentHeight);\n\n if (stlPadding) {\n contentBlock.outerWidth += stlPadding[1] + stlPadding[3];\n contentBlock.outerHeight += stlPadding[0] + stlPadding[2];\n }\n\n for (var i = 0; i < pendingList.length; i++) {\n var token = pendingList[i];\n var percentWidth = token.percentWidth;\n // Should not base on outerWidth, because token can not be placed out of padding.\n token.width = parseInt(percentWidth, 10) / 100 * contentWidth;\n }\n\n return contentBlock;\n}\n\nfunction pushTokens(block, str, styleName) {\n var isEmptyStr = str === '';\n var strs = str.split('\\n');\n var lines = block.lines;\n\n for (var i = 0; i < strs.length; i++) {\n var text = strs[i];\n var token = {\n styleName: styleName,\n text: text,\n isLineHolder: !text && !isEmptyStr\n };\n\n // The first token should be appended to the last line.\n if (!i) {\n var tokens = (lines[lines.length - 1] || (lines[0] = {tokens: []})).tokens;\n\n // Consider cases:\n // (1) ''.split('\\n') => ['', '\\n', ''], the '' at the first item\n // (which is a placeholder) should be replaced by new token.\n // (2) A image backage, where token likes {a|}.\n // (3) A redundant '' will affect textAlign in line.\n // (4) tokens with the same tplName should not be merged, because\n // they should be displayed in different box (with border and padding).\n var tokensLen = tokens.length;\n (tokensLen === 1 && tokens[0].isLineHolder)\n ? (tokens[0] = token)\n // Consider text is '', only insert when it is the \"lineHolder\" or\n // \"emptyStr\". Otherwise a redundant '' will affect textAlign in line.\n : ((text || !tokensLen || isEmptyStr) && tokens.push(token));\n }\n // Other tokens always start a new line.\n else {\n // If there is '', insert it as a placeholder.\n lines.push({tokens: [token]});\n }\n }\n}\n\nexport function makeFont(style) {\n // FIXME in node-canvas fontWeight is before fontStyle\n // Use `fontSize` `fontFamily` to check whether font properties are defined.\n var font = (style.fontSize || style.fontFamily) && [\n style.fontStyle,\n style.fontWeight,\n (style.fontSize || 12) + 'px',\n // If font properties are defined, `fontFamily` should not be ignored.\n style.fontFamily || 'sans-serif'\n ].join(' ');\n return font && trim(font) || style.textFont || style.font;\n}\n","\n/**\n * @param {Object} ctx\n * @param {Object} shape\n * @param {number} shape.x\n * @param {number} shape.y\n * @param {number} shape.width\n * @param {number} shape.height\n * @param {number} shape.r\n */\nexport function buildPath(ctx, shape) {\n var x = shape.x;\n var y = shape.y;\n var width = shape.width;\n var height = shape.height;\n var r = shape.r;\n var r1;\n var r2;\n var r3;\n var r4;\n\n // Convert width and height to positive for better borderRadius\n if (width < 0) {\n x = x + width;\n width = -width;\n }\n if (height < 0) {\n y = y + height;\n height = -height;\n }\n\n if (typeof r === 'number') {\n r1 = r2 = r3 = r4 = r;\n }\n else if (r instanceof Array) {\n if (r.length === 1) {\n r1 = r2 = r3 = r4 = r[0];\n }\n else if (r.length === 2) {\n r1 = r3 = r[0];\n r2 = r4 = r[1];\n }\n else if (r.length === 3) {\n r1 = r[0];\n r2 = r4 = r[1];\n r3 = r[2];\n }\n else {\n r1 = r[0];\n r2 = r[1];\n r3 = r[2];\n r4 = r[3];\n }\n }\n else {\n r1 = r2 = r3 = r4 = 0;\n }\n\n var total;\n if (r1 + r2 > width) {\n total = r1 + r2;\n r1 *= width / total;\n r2 *= width / total;\n }\n if (r3 + r4 > width) {\n total = r3 + r4;\n r3 *= width / total;\n r4 *= width / total;\n }\n if (r2 + r3 > height) {\n total = r2 + r3;\n r2 *= height / total;\n r3 *= height / total;\n }\n if (r1 + r4 > height) {\n total = r1 + r4;\n r1 *= height / total;\n r4 *= height / total;\n }\n ctx.moveTo(x + r1, y);\n ctx.lineTo(x + width - r2, y);\n r2 !== 0 && ctx.arc(x + width - r2, y + r2, r2, -Math.PI / 2, 0);\n ctx.lineTo(x + width, y + height - r3);\n r3 !== 0 && ctx.arc(x + width - r3, y + height - r3, r3, 0, Math.PI / 2);\n ctx.lineTo(x + r4, y + height);\n r4 !== 0 && ctx.arc(x + r4, y + height - r4, r4, Math.PI / 2, Math.PI);\n ctx.lineTo(x, y + r1);\n r1 !== 0 && ctx.arc(x + r1, y + r1, r1, Math.PI, Math.PI * 1.5);\n}\n","\nimport {\n retrieve2,\n retrieve3,\n each,\n normalizeCssArray,\n isString,\n isObject\n} from '../../core/util';\nimport * as textContain from '../../contain/text';\nimport * as roundRectHelper from './roundRect';\nimport * as imageHelper from './image';\nimport fixShadow from './fixShadow';\nimport {ContextCachedBy, WILL_BE_RESTORED} from '../constant';\n\nvar DEFAULT_FONT = textContain.DEFAULT_FONT;\n\n// TODO: Have not support 'start', 'end' yet.\nvar VALID_TEXT_ALIGN = {left: 1, right: 1, center: 1};\nvar VALID_TEXT_VERTICAL_ALIGN = {top: 1, bottom: 1, middle: 1};\n// Different from `STYLE_COMMON_PROPS` of `graphic/Style`,\n// the default value of shadowColor is `'transparent'`.\nvar SHADOW_STYLE_COMMON_PROPS = [\n ['textShadowBlur', 'shadowBlur', 0],\n ['textShadowOffsetX', 'shadowOffsetX', 0],\n ['textShadowOffsetY', 'shadowOffsetY', 0],\n ['textShadowColor', 'shadowColor', 'transparent']\n];\nvar _tmpTextPositionResult = {};\nvar _tmpBoxPositionResult = {};\n\n/**\n * @param {module:zrender/graphic/Style} style\n * @return {module:zrender/graphic/Style} The input style.\n */\nexport function normalizeTextStyle(style) {\n normalizeStyle(style);\n each(style.rich, normalizeStyle);\n return style;\n}\n\nfunction normalizeStyle(style) {\n if (style) {\n\n style.font = textContain.makeFont(style);\n\n var textAlign = style.textAlign;\n textAlign === 'middle' && (textAlign = 'center');\n style.textAlign = (\n textAlign == null || VALID_TEXT_ALIGN[textAlign]\n ) ? textAlign : 'left';\n\n // Compatible with textBaseline.\n var textVerticalAlign = style.textVerticalAlign || style.textBaseline;\n textVerticalAlign === 'center' && (textVerticalAlign = 'middle');\n style.textVerticalAlign = (\n textVerticalAlign == null || VALID_TEXT_VERTICAL_ALIGN[textVerticalAlign]\n ) ? textVerticalAlign : 'top';\n\n var textPadding = style.textPadding;\n if (textPadding) {\n style.textPadding = normalizeCssArray(style.textPadding);\n }\n }\n}\n\n/**\n * @param {CanvasRenderingContext2D} ctx\n * @param {string} text\n * @param {module:zrender/graphic/Style} style\n * @param {Object|boolean} [rect] {x, y, width, height}\n * If set false, rect text is not used.\n * @param {Element|module:zrender/graphic/helper/constant.WILL_BE_RESTORED} [prevEl] For ctx prop cache.\n */\nexport function renderText(hostEl, ctx, text, style, rect, prevEl) {\n style.rich\n ? renderRichText(hostEl, ctx, text, style, rect, prevEl)\n : renderPlainText(hostEl, ctx, text, style, rect, prevEl);\n}\n\n// Avoid setting to ctx according to prevEl if possible for\n// performance in scenarios of large amount text.\nfunction renderPlainText(hostEl, ctx, text, style, rect, prevEl) {\n 'use strict';\n\n var needDrawBg = needDrawBackground(style);\n\n var prevStyle;\n var checkCache = false;\n var cachedByMe = ctx.__attrCachedBy === ContextCachedBy.PLAIN_TEXT;\n\n // Only take and check cache for `Text` el, but not RectText.\n if (prevEl !== WILL_BE_RESTORED) {\n if (prevEl) {\n prevStyle = prevEl.style;\n checkCache = !needDrawBg && cachedByMe && prevStyle;\n }\n\n // Prevent from using cache in `Style::bind`, because of the case:\n // ctx property is modified by other properties than `Style::bind`\n // used, and Style::bind is called next.\n ctx.__attrCachedBy = needDrawBg ? ContextCachedBy.NONE : ContextCachedBy.PLAIN_TEXT;\n }\n // Since this will be restored, prevent from using these props to check cache in the next\n // entering of this method. But do not need to clear other cache like `Style::bind`.\n else if (cachedByMe) {\n ctx.__attrCachedBy = ContextCachedBy.NONE;\n }\n\n var styleFont = style.font || DEFAULT_FONT;\n // PENDING\n // Only `Text` el set `font` and keep it (`RectText` will restore). So theoretically\n // we can make font cache on ctx, which can cache for text el that are discontinuous.\n // But layer save/restore needed to be considered.\n // if (styleFont !== ctx.__fontCache) {\n // ctx.font = styleFont;\n // if (prevEl !== WILL_BE_RESTORED) {\n // ctx.__fontCache = styleFont;\n // }\n // }\n if (!checkCache || styleFont !== (prevStyle.font || DEFAULT_FONT)) {\n ctx.font = styleFont;\n }\n\n // Use the final font from context-2d, because the final\n // font might not be the style.font when it is illegal.\n // But get `ctx.font` might be time consuming.\n var computedFont = hostEl.__computedFont;\n if (hostEl.__styleFont !== styleFont) {\n hostEl.__styleFont = styleFont;\n computedFont = hostEl.__computedFont = ctx.font;\n }\n\n var textPadding = style.textPadding;\n var textLineHeight = style.textLineHeight;\n\n var contentBlock = hostEl.__textCotentBlock;\n if (!contentBlock || hostEl.__dirtyText) {\n contentBlock = hostEl.__textCotentBlock = textContain.parsePlainText(\n text, computedFont, textPadding, textLineHeight, style.truncate\n );\n }\n\n var outerHeight = contentBlock.outerHeight;\n\n var textLines = contentBlock.lines;\n var lineHeight = contentBlock.lineHeight;\n\n var boxPos = getBoxPosition(_tmpBoxPositionResult, hostEl, style, rect);\n var baseX = boxPos.baseX;\n var baseY = boxPos.baseY;\n var textAlign = boxPos.textAlign || 'left';\n var textVerticalAlign = boxPos.textVerticalAlign;\n\n // Origin of textRotation should be the base point of text drawing.\n applyTextRotation(ctx, style, rect, baseX, baseY);\n\n var boxY = textContain.adjustTextY(baseY, outerHeight, textVerticalAlign);\n var textX = baseX;\n var textY = boxY;\n\n if (needDrawBg || textPadding) {\n // Consider performance, do not call getTextWidth util necessary.\n var textWidth = textContain.getWidth(text, computedFont);\n var outerWidth = textWidth;\n textPadding && (outerWidth += textPadding[1] + textPadding[3]);\n var boxX = textContain.adjustTextX(baseX, outerWidth, textAlign);\n\n needDrawBg && drawBackground(hostEl, ctx, style, boxX, boxY, outerWidth, outerHeight);\n\n if (textPadding) {\n textX = getTextXForPadding(baseX, textAlign, textPadding);\n textY += textPadding[0];\n }\n }\n\n // Always set textAlign and textBase line, because it is difficute to calculate\n // textAlign from prevEl, and we dont sure whether textAlign will be reset if\n // font set happened.\n ctx.textAlign = textAlign;\n // Force baseline to be \"middle\". Otherwise, if using \"top\", the\n // text will offset downward a little bit in font \"Microsoft YaHei\".\n ctx.textBaseline = 'middle';\n // Set text opacity\n ctx.globalAlpha = style.opacity || 1;\n\n // Always set shadowBlur and shadowOffset to avoid leak from displayable.\n for (var i = 0; i < SHADOW_STYLE_COMMON_PROPS.length; i++) {\n var propItem = SHADOW_STYLE_COMMON_PROPS[i];\n var styleProp = propItem[0];\n var ctxProp = propItem[1];\n var val = style[styleProp];\n if (!checkCache || val !== prevStyle[styleProp]) {\n ctx[ctxProp] = fixShadow(ctx, ctxProp, val || propItem[2]);\n }\n }\n\n // `textBaseline` is set as 'middle'.\n textY += lineHeight / 2;\n\n var textStrokeWidth = style.textStrokeWidth;\n var textStrokeWidthPrev = checkCache ? prevStyle.textStrokeWidth : null;\n var strokeWidthChanged = !checkCache || textStrokeWidth !== textStrokeWidthPrev;\n var strokeChanged = !checkCache || strokeWidthChanged || style.textStroke !== prevStyle.textStroke;\n var textStroke = getStroke(style.textStroke, textStrokeWidth);\n var textFill = getFill(style.textFill);\n\n if (textStroke) {\n if (strokeWidthChanged) {\n ctx.lineWidth = textStrokeWidth;\n }\n if (strokeChanged) {\n ctx.strokeStyle = textStroke;\n }\n }\n if (textFill) {\n if (!checkCache || style.textFill !== prevStyle.textFill) {\n ctx.fillStyle = textFill;\n }\n }\n\n // Optimize simply, in most cases only one line exists.\n if (textLines.length === 1) {\n // Fill after stroke so the outline will not cover the main part.\n textStroke && ctx.strokeText(textLines[0], textX, textY);\n textFill && ctx.fillText(textLines[0], textX, textY);\n }\n else {\n for (var i = 0; i < textLines.length; i++) {\n // Fill after stroke so the outline will not cover the main part.\n textStroke && ctx.strokeText(textLines[i], textX, textY);\n textFill && ctx.fillText(textLines[i], textX, textY);\n textY += lineHeight;\n }\n }\n}\n\nfunction renderRichText(hostEl, ctx, text, style, rect, prevEl) {\n // Do not do cache for rich text because of the complexity.\n // But `RectText` this will be restored, do not need to clear other cache like `Style::bind`.\n if (prevEl !== WILL_BE_RESTORED) {\n ctx.__attrCachedBy = ContextCachedBy.NONE;\n }\n\n var contentBlock = hostEl.__textCotentBlock;\n\n if (!contentBlock || hostEl.__dirtyText) {\n contentBlock = hostEl.__textCotentBlock = textContain.parseRichText(text, style);\n }\n\n drawRichText(hostEl, ctx, contentBlock, style, rect);\n}\n\nfunction drawRichText(hostEl, ctx, contentBlock, style, rect) {\n var contentWidth = contentBlock.width;\n var outerWidth = contentBlock.outerWidth;\n var outerHeight = contentBlock.outerHeight;\n var textPadding = style.textPadding;\n\n var boxPos = getBoxPosition(_tmpBoxPositionResult, hostEl, style, rect);\n var baseX = boxPos.baseX;\n var baseY = boxPos.baseY;\n var textAlign = boxPos.textAlign;\n var textVerticalAlign = boxPos.textVerticalAlign;\n\n // Origin of textRotation should be the base point of text drawing.\n applyTextRotation(ctx, style, rect, baseX, baseY);\n\n var boxX = textContain.adjustTextX(baseX, outerWidth, textAlign);\n var boxY = textContain.adjustTextY(baseY, outerHeight, textVerticalAlign);\n var xLeft = boxX;\n var lineTop = boxY;\n if (textPadding) {\n xLeft += textPadding[3];\n lineTop += textPadding[0];\n }\n var xRight = xLeft + contentWidth;\n\n needDrawBackground(style) && drawBackground(\n hostEl, ctx, style, boxX, boxY, outerWidth, outerHeight\n );\n\n for (var i = 0; i < contentBlock.lines.length; i++) {\n var line = contentBlock.lines[i];\n var tokens = line.tokens;\n var tokenCount = tokens.length;\n var lineHeight = line.lineHeight;\n var usedWidth = line.width;\n\n var leftIndex = 0;\n var lineXLeft = xLeft;\n var lineXRight = xRight;\n var rightIndex = tokenCount - 1;\n var token;\n\n while (\n leftIndex < tokenCount\n && (token = tokens[leftIndex], !token.textAlign || token.textAlign === 'left')\n ) {\n placeToken(hostEl, ctx, token, style, lineHeight, lineTop, lineXLeft, 'left');\n usedWidth -= token.width;\n lineXLeft += token.width;\n leftIndex++;\n }\n\n while (\n rightIndex >= 0\n && (token = tokens[rightIndex], token.textAlign === 'right')\n ) {\n placeToken(hostEl, ctx, token, style, lineHeight, lineTop, lineXRight, 'right');\n usedWidth -= token.width;\n lineXRight -= token.width;\n rightIndex--;\n }\n\n // The other tokens are placed as textAlign 'center' if there is enough space.\n lineXLeft += (contentWidth - (lineXLeft - xLeft) - (xRight - lineXRight) - usedWidth) / 2;\n while (leftIndex <= rightIndex) {\n token = tokens[leftIndex];\n // Consider width specified by user, use 'center' rather than 'left'.\n placeToken(hostEl, ctx, token, style, lineHeight, lineTop, lineXLeft + token.width / 2, 'center');\n lineXLeft += token.width;\n leftIndex++;\n }\n\n lineTop += lineHeight;\n }\n}\n\nfunction applyTextRotation(ctx, style, rect, x, y) {\n // textRotation only apply in RectText.\n if (rect && style.textRotation) {\n var origin = style.textOrigin;\n if (origin === 'center') {\n x = rect.width / 2 + rect.x;\n y = rect.height / 2 + rect.y;\n }\n else if (origin) {\n x = origin[0] + rect.x;\n y = origin[1] + rect.y;\n }\n\n ctx.translate(x, y);\n // Positive: anticlockwise\n ctx.rotate(-style.textRotation);\n ctx.translate(-x, -y);\n }\n}\n\nfunction placeToken(hostEl, ctx, token, style, lineHeight, lineTop, x, textAlign) {\n var tokenStyle = style.rich[token.styleName] || {};\n tokenStyle.text = token.text;\n\n // 'ctx.textBaseline' is always set as 'middle', for sake of\n // the bias of \"Microsoft YaHei\".\n var textVerticalAlign = token.textVerticalAlign;\n var y = lineTop + lineHeight / 2;\n if (textVerticalAlign === 'top') {\n y = lineTop + token.height / 2;\n }\n else if (textVerticalAlign === 'bottom') {\n y = lineTop + lineHeight - token.height / 2;\n }\n\n !token.isLineHolder && needDrawBackground(tokenStyle) && drawBackground(\n hostEl,\n ctx,\n tokenStyle,\n textAlign === 'right'\n ? x - token.width\n : textAlign === 'center'\n ? x - token.width / 2\n : x,\n y - token.height / 2,\n token.width,\n token.height\n );\n\n var textPadding = token.textPadding;\n if (textPadding) {\n x = getTextXForPadding(x, textAlign, textPadding);\n y -= token.height / 2 - textPadding[2] - token.textHeight / 2;\n }\n\n setCtx(ctx, 'shadowBlur', retrieve3(tokenStyle.textShadowBlur, style.textShadowBlur, 0));\n setCtx(ctx, 'shadowColor', tokenStyle.textShadowColor || style.textShadowColor || 'transparent');\n setCtx(ctx, 'shadowOffsetX', retrieve3(tokenStyle.textShadowOffsetX, style.textShadowOffsetX, 0));\n setCtx(ctx, 'shadowOffsetY', retrieve3(tokenStyle.textShadowOffsetY, style.textShadowOffsetY, 0));\n\n setCtx(ctx, 'textAlign', textAlign);\n // Force baseline to be \"middle\". Otherwise, if using \"top\", the\n // text will offset downward a little bit in font \"Microsoft YaHei\".\n setCtx(ctx, 'textBaseline', 'middle');\n\n setCtx(ctx, 'font', token.font || DEFAULT_FONT);\n\n var textStroke = getStroke(tokenStyle.textStroke || style.textStroke, textStrokeWidth);\n var textFill = getFill(tokenStyle.textFill || style.textFill);\n var textStrokeWidth = retrieve2(tokenStyle.textStrokeWidth, style.textStrokeWidth);\n\n // Fill after stroke so the outline will not cover the main part.\n if (textStroke) {\n setCtx(ctx, 'lineWidth', textStrokeWidth);\n setCtx(ctx, 'strokeStyle', textStroke);\n ctx.strokeText(token.text, x, y);\n }\n if (textFill) {\n setCtx(ctx, 'fillStyle', textFill);\n ctx.fillText(token.text, x, y);\n }\n}\n\nfunction needDrawBackground(style) {\n return !!(\n style.textBackgroundColor\n || (style.textBorderWidth && style.textBorderColor)\n );\n}\n\n// style: {textBackgroundColor, textBorderWidth, textBorderColor, textBorderRadius, text}\n// shape: {x, y, width, height}\nfunction drawBackground(hostEl, ctx, style, x, y, width, height) {\n var textBackgroundColor = style.textBackgroundColor;\n var textBorderWidth = style.textBorderWidth;\n var textBorderColor = style.textBorderColor;\n var isPlainBg = isString(textBackgroundColor);\n\n setCtx(ctx, 'shadowBlur', style.textBoxShadowBlur || 0);\n setCtx(ctx, 'shadowColor', style.textBoxShadowColor || 'transparent');\n setCtx(ctx, 'shadowOffsetX', style.textBoxShadowOffsetX || 0);\n setCtx(ctx, 'shadowOffsetY', style.textBoxShadowOffsetY || 0);\n\n if (isPlainBg || (textBorderWidth && textBorderColor)) {\n ctx.beginPath();\n var textBorderRadius = style.textBorderRadius;\n if (!textBorderRadius) {\n ctx.rect(x, y, width, height);\n }\n else {\n roundRectHelper.buildPath(ctx, {\n x: x, y: y, width: width, height: height, r: textBorderRadius\n });\n }\n ctx.closePath();\n }\n\n if (isPlainBg) {\n setCtx(ctx, 'fillStyle', textBackgroundColor);\n\n if (style.fillOpacity != null) {\n var originalGlobalAlpha = ctx.globalAlpha;\n ctx.globalAlpha = style.fillOpacity * style.opacity;\n ctx.fill();\n ctx.globalAlpha = originalGlobalAlpha;\n }\n else {\n ctx.fill();\n }\n }\n else if (isObject(textBackgroundColor)) {\n var image = textBackgroundColor.image;\n\n image = imageHelper.createOrUpdateImage(\n image, null, hostEl, onBgImageLoaded, textBackgroundColor\n );\n if (image && imageHelper.isImageReady(image)) {\n ctx.drawImage(image, x, y, width, height);\n }\n }\n\n if (textBorderWidth && textBorderColor) {\n setCtx(ctx, 'lineWidth', textBorderWidth);\n setCtx(ctx, 'strokeStyle', textBorderColor);\n\n if (style.strokeOpacity != null) {\n var originalGlobalAlpha = ctx.globalAlpha;\n ctx.globalAlpha = style.strokeOpacity * style.opacity;\n ctx.stroke();\n ctx.globalAlpha = originalGlobalAlpha;\n }\n else {\n ctx.stroke();\n }\n }\n}\n\nfunction onBgImageLoaded(image, textBackgroundColor) {\n // Replace image, so that `contain/text.js#parseRichText`\n // will get correct result in next tick.\n textBackgroundColor.image = image;\n}\n\nexport function getBoxPosition(out, hostEl, style, rect) {\n var baseX = style.x || 0;\n var baseY = style.y || 0;\n var textAlign = style.textAlign;\n var textVerticalAlign = style.textVerticalAlign;\n\n // Text position represented by coord\n if (rect) {\n var textPosition = style.textPosition;\n if (textPosition instanceof Array) {\n // Percent\n baseX = rect.x + parsePercent(textPosition[0], rect.width);\n baseY = rect.y + parsePercent(textPosition[1], rect.height);\n }\n else {\n var res = (hostEl && hostEl.calculateTextPosition)\n ? hostEl.calculateTextPosition(_tmpTextPositionResult, style, rect)\n : textContain.calculateTextPosition(_tmpTextPositionResult, style, rect);\n baseX = res.x;\n baseY = res.y;\n // Default align and baseline when has textPosition\n textAlign = textAlign || res.textAlign;\n textVerticalAlign = textVerticalAlign || res.textVerticalAlign;\n }\n\n // textOffset is only support in RectText, otherwise\n // we have to adjust boundingRect for textOffset.\n var textOffset = style.textOffset;\n if (textOffset) {\n baseX += textOffset[0];\n baseY += textOffset[1];\n }\n }\n\n out = out || {};\n out.baseX = baseX;\n out.baseY = baseY;\n out.textAlign = textAlign;\n out.textVerticalAlign = textVerticalAlign;\n\n return out;\n}\n\n\nfunction setCtx(ctx, prop, value) {\n ctx[prop] = fixShadow(ctx, prop, value);\n return ctx[prop];\n}\n\n/**\n * @param {string} [stroke] If specified, do not check style.textStroke.\n * @param {string} [lineWidth] If specified, do not check style.textStroke.\n * @param {number} style\n */\nexport function getStroke(stroke, lineWidth) {\n return (stroke == null || lineWidth <= 0 || stroke === 'transparent' || stroke === 'none')\n ? null\n // TODO pattern and gradient?\n : (stroke.image || stroke.colorStops)\n ? '#000'\n : stroke;\n}\n\nexport function getFill(fill) {\n return (fill == null || fill === 'none')\n ? null\n // TODO pattern and gradient?\n : (fill.image || fill.colorStops)\n ? '#000'\n : fill;\n}\n\nexport function parsePercent(value, maxValue) {\n if (typeof value === 'string') {\n if (value.lastIndexOf('%') >= 0) {\n return parseFloat(value) / 100 * maxValue;\n }\n return parseFloat(value);\n }\n return value;\n}\n\nfunction getTextXForPadding(x, textAlign, textPadding) {\n return textAlign === 'right'\n ? (x - textPadding[1])\n : textAlign === 'center'\n ? (x + textPadding[3] / 2 - textPadding[1] / 2)\n : (x + textPadding[3]);\n}\n\n/**\n * @param {string} text\n * @param {module:zrender/Style} style\n * @return {boolean}\n */\nexport function needDrawText(text, style) {\n return text != null\n && (text\n || style.textBackgroundColor\n || (style.textBorderWidth && style.textBorderColor)\n || style.textPadding\n );\n}\n","/**\n * Mixin for drawing text in a element bounding rect\n * @module zrender/mixin/RectText\n */\n\nimport * as textHelper from '../helper/text';\nimport BoundingRect from '../../core/BoundingRect';\nimport {WILL_BE_RESTORED} from '../constant';\n\nvar tmpRect = new BoundingRect();\n\nvar RectText = function () {};\n\nRectText.prototype = {\n\n constructor: RectText,\n\n /**\n * Draw text in a rect with specified position.\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} rect Displayable rect\n */\n drawRectText: function (ctx, rect) {\n var style = this.style;\n\n rect = style.textRect || rect;\n\n // Optimize, avoid normalize every time.\n this.__dirty && textHelper.normalizeTextStyle(style, true);\n\n var text = style.text;\n\n // Convert to string\n text != null && (text += '');\n\n if (!textHelper.needDrawText(text, style)) {\n return;\n }\n\n // FIXME\n // Do not provide prevEl to `textHelper.renderText` for ctx prop cache,\n // but use `ctx.save()` and `ctx.restore()`. Because the cache for rect\n // text propably break the cache for its host elements.\n ctx.save();\n\n // Transform rect to view space\n var transform = this.transform;\n if (!style.transformText) {\n if (transform) {\n tmpRect.copy(rect);\n tmpRect.applyTransform(transform);\n rect = tmpRect;\n }\n }\n else {\n this.setTransform(ctx);\n }\n\n // transformText and textRotation can not be used at the same time.\n textHelper.renderText(this, ctx, text, style, rect, WILL_BE_RESTORED);\n\n ctx.restore();\n }\n};\n\nexport default RectText;","/**\n * Base class of all displayable graphic objects\n * @module zrender/graphic/Displayable\n */\n\n\nimport * as zrUtil from '../core/util';\nimport Style from './Style';\nimport Element from '../Element';\nimport RectText from './mixin/RectText';\n\n/**\n * @alias module:zrender/graphic/Displayable\n * @extends module:zrender/Element\n * @extends module:zrender/graphic/mixin/RectText\n */\nfunction Displayable(opts) {\n\n opts = opts || {};\n\n Element.call(this, opts);\n\n // Extend properties\n for (var name in opts) {\n if (\n opts.hasOwnProperty(name)\n && name !== 'style'\n ) {\n this[name] = opts[name];\n }\n }\n\n /**\n * @type {module:zrender/graphic/Style}\n */\n this.style = new Style(opts.style, this);\n\n this._rect = null;\n // Shapes for cascade clipping.\n // Can only be `null`/`undefined` or an non-empty array, MUST NOT be an empty array.\n // because it is easy to only using null to check whether clipPaths changed.\n this.__clipPaths = null;\n\n // FIXME Stateful must be mixined after style is setted\n // Stateful.call(this, opts);\n}\n\nDisplayable.prototype = {\n\n constructor: Displayable,\n\n type: 'displayable',\n\n /**\n * Dirty flag. From which painter will determine if this displayable object needs brush.\n * @name module:zrender/graphic/Displayable#__dirty\n * @type {boolean}\n */\n __dirty: true,\n\n /**\n * Whether the displayable object is visible. when it is true, the displayable object\n * is not drawn, but the mouse event can still trigger the object.\n * @name module:/zrender/graphic/Displayable#invisible\n * @type {boolean}\n * @default false\n */\n invisible: false,\n\n /**\n * @name module:/zrender/graphic/Displayable#z\n * @type {number}\n * @default 0\n */\n z: 0,\n\n /**\n * @name module:/zrender/graphic/Displayable#z\n * @type {number}\n * @default 0\n */\n z2: 0,\n\n /**\n * The z level determines the displayable object can be drawn in which layer canvas.\n * @name module:/zrender/graphic/Displayable#zlevel\n * @type {number}\n * @default 0\n */\n zlevel: 0,\n\n /**\n * Whether it can be dragged.\n * @name module:/zrender/graphic/Displayable#draggable\n * @type {boolean}\n * @default false\n */\n draggable: false,\n\n /**\n * Whether is it dragging.\n * @name module:/zrender/graphic/Displayable#draggable\n * @type {boolean}\n * @default false\n */\n dragging: false,\n\n /**\n * Whether to respond to mouse events.\n * @name module:/zrender/graphic/Displayable#silent\n * @type {boolean}\n * @default false\n */\n silent: false,\n\n /**\n * If enable culling\n * @type {boolean}\n * @default false\n */\n culling: false,\n\n /**\n * Mouse cursor when hovered\n * @name module:/zrender/graphic/Displayable#cursor\n * @type {string}\n */\n cursor: 'pointer',\n\n /**\n * If hover area is bounding rect\n * @name module:/zrender/graphic/Displayable#rectHover\n * @type {string}\n */\n rectHover: false,\n\n /**\n * Render the element progressively when the value >= 0,\n * usefull for large data.\n * @type {boolean}\n */\n progressive: false,\n\n /**\n * @type {boolean}\n */\n incremental: false,\n /**\n * Scale ratio for global scale.\n * @type {boolean}\n */\n globalScaleRatio: 1,\n\n beforeBrush: function (ctx) {},\n\n afterBrush: function (ctx) {},\n\n /**\n * Graphic drawing method.\n * @param {CanvasRenderingContext2D} ctx\n */\n // Interface\n brush: function (ctx, prevEl) {},\n\n /**\n * Get the minimum bounding box.\n * @return {module:zrender/core/BoundingRect}\n */\n // Interface\n getBoundingRect: function () {},\n\n /**\n * If displayable element contain coord x, y\n * @param {number} x\n * @param {number} y\n * @return {boolean}\n */\n contain: function (x, y) {\n return this.rectContain(x, y);\n },\n\n /**\n * @param {Function} cb\n * @param {} context\n */\n traverse: function (cb, context) {\n cb.call(context, this);\n },\n\n /**\n * If bounding rect of element contain coord x, y\n * @param {number} x\n * @param {number} y\n * @return {boolean}\n */\n rectContain: function (x, y) {\n var coord = this.transformCoordToLocal(x, y);\n var rect = this.getBoundingRect();\n return rect.contain(coord[0], coord[1]);\n },\n\n /**\n * Mark displayable element dirty and refresh next frame\n */\n dirty: function () {\n this.__dirty = this.__dirtyText = true;\n\n this._rect = null;\n\n this.__zr && this.__zr.refresh();\n },\n\n /**\n * If displayable object binded any event\n * @return {boolean}\n */\n // TODO, events bound by bind\n // isSilent: function () {\n // return !(\n // this.hoverable || this.draggable\n // || this.onmousemove || this.onmouseover || this.onmouseout\n // || this.onmousedown || this.onmouseup || this.onclick\n // || this.ondragenter || this.ondragover || this.ondragleave\n // || this.ondrop\n // );\n // },\n /**\n * Alias for animate('style')\n * @param {boolean} loop\n */\n animateStyle: function (loop) {\n return this.animate('style', loop);\n },\n\n attrKV: function (key, value) {\n if (key !== 'style') {\n Element.prototype.attrKV.call(this, key, value);\n }\n else {\n this.style.set(value);\n }\n },\n\n /**\n * @param {Object|string} key\n * @param {*} value\n */\n setStyle: function (key, value) {\n this.style.set(key, value);\n this.dirty(false);\n return this;\n },\n\n /**\n * Use given style object\n * @param {Object} obj\n */\n useStyle: function (obj) {\n this.style = new Style(obj, this);\n this.dirty(false);\n return this;\n },\n\n /**\n * The string value of `textPosition` needs to be calculated to a real postion.\n * For example, `'inside'` is calculated to `[rect.width/2, rect.height/2]`\n * by default. See `contain/text.js#calculateTextPosition` for more details.\n * But some coutom shapes like \"pin\", \"flag\" have center that is not exactly\n * `[width/2, height/2]`. So we provide this hook to customize the calculation\n * for those shapes. It will be called if the `style.textPosition` is a string.\n * @param {Obejct} [out] Prepared out object. If not provided, this method should\n * be responsible for creating one.\n * @param {module:zrender/graphic/Style} style\n * @param {Object} rect {x, y, width, height}\n * @return {Obejct} out The same as the input out.\n * {\n * x: number. mandatory.\n * y: number. mandatory.\n * textAlign: string. optional. use style.textAlign by default.\n * textVerticalAlign: string. optional. use style.textVerticalAlign by default.\n * }\n */\n calculateTextPosition: null\n};\n\nzrUtil.inherits(Displayable, Element);\n\nzrUtil.mixin(Displayable, RectText);\n// zrUtil.mixin(Displayable, Stateful);\n\nexport default Displayable;","import Displayable from './Displayable';\nimport BoundingRect from '../core/BoundingRect';\nimport * as zrUtil from '../core/util';\nimport * as imageHelper from './helper/image';\n\n/**\n * @alias zrender/graphic/Image\n * @extends module:zrender/graphic/Displayable\n * @constructor\n * @param {Object} opts\n */\nfunction ZImage(opts) {\n Displayable.call(this, opts);\n}\n\nZImage.prototype = {\n\n constructor: ZImage,\n\n type: 'image',\n\n brush: function (ctx, prevEl) {\n var style = this.style;\n var src = style.image;\n\n // Must bind each time\n style.bind(ctx, this, prevEl);\n\n var image = this._image = imageHelper.createOrUpdateImage(\n src,\n this._image,\n this,\n this.onload\n );\n\n if (!image || !imageHelper.isImageReady(image)) {\n return;\n }\n\n // 图片已经加载完成\n // if (image.nodeName.toUpperCase() == 'IMG') {\n // if (!image.complete) {\n // return;\n // }\n // }\n // Else is canvas\n\n var x = style.x || 0;\n var y = style.y || 0;\n var width = style.width;\n var height = style.height;\n var aspect = image.width / image.height;\n if (width == null && height != null) {\n // Keep image/height ratio\n width = height * aspect;\n }\n else if (height == null && width != null) {\n height = width / aspect;\n }\n else if (width == null && height == null) {\n width = image.width;\n height = image.height;\n }\n\n // 设置transform\n this.setTransform(ctx);\n\n if (style.sWidth && style.sHeight) {\n var sx = style.sx || 0;\n var sy = style.sy || 0;\n ctx.drawImage(\n image,\n sx, sy, style.sWidth, style.sHeight,\n x, y, width, height\n );\n }\n else if (style.sx && style.sy) {\n var sx = style.sx;\n var sy = style.sy;\n var sWidth = width - sx;\n var sHeight = height - sy;\n ctx.drawImage(\n image,\n sx, sy, sWidth, sHeight,\n x, y, width, height\n );\n }\n else {\n ctx.drawImage(image, x, y, width, height);\n }\n\n // Draw rect text\n if (style.text != null) {\n // Only restore transform when needs draw text.\n this.restoreTransform(ctx);\n this.drawRectText(ctx, this.getBoundingRect());\n }\n },\n\n getBoundingRect: function () {\n var style = this.style;\n if (!this._rect) {\n this._rect = new BoundingRect(\n style.x || 0, style.y || 0, style.width || 0, style.height || 0\n );\n }\n return this._rect;\n }\n};\n\nzrUtil.inherits(ZImage, Displayable);\n\nexport default ZImage;","import {devicePixelRatio} from './config';\nimport * as util from './core/util';\nimport logError from './core/log';\nimport BoundingRect from './core/BoundingRect';\nimport timsort from './core/timsort';\nimport Layer from './Layer';\nimport requestAnimationFrame from './animation/requestAnimationFrame';\nimport Image from './graphic/Image';\nimport env from './core/env';\n\nvar HOVER_LAYER_ZLEVEL = 1e5;\nvar CANVAS_ZLEVEL = 314159;\n\nvar EL_AFTER_INCREMENTAL_INC = 0.01;\nvar INCREMENTAL_INC = 0.001;\n\nfunction parseInt10(val) {\n return parseInt(val, 10);\n}\n\nfunction isLayerValid(layer) {\n if (!layer) {\n return false;\n }\n\n if (layer.__builtin__) {\n return true;\n }\n\n if (typeof (layer.resize) !== 'function'\n || typeof (layer.refresh) !== 'function'\n ) {\n return false;\n }\n\n return true;\n}\n\nvar tmpRect = new BoundingRect(0, 0, 0, 0);\nvar viewRect = new BoundingRect(0, 0, 0, 0);\nfunction isDisplayableCulled(el, width, height) {\n tmpRect.copy(el.getBoundingRect());\n if (el.transform) {\n tmpRect.applyTransform(el.transform);\n }\n viewRect.width = width;\n viewRect.height = height;\n return !tmpRect.intersect(viewRect);\n}\n\nfunction isClipPathChanged(clipPaths, prevClipPaths) {\n // displayable.__clipPaths can only be `null`/`undefined` or an non-empty array.\n if (clipPaths === prevClipPaths) {\n return false;\n }\n if (!clipPaths || !prevClipPaths || (clipPaths.length !== prevClipPaths.length)) {\n return true;\n }\n for (var i = 0; i < clipPaths.length; i++) {\n if (clipPaths[i] !== prevClipPaths[i]) {\n return true;\n }\n }\n return false;\n}\n\nfunction doClip(clipPaths, ctx) {\n for (var i = 0; i < clipPaths.length; i++) {\n var clipPath = clipPaths[i];\n\n clipPath.setTransform(ctx);\n ctx.beginPath();\n clipPath.buildPath(ctx, clipPath.shape);\n ctx.clip();\n // Transform back\n clipPath.restoreTransform(ctx);\n }\n}\n\nfunction createRoot(width, height) {\n var domRoot = document.createElement('div');\n\n // domRoot.onselectstart = returnFalse; // Avoid page selected\n domRoot.style.cssText = [\n 'position:relative',\n // IOS13 safari probably has a compositing bug (z order of the canvas and the consequent\n // dom does not act as expected) when some of the parent dom has\n // `-webkit-overflow-scrolling: touch;` and the webpage is longer than one screen and\n // the canvas is not at the top part of the page.\n // Check `https://bugs.webkit.org/show_bug.cgi?id=203681` for more details. We remove\n // this `overflow:hidden` to avoid the bug.\n // 'overflow:hidden',\n 'width:' + width + 'px',\n 'height:' + height + 'px',\n 'padding:0',\n 'margin:0',\n 'border-width:0'\n ].join(';') + ';';\n\n return domRoot;\n}\n\n\n/**\n * @alias module:zrender/Painter\n * @constructor\n * @param {HTMLElement} root 绘图容器\n * @param {module:zrender/Storage} storage\n * @param {Object} opts\n */\nvar Painter = function (root, storage, opts) {\n\n this.type = 'canvas';\n\n // In node environment using node-canvas\n var singleCanvas = !root.nodeName // In node ?\n || root.nodeName.toUpperCase() === 'CANVAS';\n\n this._opts = opts = util.extend({}, opts || {});\n\n /**\n * @type {number}\n */\n this.dpr = opts.devicePixelRatio || devicePixelRatio;\n /**\n * @type {boolean}\n * @private\n */\n this._singleCanvas = singleCanvas;\n /**\n * 绘图容器\n * @type {HTMLElement}\n */\n this.root = root;\n\n var rootStyle = root.style;\n\n if (rootStyle) {\n rootStyle['-webkit-tap-highlight-color'] = 'transparent';\n rootStyle['-webkit-user-select'] =\n rootStyle['user-select'] =\n rootStyle['-webkit-touch-callout'] = 'none';\n\n root.innerHTML = '';\n }\n\n /**\n * @type {module:zrender/Storage}\n */\n this.storage = storage;\n\n /**\n * @type {Array.<number>}\n * @private\n */\n var zlevelList = this._zlevelList = [];\n\n /**\n * @type {Object.<string, module:zrender/Layer>}\n * @private\n */\n var layers = this._layers = {};\n\n /**\n * @type {Object.<string, Object>}\n * @private\n */\n this._layerConfig = {};\n\n /**\n * zrender will do compositing when root is a canvas and have multiple zlevels.\n */\n this._needsManuallyCompositing = false;\n\n if (!singleCanvas) {\n this._width = this._getSize(0);\n this._height = this._getSize(1);\n\n var domRoot = this._domRoot = createRoot(\n this._width, this._height\n );\n root.appendChild(domRoot);\n }\n else {\n var width = root.width;\n var height = root.height;\n\n if (opts.width != null) {\n width = opts.width;\n }\n if (opts.height != null) {\n height = opts.height;\n }\n this.dpr = opts.devicePixelRatio || 1;\n\n // Use canvas width and height directly\n root.width = width * this.dpr;\n root.height = height * this.dpr;\n\n this._width = width;\n this._height = height;\n\n // Create layer if only one given canvas\n // Device can be specified to create a high dpi image.\n var mainLayer = new Layer(root, this, this.dpr);\n mainLayer.__builtin__ = true;\n mainLayer.initContext();\n // FIXME Use canvas width and height\n // mainLayer.resize(width, height);\n layers[CANVAS_ZLEVEL] = mainLayer;\n mainLayer.zlevel = CANVAS_ZLEVEL;\n // Not use common zlevel.\n zlevelList.push(CANVAS_ZLEVEL);\n\n this._domRoot = root;\n }\n\n /**\n * @type {module:zrender/Layer}\n * @private\n */\n this._hoverlayer = null;\n\n this._hoverElements = [];\n};\n\nPainter.prototype = {\n\n constructor: Painter,\n\n getType: function () {\n return 'canvas';\n },\n\n /**\n * If painter use a single canvas\n * @return {boolean}\n */\n isSingleCanvas: function () {\n return this._singleCanvas;\n },\n /**\n * @return {HTMLDivElement}\n */\n getViewportRoot: function () {\n return this._domRoot;\n },\n\n getViewportRootOffset: function () {\n var viewportRoot = this.getViewportRoot();\n if (viewportRoot) {\n return {\n offsetLeft: viewportRoot.offsetLeft || 0,\n offsetTop: viewportRoot.offsetTop || 0\n };\n }\n },\n\n /**\n * 刷新\n * @param {boolean} [paintAll=false] 强制绘制所有displayable\n */\n refresh: function (paintAll) {\n\n var list = this.storage.getDisplayList(true);\n\n var zlevelList = this._zlevelList;\n\n this._redrawId = Math.random();\n\n this._paintList(list, paintAll, this._redrawId);\n\n // Paint custum layers\n for (var i = 0; i < zlevelList.length; i++) {\n var z = zlevelList[i];\n var layer = this._layers[z];\n if (!layer.__builtin__ && layer.refresh) {\n var clearColor = i === 0 ? this._backgroundColor : null;\n layer.refresh(clearColor);\n }\n }\n\n this.refreshHover();\n\n return this;\n },\n\n addHover: function (el, hoverStyle) {\n if (el.__hoverMir) {\n return;\n }\n var elMirror = new el.constructor({\n style: el.style,\n shape: el.shape,\n z: el.z,\n z2: el.z2,\n silent: el.silent\n });\n elMirror.__from = el;\n el.__hoverMir = elMirror;\n hoverStyle && elMirror.setStyle(hoverStyle);\n this._hoverElements.push(elMirror);\n\n return elMirror;\n },\n\n removeHover: function (el) {\n var elMirror = el.__hoverMir;\n var hoverElements = this._hoverElements;\n var idx = util.indexOf(hoverElements, elMirror);\n if (idx >= 0) {\n hoverElements.splice(idx, 1);\n }\n el.__hoverMir = null;\n },\n\n clearHover: function (el) {\n var hoverElements = this._hoverElements;\n for (var i = 0; i < hoverElements.length; i++) {\n var from = hoverElements[i].__from;\n if (from) {\n from.__hoverMir = null;\n }\n }\n hoverElements.length = 0;\n },\n\n refreshHover: function () {\n var hoverElements = this._hoverElements;\n var len = hoverElements.length;\n var hoverLayer = this._hoverlayer;\n hoverLayer && hoverLayer.clear();\n\n if (!len) {\n return;\n }\n timsort(hoverElements, this.storage.displayableSortFunc);\n\n // Use a extream large zlevel\n // FIXME?\n if (!hoverLayer) {\n hoverLayer = this._hoverlayer = this.getLayer(HOVER_LAYER_ZLEVEL);\n }\n\n var scope = {};\n hoverLayer.ctx.save();\n for (var i = 0; i < len;) {\n var el = hoverElements[i];\n var originalEl = el.__from;\n // Original el is removed\n // PENDING\n if (!(originalEl && originalEl.__zr)) {\n hoverElements.splice(i, 1);\n originalEl.__hoverMir = null;\n len--;\n continue;\n }\n i++;\n\n // Use transform\n // FIXME style and shape ?\n if (!originalEl.invisible) {\n el.transform = originalEl.transform;\n el.invTransform = originalEl.invTransform;\n el.__clipPaths = originalEl.__clipPaths;\n // el.\n this._doPaintEl(el, hoverLayer, true, scope);\n }\n }\n\n hoverLayer.ctx.restore();\n },\n\n getHoverLayer: function () {\n return this.getLayer(HOVER_LAYER_ZLEVEL);\n },\n\n _paintList: function (list, paintAll, redrawId) {\n if (this._redrawId !== redrawId) {\n return;\n }\n\n paintAll = paintAll || false;\n\n this._updateLayerStatus(list);\n\n var finished = this._doPaintList(list, paintAll);\n\n if (this._needsManuallyCompositing) {\n this._compositeManually();\n }\n\n if (!finished) {\n var self = this;\n requestAnimationFrame(function () {\n self._paintList(list, paintAll, redrawId);\n });\n }\n },\n\n _compositeManually: function () {\n var ctx = this.getLayer(CANVAS_ZLEVEL).ctx;\n var width = this._domRoot.width;\n var height = this._domRoot.height;\n ctx.clearRect(0, 0, width, height);\n // PENDING, If only builtin layer?\n this.eachBuiltinLayer(function (layer) {\n if (layer.virtual) {\n ctx.drawImage(layer.dom, 0, 0, width, height);\n }\n });\n },\n\n _doPaintList: function (list, paintAll) {\n var layerList = [];\n for (var zi = 0; zi < this._zlevelList.length; zi++) {\n var zlevel = this._zlevelList[zi];\n var layer = this._layers[zlevel];\n if (layer.__builtin__\n && layer !== this._hoverlayer\n && (layer.__dirty || paintAll)\n ) {\n layerList.push(layer);\n }\n }\n\n var finished = true;\n\n for (var k = 0; k < layerList.length; k++) {\n var layer = layerList[k];\n var ctx = layer.ctx;\n var scope = {};\n ctx.save();\n\n var start = paintAll ? layer.__startIndex : layer.__drawIndex;\n\n var useTimer = !paintAll && layer.incremental && Date.now;\n var startTime = useTimer && Date.now();\n\n var clearColor = layer.zlevel === this._zlevelList[0]\n ? this._backgroundColor : null;\n // All elements in this layer are cleared.\n if (layer.__startIndex === layer.__endIndex) {\n layer.clear(false, clearColor);\n }\n else if (start === layer.__startIndex) {\n var firstEl = list[start];\n if (!firstEl.incremental || !firstEl.notClear || paintAll) {\n layer.clear(false, clearColor);\n }\n }\n if (start === -1) {\n console.error('For some unknown reason. drawIndex is -1');\n start = layer.__startIndex;\n }\n for (var i = start; i < layer.__endIndex; i++) {\n var el = list[i];\n this._doPaintEl(el, layer, paintAll, scope);\n el.__dirty = el.__dirtyText = false;\n\n if (useTimer) {\n // Date.now can be executed in 13,025,305 ops/second.\n var dTime = Date.now() - startTime;\n // Give 15 millisecond to draw.\n // The rest elements will be drawn in the next frame.\n if (dTime > 15) {\n break;\n }\n }\n }\n\n layer.__drawIndex = i;\n\n if (layer.__drawIndex < layer.__endIndex) {\n finished = false;\n }\n\n if (scope.prevElClipPaths) {\n // Needs restore the state. If last drawn element is in the clipping area.\n ctx.restore();\n }\n\n ctx.restore();\n }\n\n if (env.wxa) {\n // Flush for weixin application\n util.each(this._layers, function (layer) {\n if (layer && layer.ctx && layer.ctx.draw) {\n layer.ctx.draw();\n }\n });\n }\n\n return finished;\n },\n\n _doPaintEl: function (el, currentLayer, forcePaint, scope) {\n var ctx = currentLayer.ctx;\n var m = el.transform;\n if (\n (currentLayer.__dirty || forcePaint)\n // Ignore invisible element\n && !el.invisible\n // Ignore transparent element\n && el.style.opacity !== 0\n // Ignore scale 0 element, in some environment like node-canvas\n // Draw a scale 0 element can cause all following draw wrong\n // And setTransform with scale 0 will cause set back transform failed.\n && !(m && !m[0] && !m[3])\n // Ignore culled element\n && !(el.culling && isDisplayableCulled(el, this._width, this._height))\n ) {\n\n var clipPaths = el.__clipPaths;\n var prevElClipPaths = scope.prevElClipPaths;\n\n // Optimize when clipping on group with several elements\n if (!prevElClipPaths || isClipPathChanged(clipPaths, prevElClipPaths)) {\n // If has previous clipping state, restore from it\n if (prevElClipPaths) {\n ctx.restore();\n scope.prevElClipPaths = null;\n // Reset prevEl since context has been restored\n scope.prevEl = null;\n }\n // New clipping state\n if (clipPaths) {\n ctx.save();\n doClip(clipPaths, ctx);\n scope.prevElClipPaths = clipPaths;\n }\n }\n el.beforeBrush && el.beforeBrush(ctx);\n\n el.brush(ctx, scope.prevEl || null);\n scope.prevEl = el;\n\n el.afterBrush && el.afterBrush(ctx);\n }\n },\n\n /**\n * 获取 zlevel 所在层,如果不存在则会创建一个新的层\n * @param {number} zlevel\n * @param {boolean} virtual Virtual layer will not be inserted into dom.\n * @return {module:zrender/Layer}\n */\n getLayer: function (zlevel, virtual) {\n if (this._singleCanvas && !this._needsManuallyCompositing) {\n zlevel = CANVAS_ZLEVEL;\n }\n var layer = this._layers[zlevel];\n if (!layer) {\n // Create a new layer\n layer = new Layer('zr_' + zlevel, this, this.dpr);\n layer.zlevel = zlevel;\n layer.__builtin__ = true;\n\n if (this._layerConfig[zlevel]) {\n util.merge(layer, this._layerConfig[zlevel], true);\n }\n // TODO Remove EL_AFTER_INCREMENTAL_INC magic number\n else if (this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC]) {\n util.merge(layer, this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC], true);\n }\n\n if (virtual) {\n layer.virtual = virtual;\n }\n\n this.insertLayer(zlevel, layer);\n\n // Context is created after dom inserted to document\n // Or excanvas will get 0px clientWidth and clientHeight\n layer.initContext();\n }\n\n return layer;\n },\n\n insertLayer: function (zlevel, layer) {\n\n var layersMap = this._layers;\n var zlevelList = this._zlevelList;\n var len = zlevelList.length;\n var prevLayer = null;\n var i = -1;\n var domRoot = this._domRoot;\n\n if (layersMap[zlevel]) {\n logError('ZLevel ' + zlevel + ' has been used already');\n return;\n }\n // Check if is a valid layer\n if (!isLayerValid(layer)) {\n logError('Layer of zlevel ' + zlevel + ' is not valid');\n return;\n }\n\n if (len > 0 && zlevel > zlevelList[0]) {\n for (i = 0; i < len - 1; i++) {\n if (\n zlevelList[i] < zlevel\n && zlevelList[i + 1] > zlevel\n ) {\n break;\n }\n }\n prevLayer = layersMap[zlevelList[i]];\n }\n zlevelList.splice(i + 1, 0, zlevel);\n\n layersMap[zlevel] = layer;\n\n // Vitual layer will not directly show on the screen.\n // (It can be a WebGL layer and assigned to a ZImage element)\n // But it still under management of zrender.\n if (!layer.virtual) {\n if (prevLayer) {\n var prevDom = prevLayer.dom;\n if (prevDom.nextSibling) {\n domRoot.insertBefore(\n layer.dom,\n prevDom.nextSibling\n );\n }\n else {\n domRoot.appendChild(layer.dom);\n }\n }\n else {\n if (domRoot.firstChild) {\n domRoot.insertBefore(layer.dom, domRoot.firstChild);\n }\n else {\n domRoot.appendChild(layer.dom);\n }\n }\n }\n },\n\n // Iterate each layer\n eachLayer: function (cb, context) {\n var zlevelList = this._zlevelList;\n var z;\n var i;\n for (i = 0; i < zlevelList.length; i++) {\n z = zlevelList[i];\n cb.call(context, this._layers[z], z);\n }\n },\n\n // Iterate each buildin layer\n eachBuiltinLayer: function (cb, context) {\n var zlevelList = this._zlevelList;\n var layer;\n var z;\n var i;\n for (i = 0; i < zlevelList.length; i++) {\n z = zlevelList[i];\n layer = this._layers[z];\n if (layer.__builtin__) {\n cb.call(context, layer, z);\n }\n }\n },\n\n // Iterate each other layer except buildin layer\n eachOtherLayer: function (cb, context) {\n var zlevelList = this._zlevelList;\n var layer;\n var z;\n var i;\n for (i = 0; i < zlevelList.length; i++) {\n z = zlevelList[i];\n layer = this._layers[z];\n if (!layer.__builtin__) {\n cb.call(context, layer, z);\n }\n }\n },\n\n /**\n * 获取所有已创建的层\n * @param {Array.<module:zrender/Layer>} [prevLayer]\n */\n getLayers: function () {\n return this._layers;\n },\n\n _updateLayerStatus: function (list) {\n\n this.eachBuiltinLayer(function (layer, z) {\n layer.__dirty = layer.__used = false;\n });\n\n function updatePrevLayer(idx) {\n if (prevLayer) {\n if (prevLayer.__endIndex !== idx) {\n prevLayer.__dirty = true;\n }\n prevLayer.__endIndex = idx;\n }\n }\n\n if (this._singleCanvas) {\n for (var i = 1; i < list.length; i++) {\n var el = list[i];\n if (el.zlevel !== list[i - 1].zlevel || el.incremental) {\n this._needsManuallyCompositing = true;\n break;\n }\n }\n }\n\n var prevLayer = null;\n var incrementalLayerCount = 0;\n var prevZlevel;\n for (var i = 0; i < list.length; i++) {\n var el = list[i];\n var zlevel = el.zlevel;\n var layer;\n\n if (prevZlevel !== zlevel) {\n prevZlevel = zlevel;\n incrementalLayerCount = 0;\n }\n\n // TODO Not use magic number on zlevel.\n\n // Each layer with increment element can be separated to 3 layers.\n // (Other Element drawn after incremental element)\n // -----------------zlevel + EL_AFTER_INCREMENTAL_INC--------------------\n // (Incremental element)\n // ----------------------zlevel + INCREMENTAL_INC------------------------\n // (Element drawn before incremental element)\n // --------------------------------zlevel--------------------------------\n if (el.incremental) {\n layer = this.getLayer(zlevel + INCREMENTAL_INC, this._needsManuallyCompositing);\n layer.incremental = true;\n incrementalLayerCount = 1;\n }\n else {\n layer = this.getLayer(\n zlevel + (incrementalLayerCount > 0 ? EL_AFTER_INCREMENTAL_INC : 0),\n this._needsManuallyCompositing\n );\n }\n\n if (!layer.__builtin__) {\n logError('ZLevel ' + zlevel + ' has been used by unkown layer ' + layer.id);\n }\n\n if (layer !== prevLayer) {\n layer.__used = true;\n if (layer.__startIndex !== i) {\n layer.__dirty = true;\n }\n layer.__startIndex = i;\n if (!layer.incremental) {\n layer.__drawIndex = i;\n }\n else {\n // Mark layer draw index needs to update.\n layer.__drawIndex = -1;\n }\n updatePrevLayer(i);\n prevLayer = layer;\n }\n if (el.__dirty) {\n layer.__dirty = true;\n if (layer.incremental && layer.__drawIndex < 0) {\n // Start draw from the first dirty element.\n layer.__drawIndex = i;\n }\n }\n }\n\n updatePrevLayer(i);\n\n this.eachBuiltinLayer(function (layer, z) {\n // Used in last frame but not in this frame. Needs clear\n if (!layer.__used && layer.getElementCount() > 0) {\n layer.__dirty = true;\n layer.__startIndex = layer.__endIndex = layer.__drawIndex = 0;\n }\n // For incremental layer. In case start index changed and no elements are dirty.\n if (layer.__dirty && layer.__drawIndex < 0) {\n layer.__drawIndex = layer.__startIndex;\n }\n });\n },\n\n /**\n * 清除hover层外所有内容\n */\n clear: function () {\n this.eachBuiltinLayer(this._clearLayer);\n return this;\n },\n\n _clearLayer: function (layer) {\n layer.clear();\n },\n\n setBackgroundColor: function (backgroundColor) {\n this._backgroundColor = backgroundColor;\n },\n\n /**\n * 修改指定zlevel的绘制参数\n *\n * @param {string} zlevel\n * @param {Object} config 配置对象\n * @param {string} [config.clearColor=0] 每次清空画布的颜色\n * @param {string} [config.motionBlur=false] 是否开启动态模糊\n * @param {number} [config.lastFrameAlpha=0.7]\n * 在开启动态模糊的时候使用与上一帧混合的alpha值值越大尾迹越明显\n */\n configLayer: function (zlevel, config) {\n if (config) {\n var layerConfig = this._layerConfig;\n if (!layerConfig[zlevel]) {\n layerConfig[zlevel] = config;\n }\n else {\n util.merge(layerConfig[zlevel], config, true);\n }\n\n for (var i = 0; i < this._zlevelList.length; i++) {\n var _zlevel = this._zlevelList[i];\n // TODO Remove EL_AFTER_INCREMENTAL_INC magic number\n if (_zlevel === zlevel || _zlevel === zlevel + EL_AFTER_INCREMENTAL_INC) {\n var layer = this._layers[_zlevel];\n util.merge(layer, layerConfig[zlevel], true);\n }\n }\n }\n },\n\n /**\n * 删除指定层\n * @param {number} zlevel 层所在的zlevel\n */\n delLayer: function (zlevel) {\n var layers = this._layers;\n var zlevelList = this._zlevelList;\n var layer = layers[zlevel];\n if (!layer) {\n return;\n }\n layer.dom.parentNode.removeChild(layer.dom);\n delete layers[zlevel];\n\n zlevelList.splice(util.indexOf(zlevelList, zlevel), 1);\n },\n\n /**\n * 区域大小变化后重绘\n */\n resize: function (width, height) {\n if (!this._domRoot.style) { // Maybe in node or worker\n if (width == null || height == null) {\n return;\n }\n this._width = width;\n this._height = height;\n\n this.getLayer(CANVAS_ZLEVEL).resize(width, height);\n }\n else {\n var domRoot = this._domRoot;\n // FIXME Why ?\n domRoot.style.display = 'none';\n\n // Save input w/h\n var opts = this._opts;\n width != null && (opts.width = width);\n height != null && (opts.height = height);\n\n width = this._getSize(0);\n height = this._getSize(1);\n\n domRoot.style.display = '';\n\n // 优化没有实际改变的resize\n if (this._width !== width || height !== this._height) {\n domRoot.style.width = width + 'px';\n domRoot.style.height = height + 'px';\n\n for (var id in this._layers) {\n if (this._layers.hasOwnProperty(id)) {\n this._layers[id].resize(width, height);\n }\n }\n util.each(this._progressiveLayers, function (layer) {\n layer.resize(width, height);\n });\n\n this.refresh(true);\n }\n\n this._width = width;\n this._height = height;\n\n }\n return this;\n },\n\n /**\n * 清除单独的一个层\n * @param {number} zlevel\n */\n clearLayer: function (zlevel) {\n var layer = this._layers[zlevel];\n if (layer) {\n layer.clear();\n }\n },\n\n /**\n * 释放\n */\n dispose: function () {\n this.root.innerHTML = '';\n\n this.root =\n this.storage =\n\n this._domRoot =\n this._layers = null;\n },\n\n /**\n * Get canvas which has all thing rendered\n * @param {Object} opts\n * @param {string} [opts.backgroundColor]\n * @param {number} [opts.pixelRatio]\n */\n getRenderedCanvas: function (opts) {\n opts = opts || {};\n if (this._singleCanvas && !this._compositeManually) {\n return this._layers[CANVAS_ZLEVEL].dom;\n }\n\n var imageLayer = new Layer('image', this, opts.pixelRatio || this.dpr);\n imageLayer.initContext();\n imageLayer.clear(false, opts.backgroundColor || this._backgroundColor);\n\n if (opts.pixelRatio <= this.dpr) {\n this.refresh();\n\n var width = imageLayer.dom.width;\n var height = imageLayer.dom.height;\n var ctx = imageLayer.ctx;\n this.eachLayer(function (layer) {\n if (layer.__builtin__) {\n ctx.drawImage(layer.dom, 0, 0, width, height);\n }\n else if (layer.renderToCanvas) {\n imageLayer.ctx.save();\n layer.renderToCanvas(imageLayer.ctx);\n imageLayer.ctx.restore();\n }\n });\n }\n else {\n // PENDING, echarts-gl and incremental rendering.\n var scope = {};\n var displayList = this.storage.getDisplayList(true);\n for (var i = 0; i < displayList.length; i++) {\n var el = displayList[i];\n this._doPaintEl(el, imageLayer, true, scope);\n }\n }\n\n return imageLayer.dom;\n },\n /**\n * 获取绘图区域宽度\n */\n getWidth: function () {\n return this._width;\n },\n\n /**\n * 获取绘图区域高度\n */\n getHeight: function () {\n return this._height;\n },\n\n _getSize: function (whIdx) {\n var opts = this._opts;\n var wh = ['width', 'height'][whIdx];\n var cwh = ['clientWidth', 'clientHeight'][whIdx];\n var plt = ['paddingLeft', 'paddingTop'][whIdx];\n var prb = ['paddingRight', 'paddingBottom'][whIdx];\n\n if (opts[wh] != null && opts[wh] !== 'auto') {\n return parseFloat(opts[wh]);\n }\n\n var root = this.root;\n // IE8 does not support getComputedStyle, but it use VML.\n var stl = document.defaultView.getComputedStyle(root);\n\n return (\n (root[cwh] || parseInt10(stl[wh]) || parseInt10(root.style[wh]))\n - (parseInt10(stl[plt]) || 0)\n - (parseInt10(stl[prb]) || 0)\n ) | 0;\n },\n\n pathToImage: function (path, dpr) {\n dpr = dpr || this.dpr;\n\n var canvas = document.createElement('canvas');\n var ctx = canvas.getContext('2d');\n var rect = path.getBoundingRect();\n var style = path.style;\n var shadowBlurSize = style.shadowBlur * dpr;\n var shadowOffsetX = style.shadowOffsetX * dpr;\n var shadowOffsetY = style.shadowOffsetY * dpr;\n var lineWidth = style.hasStroke() ? style.lineWidth : 0;\n\n var leftMargin = Math.max(lineWidth / 2, -shadowOffsetX + shadowBlurSize);\n var rightMargin = Math.max(lineWidth / 2, shadowOffsetX + shadowBlurSize);\n var topMargin = Math.max(lineWidth / 2, -shadowOffsetY + shadowBlurSize);\n var bottomMargin = Math.max(lineWidth / 2, shadowOffsetY + shadowBlurSize);\n var width = rect.width + leftMargin + rightMargin;\n var height = rect.height + topMargin + bottomMargin;\n\n canvas.width = width * dpr;\n canvas.height = height * dpr;\n\n ctx.scale(dpr, dpr);\n ctx.clearRect(0, 0, width, height);\n ctx.dpr = dpr;\n\n var pathTransform = {\n position: path.position,\n rotation: path.rotation,\n scale: path.scale\n };\n path.position = [leftMargin - rect.x, topMargin - rect.y];\n path.rotation = 0;\n path.scale = [1, 1];\n path.updateTransform();\n if (path) {\n path.brush(ctx);\n }\n\n var ImageShape = Image;\n var imgShape = new ImageShape({\n style: {\n x: 0,\n y: 0,\n image: canvas\n }\n });\n\n if (pathTransform.position != null) {\n imgShape.position = path.position = pathTransform.position;\n }\n\n if (pathTransform.rotation != null) {\n imgShape.rotation = path.rotation = pathTransform.rotation;\n }\n\n if (pathTransform.scale != null) {\n imgShape.scale = path.scale = pathTransform.scale;\n }\n\n return imgShape;\n }\n};\n\nexport default Painter;","/**\n * Animation main class, dispatch and manage all animation controllers\n *\n * @module zrender/animation/Animation\n * @author pissang(https://github.com/pissang)\n */\n// TODO Additive animation\n// http://iosoteric.com/additive-animations-animatewithduration-in-ios-8/\n// https://developer.apple.com/videos/wwdc2014/#236\n\nimport * as util from '../core/util';\nimport {Dispatcher} from '../core/event';\nimport requestAnimationFrame from './requestAnimationFrame';\nimport Animator from './Animator';\n\n/**\n * @typedef {Object} IZRenderStage\n * @property {Function} update\n */\n\n/**\n * @alias module:zrender/animation/Animation\n * @constructor\n * @param {Object} [options]\n * @param {Function} [options.onframe]\n * @param {IZRenderStage} [options.stage]\n * @example\n * var animation = new Animation();\n * var obj = {\n * x: 100,\n * y: 100\n * };\n * animation.animate(node.position)\n * .when(1000, {\n * x: 500,\n * y: 500\n * })\n * .when(2000, {\n * x: 100,\n * y: 100\n * })\n * .start('spline');\n */\nvar Animation = function (options) {\n\n options = options || {};\n\n this.stage = options.stage || {};\n\n this.onframe = options.onframe || function () {};\n\n // private properties\n this._clips = [];\n\n this._running = false;\n\n this._time;\n\n this._pausedTime;\n\n this._pauseStart;\n\n this._paused = false;\n\n Dispatcher.call(this);\n};\n\nAnimation.prototype = {\n\n constructor: Animation,\n /**\n * Add clip\n * @param {module:zrender/animation/Clip} clip\n */\n addClip: function (clip) {\n this._clips.push(clip);\n },\n /**\n * Add animator\n * @param {module:zrender/animation/Animator} animator\n */\n addAnimator: function (animator) {\n animator.animation = this;\n var clips = animator.getClips();\n for (var i = 0; i < clips.length; i++) {\n this.addClip(clips[i]);\n }\n },\n /**\n * Delete animation clip\n * @param {module:zrender/animation/Clip} clip\n */\n removeClip: function (clip) {\n var idx = util.indexOf(this._clips, clip);\n if (idx >= 0) {\n this._clips.splice(idx, 1);\n }\n },\n\n /**\n * Delete animation clip\n * @param {module:zrender/animation/Animator} animator\n */\n removeAnimator: function (animator) {\n var clips = animator.getClips();\n for (var i = 0; i < clips.length; i++) {\n this.removeClip(clips[i]);\n }\n animator.animation = null;\n },\n\n _update: function () {\n var time = new Date().getTime() - this._pausedTime;\n var delta = time - this._time;\n var clips = this._clips;\n var len = clips.length;\n\n var deferredEvents = [];\n var deferredClips = [];\n for (var i = 0; i < len; i++) {\n var clip = clips[i];\n var e = clip.step(time, delta);\n // Throw out the events need to be called after\n // stage.update, like destroy\n if (e) {\n deferredEvents.push(e);\n deferredClips.push(clip);\n }\n }\n\n // Remove the finished clip\n for (var i = 0; i < len;) {\n if (clips[i]._needsRemove) {\n clips[i] = clips[len - 1];\n clips.pop();\n len--;\n }\n else {\n i++;\n }\n }\n\n len = deferredEvents.length;\n for (var i = 0; i < len; i++) {\n deferredClips[i].fire(deferredEvents[i]);\n }\n\n this._time = time;\n\n this.onframe(delta);\n\n // 'frame' should be triggered before stage, because upper application\n // depends on the sequence (e.g., echarts-stream and finish\n // event judge)\n this.trigger('frame', delta);\n\n if (this.stage.update) {\n this.stage.update();\n }\n },\n\n _startLoop: function () {\n var self = this;\n\n this._running = true;\n\n function step() {\n if (self._running) {\n\n requestAnimationFrame(step);\n\n !self._paused && self._update();\n }\n }\n\n requestAnimationFrame(step);\n },\n\n /**\n * Start animation.\n */\n start: function () {\n\n this._time = new Date().getTime();\n this._pausedTime = 0;\n\n this._startLoop();\n },\n\n /**\n * Stop animation.\n */\n stop: function () {\n this._running = false;\n },\n\n /**\n * Pause animation.\n */\n pause: function () {\n if (!this._paused) {\n this._pauseStart = new Date().getTime();\n this._paused = true;\n }\n },\n\n /**\n * Resume animation.\n */\n resume: function () {\n if (this._paused) {\n this._pausedTime += (new Date().getTime()) - this._pauseStart;\n this._paused = false;\n }\n },\n\n /**\n * Clear animation.\n */\n clear: function () {\n this._clips = [];\n },\n\n /**\n * Whether animation finished.\n */\n isFinished: function () {\n return !this._clips.length;\n },\n\n /**\n * Creat animator for a target, whose props can be animated.\n *\n * @param {Object} target\n * @param {Object} options\n * @param {boolean} [options.loop=false] Whether loop animation.\n * @param {Function} [options.getter=null] Get value from target.\n * @param {Function} [options.setter=null] Set value to target.\n * @return {module:zrender/animation/Animation~Animator}\n */\n // TODO Gap\n animate: function (target, options) {\n options = options || {};\n\n var animator = new Animator(\n target,\n options.loop,\n options.getter,\n options.setter\n );\n\n this.addAnimator(animator);\n\n return animator;\n }\n};\n\nutil.mixin(Animation, Dispatcher);\n\nexport default Animation;","\n/* global document */\n\nimport {\n addEventListener,\n removeEventListener,\n normalizeEvent,\n getNativeEvent\n} from '../core/event';\nimport * as zrUtil from '../core/util';\nimport Eventful from '../mixin/Eventful';\nimport env from '../core/env';\n\nvar TOUCH_CLICK_DELAY = 300;\n\nvar globalEventSupported = env.domSupported;\n\n\nvar localNativeListenerNames = (function () {\n var mouseHandlerNames = [\n 'click', 'dblclick', 'mousewheel', 'mouseout',\n 'mouseup', 'mousedown', 'mousemove', 'contextmenu'\n ];\n var touchHandlerNames = [\n 'touchstart', 'touchend', 'touchmove'\n ];\n var pointerEventNameMap = {\n pointerdown: 1, pointerup: 1, pointermove: 1, pointerout: 1\n };\n var pointerHandlerNames = zrUtil.map(mouseHandlerNames, function (name) {\n var nm = name.replace('mouse', 'pointer');\n return pointerEventNameMap.hasOwnProperty(nm) ? nm : name;\n });\n\n return {\n mouse: mouseHandlerNames,\n touch: touchHandlerNames,\n pointer: pointerHandlerNames\n };\n})();\n\nvar globalNativeListenerNames = {\n mouse: ['mousemove', 'mouseup'],\n pointer: ['pointermove', 'pointerup']\n};\n\n\nfunction eventNameFix(name) {\n return (name === 'mousewheel' && env.browser.firefox) ? 'DOMMouseScroll' : name;\n}\n\nfunction isPointerFromTouch(event) {\n var pointerType = event.pointerType;\n return pointerType === 'pen' || pointerType === 'touch';\n}\n\n// function useMSGuesture(handlerProxy, event) {\n// return isPointerFromTouch(event) && !!handlerProxy._msGesture;\n// }\n\n// function onMSGestureChange(proxy, event) {\n// if (event.translationX || event.translationY) {\n// // mousemove is carried by MSGesture to reduce the sensitivity.\n// proxy.handler.dispatchToElement(event.target, 'mousemove', event);\n// }\n// if (event.scale !== 1) {\n// event.pinchX = event.offsetX;\n// event.pinchY = event.offsetY;\n// event.pinchScale = event.scale;\n// proxy.handler.dispatchToElement(event.target, 'pinch', event);\n// }\n// }\n\n/**\n * Prevent mouse event from being dispatched after Touch Events action\n * @see <https://github.com/deltakosh/handjs/blob/master/src/hand.base.js>\n * 1. Mobile browsers dispatch mouse events 300ms after touchend.\n * 2. Chrome for Android dispatch mousedown for long-touch about 650ms\n * Result: Blocking Mouse Events for 700ms.\n *\n * @param {DOMHandlerScope} scope\n */\nfunction setTouchTimer(scope) {\n scope.touching = true;\n if (scope.touchTimer != null) {\n clearTimeout(scope.touchTimer);\n scope.touchTimer = null;\n }\n scope.touchTimer = setTimeout(function () {\n scope.touching = false;\n scope.touchTimer = null;\n }, 700);\n}\n\n// Mark touch, which is useful in distinguish touch and\n// mouse event in upper applicatoin.\nfunction markTouch(event) {\n event && (event.zrByTouch = true);\n}\n\n\n// function markTriggeredFromLocal(event) {\n// event && (event.__zrIsFromLocal = true);\n// }\n\n// function isTriggeredFromLocal(instance, event) {\n// return !!(event && event.__zrIsFromLocal);\n// }\n\nfunction normalizeGlobalEvent(instance, event) {\n // offsetX, offsetY still need to be calculated. They are necessary in the event\n // handlers of the upper applications. Set `true` to force calculate them.\n return normalizeEvent(instance.dom, new FakeGlobalEvent(instance, event), true);\n}\n\n/**\n * Detect whether the given el is in `painterRoot`.\n */\nfunction isLocalEl(instance, el) {\n var elTmp = el;\n var isLocal = false;\n while (elTmp && elTmp.nodeType !== 9\n && !(\n isLocal = elTmp.domBelongToZr\n || (elTmp !== el && elTmp === instance.painterRoot)\n )\n ) {\n elTmp = elTmp.parentNode;\n }\n return isLocal;\n}\n\n/**\n * Make a fake event but not change the original event,\n * becuase the global event probably be used by other\n * listeners not belonging to zrender.\n * @class\n */\nfunction FakeGlobalEvent(instance, event) {\n this.type = event.type;\n this.target = this.currentTarget = instance.dom;\n this.pointerType = event.pointerType;\n // Necessray for the force calculation of zrX, zrY\n this.clientX = event.clientX;\n this.clientY = event.clientY;\n // Because we do not mount global listeners to touch events,\n // we do not copy `targetTouches` and `changedTouches` here.\n}\nvar fakeGlobalEventProto = FakeGlobalEvent.prototype;\n// we make the default methods on the event do nothing,\n// otherwise it is dangerous. See more details in\n// [Drag outside] in `Handler.js`.\nfakeGlobalEventProto.stopPropagation =\n fakeGlobalEventProto.stopImmediatePropagation =\n fakeGlobalEventProto.preventDefault = zrUtil.noop;\n\n\n/**\n * Local DOM Handlers\n * @this {HandlerProxy}\n */\nvar localDOMHandlers = {\n\n mousedown: function (event) {\n event = normalizeEvent(this.dom, event);\n\n this._mayPointerCapture = [event.zrX, event.zrY];\n\n this.trigger('mousedown', event);\n },\n\n mousemove: function (event) {\n event = normalizeEvent(this.dom, event);\n\n var downPoint = this._mayPointerCapture;\n if (downPoint && (event.zrX !== downPoint[0] || event.zrY !== downPoint[1])) {\n togglePointerCapture(this, true);\n }\n\n this.trigger('mousemove', event);\n },\n\n mouseup: function (event) {\n event = normalizeEvent(this.dom, event);\n\n togglePointerCapture(this, false);\n\n this.trigger('mouseup', event);\n },\n\n mouseout: function (event) {\n event = normalizeEvent(this.dom, event);\n\n // Similarly to the browser did on `document` and touch event,\n // `globalout` will be delayed to final pointer cature release.\n if (this._pointerCapturing) {\n event.zrEventControl = 'no_globalout';\n }\n\n // There might be some doms created by upper layer application\n // at the same level of painter.getViewportRoot() (e.g., tooltip\n // dom created by echarts), where 'globalout' event should not\n // be triggered when mouse enters these doms. (But 'mouseout'\n // should be triggered at the original hovered element as usual).\n var element = event.toElement || event.relatedTarget;\n event.zrIsToLocalDOM = isLocalEl(this, element);\n\n this.trigger('mouseout', event);\n },\n\n touchstart: function (event) {\n // Default mouse behaviour should not be disabled here.\n // For example, page may needs to be slided.\n event = normalizeEvent(this.dom, event);\n\n markTouch(event);\n\n this._lastTouchMoment = new Date();\n\n this.handler.processGesture(event, 'start');\n\n // For consistent event listener for both touch device and mouse device,\n // we simulate \"mouseover-->mousedown\" in touch device. So we trigger\n // `mousemove` here (to trigger `mouseover` inside), and then trigger\n // `mousedown`.\n localDOMHandlers.mousemove.call(this, event);\n localDOMHandlers.mousedown.call(this, event);\n },\n\n touchmove: function (event) {\n event = normalizeEvent(this.dom, event);\n\n markTouch(event);\n\n this.handler.processGesture(event, 'change');\n\n // Mouse move should always be triggered no matter whether\n // there is gestrue event, because mouse move and pinch may\n // be used at the same time.\n localDOMHandlers.mousemove.call(this, event);\n },\n\n touchend: function (event) {\n event = normalizeEvent(this.dom, event);\n\n markTouch(event);\n\n this.handler.processGesture(event, 'end');\n\n localDOMHandlers.mouseup.call(this, event);\n\n // Do not trigger `mouseout` here, in spite of `mousemove`(`mouseover`) is\n // triggered in `touchstart`. This seems to be illogical, but by this mechanism,\n // we can conveniently implement \"hover style\" in both PC and touch device just\n // by listening to `mouseover` to add \"hover style\" and listening to `mouseout`\n // to remove \"hover style\" on an element, without any additional code for\n // compatibility. (`mouseout` will not be triggered in `touchend`, so \"hover\n // style\" will remain for user view)\n\n // click event should always be triggered no matter whether\n // there is gestrue event. System click can not be prevented.\n if (+new Date() - this._lastTouchMoment < TOUCH_CLICK_DELAY) {\n localDOMHandlers.click.call(this, event);\n }\n },\n\n pointerdown: function (event) {\n localDOMHandlers.mousedown.call(this, event);\n\n // if (useMSGuesture(this, event)) {\n // this._msGesture.addPointer(event.pointerId);\n // }\n },\n\n pointermove: function (event) {\n // FIXME\n // pointermove is so sensitive that it always triggered when\n // tap(click) on touch screen, which affect some judgement in\n // upper application. So, we dont support mousemove on MS touch\n // device yet.\n if (!isPointerFromTouch(event)) {\n localDOMHandlers.mousemove.call(this, event);\n }\n },\n\n pointerup: function (event) {\n localDOMHandlers.mouseup.call(this, event);\n },\n\n pointerout: function (event) {\n // pointerout will be triggered when tap on touch screen\n // (IE11+/Edge on MS Surface) after click event triggered,\n // which is inconsistent with the mousout behavior we defined\n // in touchend. So we unify them.\n // (check localDOMHandlers.touchend for detailed explanation)\n if (!isPointerFromTouch(event)) {\n localDOMHandlers.mouseout.call(this, event);\n }\n }\n\n};\n\n/**\n * Othere DOM UI Event handlers for zr dom.\n * @this {HandlerProxy}\n */\nzrUtil.each(['click', 'mousewheel', 'dblclick', 'contextmenu'], function (name) {\n localDOMHandlers[name] = function (event) {\n event = normalizeEvent(this.dom, event);\n this.trigger(name, event);\n };\n});\n\n\n/**\n * DOM UI Event handlers for global page.\n *\n * [Caution]:\n * those handlers should both support in capture phase and bubble phase!\n *\n * @this {HandlerProxy}\n */\nvar globalDOMHandlers = {\n\n pointermove: function (event) {\n // FIXME\n // pointermove is so sensitive that it always triggered when\n // tap(click) on touch screen, which affect some judgement in\n // upper application. So, we dont support mousemove on MS touch\n // device yet.\n if (!isPointerFromTouch(event)) {\n globalDOMHandlers.mousemove.call(this, event);\n }\n },\n\n pointerup: function (event) {\n globalDOMHandlers.mouseup.call(this, event);\n },\n\n mousemove: function (event) {\n this.trigger('mousemove', event);\n },\n\n mouseup: function (event) {\n var pointerCaptureReleasing = this._pointerCapturing;\n\n togglePointerCapture(this, false);\n\n this.trigger('mouseup', event);\n\n if (pointerCaptureReleasing) {\n event.zrEventControl = 'only_globalout';\n this.trigger('mouseout', event);\n }\n }\n\n};\n\n\n/**\n * @param {HandlerProxy} instance\n * @param {DOMHandlerScope} scope\n */\nfunction mountLocalDOMEventListeners(instance, scope) {\n var domHandlers = scope.domHandlers;\n\n if (env.pointerEventsSupported) { // Only IE11+/Edge\n // 1. On devices that both enable touch and mouse (e.g., MS Surface and lenovo X240),\n // IE11+/Edge do not trigger touch event, but trigger pointer event and mouse event\n // at the same time.\n // 2. On MS Surface, it probablely only trigger mousedown but no mouseup when tap on\n // screen, which do not occurs in pointer event.\n // So we use pointer event to both detect touch gesture and mouse behavior.\n zrUtil.each(localNativeListenerNames.pointer, function (nativeEventName) {\n mountSingleDOMEventListener(scope, nativeEventName, function (event) {\n // markTriggeredFromLocal(event);\n domHandlers[nativeEventName].call(instance, event);\n });\n });\n\n // FIXME\n // Note: MS Gesture require CSS touch-action set. But touch-action is not reliable,\n // which does not prevent defuault behavior occasionally (which may cause view port\n // zoomed in but use can not zoom it back). And event.preventDefault() does not work.\n // So we have to not to use MSGesture and not to support touchmove and pinch on MS\n // touch screen. And we only support click behavior on MS touch screen now.\n\n // MS Gesture Event is only supported on IE11+/Edge and on Windows 8+.\n // We dont support touch on IE on win7.\n // See <https://msdn.microsoft.com/en-us/library/dn433243(v=vs.85).aspx>\n // if (typeof MSGesture === 'function') {\n // (this._msGesture = new MSGesture()).target = dom; // jshint ignore:line\n // dom.addEventListener('MSGestureChange', onMSGestureChange);\n // }\n }\n else {\n if (env.touchEventsSupported) {\n zrUtil.each(localNativeListenerNames.touch, function (nativeEventName) {\n mountSingleDOMEventListener(scope, nativeEventName, function (event) {\n // markTriggeredFromLocal(event);\n domHandlers[nativeEventName].call(instance, event);\n setTouchTimer(scope);\n });\n });\n // Handler of 'mouseout' event is needed in touch mode, which will be mounted below.\n // addEventListener(root, 'mouseout', this._mouseoutHandler);\n }\n\n // 1. Considering some devices that both enable touch and mouse event (like on MS Surface\n // and lenovo X240, @see #2350), we make mouse event be always listened, otherwise\n // mouse event can not be handle in those devices.\n // 2. On MS Surface, Chrome will trigger both touch event and mouse event. How to prevent\n // mouseevent after touch event triggered, see `setTouchTimer`.\n zrUtil.each(localNativeListenerNames.mouse, function (nativeEventName) {\n mountSingleDOMEventListener(scope, nativeEventName, function (event) {\n event = getNativeEvent(event);\n if (!scope.touching) {\n // markTriggeredFromLocal(event);\n domHandlers[nativeEventName].call(instance, event);\n }\n });\n });\n }\n}\n\n/**\n * @param {HandlerProxy} instance\n * @param {DOMHandlerScope} scope\n */\nfunction mountGlobalDOMEventListeners(instance, scope) {\n // Only IE11+/Edge. See the comment in `mountLocalDOMEventListeners`.\n if (env.pointerEventsSupported) {\n zrUtil.each(globalNativeListenerNames.pointer, mount);\n }\n // Touch event has implemented \"drag outside\" so we do not mount global listener for touch event.\n // (see https://www.w3.org/TR/touch-events/#the-touchmove-event)\n // We do not consider \"both-support-touch-and-mouse device\" for this feature (see the comment of\n // `mountLocalDOMEventListeners`) to avoid bugs util some requirements come.\n else if (!env.touchEventsSupported) {\n zrUtil.each(globalNativeListenerNames.mouse, mount);\n }\n\n function mount(nativeEventName) {\n function nativeEventListener(event) {\n event = getNativeEvent(event);\n // See the reason in [Drag outside] in `Handler.js`\n // This checking supports both `useCapture` or not.\n // PENDING: if there is performance issue in some devices,\n // we probably can not use `useCapture` and change a easier\n // to judes whether local (mark).\n if (!isLocalEl(instance, event.target)) {\n event = normalizeGlobalEvent(instance, event);\n scope.domHandlers[nativeEventName].call(instance, event);\n }\n }\n mountSingleDOMEventListener(\n scope, nativeEventName, nativeEventListener,\n {capture: true} // See [Drag Outside] in `Handler.js`\n );\n }\n}\n\nfunction mountSingleDOMEventListener(scope, nativeEventName, listener, opt) {\n scope.mounted[nativeEventName] = listener;\n scope.listenerOpts[nativeEventName] = opt;\n addEventListener(scope.domTarget, eventNameFix(nativeEventName), listener, opt);\n}\n\nfunction unmountDOMEventListeners(scope) {\n var mounted = scope.mounted;\n for (var nativeEventName in mounted) {\n if (mounted.hasOwnProperty(nativeEventName)) {\n removeEventListener(\n scope.domTarget, eventNameFix(nativeEventName), mounted[nativeEventName],\n scope.listenerOpts[nativeEventName]\n );\n }\n }\n scope.mounted = {};\n}\n\n/**\n * See [Drag Outside] in `Handler.js`.\n * @implement\n * @param {boolean} isPointerCapturing Should never be `null`/`undefined`.\n * `true`: start to capture pointer if it is not capturing.\n * `false`: end the capture if it is capturing.\n */\nfunction togglePointerCapture(instance, isPointerCapturing) {\n instance._mayPointerCapture = null;\n\n if (globalEventSupported && (instance._pointerCapturing ^ isPointerCapturing)) {\n instance._pointerCapturing = isPointerCapturing;\n\n var globalHandlerScope = instance._globalHandlerScope;\n isPointerCapturing\n ? mountGlobalDOMEventListeners(instance, globalHandlerScope)\n : unmountDOMEventListeners(globalHandlerScope);\n }\n}\n\n/**\n * @inner\n * @class\n */\nfunction DOMHandlerScope(domTarget, domHandlers) {\n this.domTarget = domTarget;\n this.domHandlers = domHandlers;\n\n // Key: eventName, value: mounted handler funcitons.\n // Used for unmount.\n this.mounted = {};\n this.listenerOpts = {};\n\n this.touchTimer = null;\n this.touching = false;\n}\n\n/**\n * @public\n * @class\n */\nfunction HandlerDomProxy(dom, painterRoot) {\n Eventful.call(this);\n\n this.dom = dom;\n this.painterRoot = painterRoot;\n\n this._localHandlerScope = new DOMHandlerScope(dom, localDOMHandlers);\n\n if (globalEventSupported) {\n this._globalHandlerScope = new DOMHandlerScope(document, globalDOMHandlers);\n }\n\n /**\n * @type {boolean}\n */\n this._pointerCapturing = false;\n /**\n * @type {Array.<number>} [x, y] or null.\n */\n this._mayPointerCapture = null;\n\n mountLocalDOMEventListeners(this, this._localHandlerScope);\n}\n\nvar handlerDomProxyProto = HandlerDomProxy.prototype;\n\nhandlerDomProxyProto.dispose = function () {\n unmountDOMEventListeners(this._localHandlerScope);\n if (globalEventSupported) {\n unmountDOMEventListeners(this._globalHandlerScope);\n }\n};\n\nhandlerDomProxyProto.setCursor = function (cursorStyle) {\n this.dom.style && (this.dom.style.cursor = cursorStyle || 'default');\n};\n\n\nzrUtil.mixin(HandlerDomProxy, Eventful);\n\nexport default HandlerDomProxy;\n","/*!\n* ZRender, a high performance 2d drawing library.\n*\n* Copyright (c) 2013, Baidu Inc.\n* All rights reserved.\n*\n* LICENSE\n* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt\n*/\n\nimport guid from './core/guid';\nimport env from './core/env';\nimport * as zrUtil from './core/util';\nimport Handler from './Handler';\nimport Storage from './Storage';\nimport Painter from './Painter';\nimport Animation from './animation/Animation';\nimport HandlerProxy from './dom/HandlerProxy';\n\nvar useVML = !env.canvasSupported;\n\nvar painterCtors = {\n canvas: Painter\n};\n\nvar instances = {}; // ZRender实例map索引\n\n/**\n * @type {string}\n */\nexport var version = '4.3.2';\n\n/**\n * Initializing a zrender instance\n * @param {HTMLElement} dom\n * @param {Object} [opts]\n * @param {string} [opts.renderer='canvas'] 'canvas' or 'svg'\n * @param {number} [opts.devicePixelRatio]\n * @param {number|string} [opts.width] Can be 'auto' (the same as null/undefined)\n * @param {number|string} [opts.height] Can be 'auto' (the same as null/undefined)\n * @return {module:zrender/ZRender}\n */\nexport function init(dom, opts) {\n var zr = new ZRender(guid(), dom, opts);\n instances[zr.id] = zr;\n return zr;\n}\n\n/**\n * Dispose zrender instance\n * @param {module:zrender/ZRender} zr\n */\nexport function dispose(zr) {\n if (zr) {\n zr.dispose();\n }\n else {\n for (var key in instances) {\n if (instances.hasOwnProperty(key)) {\n instances[key].dispose();\n }\n }\n instances = {};\n }\n\n return this;\n}\n\n/**\n * Get zrender instance by id\n * @param {string} id zrender instance id\n * @return {module:zrender/ZRender}\n */\nexport function getInstance(id) {\n return instances[id];\n}\n\nexport function registerPainter(name, Ctor) {\n painterCtors[name] = Ctor;\n}\n\nfunction delInstance(id) {\n delete instances[id];\n}\n\n/**\n * @module zrender/ZRender\n */\n/**\n * @constructor\n * @alias module:zrender/ZRender\n * @param {string} id\n * @param {HTMLElement} dom\n * @param {Object} opts\n * @param {string} [opts.renderer='canvas'] 'canvas' or 'svg'\n * @param {number} [opts.devicePixelRatio]\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 */\nvar ZRender = function (id, dom, opts) {\n\n opts = opts || {};\n\n /**\n * @type {HTMLDomElement}\n */\n this.dom = dom;\n\n /**\n * @type {string}\n */\n this.id = id;\n\n var self = this;\n var storage = new Storage();\n\n var rendererType = opts.renderer;\n // TODO WebGL\n if (useVML) {\n if (!painterCtors.vml) {\n throw new Error('You need to require \\'zrender/vml/vml\\' to support IE8');\n }\n rendererType = 'vml';\n }\n else if (!rendererType || !painterCtors[rendererType]) {\n rendererType = 'canvas';\n }\n var painter = new painterCtors[rendererType](dom, storage, opts, id);\n\n this.storage = storage;\n this.painter = painter;\n\n var handerProxy = (!env.node && !env.worker) ? new HandlerProxy(painter.getViewportRoot(), painter.root) : null;\n this.handler = new Handler(storage, painter, handerProxy, painter.root);\n\n /**\n * @type {module:zrender/animation/Animation}\n */\n this.animation = new Animation({\n stage: {\n update: zrUtil.bind(this.flush, this)\n }\n });\n this.animation.start();\n\n /**\n * @type {boolean}\n * @private\n */\n this._needsRefresh;\n\n // 修改 storage.delFromStorage, 每次删除元素之前删除动画\n // FIXME 有点ugly\n var oldDelFromStorage = storage.delFromStorage;\n var oldAddToStorage = storage.addToStorage;\n\n storage.delFromStorage = function (el) {\n oldDelFromStorage.call(storage, el);\n\n el && el.removeSelfFromZr(self);\n };\n\n storage.addToStorage = function (el) {\n oldAddToStorage.call(storage, el);\n\n el.addSelfToZr(self);\n };\n};\n\nZRender.prototype = {\n\n constructor: ZRender,\n /**\n * 获取实例唯一标识\n * @return {string}\n */\n getId: function () {\n return this.id;\n },\n\n /**\n * 添加元素\n * @param {module:zrender/Element} el\n */\n add: function (el) {\n this.storage.addRoot(el);\n this._needsRefresh = true;\n },\n\n /**\n * 删除元素\n * @param {module:zrender/Element} el\n */\n remove: function (el) {\n this.storage.delRoot(el);\n this._needsRefresh = true;\n },\n\n /**\n * Change configuration of layer\n * @param {string} zLevel\n * @param {Object} config\n * @param {string} [config.clearColor=0] Clear color\n * @param {string} [config.motionBlur=false] If enable motion blur\n * @param {number} [config.lastFrameAlpha=0.7] Motion blur factor. Larger value cause longer trailer\n */\n configLayer: function (zLevel, config) {\n if (this.painter.configLayer) {\n this.painter.configLayer(zLevel, config);\n }\n this._needsRefresh = true;\n },\n\n /**\n * Set background color\n * @param {string} backgroundColor\n */\n setBackgroundColor: function (backgroundColor) {\n if (this.painter.setBackgroundColor) {\n this.painter.setBackgroundColor(backgroundColor);\n }\n this._needsRefresh = true;\n },\n\n /**\n * Repaint the canvas immediately\n */\n refreshImmediately: function () {\n // var start = new Date();\n\n // Clear needsRefresh ahead to avoid something wrong happens in refresh\n // Or it will cause zrender refreshes again and again.\n this._needsRefresh = this._needsRefreshHover = false;\n this.painter.refresh();\n // Avoid trigger zr.refresh in Element#beforeUpdate hook\n this._needsRefresh = this._needsRefreshHover = false;\n\n // var end = new Date();\n // var log = document.getElementById('log');\n // if (log) {\n // log.innerHTML = log.innerHTML + '<br>' + (end - start);\n // }\n },\n\n /**\n * Mark and repaint the canvas in the next frame of browser\n */\n refresh: function () {\n this._needsRefresh = true;\n },\n\n /**\n * Perform all refresh\n */\n flush: function () {\n var triggerRendered;\n\n if (this._needsRefresh) {\n triggerRendered = true;\n this.refreshImmediately();\n }\n if (this._needsRefreshHover) {\n triggerRendered = true;\n this.refreshHoverImmediately();\n }\n\n triggerRendered && this.trigger('rendered');\n },\n\n /**\n * Add element to hover layer\n * @param {module:zrender/Element} el\n * @param {Object} style\n */\n addHover: function (el, style) {\n if (this.painter.addHover) {\n var elMirror = this.painter.addHover(el, style);\n this.refreshHover();\n return elMirror;\n }\n },\n\n /**\n * Add element from hover layer\n * @param {module:zrender/Element} el\n */\n removeHover: function (el) {\n if (this.painter.removeHover) {\n this.painter.removeHover(el);\n this.refreshHover();\n }\n },\n\n /**\n * Clear all hover elements in hover layer\n * @param {module:zrender/Element} el\n */\n clearHover: function () {\n if (this.painter.clearHover) {\n this.painter.clearHover();\n this.refreshHover();\n }\n },\n\n /**\n * Refresh hover in next frame\n */\n refreshHover: function () {\n this._needsRefreshHover = true;\n },\n\n /**\n * Refresh hover immediately\n */\n refreshHoverImmediately: function () {\n this._needsRefreshHover = false;\n this.painter.refreshHover && this.painter.refreshHover();\n },\n\n /**\n * Resize the canvas.\n * Should be invoked when container size is changed\n * @param {Object} [opts]\n * @param {number|string} [opts.width] Can be 'auto' (the same as null/undefined)\n * @param {number|string} [opts.height] Can be 'auto' (the same as null/undefined)\n */\n resize: function (opts) {\n opts = opts || {};\n this.painter.resize(opts.width, opts.height);\n this.handler.resize();\n },\n\n /**\n * Stop and clear all animation immediately\n */\n clearAnimation: function () {\n this.animation.clear();\n },\n\n /**\n * Get container width\n */\n getWidth: function () {\n return this.painter.getWidth();\n },\n\n /**\n * Get container height\n */\n getHeight: function () {\n return this.painter.getHeight();\n },\n\n /**\n * Export the canvas as Base64 URL\n * @param {string} type\n * @param {string} [backgroundColor='#fff']\n * @return {string} Base64 URL\n */\n // toDataURL: function(type, backgroundColor) {\n // return this.painter.getRenderedCanvas({\n // backgroundColor: backgroundColor\n // }).toDataURL(type);\n // },\n\n /**\n * Converting a path to image.\n * It has much better performance of drawing image rather than drawing a vector path.\n * @param {module:zrender/graphic/Path} e\n * @param {number} width\n * @param {number} height\n */\n pathToImage: function (e, dpr) {\n return this.painter.pathToImage(e, dpr);\n },\n\n /**\n * Set default cursor\n * @param {string} [cursorStyle='default'] 例如 crosshair\n */\n setCursorStyle: function (cursorStyle) {\n this.handler.setCursorStyle(cursorStyle);\n },\n\n /**\n * Find hovered element\n * @param {number} x\n * @param {number} y\n * @return {Object} {target, topTarget}\n */\n findHover: function (x, y) {\n return this.handler.findHover(x, y);\n },\n\n /**\n * Bind event\n *\n * @param {string} eventName Event name\n * @param {Function} eventHandler Handler function\n * @param {Object} [context] Context object\n */\n on: function (eventName, eventHandler, context) {\n this.handler.on(eventName, eventHandler, context);\n },\n\n /**\n * Unbind event\n * @param {string} eventName Event name\n * @param {Function} [eventHandler] Handler function\n */\n off: function (eventName, eventHandler) {\n this.handler.off(eventName, eventHandler);\n },\n\n /**\n * Trigger event manually\n *\n * @param {string} eventName Event name\n * @param {event=} event Event object\n */\n trigger: function (eventName, event) {\n this.handler.trigger(eventName, event);\n },\n\n\n /**\n * Clear all objects and the canvas.\n */\n clear: function () {\n this.storage.delRoot();\n this.painter.clear();\n },\n\n /**\n * Dispose self.\n */\n dispose: function () {\n this.animation.stop();\n\n this.clear();\n this.storage.dispose();\n this.painter.dispose();\n this.handler.dispose();\n\n this.animation =\n this.storage =\n this.painter =\n this.handler = null;\n\n delInstance(this.id);\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\nimport * as zrUtil from 'zrender/src/core/util';\nimport env from 'zrender/src/core/env';\n\nvar each = zrUtil.each;\nvar isObject = zrUtil.isObject;\nvar isArray = zrUtil.isArray;\n\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 */\nvar DUMMY_COMPONENT_NAME_PREFIX = 'series\\0';\n\n/**\n * If value is not array, then translate it to array.\n * @param {*} value\n * @return {Array} [value] or value\n */\nexport function normalizeToArray(value) {\n return value instanceof Array\n ? value\n : value == null\n ? []\n : [value];\n}\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.<string>} subOpts\n */\nexport function 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] || {};\n\n // Default emphasis option from normal\n for (var i = 0, len = subOpts.length; i < len; i++) {\n var subOptName = subOpts[i];\n if (!opt.emphasis[key].hasOwnProperty(subOptName)\n && opt[key].hasOwnProperty(subOptName)\n ) {\n opt.emphasis[key][subOptName] = opt[key][subOptName];\n }\n }\n }\n}\n\nexport var TEXT_STYLE_OPTIONS = [\n 'fontStyle', 'fontWeight', 'fontSize', 'fontFamily',\n 'rich', 'tag', 'color', 'textBorderColor', 'textBorderWidth',\n 'width', 'height', 'lineHeight', 'align', 'verticalAlign', 'baseline',\n 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY',\n 'textShadowColor', 'textShadowBlur', 'textShadowOffsetX', 'textShadowOffsetY',\n 'backgroundColor', 'borderColor', 'borderWidth', 'borderRadius', 'padding'\n];\n\n// 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.<number|string|Date>}\n */\nexport function getDataItemValue(dataItem) {\n return (isObject(dataItem) && !isArray(dataItem) && !(dataItem instanceof Date))\n ? dataItem.value : dataItem;\n}\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 */\nexport function isDataItemOption(dataItem) {\n return isObject(dataItem)\n && !(dataItem instanceof Array);\n // // markLine data can be array\n // && !(dataItem[0] && isObject(dataItem[0]) && !(dataItem[0] instanceof Array));\n}\n\n/**\n * Mapping to exists for merge.\n *\n * @public\n * @param {Array.<Object>|Array.<module:echarts/model/Component>} exists\n * @param {Object|Array.<Object>} newCptOptions\n * @return {Array.<Object>} Result, like [{exist: ..., option: ...}, {}],\n * index of which is the same as exists.\n */\nexport function 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\n var result = zrUtil.map(exists || [], function (obj, index) {\n return {exist: obj};\n });\n\n // Mapping by id or name if specified.\n each(newCptOptions, function (cptOption, index) {\n if (!isObject(cptOption)) {\n return;\n }\n\n // id has highest priority.\n for (var i = 0; i < result.length; i++) {\n if (!result[i].option // Consider name: two map to one.\n && cptOption.id != null\n && result[i].exist.id === cptOption.id + ''\n ) {\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 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)\n && cptOption.name != null\n && !isIdInner(cptOption)\n && !isIdInner(exist)\n && exist.name === cptOption.name + ''\n ) {\n result[i].option = cptOption;\n newCptOptions[index] = null;\n return;\n }\n }\n });\n\n // Otherwise mapping by index.\n each(newCptOptions, function (cptOption, index) {\n if (!isObject(cptOption)) {\n return;\n }\n\n var i = 0;\n for (; i < result.length; i++) {\n var exist = result[i].exist;\n if (!result[i].option\n // 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)\n // 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 ) {\n result[i].option = cptOption;\n break;\n }\n }\n\n if (i >= result.length) {\n result.push({option: cptOption});\n }\n });\n\n return result;\n}\n\n/**\n * Make id and name for mapping result (result of mappingToExists)\n * into `keyInfo` field.\n *\n * @public\n * @param {Array.<Object>} Result, like [{exist: ..., option: ...}, {}],\n * which order is the same as exists.\n * @return {Array.<Object>} The input.\n */\nexport function 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\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\n // name can be duplicated among components, which is convenient\n // to specify multi components (like series) by one name.\n\n // Ensure that each id is distinct.\n var idMap = zrUtil.createHashMap();\n\n each(mapResult, function (item, index) {\n var existCpt = item.exist;\n existCpt && idMap.set(existCpt.id, item);\n });\n\n each(mapResult, function (item, index) {\n var opt = item.option;\n\n zrUtil.assert(\n !opt || opt.id == null || !idMap.get(opt.id) || idMap.get(opt.id) === item,\n 'id duplicates: ' + (opt && opt.id)\n );\n\n opt && opt.id != null && idMap.set(opt.id, item);\n !item.keyInfo && (item.keyInfo = {});\n });\n\n // Make name and id.\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 }\n\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 keyInfo.name = opt.name != null\n ? opt.name + ''\n : existCpt\n ? existCpt.name\n // 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 }\n else if (opt.id != null) {\n keyInfo.id = opt.id + '';\n }\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 do {\n keyInfo.id = '\\0' + keyInfo.name + '\\0' + idNum++;\n }\n while (idMap.get(keyInfo.id));\n }\n\n idMap.set(keyInfo.id, item);\n });\n}\n\nexport function isNameSpecified(componentModel) {\n var name = componentModel.name;\n // Is specified when `indexOf` get -1 or > 0.\n return !!(name && name.indexOf(DUMMY_COMPONENT_NAME_PREFIX));\n}\n\n/**\n * @public\n * @param {Object} cptOption\n * @return {boolean}\n */\nexport function isIdInner(cptOption) {\n return isObject(cptOption)\n && cptOption.id\n && (cptOption.id + '').indexOf('\\0_ec_\\0') === 0;\n}\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.<Object>} batchA Like: [{seriesId: 2, dataIndex: [32, 4, 5]}, ...]\n * @param {Array.<Object>} batchB Like: [{seriesId: 2, dataIndex: [32, 4, 5]}, ...]\n * @return {Array.<Array.<Object>, Array.<Object>>} result: [resultBatchA, resultBatchB]\n */\nexport function compressBatches(batchA, batchB) {\n var mapA = {};\n var mapB = {};\n\n makeMap(batchA || [], mapA);\n makeMap(batchB || [], mapB, mapA);\n\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 }\n else {\n (map[seriesId] || (map[seriesId] = {}))[dataIndex] = 1;\n }\n }\n }\n }\n\n function mapToArray(map, isData) {\n var result = [];\n for (var i in map) {\n if (map.hasOwnProperty(i) && map[i] != null) {\n if (isData) {\n result.push(+i);\n }\n else {\n var dataIndices = mapToArray(map[i], true);\n dataIndices.length && result.push({seriesId: i, dataIndex: dataIndices});\n }\n }\n }\n return result;\n }\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.<number>} dataIndex If not found, return undefined/null.\n */\nexport function queryDataIndex(data, payload) {\n if (payload.dataIndexInside != null) {\n return payload.dataIndexInside;\n }\n else if (payload.dataIndex != null) {\n return zrUtil.isArray(payload.dataIndex)\n ? zrUtil.map(payload.dataIndex, function (value) {\n return data.indexOfRawIndex(value);\n })\n : data.indexOfRawIndex(payload.dataIndex);\n }\n else if (payload.name != null) {\n return zrUtil.isArray(payload.name)\n ? zrUtil.map(payload.name, function (value) {\n return data.indexOfName(value);\n })\n : data.indexOfName(payload.name);\n }\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 */\nexport function 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}\nvar innerUniqueIndex = 0;\n\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.<number>|Array.<string>\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.<string>} [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 */\nexport function 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 if (defaultMainType\n && !has(finder, defaultMainType + 'Index')\n && !has(finder, defaultMainType + 'Id')\n && !has(finder, defaultMainType + 'Name')\n ) {\n finder[defaultMainType + 'Index'] = 0;\n }\n\n var result = {};\n\n each(finder, function (value, key) {\n var value = finder[key];\n\n // Exclude 'dataIndex' and other illgal keys.\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\n || !queryType\n || value == null\n || (queryType === 'index' && value === 'none')\n || (opt && opt.includeMainTypes && zrUtil.indexOf(opt.includeMainTypes, mainType) < 0)\n ) {\n return;\n }\n\n var queryParam = {mainType: mainType};\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\n return result;\n}\n\nfunction has(obj, prop) {\n return obj && obj.hasOwnProperty(prop);\n}\n\nexport function setAttribute(dom, key, value) {\n dom.setAttribute\n ? dom.setAttribute(key, value)\n : (dom[key] = value);\n}\n\nexport function getAttribute(dom, key) {\n return dom.getAttribute\n ? dom.getAttribute(key)\n : dom[key];\n}\n\nexport function getTooltipRenderMode(renderModeOption) {\n if (renderModeOption === 'auto') {\n // Using html when `document` exists, use richText otherwise\n return env.domSupported ? 'html' : 'richText';\n }\n else {\n return renderModeOption || 'html';\n }\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 */\nexport function groupData(array, getKey) {\n var buckets = zrUtil.createHashMap();\n var keys = [];\n\n zrUtil.each(array, function (item) {\n var key = getKey(item);\n (buckets.get(key)\n || (keys.push(key), buckets.set(key, []))\n ).push(item);\n });\n\n return {keys: keys, buckets: buckets};\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {__DEV__} from '../config';\nimport * as zrUtil from 'zrender/src/core/util';\n\nvar TYPE_DELIMITER = '.';\nvar IS_CONTAINER = '___EC__COMPONENT__CONTAINER___';\n\n/**\n * Notice, parseClassType('') should returns {main: '', sub: ''}\n * @public\n */\nexport function parseClassType(componentType) {\n var ret = {main: '', sub: ''};\n if (componentType) {\n componentType = componentType.split(TYPE_DELIMITER);\n ret.main = componentType[0] || '';\n ret.sub = componentType[1] || '';\n }\n return ret;\n}\n\n/**\n * @public\n */\nfunction checkClassType(componentType) {\n zrUtil.assert(\n /^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(componentType),\n 'componentType \"' + componentType + '\" illegal'\n );\n}\n\n/**\n * @public\n */\nexport function enableClassExtend(RootClass, mandatoryMethods) {\n\n RootClass.$constructor = RootClass;\n RootClass.extend = function (proto) {\n\n if (__DEV__) {\n zrUtil.each(mandatoryMethods, function (method) {\n if (!proto[method]) {\n console.warn(\n 'Method `' + method + '` should be implemented'\n + (proto.type ? ' in ' + proto.type : '') + '.'\n );\n }\n });\n }\n\n var superClass = this;\n var ExtendedClass = function () {\n if (!proto.$constructor) {\n superClass.apply(this, arguments);\n }\n else {\n proto.$constructor.apply(this, arguments);\n }\n };\n\n zrUtil.extend(ExtendedClass.prototype, proto);\n\n ExtendedClass.extend = this.extend;\n ExtendedClass.superCall = superCall;\n ExtendedClass.superApply = superApply;\n zrUtil.inherits(ExtendedClass, this);\n ExtendedClass.superClass = superClass;\n\n return ExtendedClass;\n };\n}\n\nvar classBase = 0;\n\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 */\nexport function enableClassCheck(Clz) {\n var classAttr = ['__\\0is_clz', classBase++, Math.random().toFixed(3)].join('_');\n Clz.prototype[classAttr] = true;\n\n if (__DEV__) {\n zrUtil.assert(!Clz.isInstance, 'The method \"is\" can not be defined.');\n }\n\n Clz.isInstance = function (obj) {\n return !!(obj && obj[classAttr]);\n };\n}\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.\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/**\n * @param {Object} entity\n * @param {Object} options\n * @param {boolean} [options.registerWhenExtend]\n * @public\n */\nexport function enableClassManagement(entity, options) {\n options = options || {};\n\n /**\n * Component model classes\n * key: componentType,\n * value:\n * componentClass, when componentType is 'xxx'\n * or Object.<subKey, componentClass>, when componentType is 'xxx.yy'\n * @type {Object}\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 if (__DEV__) {\n if (storage[componentType.main]) {\n console.warn(componentType.main + ' exists.');\n }\n }\n storage[componentType.main] = Clazz;\n }\n else if (componentType.sub !== IS_CONTAINER) {\n var container = makeContainer(componentType);\n container[componentType.sub] = Clazz;\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(\n !subType\n ? componentMainType + '.' + 'type should be specified.'\n : 'Component ' + componentMainType + '.' + (subType || '') + ' not exists. Load it first.'\n );\n }\n\n return Clazz;\n };\n\n entity.getClassesByMainType = function (componentType) {\n componentType = parseClassType(componentType);\n\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 }\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 /**\n * @return {Array.<string>} Like ['aa', 'bb'], but can not be ['aa.xx']\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 /**\n * If a main type is container and has sub types\n * @param {string} mainType\n * @return {boolean}\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 if (!container || !container[IS_CONTAINER]) {\n container = storage[componentType.main] = {};\n container[IS_CONTAINER] = true;\n }\n return container;\n }\n\n if (options.registerWhenExtend) {\n var originalExtend = entity.extend;\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/**\n * @param {string|Array.<string>} properties\n */\nexport function setReadOnly(obj, properties) {\n // 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\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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// TODO Parse shadow style\n// TODO Only shallow path support\nimport * as zrUtil from 'zrender/src/core/util';\n\nexport default function (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 return function (model, excludes, includes) {\n var style = {};\n for (var i = 0; i < properties.length; i++) {\n var propName = properties[i][1];\n if ((excludes && zrUtil.indexOf(excludes, propName) >= 0)\n || (includes && zrUtil.indexOf(includes, propName) < 0)\n ) {\n continue;\n }\n var val = model.getShallow(propName);\n if (val != null) {\n style[properties[i][0]] = val;\n }\n }\n return style;\n };\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport makeStyleMapper from './makeStyleMapper';\n\nvar getLineStyle = makeStyleMapper(\n [\n ['lineWidth', 'width'],\n ['stroke', 'color'],\n ['opacity'],\n ['shadowBlur'],\n ['shadowOffsetX'],\n ['shadowOffsetY'],\n ['shadowColor']\n ]\n);\n\nexport default {\n getLineStyle: function (excludes) {\n var style = getLineStyle(this, excludes);\n // Always set lineDash whether dashed, otherwise we can not\n // erase the previous style when assigning to el.style.\n style.lineDash = this.getLineDash(style.lineWidth);\n return style;\n },\n\n getLineDash: function (lineWidth) {\n if (lineWidth == null) {\n lineWidth = 1;\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)\n // 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\n : lineType === 'dashed'\n ? [dashSize, dashSize]\n : [dotSize, dotSize];\n }\n};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport makeStyleMapper from './makeStyleMapper';\n\nvar getAreaStyle = makeStyleMapper(\n [\n ['fill', 'color'],\n ['shadowBlur'],\n ['shadowOffsetX'],\n ['shadowOffsetY'],\n ['opacity'],\n ['shadowColor']\n ]\n);\n\nexport default {\n getAreaStyle: function (excludes, includes) {\n return getAreaStyle(this, excludes, includes);\n }\n};","/**\n * 曲线辅助模块\n * @module zrender/core/curve\n * @author pissang(https://www.github.com/pissang)\n */\n\nimport {\n create as v2Create,\n distSquare as v2DistSquare\n} from './vector';\n\nvar mathPow = Math.pow;\nvar mathSqrt = Math.sqrt;\n\nvar EPSILON = 1e-8;\nvar EPSILON_NUMERIC = 1e-4;\n\nvar THREE_SQRT = mathSqrt(3);\nvar ONE_THIRD = 1 / 3;\n\n// 临时变量\nvar _v0 = v2Create();\nvar _v1 = v2Create();\nvar _v2 = v2Create();\n\nfunction isAroundZero(val) {\n return val > -EPSILON && val < EPSILON;\n}\nfunction isNotAroundZero(val) {\n return val > EPSILON || val < -EPSILON;\n}\n/**\n * 计算三次贝塞尔值\n * @memberOf module:zrender/core/curve\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} p3\n * @param {number} t\n * @return {number}\n */\nexport function cubicAt(p0, p1, p2, p3, t) {\n var onet = 1 - t;\n return onet * onet * (onet * p0 + 3 * t * p1)\n + t * t * (t * p3 + 3 * onet * p2);\n}\n\n/**\n * 计算三次贝塞尔导数值\n * @memberOf module:zrender/core/curve\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} p3\n * @param {number} t\n * @return {number}\n */\nexport function cubicDerivativeAt(p0, p1, p2, p3, t) {\n var onet = 1 - t;\n return 3 * (\n ((p1 - p0) * onet + 2 * (p2 - p1) * t) * onet\n + (p3 - p2) * t * t\n );\n}\n\n/**\n * 计算三次贝塞尔方程根,使用盛金公式\n * @memberOf module:zrender/core/curve\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} p3\n * @param {number} val\n * @param {Array.<number>} roots\n * @return {number} 有效根数目\n */\nexport function cubicRootAt(p0, p1, p2, p3, val, roots) {\n // Evaluate roots of cubic functions\n var a = p3 + 3 * (p1 - p2) - p0;\n var b = 3 * (p2 - p1 * 2 + p0);\n var c = 3 * (p1 - p0);\n var d = p0 - val;\n\n var A = b * b - 3 * a * c;\n var B = b * c - 9 * a * d;\n var C = c * c - 3 * b * d;\n\n var n = 0;\n\n if (isAroundZero(A) && isAroundZero(B)) {\n if (isAroundZero(b)) {\n roots[0] = 0;\n }\n else {\n var t1 = -c / b; //t1, t2, t3, b is not zero\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n }\n }\n else {\n var disc = B * B - 4 * A * C;\n\n if (isAroundZero(disc)) {\n var K = B / A;\n var t1 = -b / a + K; // t1, a is not zero\n var t2 = -K / 2; // t2, t3\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n if (t2 >= 0 && t2 <= 1) {\n roots[n++] = t2;\n }\n }\n else if (disc > 0) {\n var discSqrt = mathSqrt(disc);\n var Y1 = A * b + 1.5 * a * (-B + discSqrt);\n var Y2 = A * b + 1.5 * a * (-B - discSqrt);\n if (Y1 < 0) {\n Y1 = -mathPow(-Y1, ONE_THIRD);\n }\n else {\n Y1 = mathPow(Y1, ONE_THIRD);\n }\n if (Y2 < 0) {\n Y2 = -mathPow(-Y2, ONE_THIRD);\n }\n else {\n Y2 = mathPow(Y2, ONE_THIRD);\n }\n var t1 = (-b - (Y1 + Y2)) / (3 * a);\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n }\n else {\n var T = (2 * A * b - 3 * a * B) / (2 * mathSqrt(A * A * A));\n var theta = Math.acos(T) / 3;\n var ASqrt = mathSqrt(A);\n var tmp = Math.cos(theta);\n\n var t1 = (-b - 2 * ASqrt * tmp) / (3 * a);\n var t2 = (-b + ASqrt * (tmp + THREE_SQRT * Math.sin(theta))) / (3 * a);\n var t3 = (-b + ASqrt * (tmp - THREE_SQRT * Math.sin(theta))) / (3 * a);\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n if (t2 >= 0 && t2 <= 1) {\n roots[n++] = t2;\n }\n if (t3 >= 0 && t3 <= 1) {\n roots[n++] = t3;\n }\n }\n }\n return n;\n}\n\n/**\n * 计算三次贝塞尔方程极限值的位置\n * @memberOf module:zrender/core/curve\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} p3\n * @param {Array.<number>} extrema\n * @return {number} 有效数目\n */\nexport function cubicExtrema(p0, p1, p2, p3, extrema) {\n var b = 6 * p2 - 12 * p1 + 6 * p0;\n var a = 9 * p1 + 3 * p3 - 3 * p0 - 9 * p2;\n var c = 3 * p1 - 3 * p0;\n\n var n = 0;\n if (isAroundZero(a)) {\n if (isNotAroundZero(b)) {\n var t1 = -c / b;\n if (t1 >= 0 && t1 <= 1) {\n extrema[n++] = t1;\n }\n }\n }\n else {\n var disc = b * b - 4 * a * c;\n if (isAroundZero(disc)) {\n extrema[0] = -b / (2 * a);\n }\n else if (disc > 0) {\n var discSqrt = mathSqrt(disc);\n var t1 = (-b + discSqrt) / (2 * a);\n var t2 = (-b - discSqrt) / (2 * a);\n if (t1 >= 0 && t1 <= 1) {\n extrema[n++] = t1;\n }\n if (t2 >= 0 && t2 <= 1) {\n extrema[n++] = t2;\n }\n }\n }\n return n;\n}\n\n/**\n * 细分三次贝塞尔曲线\n * @memberOf module:zrender/core/curve\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} p3\n * @param {number} t\n * @param {Array.<number>} out\n */\nexport function cubicSubdivide(p0, p1, p2, p3, t, out) {\n var p01 = (p1 - p0) * t + p0;\n var p12 = (p2 - p1) * t + p1;\n var p23 = (p3 - p2) * t + p2;\n\n var p012 = (p12 - p01) * t + p01;\n var p123 = (p23 - p12) * t + p12;\n\n var p0123 = (p123 - p012) * t + p012;\n // Seg0\n out[0] = p0;\n out[1] = p01;\n out[2] = p012;\n out[3] = p0123;\n // Seg1\n out[4] = p0123;\n out[5] = p123;\n out[6] = p23;\n out[7] = p3;\n}\n\n/**\n * 投射点到三次贝塞尔曲线上,返回投射距离。\n * 投射点有可能会有一个或者多个,这里只返回其中距离最短的一个。\n * @param {number} x0\n * @param {number} y0\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {number} x\n * @param {number} y\n * @param {Array.<number>} [out] 投射点\n * @return {number}\n */\nexport function cubicProjectPoint(\n x0, y0, x1, y1, x2, y2, x3, y3,\n x, y, out\n) {\n // http://pomax.github.io/bezierinfo/#projections\n var t;\n var interval = 0.005;\n var d = Infinity;\n var prev;\n var next;\n var d1;\n var d2;\n\n _v0[0] = x;\n _v0[1] = y;\n\n // 先粗略估计一下可能的最小距离的 t 值\n // PENDING\n for (var _t = 0; _t < 1; _t += 0.05) {\n _v1[0] = cubicAt(x0, x1, x2, x3, _t);\n _v1[1] = cubicAt(y0, y1, y2, y3, _t);\n d1 = v2DistSquare(_v0, _v1);\n if (d1 < d) {\n t = _t;\n d = d1;\n }\n }\n d = Infinity;\n\n // At most 32 iteration\n for (var i = 0; i < 32; i++) {\n if (interval < EPSILON_NUMERIC) {\n break;\n }\n prev = t - interval;\n next = t + interval;\n // t - interval\n _v1[0] = cubicAt(x0, x1, x2, x3, prev);\n _v1[1] = cubicAt(y0, y1, y2, y3, prev);\n\n d1 = v2DistSquare(_v1, _v0);\n\n if (prev >= 0 && d1 < d) {\n t = prev;\n d = d1;\n }\n else {\n // t + interval\n _v2[0] = cubicAt(x0, x1, x2, x3, next);\n _v2[1] = cubicAt(y0, y1, y2, y3, next);\n d2 = v2DistSquare(_v2, _v0);\n\n if (next <= 1 && d2 < d) {\n t = next;\n d = d2;\n }\n else {\n interval *= 0.5;\n }\n }\n }\n // t\n if (out) {\n out[0] = cubicAt(x0, x1, x2, x3, t);\n out[1] = cubicAt(y0, y1, y2, y3, t);\n }\n // console.log(interval, i);\n return mathSqrt(d);\n}\n\n/**\n * 计算二次方贝塞尔值\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} t\n * @return {number}\n */\nexport function quadraticAt(p0, p1, p2, t) {\n var onet = 1 - t;\n return onet * (onet * p0 + 2 * t * p1) + t * t * p2;\n}\n\n/**\n * 计算二次方贝塞尔导数值\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} t\n * @return {number}\n */\nexport function quadraticDerivativeAt(p0, p1, p2, t) {\n return 2 * ((1 - t) * (p1 - p0) + t * (p2 - p1));\n}\n\n/**\n * 计算二次方贝塞尔方程根\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} t\n * @param {Array.<number>} roots\n * @return {number} 有效根数目\n */\nexport function quadraticRootAt(p0, p1, p2, val, roots) {\n var a = p0 - 2 * p1 + p2;\n var b = 2 * (p1 - p0);\n var c = p0 - val;\n\n var n = 0;\n if (isAroundZero(a)) {\n if (isNotAroundZero(b)) {\n var t1 = -c / b;\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n }\n }\n else {\n var disc = b * b - 4 * a * c;\n if (isAroundZero(disc)) {\n var t1 = -b / (2 * a);\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n }\n else if (disc > 0) {\n var discSqrt = mathSqrt(disc);\n var t1 = (-b + discSqrt) / (2 * a);\n var t2 = (-b - discSqrt) / (2 * a);\n if (t1 >= 0 && t1 <= 1) {\n roots[n++] = t1;\n }\n if (t2 >= 0 && t2 <= 1) {\n roots[n++] = t2;\n }\n }\n }\n return n;\n}\n\n/**\n * 计算二次贝塞尔方程极限值\n * @memberOf module:zrender/core/curve\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @return {number}\n */\nexport function quadraticExtremum(p0, p1, p2) {\n var divider = p0 + p2 - 2 * p1;\n if (divider === 0) {\n // p1 is center of p0 and p2\n return 0.5;\n }\n else {\n return (p0 - p1) / divider;\n }\n}\n\n/**\n * 细分二次贝塞尔曲线\n * @memberOf module:zrender/core/curve\n * @param {number} p0\n * @param {number} p1\n * @param {number} p2\n * @param {number} t\n * @param {Array.<number>} out\n */\nexport function quadraticSubdivide(p0, p1, p2, t, out) {\n var p01 = (p1 - p0) * t + p0;\n var p12 = (p2 - p1) * t + p1;\n var p012 = (p12 - p01) * t + p01;\n\n // Seg0\n out[0] = p0;\n out[1] = p01;\n out[2] = p012;\n\n // Seg1\n out[3] = p012;\n out[4] = p12;\n out[5] = p2;\n}\n\n/**\n * 投射点到二次贝塞尔曲线上,返回投射距离。\n * 投射点有可能会有一个或者多个,这里只返回其中距离最短的一个。\n * @param {number} x0\n * @param {number} y0\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x\n * @param {number} y\n * @param {Array.<number>} out 投射点\n * @return {number}\n */\nexport function quadraticProjectPoint(\n x0, y0, x1, y1, x2, y2,\n x, y, out\n) {\n // http://pomax.github.io/bezierinfo/#projections\n var t;\n var interval = 0.005;\n var d = Infinity;\n\n _v0[0] = x;\n _v0[1] = y;\n\n // 先粗略估计一下可能的最小距离的 t 值\n // PENDING\n for (var _t = 0; _t < 1; _t += 0.05) {\n _v1[0] = quadraticAt(x0, x1, x2, _t);\n _v1[1] = quadraticAt(y0, y1, y2, _t);\n var d1 = v2DistSquare(_v0, _v1);\n if (d1 < d) {\n t = _t;\n d = d1;\n }\n }\n d = Infinity;\n\n // At most 32 iteration\n for (var i = 0; i < 32; i++) {\n if (interval < EPSILON_NUMERIC) {\n break;\n }\n var prev = t - interval;\n var next = t + interval;\n // t - interval\n _v1[0] = quadraticAt(x0, x1, x2, prev);\n _v1[1] = quadraticAt(y0, y1, y2, prev);\n\n var d1 = v2DistSquare(_v1, _v0);\n\n if (prev >= 0 && d1 < d) {\n t = prev;\n d = d1;\n }\n else {\n // t + interval\n _v2[0] = quadraticAt(x0, x1, x2, next);\n _v2[1] = quadraticAt(y0, y1, y2, next);\n var d2 = v2DistSquare(_v2, _v0);\n if (next <= 1 && d2 < d) {\n t = next;\n d = d2;\n }\n else {\n interval *= 0.5;\n }\n }\n }\n // t\n if (out) {\n out[0] = quadraticAt(x0, x1, x2, t);\n out[1] = quadraticAt(y0, y1, y2, t);\n }\n // console.log(interval, i);\n return mathSqrt(d);\n}\n","/**\n * @author Yi Shen(https://github.com/pissang)\n */\n\nimport * as vec2 from './vector';\nimport * as curve from './curve';\n\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathSin = Math.sin;\nvar mathCos = Math.cos;\nvar PI2 = Math.PI * 2;\n\nvar start = vec2.create();\nvar end = vec2.create();\nvar extremity = vec2.create();\n\n/**\n * 从顶点数组中计算出最小包围盒,写入`min`和`max`中\n * @module zrender/core/bbox\n * @param {Array<Object>} points 顶点数组\n * @param {number} min\n * @param {number} max\n */\nexport function fromPoints(points, min, max) {\n if (points.length === 0) {\n return;\n }\n var p = points[0];\n var left = p[0];\n var right = p[0];\n var top = p[1];\n var bottom = p[1];\n var i;\n\n for (i = 1; i < points.length; i++) {\n p = points[i];\n left = mathMin(left, p[0]);\n right = mathMax(right, p[0]);\n top = mathMin(top, p[1]);\n bottom = mathMax(bottom, p[1]);\n }\n\n min[0] = left;\n min[1] = top;\n max[0] = right;\n max[1] = bottom;\n}\n\n/**\n * @memberOf module:zrender/core/bbox\n * @param {number} x0\n * @param {number} y0\n * @param {number} x1\n * @param {number} y1\n * @param {Array.<number>} min\n * @param {Array.<number>} max\n */\nexport function fromLine(x0, y0, x1, y1, min, max) {\n min[0] = mathMin(x0, x1);\n min[1] = mathMin(y0, y1);\n max[0] = mathMax(x0, x1);\n max[1] = mathMax(y0, y1);\n}\n\nvar xDim = [];\nvar yDim = [];\n/**\n * 从三阶贝塞尔曲线(p0, p1, p2, p3)中计算出最小包围盒,写入`min`和`max`中\n * @memberOf module:zrender/core/bbox\n * @param {number} x0\n * @param {number} y0\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {Array.<number>} min\n * @param {Array.<number>} max\n */\nexport function fromCubic(\n x0, y0, x1, y1, x2, y2, x3, y3, min, max\n) {\n var cubicExtrema = curve.cubicExtrema;\n var cubicAt = curve.cubicAt;\n var i;\n var n = cubicExtrema(x0, x1, x2, x3, xDim);\n min[0] = Infinity;\n min[1] = Infinity;\n max[0] = -Infinity;\n max[1] = -Infinity;\n\n for (i = 0; i < n; i++) {\n var x = cubicAt(x0, x1, x2, x3, xDim[i]);\n min[0] = mathMin(x, min[0]);\n max[0] = mathMax(x, max[0]);\n }\n n = cubicExtrema(y0, y1, y2, y3, yDim);\n for (i = 0; i < n; i++) {\n var y = cubicAt(y0, y1, y2, y3, yDim[i]);\n min[1] = mathMin(y, min[1]);\n max[1] = mathMax(y, max[1]);\n }\n\n min[0] = mathMin(x0, min[0]);\n max[0] = mathMax(x0, max[0]);\n min[0] = mathMin(x3, min[0]);\n max[0] = mathMax(x3, max[0]);\n\n min[1] = mathMin(y0, min[1]);\n max[1] = mathMax(y0, max[1]);\n min[1] = mathMin(y3, min[1]);\n max[1] = mathMax(y3, max[1]);\n}\n\n/**\n * 从二阶贝塞尔曲线(p0, p1, p2)中计算出最小包围盒,写入`min`和`max`中\n * @memberOf module:zrender/core/bbox\n * @param {number} x0\n * @param {number} y0\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {Array.<number>} min\n * @param {Array.<number>} max\n */\nexport function fromQuadratic(x0, y0, x1, y1, x2, y2, min, max) {\n var quadraticExtremum = curve.quadraticExtremum;\n var quadraticAt = curve.quadraticAt;\n // Find extremities, where derivative in x dim or y dim is zero\n var tx =\n mathMax(\n mathMin(quadraticExtremum(x0, x1, x2), 1), 0\n );\n var ty =\n mathMax(\n mathMin(quadraticExtremum(y0, y1, y2), 1), 0\n );\n\n var x = quadraticAt(x0, x1, x2, tx);\n var y = quadraticAt(y0, y1, y2, ty);\n\n min[0] = mathMin(x0, x2, x);\n min[1] = mathMin(y0, y2, y);\n max[0] = mathMax(x0, x2, x);\n max[1] = mathMax(y0, y2, y);\n}\n\n/**\n * 从圆弧中计算出最小包围盒,写入`min`和`max`中\n * @method\n * @memberOf module:zrender/core/bbox\n * @param {number} x\n * @param {number} y\n * @param {number} rx\n * @param {number} ry\n * @param {number} startAngle\n * @param {number} endAngle\n * @param {number} anticlockwise\n * @param {Array.<number>} min\n * @param {Array.<number>} max\n */\nexport function fromArc(\n x, y, rx, ry, startAngle, endAngle, anticlockwise, min, max\n) {\n var vec2Min = vec2.min;\n var vec2Max = vec2.max;\n\n var diff = Math.abs(startAngle - endAngle);\n\n\n if (diff % PI2 < 1e-4 && diff > 1e-4) {\n // Is a circle\n min[0] = x - rx;\n min[1] = y - ry;\n max[0] = x + rx;\n max[1] = y + ry;\n return;\n }\n\n start[0] = mathCos(startAngle) * rx + x;\n start[1] = mathSin(startAngle) * ry + y;\n\n end[0] = mathCos(endAngle) * rx + x;\n end[1] = mathSin(endAngle) * ry + y;\n\n vec2Min(min, start, end);\n vec2Max(max, start, end);\n\n // Thresh to [0, Math.PI * 2]\n startAngle = startAngle % (PI2);\n if (startAngle < 0) {\n startAngle = startAngle + PI2;\n }\n endAngle = endAngle % (PI2);\n if (endAngle < 0) {\n endAngle = endAngle + PI2;\n }\n\n if (startAngle > endAngle && !anticlockwise) {\n endAngle += PI2;\n }\n else if (startAngle < endAngle && anticlockwise) {\n startAngle += PI2;\n }\n if (anticlockwise) {\n var tmp = endAngle;\n endAngle = startAngle;\n startAngle = tmp;\n }\n\n // var number = 0;\n // var step = (anticlockwise ? -Math.PI : Math.PI) / 2;\n for (var angle = 0; angle < endAngle; angle += Math.PI / 2) {\n if (angle > startAngle) {\n extremity[0] = mathCos(angle) * rx + x;\n extremity[1] = mathSin(angle) * ry + y;\n\n vec2Min(min, extremity, min);\n vec2Max(max, extremity, max);\n }\n }\n}\n","/**\n * Path 代理,可以在`buildPath`中用于替代`ctx`, 会保存每个path操作的命令到pathCommands属性中\n * 可以用于 isInsidePath 判断以及获取boundingRect\n *\n * @module zrender/core/PathProxy\n * @author Yi Shen (http://www.github.com/pissang)\n */\n\n// TODO getTotalLength, getPointAtLength\n\n/* global Float32Array */\n\nimport * as curve from './curve';\nimport * as vec2 from './vector';\nimport * as bbox from './bbox';\nimport BoundingRect from './BoundingRect';\nimport {devicePixelRatio as dpr} from '../config';\n\nvar CMD = {\n M: 1,\n L: 2,\n C: 3,\n Q: 4,\n A: 5,\n Z: 6,\n // Rect\n R: 7\n};\n\n// var CMD_MEM_SIZE = {\n// M: 3,\n// L: 3,\n// C: 7,\n// Q: 5,\n// A: 9,\n// R: 5,\n// Z: 1\n// };\n\nvar min = [];\nvar max = [];\nvar min2 = [];\nvar max2 = [];\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathCos = Math.cos;\nvar mathSin = Math.sin;\nvar mathSqrt = Math.sqrt;\nvar mathAbs = Math.abs;\n\nvar hasTypedArray = typeof Float32Array !== 'undefined';\n\n/**\n * @alias module:zrender/core/PathProxy\n * @constructor\n */\nvar PathProxy = function (notSaveData) {\n\n this._saveData = !(notSaveData || false);\n\n if (this._saveData) {\n /**\n * Path data. Stored as flat array\n * @type {Array.<Object>}\n */\n this.data = [];\n }\n\n this._ctx = null;\n};\n\n/**\n * 快速计算Path包围盒并不是最小包围盒\n * @return {Object}\n */\nPathProxy.prototype = {\n\n constructor: PathProxy,\n\n _xi: 0,\n _yi: 0,\n\n _x0: 0,\n _y0: 0,\n // Unit x, Unit y. Provide for avoiding drawing that too short line segment\n _ux: 0,\n _uy: 0,\n\n _len: 0,\n\n _lineDash: null,\n\n _dashOffset: 0,\n\n _dashIdx: 0,\n\n _dashSum: 0,\n\n /**\n * @readOnly\n */\n setScale: function (sx, sy, segmentIgnoreThreshold) {\n // Compat. Previously there is no segmentIgnoreThreshold.\n segmentIgnoreThreshold = segmentIgnoreThreshold || 0;\n this._ux = mathAbs(segmentIgnoreThreshold / dpr / sx) || 0;\n this._uy = mathAbs(segmentIgnoreThreshold / dpr / sy) || 0;\n },\n\n getContext: function () {\n return this._ctx;\n },\n\n /**\n * @param {CanvasRenderingContext2D} ctx\n * @return {module:zrender/core/PathProxy}\n */\n beginPath: function (ctx) {\n\n this._ctx = ctx;\n\n ctx && ctx.beginPath();\n\n ctx && (this.dpr = ctx.dpr);\n\n // Reset\n if (this._saveData) {\n this._len = 0;\n }\n\n if (this._lineDash) {\n this._lineDash = null;\n\n this._dashOffset = 0;\n }\n\n return this;\n },\n\n /**\n * @param {number} x\n * @param {number} y\n * @return {module:zrender/core/PathProxy}\n */\n moveTo: function (x, y) {\n this.addData(CMD.M, x, y);\n this._ctx && this._ctx.moveTo(x, y);\n\n // x0, y0, xi, yi 是记录在 _dashedXXXXTo 方法中使用\n // xi, yi 记录当前点, x0, y0 在 closePath 的时候回到起始点。\n // 有可能在 beginPath 之后直接调用 lineTo这时候 x0, y0 需要\n // 在 lineTo 方法中记录这里先不考虑这种情况dashed line 也只在 IE10- 中不支持\n this._x0 = x;\n this._y0 = y;\n\n this._xi = x;\n this._yi = y;\n\n return this;\n },\n\n /**\n * @param {number} x\n * @param {number} y\n * @return {module:zrender/core/PathProxy}\n */\n lineTo: function (x, y) {\n var exceedUnit = mathAbs(x - this._xi) > this._ux\n || mathAbs(y - this._yi) > this._uy\n // Force draw the first segment\n || this._len < 5;\n\n this.addData(CMD.L, x, y);\n\n if (this._ctx && exceedUnit) {\n this._needsDash() ? this._dashedLineTo(x, y)\n : this._ctx.lineTo(x, y);\n }\n if (exceedUnit) {\n this._xi = x;\n this._yi = y;\n }\n\n return this;\n },\n\n /**\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @return {module:zrender/core/PathProxy}\n */\n bezierCurveTo: function (x1, y1, x2, y2, x3, y3) {\n this.addData(CMD.C, x1, y1, x2, y2, x3, y3);\n if (this._ctx) {\n this._needsDash() ? this._dashedBezierTo(x1, y1, x2, y2, x3, y3)\n : this._ctx.bezierCurveTo(x1, y1, x2, y2, x3, y3);\n }\n this._xi = x3;\n this._yi = y3;\n return this;\n },\n\n /**\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @return {module:zrender/core/PathProxy}\n */\n quadraticCurveTo: function (x1, y1, x2, y2) {\n this.addData(CMD.Q, x1, y1, x2, y2);\n if (this._ctx) {\n this._needsDash() ? this._dashedQuadraticTo(x1, y1, x2, y2)\n : this._ctx.quadraticCurveTo(x1, y1, x2, y2);\n }\n this._xi = x2;\n this._yi = y2;\n return this;\n },\n\n /**\n * @param {number} cx\n * @param {number} cy\n * @param {number} r\n * @param {number} startAngle\n * @param {number} endAngle\n * @param {boolean} anticlockwise\n * @return {module:zrender/core/PathProxy}\n */\n arc: function (cx, cy, r, startAngle, endAngle, anticlockwise) {\n this.addData(\n CMD.A, cx, cy, r, r, startAngle, endAngle - startAngle, 0, anticlockwise ? 0 : 1\n );\n this._ctx && this._ctx.arc(cx, cy, r, startAngle, endAngle, anticlockwise);\n\n this._xi = mathCos(endAngle) * r + cx;\n this._yi = mathSin(endAngle) * r + cy;\n return this;\n },\n\n // TODO\n arcTo: function (x1, y1, x2, y2, radius) {\n if (this._ctx) {\n this._ctx.arcTo(x1, y1, x2, y2, radius);\n }\n return this;\n },\n\n // TODO\n rect: function (x, y, w, h) {\n this._ctx && this._ctx.rect(x, y, w, h);\n this.addData(CMD.R, x, y, w, h);\n return this;\n },\n\n /**\n * @return {module:zrender/core/PathProxy}\n */\n closePath: function () {\n this.addData(CMD.Z);\n\n var ctx = this._ctx;\n var x0 = this._x0;\n var y0 = this._y0;\n if (ctx) {\n this._needsDash() && this._dashedLineTo(x0, y0);\n ctx.closePath();\n }\n\n this._xi = x0;\n this._yi = y0;\n return this;\n },\n\n /**\n * Context 从外部传入,因为有可能是 rebuildPath 完之后再 fill。\n * stroke 同样\n * @param {CanvasRenderingContext2D} ctx\n * @return {module:zrender/core/PathProxy}\n */\n fill: function (ctx) {\n ctx && ctx.fill();\n this.toStatic();\n },\n\n /**\n * @param {CanvasRenderingContext2D} ctx\n * @return {module:zrender/core/PathProxy}\n */\n stroke: function (ctx) {\n ctx && ctx.stroke();\n this.toStatic();\n },\n\n /**\n * 必须在其它绘制命令前调用\n * Must be invoked before all other path drawing methods\n * @return {module:zrender/core/PathProxy}\n */\n setLineDash: function (lineDash) {\n if (lineDash instanceof Array) {\n this._lineDash = lineDash;\n\n this._dashIdx = 0;\n\n var lineDashSum = 0;\n for (var i = 0; i < lineDash.length; i++) {\n lineDashSum += lineDash[i];\n }\n this._dashSum = lineDashSum;\n }\n return this;\n },\n\n /**\n * 必须在其它绘制命令前调用\n * Must be invoked before all other path drawing methods\n * @return {module:zrender/core/PathProxy}\n */\n setLineDashOffset: function (offset) {\n this._dashOffset = offset;\n return this;\n },\n\n /**\n *\n * @return {boolean}\n */\n len: function () {\n return this._len;\n },\n\n /**\n * 直接设置 Path 数据\n */\n setData: function (data) {\n\n var len = data.length;\n\n if (!(this.data && this.data.length === len) && hasTypedArray) {\n this.data = new Float32Array(len);\n }\n\n for (var i = 0; i < len; i++) {\n this.data[i] = data[i];\n }\n\n this._len = len;\n },\n\n /**\n * 添加子路径\n * @param {module:zrender/core/PathProxy|Array.<module:zrender/core/PathProxy>} path\n */\n appendPath: function (path) {\n if (!(path instanceof Array)) {\n path = [path];\n }\n var len = path.length;\n var appendSize = 0;\n var offset = this._len;\n for (var i = 0; i < len; i++) {\n appendSize += path[i].len();\n }\n if (hasTypedArray && (this.data instanceof Float32Array)) {\n this.data = new Float32Array(offset + appendSize);\n }\n for (var i = 0; i < len; i++) {\n var appendPathData = path[i].data;\n for (var k = 0; k < appendPathData.length; k++) {\n this.data[offset++] = appendPathData[k];\n }\n }\n this._len = offset;\n },\n\n /**\n * 填充 Path 数据。\n * 尽量复用而不申明新的数组。大部分图形重绘的指令数据长度都是不变的。\n */\n addData: function (cmd) {\n if (!this._saveData) {\n return;\n }\n\n var data = this.data;\n if (this._len + arguments.length > data.length) {\n // 因为之前的数组已经转换成静态的 Float32Array\n // 所以不够用时需要扩展一个新的动态数组\n this._expandData();\n data = this.data;\n }\n for (var i = 0; i < arguments.length; i++) {\n data[this._len++] = arguments[i];\n }\n\n this._prevCmd = cmd;\n },\n\n _expandData: function () {\n // Only if data is Float32Array\n if (!(this.data instanceof Array)) {\n var newData = [];\n for (var i = 0; i < this._len; i++) {\n newData[i] = this.data[i];\n }\n this.data = newData;\n }\n },\n\n /**\n * If needs js implemented dashed line\n * @return {boolean}\n * @private\n */\n _needsDash: function () {\n return this._lineDash;\n },\n\n _dashedLineTo: function (x1, y1) {\n var dashSum = this._dashSum;\n var offset = this._dashOffset;\n var lineDash = this._lineDash;\n var ctx = this._ctx;\n\n var x0 = this._xi;\n var y0 = this._yi;\n var dx = x1 - x0;\n var dy = y1 - y0;\n var dist = mathSqrt(dx * dx + dy * dy);\n var x = x0;\n var y = y0;\n var dash;\n var nDash = lineDash.length;\n var idx;\n dx /= dist;\n dy /= dist;\n\n if (offset < 0) {\n // Convert to positive offset\n offset = dashSum + offset;\n }\n offset %= dashSum;\n x -= offset * dx;\n y -= offset * dy;\n\n while ((dx > 0 && x <= x1) || (dx < 0 && x >= x1)\n || (dx === 0 && ((dy > 0 && y <= y1) || (dy < 0 && y >= y1)))) {\n idx = this._dashIdx;\n dash = lineDash[idx];\n x += dx * dash;\n y += dy * dash;\n this._dashIdx = (idx + 1) % nDash;\n // Skip positive offset\n if ((dx > 0 && x < x0) || (dx < 0 && x > x0) || (dy > 0 && y < y0) || (dy < 0 && y > y0)) {\n continue;\n }\n ctx[idx % 2 ? 'moveTo' : 'lineTo'](\n dx >= 0 ? mathMin(x, x1) : mathMax(x, x1),\n dy >= 0 ? mathMin(y, y1) : mathMax(y, y1)\n );\n }\n // Offset for next lineTo\n dx = x - x1;\n dy = y - y1;\n this._dashOffset = -mathSqrt(dx * dx + dy * dy);\n },\n\n // Not accurate dashed line to\n _dashedBezierTo: function (x1, y1, x2, y2, x3, y3) {\n var dashSum = this._dashSum;\n var offset = this._dashOffset;\n var lineDash = this._lineDash;\n var ctx = this._ctx;\n\n var x0 = this._xi;\n var y0 = this._yi;\n var t;\n var dx;\n var dy;\n var cubicAt = curve.cubicAt;\n var bezierLen = 0;\n var idx = this._dashIdx;\n var nDash = lineDash.length;\n\n var x;\n var y;\n\n var tmpLen = 0;\n\n if (offset < 0) {\n // Convert to positive offset\n offset = dashSum + offset;\n }\n offset %= dashSum;\n // Bezier approx length\n for (t = 0; t < 1; t += 0.1) {\n dx = cubicAt(x0, x1, x2, x3, t + 0.1)\n - cubicAt(x0, x1, x2, x3, t);\n dy = cubicAt(y0, y1, y2, y3, t + 0.1)\n - cubicAt(y0, y1, y2, y3, t);\n bezierLen += mathSqrt(dx * dx + dy * dy);\n }\n\n // Find idx after add offset\n for (; idx < nDash; idx++) {\n tmpLen += lineDash[idx];\n if (tmpLen > offset) {\n break;\n }\n }\n t = (tmpLen - offset) / bezierLen;\n\n while (t <= 1) {\n\n x = cubicAt(x0, x1, x2, x3, t);\n y = cubicAt(y0, y1, y2, y3, t);\n\n // Use line to approximate dashed bezier\n // Bad result if dash is long\n idx % 2 ? ctx.moveTo(x, y)\n : ctx.lineTo(x, y);\n\n t += lineDash[idx] / bezierLen;\n\n idx = (idx + 1) % nDash;\n }\n\n // Finish the last segment and calculate the new offset\n (idx % 2 !== 0) && ctx.lineTo(x3, y3);\n dx = x3 - x;\n dy = y3 - y;\n this._dashOffset = -mathSqrt(dx * dx + dy * dy);\n },\n\n _dashedQuadraticTo: function (x1, y1, x2, y2) {\n // Convert quadratic to cubic using degree elevation\n var x3 = x2;\n var y3 = y2;\n x2 = (x2 + 2 * x1) / 3;\n y2 = (y2 + 2 * y1) / 3;\n x1 = (this._xi + 2 * x1) / 3;\n y1 = (this._yi + 2 * y1) / 3;\n\n this._dashedBezierTo(x1, y1, x2, y2, x3, y3);\n },\n\n /**\n * 转成静态的 Float32Array 减少堆内存占用\n * Convert dynamic array to static Float32Array\n */\n toStatic: function () {\n var data = this.data;\n if (data instanceof Array) {\n data.length = this._len;\n if (hasTypedArray) {\n this.data = new Float32Array(data);\n }\n }\n },\n\n /**\n * @return {module:zrender/core/BoundingRect}\n */\n getBoundingRect: function () {\n min[0] = min[1] = min2[0] = min2[1] = Number.MAX_VALUE;\n max[0] = max[1] = max2[0] = max2[1] = -Number.MAX_VALUE;\n\n var data = this.data;\n var xi = 0;\n var yi = 0;\n var x0 = 0;\n var y0 = 0;\n\n for (var i = 0; i < data.length;) {\n var cmd = data[i++];\n\n if (i === 1) {\n // 如果第一个命令是 L, C, Q\n // 则 previous point 同绘制命令的第一个 point\n //\n // 第一个命令为 Arc 的情况下会在后面特殊处理\n xi = data[i];\n yi = data[i + 1];\n\n x0 = xi;\n y0 = yi;\n }\n\n switch (cmd) {\n case CMD.M:\n // moveTo 命令重新创建一个新的 subpath, 并且更新新的起点\n // 在 closePath 的时候使用\n x0 = data[i++];\n y0 = data[i++];\n xi = x0;\n yi = y0;\n min2[0] = x0;\n min2[1] = y0;\n max2[0] = x0;\n max2[1] = y0;\n break;\n case CMD.L:\n bbox.fromLine(xi, yi, data[i], data[i + 1], min2, max2);\n xi = data[i++];\n yi = data[i++];\n break;\n case CMD.C:\n bbox.fromCubic(\n xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1],\n min2, max2\n );\n xi = data[i++];\n yi = data[i++];\n break;\n case CMD.Q:\n bbox.fromQuadratic(\n xi, yi, data[i++], data[i++], data[i], data[i + 1],\n min2, max2\n );\n xi = data[i++];\n yi = data[i++];\n break;\n case CMD.A:\n // TODO Arc 判断的开销比较大\n var cx = data[i++];\n var cy = data[i++];\n var rx = data[i++];\n var ry = data[i++];\n var startAngle = data[i++];\n var endAngle = data[i++] + startAngle;\n // TODO Arc 旋转\n i += 1;\n var anticlockwise = 1 - data[i++];\n\n if (i === 1) {\n // 直接使用 arc 命令\n // 第一个命令起点还未定义\n x0 = mathCos(startAngle) * rx + cx;\n y0 = mathSin(startAngle) * ry + cy;\n }\n\n bbox.fromArc(\n cx, cy, rx, ry, startAngle, endAngle,\n anticlockwise, min2, max2\n );\n\n xi = mathCos(endAngle) * rx + cx;\n yi = mathSin(endAngle) * ry + cy;\n break;\n case CMD.R:\n x0 = xi = data[i++];\n y0 = yi = data[i++];\n var width = data[i++];\n var height = data[i++];\n // Use fromLine\n bbox.fromLine(x0, y0, x0 + width, y0 + height, min2, max2);\n break;\n case CMD.Z:\n xi = x0;\n yi = y0;\n break;\n }\n\n // Union\n vec2.min(min, min, min2);\n vec2.max(max, max, max2);\n }\n\n // No data\n if (i === 0) {\n min[0] = min[1] = max[0] = max[1] = 0;\n }\n\n return new BoundingRect(\n min[0], min[1], max[0] - min[0], max[1] - min[1]\n );\n },\n\n /**\n * Rebuild path from current data\n * Rebuild path will not consider javascript implemented line dash.\n * @param {CanvasRenderingContext2D} ctx\n */\n rebuildPath: function (ctx) {\n var d = this.data;\n var x0;\n var y0;\n var xi;\n var yi;\n var x;\n var y;\n var ux = this._ux;\n var uy = this._uy;\n var len = this._len;\n for (var i = 0; i < len;) {\n var cmd = d[i++];\n\n if (i === 1) {\n // 如果第一个命令是 L, C, Q\n // 则 previous point 同绘制命令的第一个 point\n //\n // 第一个命令为 Arc 的情况下会在后面特殊处理\n xi = d[i];\n yi = d[i + 1];\n\n x0 = xi;\n y0 = yi;\n }\n switch (cmd) {\n case CMD.M:\n x0 = xi = d[i++];\n y0 = yi = d[i++];\n ctx.moveTo(xi, yi);\n break;\n case CMD.L:\n x = d[i++];\n y = d[i++];\n // Not draw too small seg between\n if (mathAbs(x - xi) > ux || mathAbs(y - yi) > uy || i === len - 1) {\n ctx.lineTo(x, y);\n xi = x;\n yi = y;\n }\n break;\n case CMD.C:\n ctx.bezierCurveTo(\n d[i++], d[i++], d[i++], d[i++], d[i++], d[i++]\n );\n xi = d[i - 2];\n yi = d[i - 1];\n break;\n case CMD.Q:\n ctx.quadraticCurveTo(d[i++], d[i++], d[i++], d[i++]);\n xi = d[i - 2];\n yi = d[i - 1];\n break;\n case CMD.A:\n var cx = d[i++];\n var cy = d[i++];\n var rx = d[i++];\n var ry = d[i++];\n var theta = d[i++];\n var dTheta = d[i++];\n var psi = d[i++];\n var fs = d[i++];\n var r = (rx > ry) ? rx : ry;\n var scaleX = (rx > ry) ? 1 : rx / ry;\n var scaleY = (rx > ry) ? ry / rx : 1;\n var isEllipse = Math.abs(rx - ry) > 1e-3;\n var endAngle = theta + dTheta;\n if (isEllipse) {\n ctx.translate(cx, cy);\n ctx.rotate(psi);\n ctx.scale(scaleX, scaleY);\n ctx.arc(0, 0, r, theta, endAngle, 1 - fs);\n ctx.scale(1 / scaleX, 1 / scaleY);\n ctx.rotate(-psi);\n ctx.translate(-cx, -cy);\n }\n else {\n ctx.arc(cx, cy, r, theta, endAngle, 1 - fs);\n }\n\n if (i === 1) {\n // 直接使用 arc 命令\n // 第一个命令起点还未定义\n x0 = mathCos(theta) * rx + cx;\n y0 = mathSin(theta) * ry + cy;\n }\n xi = mathCos(endAngle) * rx + cx;\n yi = mathSin(endAngle) * ry + cy;\n break;\n case CMD.R:\n x0 = xi = d[i];\n y0 = yi = d[i + 1];\n ctx.rect(d[i++], d[i++], d[i++], d[i++]);\n break;\n case CMD.Z:\n ctx.closePath();\n xi = x0;\n yi = y0;\n }\n }\n }\n};\n\nPathProxy.CMD = CMD;\n\nexport default PathProxy;","\n/**\n * 线段包含判断\n * @param {number} x0\n * @param {number} y0\n * @param {number} x1\n * @param {number} y1\n * @param {number} lineWidth\n * @param {number} x\n * @param {number} y\n * @return {boolean}\n */\nexport function containStroke(x0, y0, x1, y1, lineWidth, x, y) {\n if (lineWidth === 0) {\n return false;\n }\n var _l = lineWidth;\n var _a = 0;\n var _b = x0;\n // Quick reject\n if (\n (y > y0 + _l && y > y1 + _l)\n || (y < y0 - _l && y < y1 - _l)\n || (x > x0 + _l && x > x1 + _l)\n || (x < x0 - _l && x < x1 - _l)\n ) {\n return false;\n }\n\n if (x0 !== x1) {\n _a = (y0 - y1) / (x0 - x1);\n _b = (x0 * y1 - x1 * y0) / (x0 - x1);\n }\n else {\n return Math.abs(x - x0) <= _l / 2;\n }\n var tmp = _a * x - y + _b;\n var _s = tmp * tmp / (_a * _a + 1);\n return _s <= _l / 2 * _l / 2;\n}","\nimport * as curve from '../core/curve';\n\n/**\n * 三次贝塞尔曲线描边包含判断\n * @param {number} x0\n * @param {number} y0\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} x3\n * @param {number} y3\n * @param {number} lineWidth\n * @param {number} x\n * @param {number} y\n * @return {boolean}\n */\nexport function containStroke(x0, y0, x1, y1, x2, y2, x3, y3, lineWidth, x, y) {\n if (lineWidth === 0) {\n return false;\n }\n var _l = lineWidth;\n // Quick reject\n if (\n (y > y0 + _l && y > y1 + _l && y > y2 + _l && y > y3 + _l)\n || (y < y0 - _l && y < y1 - _l && y < y2 - _l && y < y3 - _l)\n || (x > x0 + _l && x > x1 + _l && x > x2 + _l && x > x3 + _l)\n || (x < x0 - _l && x < x1 - _l && x < x2 - _l && x < x3 - _l)\n ) {\n return false;\n }\n var d = curve.cubicProjectPoint(\n x0, y0, x1, y1, x2, y2, x3, y3,\n x, y, null\n );\n return d <= _l / 2;\n}","import {quadraticProjectPoint} from '../core/curve';\n\n/**\n * 二次贝塞尔曲线描边包含判断\n * @param {number} x0\n * @param {number} y0\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @param {number} lineWidth\n * @param {number} x\n * @param {number} y\n * @return {boolean}\n */\nexport function containStroke(x0, y0, x1, y1, x2, y2, lineWidth, x, y) {\n if (lineWidth === 0) {\n return false;\n }\n var _l = lineWidth;\n // Quick reject\n if (\n (y > y0 + _l && y > y1 + _l && y > y2 + _l)\n || (y < y0 - _l && y < y1 - _l && y < y2 - _l)\n || (x > x0 + _l && x > x1 + _l && x > x2 + _l)\n || (x < x0 - _l && x < x1 - _l && x < x2 - _l)\n ) {\n return false;\n }\n var d = quadraticProjectPoint(\n x0, y0, x1, y1, x2, y2,\n x, y, null\n );\n return d <= _l / 2;\n}\n","\nvar PI2 = Math.PI * 2;\n\nexport function normalizeRadian(angle) {\n angle %= PI2;\n if (angle < 0) {\n angle += PI2;\n }\n return angle;\n}","\nimport {normalizeRadian} from './util';\n\nvar PI2 = Math.PI * 2;\n\n/**\n * 圆弧描边包含判断\n * @param {number} cx\n * @param {number} cy\n * @param {number} r\n * @param {number} startAngle\n * @param {number} endAngle\n * @param {boolean} anticlockwise\n * @param {number} lineWidth\n * @param {number} x\n * @param {number} y\n * @return {Boolean}\n */\nexport function containStroke(\n cx, cy, r, startAngle, endAngle, anticlockwise,\n lineWidth, x, y\n) {\n\n if (lineWidth === 0) {\n return false;\n }\n var _l = lineWidth;\n\n x -= cx;\n y -= cy;\n var d = Math.sqrt(x * x + y * y);\n\n if ((d - _l > r) || (d + _l < r)) {\n return false;\n }\n if (Math.abs(startAngle - endAngle) % PI2 < 1e-4) {\n // Is a circle\n return true;\n }\n if (anticlockwise) {\n var tmp = startAngle;\n startAngle = normalizeRadian(endAngle);\n endAngle = normalizeRadian(tmp);\n }\n else {\n startAngle = normalizeRadian(startAngle);\n endAngle = normalizeRadian(endAngle);\n }\n if (startAngle > endAngle) {\n endAngle += PI2;\n }\n\n var angle = Math.atan2(y, x);\n if (angle < 0) {\n angle += PI2;\n }\n return (angle >= startAngle && angle <= endAngle)\n || (angle + PI2 >= startAngle && angle + PI2 <= endAngle);\n}","\nexport default function windingLine(x0, y0, x1, y1, x, y) {\n if ((y > y0 && y > y1) || (y < y0 && y < y1)) {\n return 0;\n }\n // Ignore horizontal line\n if (y1 === y0) {\n return 0;\n }\n var dir = y1 < y0 ? 1 : -1;\n var t = (y - y0) / (y1 - y0);\n\n // Avoid winding error when intersection point is the connect point of two line of polygon\n if (t === 1 || t === 0) {\n dir = y1 < y0 ? 0.5 : -0.5;\n }\n\n var x_ = t * (x1 - x0) + x0;\n\n // If (x, y) on the line, considered as \"contain\".\n return x_ === x ? Infinity : x_ > x ? dir : 0;\n}","import PathProxy from '../core/PathProxy';\nimport * as line from './line';\nimport * as cubic from './cubic';\nimport * as quadratic from './quadratic';\nimport * as arc from './arc';\nimport {normalizeRadian} from './util';\nimport * as curve from '../core/curve';\nimport windingLine from './windingLine';\n\nvar CMD = PathProxy.CMD;\nvar PI2 = Math.PI * 2;\n\nvar EPSILON = 1e-4;\n\nfunction isAroundEqual(a, b) {\n return Math.abs(a - b) < EPSILON;\n}\n\n// 临时数组\nvar roots = [-1, -1, -1];\nvar extrema = [-1, -1];\n\nfunction swapExtrema() {\n var tmp = extrema[0];\n extrema[0] = extrema[1];\n extrema[1] = tmp;\n}\n\nfunction windingCubic(x0, y0, x1, y1, x2, y2, x3, y3, x, y) {\n // Quick reject\n if (\n (y > y0 && y > y1 && y > y2 && y > y3)\n || (y < y0 && y < y1 && y < y2 && y < y3)\n ) {\n return 0;\n }\n var nRoots = curve.cubicRootAt(y0, y1, y2, y3, y, roots);\n if (nRoots === 0) {\n return 0;\n }\n else {\n var w = 0;\n var nExtrema = -1;\n var y0_;\n var y1_;\n for (var i = 0; i < nRoots; i++) {\n var t = roots[i];\n\n // Avoid winding error when intersection point is the connect point of two line of polygon\n var unit = (t === 0 || t === 1) ? 0.5 : 1;\n\n var x_ = curve.cubicAt(x0, x1, x2, x3, t);\n if (x_ < x) { // Quick reject\n continue;\n }\n if (nExtrema < 0) {\n nExtrema = curve.cubicExtrema(y0, y1, y2, y3, extrema);\n if (extrema[1] < extrema[0] && nExtrema > 1) {\n swapExtrema();\n }\n y0_ = curve.cubicAt(y0, y1, y2, y3, extrema[0]);\n if (nExtrema > 1) {\n y1_ = curve.cubicAt(y0, y1, y2, y3, extrema[1]);\n }\n }\n if (nExtrema === 2) {\n // 分成三段单调函数\n if (t < extrema[0]) {\n w += y0_ < y0 ? unit : -unit;\n }\n else if (t < extrema[1]) {\n w += y1_ < y0_ ? unit : -unit;\n }\n else {\n w += y3 < y1_ ? unit : -unit;\n }\n }\n else {\n // 分成两段单调函数\n if (t < extrema[0]) {\n w += y0_ < y0 ? unit : -unit;\n }\n else {\n w += y3 < y0_ ? unit : -unit;\n }\n }\n }\n return w;\n }\n}\n\nfunction windingQuadratic(x0, y0, x1, y1, x2, y2, x, y) {\n // Quick reject\n if (\n (y > y0 && y > y1 && y > y2)\n || (y < y0 && y < y1 && y < y2)\n ) {\n return 0;\n }\n var nRoots = curve.quadraticRootAt(y0, y1, y2, y, roots);\n if (nRoots === 0) {\n return 0;\n }\n else {\n var t = curve.quadraticExtremum(y0, y1, y2);\n if (t >= 0 && t <= 1) {\n var w = 0;\n var y_ = curve.quadraticAt(y0, y1, y2, t);\n for (var i = 0; i < nRoots; i++) {\n // Remove one endpoint.\n var unit = (roots[i] === 0 || roots[i] === 1) ? 0.5 : 1;\n\n var x_ = curve.quadraticAt(x0, x1, x2, roots[i]);\n if (x_ < x) { // Quick reject\n continue;\n }\n if (roots[i] < t) {\n w += y_ < y0 ? unit : -unit;\n }\n else {\n w += y2 < y_ ? unit : -unit;\n }\n }\n return w;\n }\n else {\n // Remove one endpoint.\n var unit = (roots[0] === 0 || roots[0] === 1) ? 0.5 : 1;\n\n var x_ = curve.quadraticAt(x0, x1, x2, roots[0]);\n if (x_ < x) { // Quick reject\n return 0;\n }\n return y2 < y0 ? unit : -unit;\n }\n }\n}\n\n// TODO\n// Arc 旋转\nfunction windingArc(\n cx, cy, r, startAngle, endAngle, anticlockwise, x, y\n) {\n y -= cy;\n if (y > r || y < -r) {\n return 0;\n }\n var tmp = Math.sqrt(r * r - y * y);\n roots[0] = -tmp;\n roots[1] = tmp;\n\n var diff = Math.abs(startAngle - endAngle);\n if (diff < 1e-4) {\n return 0;\n }\n if (diff % PI2 < 1e-4) {\n // Is a circle\n startAngle = 0;\n endAngle = PI2;\n var dir = anticlockwise ? 1 : -1;\n if (x >= roots[0] + cx && x <= roots[1] + cx) {\n return dir;\n }\n else {\n return 0;\n }\n }\n\n if (anticlockwise) {\n var tmp = startAngle;\n startAngle = normalizeRadian(endAngle);\n endAngle = normalizeRadian(tmp);\n }\n else {\n startAngle = normalizeRadian(startAngle);\n endAngle = normalizeRadian(endAngle);\n }\n if (startAngle > endAngle) {\n endAngle += PI2;\n }\n\n var w = 0;\n for (var i = 0; i < 2; i++) {\n var x_ = roots[i];\n if (x_ + cx > x) {\n var angle = Math.atan2(y, x_);\n var dir = anticlockwise ? 1 : -1;\n if (angle < 0) {\n angle = PI2 + angle;\n }\n if (\n (angle >= startAngle && angle <= endAngle)\n || (angle + PI2 >= startAngle && angle + PI2 <= endAngle)\n ) {\n if (angle > Math.PI / 2 && angle < Math.PI * 1.5) {\n dir = -dir;\n }\n w += dir;\n }\n }\n }\n return w;\n}\n\nfunction containPath(data, lineWidth, isStroke, x, y) {\n var w = 0;\n var xi = 0;\n var yi = 0;\n var x0 = 0;\n var y0 = 0;\n\n for (var i = 0; i < data.length;) {\n var cmd = data[i++];\n // Begin a new subpath\n if (cmd === CMD.M && i > 1) {\n // Close previous subpath\n if (!isStroke) {\n w += windingLine(xi, yi, x0, y0, x, y);\n }\n // 如果被任何一个 subpath 包含\n // if (w !== 0) {\n // return true;\n // }\n }\n\n if (i === 1) {\n // 如果第一个命令是 L, C, Q\n // 则 previous point 同绘制命令的第一个 point\n //\n // 第一个命令为 Arc 的情况下会在后面特殊处理\n xi = data[i];\n yi = data[i + 1];\n\n x0 = xi;\n y0 = yi;\n }\n\n switch (cmd) {\n case CMD.M:\n // moveTo 命令重新创建一个新的 subpath, 并且更新新的起点\n // 在 closePath 的时候使用\n x0 = data[i++];\n y0 = data[i++];\n xi = x0;\n yi = y0;\n break;\n case CMD.L:\n if (isStroke) {\n if (line.containStroke(xi, yi, data[i], data[i + 1], lineWidth, x, y)) {\n return true;\n }\n }\n else {\n // NOTE 在第一个命令为 L, C, Q 的时候会计算出 NaN\n w += windingLine(xi, yi, data[i], data[i + 1], x, y) || 0;\n }\n xi = data[i++];\n yi = data[i++];\n break;\n case CMD.C:\n if (isStroke) {\n if (cubic.containStroke(xi, yi,\n data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1],\n lineWidth, x, y\n )) {\n return true;\n }\n }\n else {\n w += windingCubic(\n xi, yi,\n data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1],\n x, y\n ) || 0;\n }\n xi = data[i++];\n yi = data[i++];\n break;\n case CMD.Q:\n if (isStroke) {\n if (quadratic.containStroke(xi, yi,\n data[i++], data[i++], data[i], data[i + 1],\n lineWidth, x, y\n )) {\n return true;\n }\n }\n else {\n w += windingQuadratic(\n xi, yi,\n data[i++], data[i++], data[i], data[i + 1],\n x, y\n ) || 0;\n }\n xi = data[i++];\n yi = data[i++];\n break;\n case CMD.A:\n // TODO Arc 判断的开销比较大\n var cx = data[i++];\n var cy = data[i++];\n var rx = data[i++];\n var ry = data[i++];\n var theta = data[i++];\n var dTheta = data[i++];\n // TODO Arc 旋转\n i += 1;\n var anticlockwise = 1 - data[i++];\n var x1 = Math.cos(theta) * rx + cx;\n var y1 = Math.sin(theta) * ry + cy;\n // 不是直接使用 arc 命令\n if (i > 1) {\n w += windingLine(xi, yi, x1, y1, x, y);\n }\n else {\n // 第一个命令起点还未定义\n x0 = x1;\n y0 = y1;\n }\n // zr 使用scale来模拟椭圆, 这里也对x做一定的缩放\n var _x = (x - cx) * ry / rx + cx;\n if (isStroke) {\n if (arc.containStroke(\n cx, cy, ry, theta, theta + dTheta, anticlockwise,\n lineWidth, _x, y\n )) {\n return true;\n }\n }\n else {\n w += windingArc(\n cx, cy, ry, theta, theta + dTheta, anticlockwise,\n _x, y\n );\n }\n xi = Math.cos(theta + dTheta) * rx + cx;\n yi = Math.sin(theta + dTheta) * ry + cy;\n break;\n case CMD.R:\n x0 = xi = data[i++];\n y0 = yi = data[i++];\n var width = data[i++];\n var height = data[i++];\n var x1 = x0 + width;\n var y1 = y0 + height;\n if (isStroke) {\n if (line.containStroke(x0, y0, x1, y0, lineWidth, x, y)\n || line.containStroke(x1, y0, x1, y1, lineWidth, x, y)\n || line.containStroke(x1, y1, x0, y1, lineWidth, x, y)\n || line.containStroke(x0, y1, x0, y0, lineWidth, x, y)\n ) {\n return true;\n }\n }\n else {\n // FIXME Clockwise ?\n w += windingLine(x1, y0, x1, y1, x, y);\n w += windingLine(x0, y1, x0, y0, x, y);\n }\n break;\n case CMD.Z:\n if (isStroke) {\n if (line.containStroke(\n xi, yi, x0, y0, lineWidth, x, y\n )) {\n return true;\n }\n }\n else {\n // Close a subpath\n w += windingLine(xi, yi, x0, y0, x, y);\n // 如果被任何一个 subpath 包含\n // FIXME subpaths may overlap\n // if (w !== 0) {\n // return true;\n // }\n }\n xi = x0;\n yi = y0;\n break;\n }\n }\n if (!isStroke && !isAroundEqual(yi, y0)) {\n w += windingLine(xi, yi, x0, y0, x, y) || 0;\n }\n return w !== 0;\n}\n\nexport function contain(pathData, x, y) {\n return containPath(pathData, 0, false, x, y);\n}\n\nexport function containStroke(pathData, lineWidth, x, y) {\n return containPath(pathData, lineWidth, true, x, y);\n}","import Displayable from './Displayable';\nimport * as zrUtil from '../core/util';\nimport PathProxy from '../core/PathProxy';\nimport * as pathContain from '../contain/path';\nimport Pattern from './Pattern';\n\nvar getCanvasPattern = Pattern.prototype.getCanvasPattern;\n\nvar abs = Math.abs;\n\nvar pathProxyForDraw = new PathProxy(true);\n/**\n * @alias module:zrender/graphic/Path\n * @extends module:zrender/graphic/Displayable\n * @constructor\n * @param {Object} opts\n */\nfunction Path(opts) {\n Displayable.call(this, opts);\n\n /**\n * @type {module:zrender/core/PathProxy}\n * @readOnly\n */\n this.path = null;\n}\n\nPath.prototype = {\n\n constructor: Path,\n\n type: 'path',\n\n __dirtyPath: true,\n\n strokeContainThreshold: 5,\n\n // This item default to be false. But in map series in echarts,\n // in order to improve performance, it should be set to true,\n // so the shorty segment won't draw.\n segmentIgnoreThreshold: 0,\n\n /**\n * See `module:zrender/src/graphic/helper/subPixelOptimize`.\n * @type {boolean}\n */\n subPixelOptimize: false,\n\n brush: function (ctx, prevEl) {\n var style = this.style;\n var path = this.path || pathProxyForDraw;\n var hasStroke = style.hasStroke();\n var hasFill = style.hasFill();\n var fill = style.fill;\n var stroke = style.stroke;\n var hasFillGradient = hasFill && !!(fill.colorStops);\n var hasStrokeGradient = hasStroke && !!(stroke.colorStops);\n var hasFillPattern = hasFill && !!(fill.image);\n var hasStrokePattern = hasStroke && !!(stroke.image);\n\n style.bind(ctx, this, prevEl);\n this.setTransform(ctx);\n\n if (this.__dirty) {\n var rect;\n // Update gradient because bounding rect may changed\n if (hasFillGradient) {\n rect = rect || this.getBoundingRect();\n this._fillGradient = style.getGradient(ctx, fill, rect);\n }\n if (hasStrokeGradient) {\n rect = rect || this.getBoundingRect();\n this._strokeGradient = style.getGradient(ctx, stroke, rect);\n }\n }\n // Use the gradient or pattern\n if (hasFillGradient) {\n // PENDING If may have affect the state\n ctx.fillStyle = this._fillGradient;\n }\n else if (hasFillPattern) {\n ctx.fillStyle = getCanvasPattern.call(fill, ctx);\n }\n if (hasStrokeGradient) {\n ctx.strokeStyle = this._strokeGradient;\n }\n else if (hasStrokePattern) {\n ctx.strokeStyle = getCanvasPattern.call(stroke, ctx);\n }\n\n var lineDash = style.lineDash;\n var lineDashOffset = style.lineDashOffset;\n\n var ctxLineDash = !!ctx.setLineDash;\n\n // Update path sx, sy\n var scale = this.getGlobalScale();\n path.setScale(scale[0], scale[1], this.segmentIgnoreThreshold);\n\n // Proxy context\n // Rebuild path in following 2 cases\n // 1. Path is dirty\n // 2. Path needs javascript implemented lineDash stroking.\n // In this case, lineDash information will not be saved in PathProxy\n if (this.__dirtyPath\n || (lineDash && !ctxLineDash && hasStroke)\n ) {\n path.beginPath(ctx);\n\n // Setting line dash before build path\n if (lineDash && !ctxLineDash) {\n path.setLineDash(lineDash);\n path.setLineDashOffset(lineDashOffset);\n }\n\n this.buildPath(path, this.shape, false);\n\n // Clear path dirty flag\n if (this.path) {\n this.__dirtyPath = false;\n }\n }\n else {\n // Replay path building\n ctx.beginPath();\n this.path.rebuildPath(ctx);\n }\n\n if (hasFill) {\n if (style.fillOpacity != null) {\n var originalGlobalAlpha = ctx.globalAlpha;\n ctx.globalAlpha = style.fillOpacity * style.opacity;\n path.fill(ctx);\n ctx.globalAlpha = originalGlobalAlpha;\n }\n else {\n path.fill(ctx);\n }\n }\n\n if (lineDash && ctxLineDash) {\n ctx.setLineDash(lineDash);\n ctx.lineDashOffset = lineDashOffset;\n }\n\n if (hasStroke) {\n if (style.strokeOpacity != null) {\n var originalGlobalAlpha = ctx.globalAlpha;\n ctx.globalAlpha = style.strokeOpacity * style.opacity;\n path.stroke(ctx);\n ctx.globalAlpha = originalGlobalAlpha;\n }\n else {\n path.stroke(ctx);\n }\n }\n\n if (lineDash && ctxLineDash) {\n // PENDING\n // Remove lineDash\n ctx.setLineDash([]);\n }\n\n // Draw rect text\n if (style.text != null) {\n // Only restore transform when needs draw text.\n this.restoreTransform(ctx);\n this.drawRectText(ctx, this.getBoundingRect());\n }\n },\n\n // When bundling path, some shape may decide if use moveTo to begin a new subpath or closePath\n // Like in circle\n buildPath: function (ctx, shapeCfg, inBundle) {},\n\n createPathProxy: function () {\n this.path = new PathProxy();\n },\n\n getBoundingRect: function () {\n var rect = this._rect;\n var style = this.style;\n var needsUpdateRect = !rect;\n if (needsUpdateRect) {\n var path = this.path;\n if (!path) {\n // Create path on demand.\n path = this.path = new PathProxy();\n }\n if (this.__dirtyPath) {\n path.beginPath();\n this.buildPath(path, this.shape, false);\n }\n rect = path.getBoundingRect();\n }\n this._rect = rect;\n\n if (style.hasStroke()) {\n // Needs update rect with stroke lineWidth when\n // 1. Element changes scale or lineWidth\n // 2. Shape is changed\n var rectWithStroke = this._rectWithStroke || (this._rectWithStroke = rect.clone());\n if (this.__dirty || needsUpdateRect) {\n rectWithStroke.copy(rect);\n // FIXME Must after updateTransform\n var w = style.lineWidth;\n // PENDING, Min line width is needed when line is horizontal or vertical\n var lineScale = style.strokeNoScale ? this.getLineScale() : 1;\n\n // Only add extra hover lineWidth when there are no fill\n if (!style.hasFill()) {\n w = Math.max(w, this.strokeContainThreshold || 4);\n }\n // Consider line width\n // Line scale can't be 0;\n if (lineScale > 1e-10) {\n rectWithStroke.width += w / lineScale;\n rectWithStroke.height += w / lineScale;\n rectWithStroke.x -= w / lineScale / 2;\n rectWithStroke.y -= w / lineScale / 2;\n }\n }\n\n // Return rect with stroke\n return rectWithStroke;\n }\n\n return rect;\n },\n\n contain: function (x, y) {\n var localPos = this.transformCoordToLocal(x, y);\n var rect = this.getBoundingRect();\n var style = this.style;\n x = localPos[0];\n y = localPos[1];\n\n if (rect.contain(x, y)) {\n var pathData = this.path.data;\n if (style.hasStroke()) {\n var lineWidth = style.lineWidth;\n var lineScale = style.strokeNoScale ? this.getLineScale() : 1;\n // Line scale can't be 0;\n if (lineScale > 1e-10) {\n // Only add extra hover lineWidth when there are no fill\n if (!style.hasFill()) {\n lineWidth = Math.max(lineWidth, this.strokeContainThreshold);\n }\n if (pathContain.containStroke(\n pathData, lineWidth / lineScale, x, y\n )) {\n return true;\n }\n }\n }\n if (style.hasFill()) {\n return pathContain.contain(pathData, x, y);\n }\n }\n return false;\n },\n\n /**\n * @param {boolean} dirtyPath\n */\n dirty: function (dirtyPath) {\n if (dirtyPath == null) {\n dirtyPath = true;\n }\n // Only mark dirty, not mark clean\n if (dirtyPath) {\n this.__dirtyPath = dirtyPath;\n this._rect = null;\n }\n\n this.__dirty = this.__dirtyText = true;\n\n this.__zr && this.__zr.refresh();\n\n // Used as a clipping path\n if (this.__clipTarget) {\n this.__clipTarget.dirty();\n }\n },\n\n /**\n * Alias for animate('shape')\n * @param {boolean} loop\n */\n animateShape: function (loop) {\n return this.animate('shape', loop);\n },\n\n // Overwrite attrKV\n attrKV: function (key, value) {\n // FIXME\n if (key === 'shape') {\n this.setShape(value);\n this.__dirtyPath = true;\n this._rect = null;\n }\n else {\n Displayable.prototype.attrKV.call(this, key, value);\n }\n },\n\n /**\n * @param {Object|string} key\n * @param {*} value\n */\n setShape: function (key, value) {\n var shape = this.shape;\n // Path from string may not have shape\n if (shape) {\n if (zrUtil.isObject(key)) {\n for (var name in key) {\n if (key.hasOwnProperty(name)) {\n shape[name] = key[name];\n }\n }\n }\n else {\n shape[key] = value;\n }\n this.dirty(true);\n }\n return this;\n },\n\n getLineScale: function () {\n var m = this.transform;\n // Get the line scale.\n // Determinant of `m` means how much the area is enlarged by the\n // transformation. So its square root can be used as a scale factor\n // for width.\n return m && abs(m[0] - 1) > 1e-10 && abs(m[3] - 1) > 1e-10\n ? Math.sqrt(abs(m[0] * m[3] - m[2] * m[1]))\n : 1;\n }\n};\n\n/**\n * 扩展一个 Path element, 比如星形,圆等。\n * Extend a path element\n * @param {Object} props\n * @param {string} props.type Path type\n * @param {Function} props.init Initialize\n * @param {Function} props.buildPath Overwrite buildPath method\n * @param {Object} [props.style] Extended default style config\n * @param {Object} [props.shape] Extended default shape config\n */\nPath.extend = function (defaults) {\n var Sub = function (opts) {\n Path.call(this, opts);\n\n if (defaults.style) {\n // Extend default style\n this.style.extendFrom(defaults.style, false);\n }\n\n // Extend default shape\n var defaultShape = defaults.shape;\n if (defaultShape) {\n this.shape = this.shape || {};\n var thisShape = this.shape;\n for (var name in defaultShape) {\n if (\n !thisShape.hasOwnProperty(name)\n && defaultShape.hasOwnProperty(name)\n ) {\n thisShape[name] = defaultShape[name];\n }\n }\n }\n\n defaults.init && defaults.init.call(this, opts);\n };\n\n zrUtil.inherits(Sub, Path);\n\n // FIXME 不能 extend position, rotation 等引用对象\n for (var name in defaults) {\n // Extending prototype values and methods\n if (name !== 'style' && name !== 'shape') {\n Sub.prototype[name] = defaults[name];\n }\n }\n\n return Sub;\n};\n\nzrUtil.inherits(Path, Displayable);\n\nexport default Path;","import PathProxy from '../core/PathProxy';\nimport {applyTransform as v2ApplyTransform} from '../core/vector';\n\nvar CMD = PathProxy.CMD;\n\nvar points = [[], [], []];\nvar mathSqrt = Math.sqrt;\nvar mathAtan2 = Math.atan2;\n\nexport default function (path, m) {\n var data = path.data;\n var cmd;\n var nPoint;\n var i;\n var j;\n var k;\n var p;\n\n var M = CMD.M;\n var C = CMD.C;\n var L = CMD.L;\n var R = CMD.R;\n var A = CMD.A;\n var Q = CMD.Q;\n\n for (i = 0, j = 0; i < data.length;) {\n cmd = data[i++];\n j = i;\n nPoint = 0;\n\n switch (cmd) {\n case M:\n nPoint = 1;\n break;\n case L:\n nPoint = 1;\n break;\n case C:\n nPoint = 3;\n break;\n case Q:\n nPoint = 2;\n break;\n case A:\n var x = m[4];\n var y = m[5];\n var sx = mathSqrt(m[0] * m[0] + m[1] * m[1]);\n var sy = mathSqrt(m[2] * m[2] + m[3] * m[3]);\n var angle = mathAtan2(-m[1] / sy, m[0] / sx);\n // cx\n data[i] *= sx;\n data[i++] += x;\n // cy\n data[i] *= sy;\n data[i++] += y;\n // Scale rx and ry\n // FIXME Assume psi is 0 here\n data[i++] *= sx;\n data[i++] *= sy;\n\n // Start angle\n data[i++] += angle;\n // end angle\n data[i++] += angle;\n // FIXME psi\n i += 2;\n j = i;\n break;\n case R:\n // x0, y0\n p[0] = data[i++];\n p[1] = data[i++];\n v2ApplyTransform(p, p, m);\n data[j++] = p[0];\n data[j++] = p[1];\n // x1, y1\n p[0] += data[i++];\n p[1] += data[i++];\n v2ApplyTransform(p, p, m);\n data[j++] = p[0];\n data[j++] = p[1];\n }\n\n for (k = 0; k < nPoint; k++) {\n var p = points[k];\n p[0] = data[i++];\n p[1] = data[i++];\n\n v2ApplyTransform(p, p, m);\n // Write back\n data[j++] = p[0];\n data[j++] = p[1];\n }\n }\n}\n","import Path from '../graphic/Path';\nimport PathProxy from '../core/PathProxy';\nimport transformPath from './transformPath';\n\n// command chars\n// var cc = [\n// 'm', 'M', 'l', 'L', 'v', 'V', 'h', 'H', 'z', 'Z',\n// 'c', 'C', 'q', 'Q', 't', 'T', 's', 'S', 'a', 'A'\n// ];\n\nvar mathSqrt = Math.sqrt;\nvar mathSin = Math.sin;\nvar mathCos = Math.cos;\nvar PI = Math.PI;\n\nvar vMag = function (v) {\n return Math.sqrt(v[0] * v[0] + v[1] * v[1]);\n};\nvar vRatio = function (u, v) {\n return (u[0] * v[0] + u[1] * v[1]) / (vMag(u) * vMag(v));\n};\nvar vAngle = function (u, v) {\n return (u[0] * v[1] < u[1] * v[0] ? -1 : 1)\n * Math.acos(vRatio(u, v));\n};\n\nfunction processArc(x1, y1, x2, y2, fa, fs, rx, ry, psiDeg, cmd, path) {\n var psi = psiDeg * (PI / 180.0);\n var xp = mathCos(psi) * (x1 - x2) / 2.0\n + mathSin(psi) * (y1 - y2) / 2.0;\n var yp = -1 * mathSin(psi) * (x1 - x2) / 2.0\n + mathCos(psi) * (y1 - y2) / 2.0;\n\n var lambda = (xp * xp) / (rx * rx) + (yp * yp) / (ry * ry);\n\n if (lambda > 1) {\n rx *= mathSqrt(lambda);\n ry *= mathSqrt(lambda);\n }\n\n var f = (fa === fs ? -1 : 1)\n * mathSqrt((((rx * rx) * (ry * ry))\n - ((rx * rx) * (yp * yp))\n - ((ry * ry) * (xp * xp))) / ((rx * rx) * (yp * yp)\n + (ry * ry) * (xp * xp))\n ) || 0;\n\n var cxp = f * rx * yp / ry;\n var cyp = f * -ry * xp / rx;\n\n var cx = (x1 + x2) / 2.0\n + mathCos(psi) * cxp\n - mathSin(psi) * cyp;\n var cy = (y1 + y2) / 2.0\n + mathSin(psi) * cxp\n + mathCos(psi) * cyp;\n\n var theta = vAngle([ 1, 0 ], [ (xp - cxp) / rx, (yp - cyp) / ry ]);\n var u = [ (xp - cxp) / rx, (yp - cyp) / ry ];\n var v = [ (-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry ];\n var dTheta = vAngle(u, v);\n\n if (vRatio(u, v) <= -1) {\n dTheta = PI;\n }\n if (vRatio(u, v) >= 1) {\n dTheta = 0;\n }\n if (fs === 0 && dTheta > 0) {\n dTheta = dTheta - 2 * PI;\n }\n if (fs === 1 && dTheta < 0) {\n dTheta = dTheta + 2 * PI;\n }\n\n path.addData(cmd, cx, cy, rx, ry, theta, dTheta, psi, fs);\n}\n\n\nvar commandReg = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig;\n// Consider case:\n// (1) delimiter can be comma or space, where continuous commas\n// or spaces should be seen as one comma.\n// (2) value can be like:\n// '2e-4', 'l.5.9' (ignore 0), 'M-10-10', 'l-2.43e-1,34.9983',\n// 'l-.5E1,54', '121-23-44-11' (no delimiter)\nvar numberReg = /-?([0-9]*\\.)?[0-9]+([eE]-?[0-9]+)?/g;\n// var valueSplitReg = /[\\s,]+/;\n\nfunction createPathProxyFromString(data) {\n if (!data) {\n return new PathProxy();\n }\n\n // var data = data.replace(/-/g, ' -')\n // .replace(/ /g, ' ')\n // .replace(/ /g, ',')\n // .replace(/,,/g, ',');\n\n // var n;\n // create pipes so that we can split the data\n // for (n = 0; n < cc.length; n++) {\n // cs = cs.replace(new RegExp(cc[n], 'g'), '|' + cc[n]);\n // }\n\n // data = data.replace(/-/g, ',-');\n\n // create array\n // var arr = cs.split('|');\n // init context point\n var cpx = 0;\n var cpy = 0;\n var subpathX = cpx;\n var subpathY = cpy;\n var prevCmd;\n\n var path = new PathProxy();\n var CMD = PathProxy.CMD;\n\n // commandReg.lastIndex = 0;\n // var cmdResult;\n // while ((cmdResult = commandReg.exec(data)) != null) {\n // var cmdStr = cmdResult[1];\n // var cmdContent = cmdResult[2];\n\n var cmdList = data.match(commandReg);\n for (var l = 0; l < cmdList.length; l++) {\n var cmdText = cmdList[l];\n var cmdStr = cmdText.charAt(0);\n\n var cmd;\n\n // String#split is faster a little bit than String#replace or RegExp#exec.\n // var p = cmdContent.split(valueSplitReg);\n // var pLen = 0;\n // for (var i = 0; i < p.length; i++) {\n // // '' and other invalid str => NaN\n // var val = parseFloat(p[i]);\n // !isNaN(val) && (p[pLen++] = val);\n // }\n\n var p = cmdText.match(numberReg) || [];\n var pLen = p.length;\n for (var i = 0; i < pLen; i++) {\n p[i] = parseFloat(p[i]);\n }\n\n var off = 0;\n while (off < pLen) {\n var ctlPtx;\n var ctlPty;\n\n var rx;\n var ry;\n var psi;\n var fa;\n var fs;\n\n var x1 = cpx;\n var y1 = cpy;\n\n // convert l, H, h, V, and v to L\n switch (cmdStr) {\n case 'l':\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n case 'L':\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n case 'm':\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.M;\n path.addData(cmd, cpx, cpy);\n subpathX = cpx;\n subpathY = cpy;\n cmdStr = 'l';\n break;\n case 'M':\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.M;\n path.addData(cmd, cpx, cpy);\n subpathX = cpx;\n subpathY = cpy;\n cmdStr = 'L';\n break;\n case 'h':\n cpx += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n case 'H':\n cpx = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n case 'v':\n cpy += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n case 'V':\n cpy = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n case 'C':\n cmd = CMD.C;\n path.addData(\n cmd, p[off++], p[off++], p[off++], p[off++], p[off++], p[off++]\n );\n cpx = p[off - 2];\n cpy = p[off - 1];\n break;\n case 'c':\n cmd = CMD.C;\n path.addData(\n cmd,\n p[off++] + cpx, p[off++] + cpy,\n p[off++] + cpx, p[off++] + cpy,\n p[off++] + cpx, p[off++] + cpy\n );\n cpx += p[off - 2];\n cpy += p[off - 1];\n break;\n case 'S':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n if (prevCmd === CMD.C) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n cmd = CMD.C;\n x1 = p[off++];\n y1 = p[off++];\n cpx = p[off++];\n cpy = p[off++];\n path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy);\n break;\n case 's':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n if (prevCmd === CMD.C) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n cmd = CMD.C;\n x1 = cpx + p[off++];\n y1 = cpy + p[off++];\n cpx += p[off++];\n cpy += p[off++];\n path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy);\n break;\n case 'Q':\n x1 = p[off++];\n y1 = p[off++];\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.Q;\n path.addData(cmd, x1, y1, cpx, cpy);\n break;\n case 'q':\n x1 = p[off++] + cpx;\n y1 = p[off++] + cpy;\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.Q;\n path.addData(cmd, x1, y1, cpx, cpy);\n break;\n case 'T':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n if (prevCmd === CMD.Q) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.Q;\n path.addData(cmd, ctlPtx, ctlPty, cpx, cpy);\n break;\n case 't':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n if (prevCmd === CMD.Q) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.Q;\n path.addData(cmd, ctlPtx, ctlPty, cpx, cpy);\n break;\n case 'A':\n rx = p[off++];\n ry = p[off++];\n psi = p[off++];\n fa = p[off++];\n fs = p[off++];\n\n x1 = cpx, y1 = cpy;\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.A;\n processArc(\n x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path\n );\n break;\n case 'a':\n rx = p[off++];\n ry = p[off++];\n psi = p[off++];\n fa = p[off++];\n fs = p[off++];\n\n x1 = cpx, y1 = cpy;\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.A;\n processArc(\n x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path\n );\n break;\n }\n }\n\n if (cmdStr === 'z' || cmdStr === 'Z') {\n cmd = CMD.Z;\n path.addData(cmd);\n // z may be in the middle of the path.\n cpx = subpathX;\n cpy = subpathY;\n }\n\n prevCmd = cmd;\n }\n\n path.toStatic();\n\n return path;\n}\n\n// TODO Optimize double memory cost problem\nfunction createPathOptions(str, opts) {\n var pathProxy = createPathProxyFromString(str);\n opts = opts || {};\n opts.buildPath = function (path) {\n if (path.setData) {\n path.setData(pathProxy.data);\n // Svg and vml renderer don't have context\n var ctx = path.getContext();\n if (ctx) {\n path.rebuildPath(ctx);\n }\n }\n else {\n var ctx = path;\n pathProxy.rebuildPath(ctx);\n }\n };\n\n opts.applyTransform = function (m) {\n transformPath(pathProxy, m);\n this.dirty(true);\n };\n\n return opts;\n}\n\n/**\n * Create a Path object from path string data\n * http://www.w3.org/TR/SVG/paths.html#PathData\n * @param {Object} opts Other options\n */\nexport function createFromString(str, opts) {\n return new Path(createPathOptions(str, opts));\n}\n\n/**\n * Create a Path class from path string data\n * @param {string} str\n * @param {Object} opts Other options\n */\nexport function extendFromString(str, opts) {\n return Path.extend(createPathOptions(str, opts));\n}\n\n/**\n * Merge multiple paths\n */\n// TODO Apply transform\n// TODO stroke dash\n// TODO Optimize double memory cost problem\nexport function mergePath(pathEls, opts) {\n var pathList = [];\n var len = pathEls.length;\n for (var i = 0; i < len; i++) {\n var pathEl = pathEls[i];\n if (!pathEl.path) {\n pathEl.createPathProxy();\n }\n if (pathEl.__dirtyPath) {\n pathEl.buildPath(pathEl.path, pathEl.shape, true);\n }\n pathList.push(pathEl.path);\n }\n\n var pathBundle = new Path(opts);\n // Need path proxy.\n pathBundle.createPathProxy();\n pathBundle.buildPath = function (path) {\n path.appendPath(pathList);\n // Svg and vml renderer don't have context\n var ctx = path.getContext();\n if (ctx) {\n path.rebuildPath(ctx);\n }\n };\n\n return pathBundle;\n}","import Displayable from './Displayable';\nimport * as zrUtil from '../core/util';\nimport * as textContain from '../contain/text';\nimport * as textHelper from './helper/text';\nimport {ContextCachedBy} from './constant';\n\n/**\n * @alias zrender/graphic/Text\n * @extends module:zrender/graphic/Displayable\n * @constructor\n * @param {Object} opts\n */\nvar Text = function (opts) { // jshint ignore:line\n Displayable.call(this, opts);\n};\n\nText.prototype = {\n\n constructor: Text,\n\n type: 'text',\n\n brush: function (ctx, prevEl) {\n var style = this.style;\n\n // Optimize, avoid normalize every time.\n this.__dirty && textHelper.normalizeTextStyle(style, true);\n\n // Use props with prefix 'text'.\n style.fill = style.stroke = style.shadowBlur = style.shadowColor =\n style.shadowOffsetX = style.shadowOffsetY = null;\n\n var text = style.text;\n // Convert to string\n text != null && (text += '');\n\n // Do not apply style.bind in Text node. Because the real bind job\n // is in textHelper.renderText, and performance of text render should\n // be considered.\n // style.bind(ctx, this, prevEl);\n\n if (!textHelper.needDrawText(text, style)) {\n // The current el.style is not applied\n // and should not be used as cache.\n ctx.__attrCachedBy = ContextCachedBy.NONE;\n return;\n }\n\n this.setTransform(ctx);\n\n textHelper.renderText(this, ctx, text, style, null, prevEl);\n\n this.restoreTransform(ctx);\n },\n\n getBoundingRect: function () {\n var style = this.style;\n\n // Optimize, avoid normalize every time.\n this.__dirty && textHelper.normalizeTextStyle(style, true);\n\n if (!this._rect) {\n var text = style.text;\n text != null ? (text += '') : (text = '');\n\n var rect = textContain.getBoundingRect(\n style.text + '',\n style.font,\n style.textAlign,\n style.textVerticalAlign,\n style.textPadding,\n style.textLineHeight,\n style.rich\n );\n\n rect.x += style.x || 0;\n rect.y += style.y || 0;\n\n if (textHelper.getStroke(style.textStroke, style.textStrokeWidth)) {\n var w = style.textStrokeWidth;\n rect.x -= w / 2;\n rect.y -= w / 2;\n rect.width += w;\n rect.height += w;\n }\n\n this._rect = rect;\n }\n\n return this._rect;\n }\n};\n\nzrUtil.inherits(Text, Displayable);\n\nexport default Text;","/**\n * 圆形\n * @module zrender/shape/Circle\n */\n\nimport Path from '../Path';\n\nexport default Path.extend({\n\n type: 'circle',\n\n shape: {\n cx: 0,\n cy: 0,\n r: 0\n },\n\n\n buildPath: function (ctx, shape, inBundle) {\n // Better stroking in ShapeBundle\n // Always do it may have performence issue ( fill may be 2x more cost)\n if (inBundle) {\n ctx.moveTo(shape.cx + shape.r, shape.cy);\n }\n // else {\n // if (ctx.allocate && !ctx.data.length) {\n // ctx.allocate(ctx.CMD_MEM_SIZE.A);\n // }\n // }\n // Better stroking in ShapeBundle\n // ctx.moveTo(shape.cx + shape.r, shape.cy);\n ctx.arc(shape.cx, shape.cy, shape.r, 0, Math.PI * 2, true);\n }\n});","import env from '../../core/env';\n\n// Fix weird bug in some version of IE11 (like 11.0.9600.178**),\n// where exception \"unexpected call to method or property access\"\n// might be thrown when calling ctx.fill or ctx.stroke after a path\n// whose area size is zero is drawn and ctx.clip() is called and\n// shadowBlur is set. See #4572, #3112, #5777.\n// (e.g.,\n// ctx.moveTo(10, 10);\n// ctx.lineTo(20, 10);\n// ctx.closePath();\n// ctx.clip();\n// ctx.shadowBlur = 10;\n// ...\n// ctx.fill();\n// )\n\nvar shadowTemp = [\n ['shadowBlur', 0],\n ['shadowColor', '#000'],\n ['shadowOffsetX', 0],\n ['shadowOffsetY', 0]\n];\n\nexport default function (orignalBrush) {\n\n // version string can be: '11.0'\n return (env.browser.ie && env.browser.version >= 11)\n\n ? function () {\n var clipPaths = this.__clipPaths;\n var style = this.style;\n var modified;\n\n if (clipPaths) {\n for (var i = 0; i < clipPaths.length; i++) {\n var clipPath = clipPaths[i];\n var shape = clipPath && clipPath.shape;\n var type = clipPath && clipPath.type;\n\n if (shape && (\n (type === 'sector' && shape.startAngle === shape.endAngle)\n || (type === 'rect' && (!shape.width || !shape.height))\n )) {\n for (var j = 0; j < shadowTemp.length; j++) {\n // It is save to put shadowTemp static, because shadowTemp\n // will be all modified each item brush called.\n shadowTemp[j][2] = style[shadowTemp[j][0]];\n style[shadowTemp[j][0]] = shadowTemp[j][1];\n }\n modified = true;\n break;\n }\n }\n }\n\n orignalBrush.apply(this, arguments);\n\n if (modified) {\n for (var j = 0; j < shadowTemp.length; j++) {\n style[shadowTemp[j][0]] = shadowTemp[j][2];\n }\n }\n }\n\n : orignalBrush;\n}\n","/**\n * 扇形\n * @module zrender/graphic/shape/Sector\n */\n\nimport Path from '../Path';\nimport fixClipWithShadow from '../helper/fixClipWithShadow';\n\nexport default Path.extend({\n\n type: 'sector',\n\n shape: {\n\n cx: 0,\n\n cy: 0,\n\n r0: 0,\n\n r: 0,\n\n startAngle: 0,\n\n endAngle: Math.PI * 2,\n\n clockwise: true\n },\n\n brush: fixClipWithShadow(Path.prototype.brush),\n\n buildPath: function (ctx, shape) {\n\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 startAngle = shape.startAngle;\n var endAngle = shape.endAngle;\n var clockwise = shape.clockwise;\n\n var unitX = Math.cos(startAngle);\n var unitY = Math.sin(startAngle);\n\n ctx.moveTo(unitX * r0 + x, unitY * r0 + y);\n\n ctx.lineTo(unitX * r + x, unitY * r + y);\n\n ctx.arc(x, y, r, startAngle, endAngle, !clockwise);\n\n ctx.lineTo(\n Math.cos(endAngle) * r0 + x,\n Math.sin(endAngle) * r0 + y\n );\n\n if (r0 !== 0) {\n ctx.arc(x, y, r0, endAngle, startAngle, clockwise);\n }\n\n ctx.closePath();\n }\n});","/**\n * 圆环\n * @module zrender/graphic/shape/Ring\n */\n\nimport Path from '../Path';\n\nexport default Path.extend({\n\n type: 'ring',\n\n shape: {\n cx: 0,\n cy: 0,\n r: 0,\n r0: 0\n },\n\n buildPath: function (ctx, shape) {\n var x = shape.cx;\n var y = shape.cy;\n var PI2 = Math.PI * 2;\n ctx.moveTo(x + shape.r, y);\n ctx.arc(x, y, shape.r, 0, PI2, false);\n ctx.moveTo(x + shape.r0, y);\n ctx.arc(x, y, shape.r0, 0, PI2, true);\n }\n});","/**\n * Catmull-Rom spline 插值折线\n * @module zrender/shape/util/smoothSpline\n * @author pissang (https://www.github.com/pissang)\n * Kener (@Kener-林峰, kener.linfeng@gmail.com)\n * errorrik (errorrik@gmail.com)\n */\n\nimport {distance as v2Distance} from '../../core/vector';\n\n/**\n * @inner\n */\nfunction interpolate(p0, p1, p2, p3, t, t2, t3) {\n var v0 = (p2 - p0) * 0.5;\n var v1 = (p3 - p1) * 0.5;\n return (2 * (p1 - p2) + v0 + v1) * t3\n + (-3 * (p1 - p2) - 2 * v0 - v1) * t2\n + v0 * t + p1;\n}\n\n/**\n * @alias module:zrender/shape/util/smoothSpline\n * @param {Array} points 线段顶点数组\n * @param {boolean} isLoop\n * @return {Array}\n */\nexport default function (points, isLoop) {\n var len = points.length;\n var ret = [];\n\n var distance = 0;\n for (var i = 1; i < len; i++) {\n distance += v2Distance(points[i - 1], points[i]);\n }\n\n var segs = distance / 2;\n segs = segs < len ? len : segs;\n for (var i = 0; i < segs; i++) {\n var pos = i / (segs - 1) * (isLoop ? len : len - 1);\n var idx = Math.floor(pos);\n\n var w = pos - idx;\n\n var p0;\n var p1 = points[idx % len];\n var p2;\n var p3;\n if (!isLoop) {\n p0 = points[idx === 0 ? idx : idx - 1];\n p2 = points[idx > len - 2 ? len - 1 : idx + 1];\n p3 = points[idx > len - 3 ? len - 1 : idx + 2];\n }\n else {\n p0 = points[(idx - 1 + len) % len];\n p2 = points[(idx + 1) % len];\n p3 = points[(idx + 2) % len];\n }\n\n var w2 = w * w;\n var w3 = w * w2;\n\n ret.push([\n interpolate(p0[0], p1[0], p2[0], p3[0], w, w2, w3),\n interpolate(p0[1], p1[1], p2[1], p3[1], w, w2, w3)\n ]);\n }\n return ret;\n}","/**\n * 贝塞尔平滑曲线\n * @module zrender/shape/util/smoothBezier\n * @author pissang (https://www.github.com/pissang)\n * Kener (@Kener-林峰, kener.linfeng@gmail.com)\n * errorrik (errorrik@gmail.com)\n */\n\nimport {\n min as v2Min,\n max as v2Max,\n scale as v2Scale,\n distance as v2Distance,\n add as v2Add,\n clone as v2Clone,\n sub as v2Sub\n} from '../../core/vector';\n\n/**\n * 贝塞尔平滑曲线\n * @alias module:zrender/shape/util/smoothBezier\n * @param {Array} points 线段顶点数组\n * @param {number} smooth 平滑等级, 0-1\n * @param {boolean} isLoop\n * @param {Array} constraint 将计算出来的控制点约束在一个包围盒内\n * 比如 [[0, 0], [100, 100]], 这个包围盒会与\n * 整个折线的包围盒做一个并集用来约束控制点。\n * @param {Array} 计算出来的控制点数组\n */\nexport default function (points, smooth, isLoop, constraint) {\n var cps = [];\n\n var v = [];\n var v1 = [];\n var v2 = [];\n var prevPoint;\n var nextPoint;\n\n var min;\n var max;\n if (constraint) {\n min = [Infinity, Infinity];\n max = [-Infinity, -Infinity];\n for (var i = 0, len = points.length; i < len; i++) {\n v2Min(min, min, points[i]);\n v2Max(max, max, points[i]);\n }\n // 与指定的包围盒做并集\n v2Min(min, min, constraint[0]);\n v2Max(max, max, constraint[1]);\n }\n\n for (var i = 0, len = points.length; i < len; i++) {\n var point = points[i];\n\n if (isLoop) {\n prevPoint = points[i ? i - 1 : len - 1];\n nextPoint = points[(i + 1) % len];\n }\n else {\n if (i === 0 || i === len - 1) {\n cps.push(v2Clone(points[i]));\n continue;\n }\n else {\n prevPoint = points[i - 1];\n nextPoint = points[i + 1];\n }\n }\n\n v2Sub(v, nextPoint, prevPoint);\n\n // use degree to scale the handle length\n v2Scale(v, v, smooth);\n\n var d0 = v2Distance(point, prevPoint);\n var d1 = v2Distance(point, nextPoint);\n var sum = d0 + d1;\n if (sum !== 0) {\n d0 /= sum;\n d1 /= sum;\n }\n\n v2Scale(v1, v, -d0);\n v2Scale(v2, v, d1);\n var cp0 = v2Add([], point, v1);\n var cp1 = v2Add([], point, v2);\n if (constraint) {\n v2Max(cp0, cp0, min);\n v2Min(cp0, cp0, max);\n v2Max(cp1, cp1, min);\n v2Min(cp1, cp1, max);\n }\n cps.push(cp0);\n cps.push(cp1);\n }\n\n if (isLoop) {\n cps.push(cps.shift());\n }\n\n return cps;\n}","\nimport smoothSpline from './smoothSpline';\nimport smoothBezier from './smoothBezier';\n\nexport function buildPath(ctx, shape, closePath) {\n var points = shape.points;\n var smooth = shape.smooth;\n if (points && points.length >= 2) {\n if (smooth && smooth !== 'spline') {\n var controlPoints = smoothBezier(\n points, smooth, closePath, shape.smoothConstraint\n );\n\n ctx.moveTo(points[0][0], points[0][1]);\n var len = points.length;\n for (var i = 0; i < (closePath ? len : len - 1); i++) {\n var cp1 = controlPoints[i * 2];\n var cp2 = controlPoints[i * 2 + 1];\n var p = points[(i + 1) % len];\n ctx.bezierCurveTo(\n cp1[0], cp1[1], cp2[0], cp2[1], p[0], p[1]\n );\n }\n }\n else {\n if (smooth === 'spline') {\n points = smoothSpline(points, closePath);\n }\n\n ctx.moveTo(points[0][0], points[0][1]);\n for (var i = 1, l = points.length; i < l; i++) {\n ctx.lineTo(points[i][0], points[i][1]);\n }\n }\n\n closePath && ctx.closePath();\n }\n}\n","/**\n * 多边形\n * @module zrender/shape/Polygon\n */\n\nimport Path from '../Path';\nimport * as polyHelper from '../helper/poly';\n\nexport default Path.extend({\n\n type: 'polygon',\n\n shape: {\n points: null,\n\n smooth: false,\n\n smoothConstraint: null\n },\n\n buildPath: function (ctx, shape) {\n polyHelper.buildPath(ctx, shape, true);\n }\n});","/**\n * @module zrender/graphic/shape/Polyline\n */\n\nimport Path from '../Path';\nimport * as polyHelper from '../helper/poly';\n\nexport default Path.extend({\n\n type: 'polyline',\n\n shape: {\n points: null,\n\n smooth: false,\n\n smoothConstraint: null\n },\n\n style: {\n stroke: '#000',\n\n fill: null\n },\n\n buildPath: function (ctx, shape) {\n polyHelper.buildPath(ctx, shape, false);\n }\n});","/**\n * Sub-pixel optimize for canvas rendering, prevent from blur\n * when rendering a thin vertical/horizontal line.\n */\n\nvar round = Math.round;\n\n/**\n * Sub pixel optimize line for canvas\n *\n * @param {Object} outputShape The modification will be performed on `outputShape`.\n * `outputShape` and `inputShape` can be the same object.\n * `outputShape` object can be used repeatly, because all of\n * the `x1`, `x2`, `y1`, `y2` will be assigned in this method.\n * @param {Object} [inputShape]\n * @param {number} [inputShape.x1]\n * @param {number} [inputShape.y1]\n * @param {number} [inputShape.x2]\n * @param {number} [inputShape.y2]\n * @param {Object} [style]\n * @param {number} [style.lineWidth] If `null`/`undefined`/`0`, do not optimize.\n */\nexport function subPixelOptimizeLine(outputShape, inputShape, style) {\n if (!inputShape) {\n return;\n }\n\n var x1 = inputShape.x1;\n var x2 = inputShape.x2;\n var y1 = inputShape.y1;\n var y2 = inputShape.y2;\n\n outputShape.x1 = x1;\n outputShape.x2 = x2;\n outputShape.y1 = y1;\n outputShape.y2 = y2;\n\n var lineWidth = style && style.lineWidth;\n if (!lineWidth) {\n return;\n }\n\n if (round(x1 * 2) === round(x2 * 2)) {\n outputShape.x1 = outputShape.x2 = subPixelOptimize(x1, lineWidth, true);\n }\n if (round(y1 * 2) === round(y2 * 2)) {\n outputShape.y1 = outputShape.y2 = subPixelOptimize(y1, lineWidth, true);\n }\n}\n\n/**\n * Sub pixel optimize rect for canvas\n *\n * @param {Object} outputShape The modification will be performed on `outputShape`.\n * `outputShape` and `inputShape` can be the same object.\n * `outputShape` object can be used repeatly, because all of\n * the `x`, `y`, `width`, `height` will be assigned in this method.\n * @param {Object} [inputShape]\n * @param {number} [inputShape.x]\n * @param {number} [inputShape.y]\n * @param {number} [inputShape.width]\n * @param {number} [inputShape.height]\n * @param {Object} [style]\n * @param {number} [style.lineWidth] If `null`/`undefined`/`0`, do not optimize.\n */\nexport function subPixelOptimizeRect(outputShape, inputShape, style) {\n if (!inputShape) {\n return;\n }\n\n var originX = inputShape.x;\n var originY = inputShape.y;\n var originWidth = inputShape.width;\n var originHeight = inputShape.height;\n\n outputShape.x = originX;\n outputShape.y = originY;\n outputShape.width = originWidth;\n outputShape.height = originHeight;\n\n var lineWidth = style && style.lineWidth;\n if (!lineWidth) {\n return;\n }\n\n outputShape.x = subPixelOptimize(originX, lineWidth, true);\n outputShape.y = subPixelOptimize(originY, lineWidth, true);\n outputShape.width = Math.max(\n subPixelOptimize(originX + originWidth, lineWidth, false) - outputShape.x,\n originWidth === 0 ? 0 : 1\n );\n outputShape.height = Math.max(\n subPixelOptimize(originY + originHeight, lineWidth, false) - outputShape.y,\n originHeight === 0 ? 0 : 1\n );\n}\n\n/**\n * Sub pixel optimize for canvas\n *\n * @param {number} position Coordinate, such as x, y\n * @param {number} lineWidth If `null`/`undefined`/`0`, do not optimize.\n * @param {boolean=} positiveOrNegative Default false (negative).\n * @return {number} Optimized position.\n */\nexport function subPixelOptimize(position, lineWidth, positiveOrNegative) {\n if (!lineWidth) {\n return position;\n }\n // Assure that (position + lineWidth / 2) is near integer edge,\n // otherwise line will be fuzzy in canvas.\n var doubledPosition = round(position * 2);\n return (doubledPosition + round(lineWidth)) % 2 === 0\n ? doubledPosition / 2\n : (doubledPosition + (positiveOrNegative ? 1 : -1)) / 2;\n}\n","/**\n * 矩形\n * @module zrender/graphic/shape/Rect\n */\n\nimport Path from '../Path';\nimport * as roundRectHelper from '../helper/roundRect';\nimport {subPixelOptimizeRect} from '../helper/subPixelOptimize';\n\n// Avoid create repeatly.\nvar subPixelOptimizeOutputShape = {};\n\nexport default Path.extend({\n\n type: 'rect',\n\n shape: {\n // 左上、右上、右下、左下角的半径依次为r1、r2、r3、r4\n // r缩写为1 相当于 [1, 1, 1, 1]\n // r缩写为[1] 相当于 [1, 1, 1, 1]\n // r缩写为[1, 2] 相当于 [1, 2, 1, 2]\n // r缩写为[1, 2, 3] 相当于 [1, 2, 3, 2]\n r: 0,\n\n x: 0,\n y: 0,\n width: 0,\n height: 0\n },\n\n buildPath: function (ctx, shape) {\n var x;\n var y;\n var width;\n var height;\n\n if (this.subPixelOptimize) {\n subPixelOptimizeRect(subPixelOptimizeOutputShape, shape, this.style);\n x = subPixelOptimizeOutputShape.x;\n y = subPixelOptimizeOutputShape.y;\n width = subPixelOptimizeOutputShape.width;\n height = subPixelOptimizeOutputShape.height;\n subPixelOptimizeOutputShape.r = shape.r;\n shape = subPixelOptimizeOutputShape;\n }\n else {\n x = shape.x;\n y = shape.y;\n width = shape.width;\n height = shape.height;\n }\n\n if (!shape.r) {\n ctx.rect(x, y, width, height);\n }\n else {\n roundRectHelper.buildPath(ctx, shape);\n }\n ctx.closePath();\n return;\n }\n});","/**\n * 直线\n * @module zrender/graphic/shape/Line\n */\n\nimport Path from '../Path';\nimport {subPixelOptimizeLine} from '../helper/subPixelOptimize';\n\n// Avoid create repeatly.\nvar subPixelOptimizeOutputShape = {};\n\nexport default Path.extend({\n\n type: 'line',\n\n shape: {\n // Start point\n x1: 0,\n y1: 0,\n // End point\n x2: 0,\n y2: 0,\n\n percent: 1\n },\n\n style: {\n stroke: '#000',\n fill: null\n },\n\n buildPath: function (ctx, shape) {\n var x1;\n var y1;\n var x2;\n var y2;\n\n if (this.subPixelOptimize) {\n subPixelOptimizeLine(subPixelOptimizeOutputShape, shape, this.style);\n x1 = subPixelOptimizeOutputShape.x1;\n y1 = subPixelOptimizeOutputShape.y1;\n x2 = subPixelOptimizeOutputShape.x2;\n y2 = subPixelOptimizeOutputShape.y2;\n }\n else {\n x1 = shape.x1;\n y1 = shape.y1;\n x2 = shape.x2;\n y2 = shape.y2;\n }\n\n var percent = shape.percent;\n\n if (percent === 0) {\n return;\n }\n\n ctx.moveTo(x1, y1);\n\n if (percent < 1) {\n x2 = x1 * (1 - percent) + x2 * percent;\n y2 = y1 * (1 - percent) + y2 * percent;\n }\n ctx.lineTo(x2, y2);\n },\n\n /**\n * Get point at percent\n * @param {number} percent\n * @return {Array.<number>}\n */\n pointAt: function (p) {\n var shape = this.shape;\n return [\n shape.x1 * (1 - p) + shape.x2 * p,\n shape.y1 * (1 - p) + shape.y2 * p\n ];\n }\n});","/**\n * 贝塞尔曲线\n * @module zrender/shape/BezierCurve\n */\n\nimport Path from '../Path';\nimport * as vec2 from '../../core/vector';\nimport {\n quadraticSubdivide,\n cubicSubdivide,\n quadraticAt,\n cubicAt,\n quadraticDerivativeAt,\n cubicDerivativeAt\n} from '../../core/curve';\n\nvar out = [];\n\nfunction someVectorAt(shape, t, isTangent) {\n var cpx2 = shape.cpx2;\n var cpy2 = shape.cpy2;\n if (cpx2 === null || cpy2 === null) {\n return [\n (isTangent ? cubicDerivativeAt : cubicAt)(shape.x1, shape.cpx1, shape.cpx2, shape.x2, t),\n (isTangent ? cubicDerivativeAt : cubicAt)(shape.y1, shape.cpy1, shape.cpy2, shape.y2, t)\n ];\n }\n else {\n return [\n (isTangent ? quadraticDerivativeAt : quadraticAt)(shape.x1, shape.cpx1, shape.x2, t),\n (isTangent ? quadraticDerivativeAt : quadraticAt)(shape.y1, shape.cpy1, shape.y2, t)\n ];\n }\n}\n\nexport default Path.extend({\n\n type: 'bezier-curve',\n\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\n // Curve show percent, for animating\n percent: 1\n },\n\n style: {\n stroke: '#000',\n fill: null\n },\n\n buildPath: function (ctx, shape) {\n var x1 = shape.x1;\n var y1 = shape.y1;\n var x2 = shape.x2;\n var y2 = shape.y2;\n var cpx1 = shape.cpx1;\n var cpy1 = shape.cpy1;\n var cpx2 = shape.cpx2;\n var cpy2 = shape.cpy2;\n var percent = shape.percent;\n if (percent === 0) {\n return;\n }\n\n ctx.moveTo(x1, y1);\n\n if (cpx2 == null || cpy2 == null) {\n if (percent < 1) {\n quadraticSubdivide(\n x1, cpx1, x2, percent, out\n );\n cpx1 = out[1];\n x2 = out[2];\n quadraticSubdivide(\n y1, cpy1, y2, percent, out\n );\n cpy1 = out[1];\n y2 = out[2];\n }\n\n ctx.quadraticCurveTo(\n cpx1, cpy1,\n x2, y2\n );\n }\n else {\n if (percent < 1) {\n cubicSubdivide(\n x1, cpx1, cpx2, x2, percent, out\n );\n cpx1 = out[1];\n cpx2 = out[2];\n x2 = out[3];\n cubicSubdivide(\n y1, cpy1, cpy2, y2, percent, out\n );\n cpy1 = out[1];\n cpy2 = out[2];\n y2 = out[3];\n }\n ctx.bezierCurveTo(\n cpx1, cpy1,\n cpx2, cpy2,\n x2, y2\n );\n }\n },\n\n /**\n * Get point at percent\n * @param {number} t\n * @return {Array.<number>}\n */\n pointAt: function (t) {\n return someVectorAt(this.shape, t, false);\n },\n\n /**\n * Get tangent at percent\n * @param {number} t\n * @return {Array.<number>}\n */\n tangentAt: function (t) {\n var p = someVectorAt(this.shape, t, true);\n return vec2.normalize(p, p);\n }\n});","/**\n * 圆弧\n * @module zrender/graphic/shape/Arc\n */\n\nimport Path from '../Path';\n\nexport default Path.extend({\n\n type: 'arc',\n\n shape: {\n\n cx: 0,\n\n cy: 0,\n\n r: 0,\n\n startAngle: 0,\n\n endAngle: Math.PI * 2,\n\n clockwise: true\n },\n\n style: {\n\n stroke: '#000',\n\n fill: null\n },\n\n buildPath: function (ctx, shape) {\n\n var x = shape.cx;\n var y = shape.cy;\n var r = Math.max(shape.r, 0);\n var startAngle = shape.startAngle;\n var endAngle = shape.endAngle;\n var clockwise = shape.clockwise;\n\n var unitX = Math.cos(startAngle);\n var unitY = Math.sin(startAngle);\n\n ctx.moveTo(unitX * r + x, unitY * r + y);\n ctx.arc(x, y, r, startAngle, endAngle, !clockwise);\n }\n});","// CompoundPath to improve performance\n\nimport Path from './Path';\n\nexport default Path.extend({\n\n type: 'compound',\n\n shape: {\n\n paths: null\n },\n\n _updatePathDirty: function () {\n var dirtyPath = this.__dirtyPath;\n var paths = this.shape.paths;\n for (var i = 0; i < paths.length; i++) {\n // Mark as dirty if any subpath is dirty\n dirtyPath = dirtyPath || paths[i].__dirtyPath;\n }\n this.__dirtyPath = dirtyPath;\n this.__dirty = this.__dirty || dirtyPath;\n },\n\n beforeBrush: function () {\n this._updatePathDirty();\n var paths = this.shape.paths || [];\n var scale = this.getGlobalScale();\n // Update path scale\n for (var i = 0; i < paths.length; i++) {\n if (!paths[i].path) {\n paths[i].createPathProxy();\n }\n paths[i].path.setScale(scale[0], scale[1], paths[i].segmentIgnoreThreshold);\n }\n },\n\n buildPath: function (ctx, shape) {\n var paths = shape.paths || [];\n for (var i = 0; i < paths.length; i++) {\n paths[i].buildPath(ctx, paths[i].shape, true);\n }\n },\n\n afterBrush: function () {\n var paths = this.shape.paths || [];\n for (var i = 0; i < paths.length; i++) {\n paths[i].__dirtyPath = false;\n }\n },\n\n getBoundingRect: function () {\n this._updatePathDirty();\n return Path.prototype.getBoundingRect.call(this);\n }\n});","\n/**\n * @param {Array.<Object>} colorStops\n */\nvar Gradient = function (colorStops) {\n\n this.colorStops = colorStops || [];\n\n};\n\nGradient.prototype = {\n\n constructor: Gradient,\n\n addColorStop: function (offset, color) {\n this.colorStops.push({\n\n offset: offset,\n\n color: color\n });\n }\n\n};\n\nexport default Gradient;","import * as zrUtil from '../core/util';\nimport Gradient from './Gradient';\n\n/**\n * x, y, x2, y2 are all percent from 0 to 1\n * @param {number} [x=0]\n * @param {number} [y=0]\n * @param {number} [x2=1]\n * @param {number} [y2=0]\n * @param {Array.<Object>} colorStops\n * @param {boolean} [globalCoord=false]\n */\nvar LinearGradient = function (x, y, x2, y2, colorStops, globalCoord) {\n // Should do nothing more in this constructor. Because gradient can be\n // declard by `color: {type: 'linear', colorStops: ...}`, where\n // this constructor will not be called.\n\n this.x = x == null ? 0 : x;\n\n this.y = y == null ? 0 : y;\n\n this.x2 = x2 == null ? 1 : x2;\n\n this.y2 = y2 == null ? 0 : y2;\n\n // Can be cloned\n this.type = 'linear';\n\n // If use global coord\n this.global = globalCoord || false;\n\n Gradient.call(this, colorStops);\n};\n\nLinearGradient.prototype = {\n\n constructor: LinearGradient\n};\n\nzrUtil.inherits(LinearGradient, Gradient);\n\nexport default LinearGradient;","import * as zrUtil from '../core/util';\nimport Gradient from './Gradient';\n\n/**\n * x, y, r are all percent from 0 to 1\n * @param {number} [x=0.5]\n * @param {number} [y=0.5]\n * @param {number} [r=0.5]\n * @param {Array.<Object>} [colorStops]\n * @param {boolean} [globalCoord=false]\n */\nvar RadialGradient = function (x, y, r, colorStops, globalCoord) {\n // Should do nothing more in this constructor. Because gradient can be\n // declard by `color: {type: 'radial', colorStops: ...}`, where\n // this constructor will not be called.\n\n this.x = x == null ? 0.5 : x;\n\n this.y = y == null ? 0.5 : y;\n\n this.r = r == null ? 0.5 : r;\n\n // Can be cloned\n this.type = 'radial';\n\n // If use global coord\n this.global = globalCoord || false;\n\n Gradient.call(this, colorStops);\n};\n\nRadialGradient.prototype = {\n\n constructor: RadialGradient\n};\n\nzrUtil.inherits(RadialGradient, Gradient);\n\nexport default RadialGradient;","/**\n * Displayable for incremental rendering. It will be rendered in a separate layer\n * IncrementalDisplay have two main methods. `clearDisplayables` and `addDisplayables`\n * addDisplayables will render the added displayables incremetally.\n *\n * It use a not clearFlag to tell the painter don't clear the layer if it's the first element.\n */\nimport { inherits } from '../core/util';\nimport Displayble from './Displayable';\nimport BoundingRect from '../core/BoundingRect';\n\n// TODO Style override ?\nfunction IncrementalDisplayble(opts) {\n\n Displayble.call(this, opts);\n\n this._displayables = [];\n\n this._temporaryDisplayables = [];\n\n this._cursor = 0;\n\n this.notClear = true;\n}\n\nIncrementalDisplayble.prototype.incremental = true;\n\nIncrementalDisplayble.prototype.clearDisplaybles = function () {\n this._displayables = [];\n this._temporaryDisplayables = [];\n this._cursor = 0;\n this.dirty();\n\n this.notClear = false;\n};\n\nIncrementalDisplayble.prototype.addDisplayable = function (displayable, notPersistent) {\n if (notPersistent) {\n this._temporaryDisplayables.push(displayable);\n }\n else {\n this._displayables.push(displayable);\n }\n this.dirty();\n};\n\nIncrementalDisplayble.prototype.addDisplayables = function (displayables, notPersistent) {\n notPersistent = notPersistent || false;\n for (var i = 0; i < displayables.length; i++) {\n this.addDisplayable(displayables[i], notPersistent);\n }\n};\n\nIncrementalDisplayble.prototype.eachPendingDisplayable = function (cb) {\n for (var i = this._cursor; i < this._displayables.length; i++) {\n cb && cb(this._displayables[i]);\n }\n for (var i = 0; i < this._temporaryDisplayables.length; i++) {\n cb && cb(this._temporaryDisplayables[i]);\n }\n};\n\nIncrementalDisplayble.prototype.update = function () {\n this.updateTransform();\n for (var i = this._cursor; i < this._displayables.length; i++) {\n var displayable = this._displayables[i];\n // PENDING\n displayable.parent = this;\n displayable.update();\n displayable.parent = null;\n }\n for (var i = 0; i < this._temporaryDisplayables.length; i++) {\n var displayable = this._temporaryDisplayables[i];\n // PENDING\n displayable.parent = this;\n displayable.update();\n displayable.parent = null;\n }\n};\n\nIncrementalDisplayble.prototype.brush = function (ctx, prevEl) {\n // Render persistant displayables.\n for (var i = this._cursor; i < this._displayables.length; i++) {\n var displayable = this._displayables[i];\n displayable.beforeBrush && displayable.beforeBrush(ctx);\n displayable.brush(ctx, i === this._cursor ? null : this._displayables[i - 1]);\n displayable.afterBrush && displayable.afterBrush(ctx);\n }\n this._cursor = i;\n // Render temporary displayables.\n for (var i = 0; i < this._temporaryDisplayables.length; i++) {\n var displayable = this._temporaryDisplayables[i];\n displayable.beforeBrush && displayable.beforeBrush(ctx);\n displayable.brush(ctx, i === 0 ? null : this._temporaryDisplayables[i - 1]);\n displayable.afterBrush && displayable.afterBrush(ctx);\n }\n\n this._temporaryDisplayables = [];\n\n this.notClear = true;\n};\n\nvar m = [];\nIncrementalDisplayble.prototype.getBoundingRect = function () {\n if (!this._rect) {\n var rect = new BoundingRect(Infinity, Infinity, -Infinity, -Infinity);\n for (var i = 0; i < this._displayables.length; i++) {\n var displayable = this._displayables[i];\n var childRect = displayable.getBoundingRect().clone();\n if (displayable.needLocalTransform()) {\n childRect.applyTransform(displayable.getLocalTransform(m));\n }\n rect.union(childRect);\n }\n this._rect = rect;\n }\n return this._rect;\n};\n\nIncrementalDisplayble.prototype.contain = function (x, y) {\n var localPos = this.transformCoordToLocal(x, y);\n var rect = this.getBoundingRect();\n\n if (rect.contain(localPos[0], localPos[1])) {\n for (var i = 0; i < this._displayables.length; i++) {\n var displayable = this._displayables[i];\n if (displayable.contain(x, y)) {\n return true;\n }\n }\n }\n return false;\n};\n\ninherits(IncrementalDisplayble, Displayble);\n\nexport default IncrementalDisplayble;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as pathTool from 'zrender/src/tool/path';\nimport * as colorTool from 'zrender/src/tool/color';\nimport * as matrix from 'zrender/src/core/matrix';\nimport * as vector from 'zrender/src/core/vector';\nimport Path from 'zrender/src/graphic/Path';\nimport Transformable from 'zrender/src/mixin/Transformable';\nimport ZImage from 'zrender/src/graphic/Image';\nimport Group from 'zrender/src/container/Group';\nimport Text from 'zrender/src/graphic/Text';\nimport Circle from 'zrender/src/graphic/shape/Circle';\nimport Sector from 'zrender/src/graphic/shape/Sector';\nimport Ring from 'zrender/src/graphic/shape/Ring';\nimport Polygon from 'zrender/src/graphic/shape/Polygon';\nimport Polyline from 'zrender/src/graphic/shape/Polyline';\nimport Rect from 'zrender/src/graphic/shape/Rect';\nimport Line from 'zrender/src/graphic/shape/Line';\nimport BezierCurve from 'zrender/src/graphic/shape/BezierCurve';\nimport Arc from 'zrender/src/graphic/shape/Arc';\nimport CompoundPath from 'zrender/src/graphic/CompoundPath';\nimport LinearGradient from 'zrender/src/graphic/LinearGradient';\nimport RadialGradient from 'zrender/src/graphic/RadialGradient';\nimport BoundingRect from 'zrender/src/core/BoundingRect';\nimport IncrementalDisplayable from 'zrender/src/graphic/IncrementalDisplayable';\nimport * as subPixelOptimizeUtil from 'zrender/src/graphic/helper/subPixelOptimize';\n\n\nvar mathMax = Math.max;\nvar mathMin = Math.min;\n\nvar EMPTY_OBJ = {};\n\nexport var Z2_EMPHASIS_LIFT = 1;\n\n// key: label model property nane, value: style property name.\nexport var CACHED_LABEL_STYLE_PROPERTIES = {\n color: 'textFill',\n textBorderColor: 'textStroke',\n textBorderWidth: 'textStrokeWidth'\n};\n\nvar EMPHASIS = 'emphasis';\nvar NORMAL = 'normal';\n\n// Reserve 0 as default.\nvar _highlightNextDigit = 1;\nvar _highlightKeyMap = {};\n\nvar _customShapeMap = {};\n\n\n/**\n * Extend shape with parameters\n */\nexport function extendShape(opts) {\n return Path.extend(opts);\n}\n\n/**\n * Extend path\n */\nexport function extendPath(pathData, opts) {\n return pathTool.extendFromString(pathData, opts);\n}\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 */\nexport function registerShape(name, ShapeClass) {\n _customShapeMap[name] = ShapeClass;\n}\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 */\nexport function getShapeClass(name) {\n if (_customShapeMap.hasOwnProperty(name)) {\n return _customShapeMap[name];\n }\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 */\nexport function makePath(pathData, opts, rect, layout) {\n var path = pathTool.createFromString(pathData, opts);\n if (rect) {\n if (layout === 'center') {\n rect = centerGraphic(rect, path.getBoundingRect());\n }\n resizePath(path, rect);\n }\n return path;\n}\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 */\nexport function 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/**\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 */\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 if (width <= rect.width) {\n height = rect.height;\n }\n else {\n width = rect.width;\n height = width / aspect;\n }\n var cx = rect.x + rect.width / 2;\n var cy = rect.y + rect.height / 2;\n\n return {\n x: cx - width / 2,\n y: cy - height / 2,\n width: width,\n height: height\n };\n}\n\nexport var mergePath = pathTool.mergePath;\n\n/**\n * Resize a path to fit the rect\n * @param {module:zrender/graphic/Path} path\n * @param {Object} rect\n */\nexport function resizePath(path, rect) {\n if (!path.applyTransform) {\n return;\n }\n\n var pathRect = path.getBoundingRect();\n\n var m = pathRect.calculateTransform(rect);\n\n path.applyTransform(m);\n}\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 */\nexport function subPixelOptimizeLine(param) {\n subPixelOptimizeUtil.subPixelOptimizeLine(param.shape, param.shape, param.style);\n return param;\n}\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 */\nexport function subPixelOptimizeRect(param) {\n subPixelOptimizeUtil.subPixelOptimizeRect(param.shape, param.shape, param.style);\n return param;\n}\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 */\nexport var subPixelOptimize = subPixelOptimizeUtil.subPixelOptimize;\n\n\nfunction hasFillOrStroke(fillOrStroke) {\n return fillOrStroke != null && fillOrStroke !== 'none';\n}\n\n// Most lifted color are duplicated.\nvar liftedColorMap = zrUtil.createHashMap();\nvar liftedColorCount = 0;\n\nfunction liftColor(color) {\n if (typeof color !== 'string') {\n return color;\n }\n var liftedColor = liftedColorMap.get(color);\n if (!liftedColor) {\n liftedColor = colorTool.lift(color, -0.1);\n if (liftedColorCount < 10000) {\n liftedColorMap.set(color, liftedColor);\n liftedColorCount++;\n }\n }\n return liftedColor;\n}\n\nfunction cacheElementStl(el) {\n if (!el.__hoverStlDirty) {\n return;\n }\n el.__hoverStlDirty = false;\n\n var hoverStyle = el.__hoverStl;\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 }\n\n // Always cache fill and stroke to normalStyle for lifting color.\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\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 }\n\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 targetStyle.extendFrom(hoverStl);\n\n setDefaultHoverFillStroke(targetStyle, hoverStl, 'fill');\n setDefaultHoverFillStroke(targetStyle, hoverStl, 'stroke');\n\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 }\n else {\n var style = el.style;\n\n var normalStl = el.__cachedNormalStl;\n if (normalStl) {\n rollbackDefaultTextStyle(style);\n el.setStyle(normalStl);\n applyDefaultTextStyle(style);\n }\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 var normalZ2 = el.__cachedNormalZ2;\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;\n // See the rule of `highDownOnUpdate` on `graphic.setAsHighDownDispatcher`.\n el.__highlighted && (fromState = EMPHASIS, trigger = true);\n updater(el, commonParam);\n el.__highlighted && (toState = EMPHASIS, trigger = true);\n\n el.isGroup && el.traverse(function (child) {\n !child.isGroup && updater(child, commonParam);\n });\n\n trigger && el.__highDownOnUpdate && el.__highDownOnUpdate(fromState, toState);\n}\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 */\nexport function 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;\n\n // 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 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;\n // 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 singleEnterNormal(el);\n\n singleEnterEmphasis(el);\n }\n}\n\nfunction onElementMouseOver(e) {\n !shouldSilent(this, e)\n // \"emphasis\" event highlight has higher priority than mouse highlight.\n && !this.__highByOuter\n && traverseUpdate(this, singleEnterEmphasis);\n}\n\nfunction onElementMouseOut(e) {\n !shouldSilent(this, e)\n // \"emphasis\" event highlight has higher priority than mouse highlight.\n && !this.__highByOuter\n && 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)))\n && traverseUpdate(this, singleEnterNormal);\n}\n\nfunction shouldSilent(el, e) {\n return el.__highDownSilentOnTouch && e.zrByTouch;\n}\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 * <A> This method MUST be called after all of the normal styles having been adopted\n * to the `el`.\n * <B> The input `hoverStyle` (that is, \"emphasis style\") MUST be the subset of the\n * \"normal style\" having been set to the el.\n * <C> `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 */\nexport function setHoverStyle(el, hoverStyle) {\n setAsHighDownDispatcher(el, true);\n traverseUpdate(el, setElementHoverStyle, hoverStyle);\n}\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 */\nexport function setAsHighDownDispatcher(el, asDispatcher) {\n var disable = asDispatcher === false;\n // Make `highDownSilentOnTouch` and `highDownOnUpdate` only work after\n // `setAsHighDownDispatcher` called. Avoid it is modified by user unexpectedly.\n el.__highDownSilentOnTouch = el.highDownSilentOnTouch;\n el.__highDownOnUpdate = el.highDownOnUpdate;\n\n // Simple optimize, since this method might be\n // called for each elements of a group in some cases.\n if (!disable || el.__highDownDispatcher) {\n var method = disable ? 'off' : 'on';\n\n // Duplicated function will be auto-ignored, see Eventful.js.\n el[method]('mouseover', onElementMouseOver)[method]('mouseout', onElementMouseOut);\n // Emphasis, normal can be triggered manually by API or other components like hover link.\n el[method]('emphasis', onElementEmphasisEvent)[method]('normal', onElementNormalEvent);\n // Also keep previous record.\n el.__highByOuter = el.__highByOuter || 0;\n\n el.__highDownDispatcher = !disable;\n }\n}\n\n/**\n * @param {module:zrender/src/Element} el\n * @return {boolean}\n */\nexport function isHighDownDispatcher(el) {\n return !!(el && el.__highDownDispatcher);\n}\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 */\nexport function getHighlightDigit(highlightKey) {\n var highlightDigit = _highlightKeyMap[highlightKey];\n if (highlightDigit == null && _highlightNextDigit <= 32) {\n highlightDigit = _highlightKeyMap[highlightKey] = _highlightNextDigit++;\n }\n return highlightDigit;\n}\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 */\nexport function setLabelStyle(\n normalStyle, emphasisStyle,\n normalModel, emphasisModel,\n opt,\n normalSpecified, emphasisSpecified\n) {\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;\n\n // 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');\n\n // 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 var baseText;\n if (showNormal || showEmphasis) {\n if (labelFetcher) {\n baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex, labelProp);\n }\n if (baseText == null) {\n baseText = zrUtil.isFunction(opt.defaultText) ? opt.defaultText(labelDataIndex, opt) : opt.defaultText;\n }\n }\n var normalStyleText = showNormal ? baseText : null;\n var emphasisStyleText = showEmphasis\n ? zrUtil.retrieve2(\n labelFetcher\n ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex, labelProp)\n : null,\n baseText\n )\n : null;\n\n // Optimize: If style.text is null, text will not be drawn.\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/**\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 */\nexport function modifyLabelStyle(el, normalStyleProps, emphasisStyleProps) {\n var elStyle = el.style;\n if (normalStyleProps) {\n rollbackDefaultTextStyle(elStyle);\n el.setStyle(normalStyleProps);\n applyDefaultTextStyle(elStyle);\n }\n elStyle = el.__hoverStl;\n if (emphasisStyleProps && elStyle) {\n rollbackDefaultTextStyle(elStyle);\n zrUtil.extend(elStyle, emphasisStyleProps);\n applyDefaultTextStyle(elStyle);\n }\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 */\nexport function setTextStyle(\n textStyle, textStyleModel, specifiedTextStyle, opt, isEmphasis\n) {\n setTextStyleCommon(textStyle, textStyleModel, opt, isEmphasis);\n specifiedTextStyle && zrUtil.extend(textStyle, specifiedTextStyle);\n // textStyle.host && textStyle.host.dirty && textStyle.host.dirty(false);\n\n return textStyle;\n}\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 */\nexport function setText(textStyle, labelModel, defaultColor) {\n var opt = {isRectText: true};\n var isEmphasis;\n\n if (defaultColor === false) {\n isEmphasis = true;\n }\n else {\n // Support setting color as 'auto' to get visual color.\n opt.autoColor = defaultColor;\n }\n setTextStyleCommon(textStyle, labelModel, opt, isEmphasis);\n // textStyle.host && textStyle.host.dirty && textStyle.host.dirty(false);\n}\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 */\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 if (opt.getTextPosition) {\n textPosition = opt.getTextPosition(textStyleModel, isEmphasis);\n }\n else {\n textPosition = textStyleModel.getShallow('position')\n || (isEmphasis ? null : 'inside');\n // 'outside' is not a valid zr textPostion value, but used\n // in bar series, and magric type should be considered.\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(\n textStyleModel.getShallow('distance'), isEmphasis ? null : 5\n );\n }\n\n var ecModel = textStyleModel.ecModel;\n var globalTextStyle = ecModel && ecModel.option.textStyle;\n\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 var richItemNames = getRichItemNames(textStyleModel);\n var richResult;\n if (richItemNames) {\n richResult = {};\n for (var name in richItemNames) {\n if (richItemNames.hasOwnProperty(name)) {\n // Cascade is supported in rich.\n var richTextStyle = textStyleModel.getModel(['rich', name]);\n // 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 setTokenTextStyle(richResult[name] = {}, richTextStyle, globalTextStyle, opt, isEmphasis);\n }\n }\n }\n textStyle.rich = richResult;\n\n setTokenTextStyle(textStyle, textStyleModel, globalTextStyle, opt, isEmphasis, true);\n\n if (opt.forceRich && !opt.textStyle) {\n opt.textStyle = {};\n }\n\n return textStyle;\n}\n\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// }\nfunction getRichItemNames(textStyleModel) {\n // Use object to remove duplicated names.\n var richItemNameMap;\n while (textStyleModel && textStyleModel !== textStyleModel.ecModel) {\n var rich = (textStyleModel.option || EMPTY_OBJ).rich;\n if (rich) {\n richItemNameMap = richItemNameMap || {};\n for (var name in rich) {\n if (rich.hasOwnProperty(name)) {\n richItemNameMap[name] = 1;\n }\n }\n }\n textStyleModel = textStyleModel.parentModel;\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\n textStyle.textFill = getAutoColor(textStyleModel.getShallow('color'), opt)\n || globalTextStyle.color;\n textStyle.textStroke = getAutoColor(textStyleModel.getShallow('textBorderColor'), opt)\n || globalTextStyle.textBorderColor;\n textStyle.textStrokeWidth = zrUtil.retrieve2(\n textStyleModel.getShallow('textBorderWidth'),\n globalTextStyle.textBorderWidth\n );\n\n if (!isEmphasis) {\n if (isBlock) {\n textStyle.insideRollbackOpt = opt;\n applyDefaultTextStyle(textStyle);\n }\n\n // Set default finally.\n if (textStyle.textFill == null) {\n textStyle.textFill = opt.autoColor;\n }\n }\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 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\n textStyle.textAlign = textStyleModel.getShallow('align');\n textStyle.textVerticalAlign = textStyleModel.getShallow('verticalAlign')\n || textStyleModel.getShallow('baseline');\n\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\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')\n || globalTextStyle.textShadowColor;\n textStyle.textShadowBlur = textStyleModel.getShallow('textShadowBlur')\n || globalTextStyle.textShadowBlur;\n textStyle.textShadowOffsetX = textStyleModel.getShallow('textShadowOffsetX')\n || globalTextStyle.textShadowOffsetX;\n textStyle.textShadowOffsetY = textStyleModel.getShallow('textShadowOffsetY')\n || globalTextStyle.textShadowOffsetY;\n}\n\nfunction getAutoColor(color, opt) {\n return color !== 'auto' ? color : (opt && opt.autoColor) ? opt.autoColor : null;\n}\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 */\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\n var useInsideStyleCache = useInsideStyle !== false\n && (useInsideStyle === true\n || (isRectText\n && textPosition\n // textPosition can be [10, 30]\n && typeof textPosition === 'string'\n && textPosition.indexOf('inside') >= 0\n )\n );\n var useAutoColorCache = !useInsideStyleCache && autoColor != null;\n\n // All of the props declared in `CACHED_LABEL_STYLE_PROPERTIES` are to be cached.\n if (useInsideStyleCache || useAutoColorCache) {\n insideRollback = {\n textFill: textStyle.textFill,\n textStroke: textStyle.textStroke,\n textStrokeWidth: textStyle.textStrokeWidth\n };\n }\n if (useInsideStyleCache) {\n textStyle.textFill = '#fff';\n // Consider text with #fff overflow its container.\n if (textStyle.textStroke == null) {\n textStyle.textStroke = autoColor;\n textStyle.textStrokeWidth == null && (textStyle.textStrokeWidth = 2);\n }\n }\n if (useAutoColorCache) {\n textStyle.textFill = autoColor;\n }\n }\n\n // Always set `insideRollback`, so that the previous one can be cleared.\n textStyle.insideRollback = insideRollback;\n}\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 */\nfunction rollbackDefaultTextStyle(style) {\n var insideRollback = style.insideRollback;\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\nexport function getFont(opt, ecModel) {\n var gTextStyleModel = ecModel && ecModel.getModel('textStyle');\n return zrUtil.trim([\n // FIXME in node-canvas fontWeight is before fontStyle\n opt.fontStyle || gTextStyleModel && gTextStyleModel.getShallow('fontStyle') || '',\n opt.fontWeight || gTextStyleModel && gTextStyleModel.getShallow('fontWeight') || '',\n (opt.fontSize || gTextStyleModel && gTextStyleModel.getShallow('fontSize') || 12) + 'px',\n opt.fontFamily || gTextStyleModel && gTextStyleModel.getShallow('fontFamily') || 'sans-serif'\n ].join(' '));\n}\n\nfunction animateOrSetProps(isUpdate, el, props, animatableModel, dataIndex, cb) {\n if (typeof dataIndex === 'function') {\n cb = dataIndex;\n dataIndex = null;\n }\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 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 if (typeof animationDelay === 'function') {\n animationDelay = animationDelay(\n dataIndex,\n animatableModel.getAnimationDelayParams\n ? animatableModel.getAnimationDelayParams(el, dataIndex)\n : null\n );\n }\n if (typeof duration === 'function') {\n duration = duration(dataIndex);\n }\n\n duration > 0\n ? el.animateTo(props, duration, animationDelay || 0, animationEasing, cb, !!cb)\n : (el.stopAnimation(), el.attr(props), cb && cb());\n }\n else {\n el.stopAnimation();\n el.attr(props);\n cb && cb();\n }\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 */\nexport function updateProps(el, props, animatableModel, dataIndex, cb) {\n animateOrSetProps(true, el, props, animatableModel, dataIndex, cb);\n}\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 */\nexport function initProps(el, props, animatableModel, dataIndex, cb) {\n animateOrSetProps(false, el, props, animatableModel, dataIndex, cb);\n}\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 */\nexport function 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/**\n * Apply transform to an vertex.\n * @param {Array.<number>} target [x, y]\n * @param {Array.<number>|TypedArray.<number>|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.<number>} [x, y]\n */\nexport function 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 return vector.applyTransform([], target, transform);\n}\n\n/**\n * @param {string} direction 'left' 'right' 'top' 'bottom'\n * @param {Array.<number>} 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 */\nexport function transformDirection(direction, transform, invert) {\n\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)\n ? 1 : Math.abs(2 * transform[4] / transform[0]);\n var vBase = (transform[4] === 0 || transform[5] === 0 || transform[2] === 0)\n ? 1 : Math.abs(2 * transform[4] / transform[2]);\n\n var vertex = [\n direction === 'left' ? -hBase : direction === 'right' ? hBase : 0,\n direction === 'top' ? -vBase : direction === 'bottom' ? vBase : 0\n ];\n\n vertex = applyTransform(vertex, transform, invert);\n\n return Math.abs(vertex[0]) > Math.abs(vertex[1])\n ? (vertex[0] > 0 ? 'right' : 'left')\n : (vertex[1] > 0 ? 'bottom' : 'top');\n}\n\n/**\n * Apply group transition animation from g1 to g2.\n * If no animatableModel, no animation.\n */\nexport function 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 function getAnimatableProps(el) {\n var obj = {\n position: vector.clone(el.position),\n rotation: el.rotation\n };\n if (el.shape) {\n obj.shape = zrUtil.extend({}, el.shape);\n }\n return obj;\n }\n var elMap1 = getElMap(g1);\n\n g2.traverse(function (el) {\n if (!el.isGroup && el.anid) {\n var oldEl = elMap1[el.anid];\n if (oldEl) {\n var newProp = getAnimatableProps(el);\n el.attr(getAnimatableProps(oldEl));\n updateProps(el, newProp, animatableModel, el.dataIndex);\n }\n // else {\n // if (el.previousProps) {\n // graphic.updateProps\n // }\n // }\n }\n });\n}\n\n/**\n * @param {Array.<Array.<number>>} points Like: [[23, 44], [53, 66], ...]\n * @param {Object} rect {x, y, width, height}\n * @return {Array.<Array.<number>>} A new clipped points.\n */\nexport function 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/**\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 */\nexport function 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);\n\n // If the total rect is cliped, nothing, including the border,\n // should be painted. So return undefined.\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/**\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 */\nexport function createIcon(iconStr, opt, rect) {\n opt = zrUtil.extend({rectHover: true}, opt);\n var style = opt.style = {strokeNoScale: true};\n rect = rect || {x: -1, y: -1, width: 2, height: 2};\n\n if (iconStr) {\n return iconStr.indexOf('image://') === 0\n ? (\n style.image = iconStr.slice(8),\n zrUtil.defaults(style, rect),\n new ZImage(opt)\n )\n : (\n makePath(\n iconStr.replace('path://', ''),\n opt,\n rect,\n 'center'\n )\n );\n }\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.<Array.<number>>} points Points of the polygon.\n * @return {boolean}\n */\nexport function 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 if (lineLineIntersect(a1x, a1y, a2x, a2y, p[0], p[1], p2[0], p2[1])) {\n return true;\n }\n p2 = p;\n }\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 */\nexport function 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;\n\n // `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 var nmCrossProduct = crossProduct2d(nx, ny, mx, my);\n if (nearZero(nmCrossProduct)) {\n return false;\n }\n\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 var b1a1x = a1x - b1x;\n var b1a1y = a1y - b1y;\n var q = crossProduct2d(b1a1x, b1a1y, mx, my) / nmCrossProduct;\n if (q < 0 || q > 1) {\n return false;\n }\n var p = crossProduct2d(b1a1x, b1a1y, nx, ny) / nmCrossProduct;\n if (p < 0 || p > 1) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Cross product of 2-dimension vector.\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}\n\n// Register built-in shapes. These shapes might be overwirtten\n// by users, although we do not recommend that.\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);\n\nexport {\n Group,\n ZImage as Image,\n Text,\n Circle,\n Sector,\n Ring,\n Polygon,\n Polyline,\n Rect,\n Line,\n BezierCurve,\n Arc,\n IncrementalDisplayable,\n CompoundPath,\n LinearGradient,\n RadialGradient,\n 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*/\n\nimport * as textContain from 'zrender/src/contain/text';\nimport * as graphicUtil from '../../util/graphic';\n\nvar PATH_COLOR = ['textStyle', 'color'];\n\nexport 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')\n || (\n (!isEmphasis && ecModel) ? ecModel.get(PATH_COLOR) : null\n );\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\n getTextRect: function (text) {\n return textContain.getBoundingRect(\n text,\n this.getFont(),\n this.getShallow('align'),\n this.getShallow('verticalAlign') || this.getShallow('baseline'),\n this.getShallow('padding'),\n this.getShallow('lineHeight'),\n this.getShallow('rich'),\n this.getShallow('truncateText')\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\nimport makeStyleMapper from './makeStyleMapper';\n\nvar getItemStyle = makeStyleMapper(\n [\n ['fill', 'color'],\n ['stroke', 'borderColor'],\n ['lineWidth', 'borderWidth'],\n ['opacity'],\n ['shadowBlur'],\n ['shadowOffsetX'],\n ['shadowOffsetY'],\n ['shadowColor'],\n ['textPosition'],\n ['textAlign']\n ]\n);\n\nexport 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\n getBorderLineDash: function () {\n var lineType = this.get('borderType');\n return (lineType === 'solid' || lineType == null) ? null\n : (lineType === 'dashed' ? [5, 5] : [1, 1]);\n }\n};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @module echarts/model/Model\n */\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport env from 'zrender/src/core/env';\nimport {makeInner} from '../util/model';\nimport {enableClassExtend, enableClassCheck} from '../util/clazz';\n\nimport lineStyleMixin from './mixin/lineStyle';\nimport areaStyleMixin from './mixin/areaStyle';\nimport textStyleMixin from './mixin/textStyle';\nimport itemStyleMixin from './mixin/itemStyle';\n\nvar mixin = zrUtil.mixin;\nvar inner = makeInner();\n\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 */\nfunction Model(option, parentModel, ecModel) {\n /**\n * @type {module:echarts/model/Model}\n * @readOnly\n */\n this.parentModel = parentModel;\n\n /**\n * @type {module:echarts/model/Global}\n * @readOnly\n */\n this.ecModel = ecModel;\n\n /**\n * @type {Object}\n * @protected\n */\n this.option = option;\n\n // 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\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.<string>} 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(\n this.option,\n this.parsePath(path),\n !ignoreParent && getParent(this, path)\n );\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\n var val = option == null ? option : option[key];\n var parentModel = !ignoreParent && getParent(this, key);\n if (val == null && parentModel) {\n val = parentModel.getShallow(key);\n }\n return val;\n },\n\n /**\n * @param {string|Array.<string>} [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\n ? this.option\n : doGet(this.option, path = this.parsePath(path));\n\n var thisParentModel;\n parentModel = parentModel || (\n (thisParentModel = getParent(this, path))\n && thisParentModel.getModel(path)\n );\n\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\n restoreData: function () {},\n\n // Pending\n clone: function () {\n var Ctor = this.constructor;\n return new Ctor(zrUtil.clone(this.option));\n },\n\n setReadOnly: function (properties) {\n // clazzUtil.setReadOnly(this, properties);\n },\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 return path;\n },\n\n /**\n * @param {Function} getParentMethod\n * param {Array.<string>|string} path\n * return {module:echarts/model/Model}\n */\n customizeGetParent: function (getParentMethod) {\n inner(this).getParent = getParentMethod;\n },\n\n isAnimationEnabled: function () {\n if (!env.node) {\n if (this.option.animation != null) {\n return !!this.option.animation;\n }\n else if (this.parentModel) {\n return this.parentModel.isAnimationEnabled();\n }\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 }\n // obj could be number/string/... (like 0)\n obj = (obj && typeof obj === 'object') ? obj[pathArr[i]] : null;\n if (obj == null) {\n break;\n }\n }\n if (obj == null && parentModel) {\n obj = parentModel.get(pathArr);\n }\n return obj;\n}\n\n// `path` can be null/undefined\nfunction getParent(model, path) {\n var getParentMethod = inner(model).getParent;\n return getParentMethod ? getParentMethod.call(model, path) : model.parentModel;\n}\n\n// Enable Model.extend.\nenableClassExtend(Model);\nenableClassCheck(Model);\n\nmixin(Model, lineStyleMixin);\nmixin(Model, areaStyleMixin);\nmixin(Model, textStyleMixin);\nmixin(Model, itemStyleMixin);\n\nexport default Model;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport {parseClassType} from './clazz';\n\nvar base = 0;\n\n/**\n * @public\n * @param {string} type\n * @return {string}\n */\nexport function 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/**\n * @inner\n */\nexport function enableSubTypeDefaulter(entity) {\n\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 if (!type) {\n var componentTypeMain = parseClassType(componentType).main;\n if (entity.hasSubTypes(componentType) && subTypeDefaulters[componentTypeMain]) {\n type = subTypeDefaulters[componentTypeMain](option);\n }\n }\n return type;\n };\n\n return entity;\n}\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 */\nexport function enableTopologicalTravel(entity, dependencyGetter) {\n\n /**\n * @public\n * @param {Array.<string>} targetNameList Target Component type list.\n * Can be ['aa', 'bb', 'aa.xx']\n * @param {Array.<string>} 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\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 if (isInTargetNameSet) {\n callback.call(context, currComponentType, currVertex.originalDeps.slice());\n delete targetNameSet[currComponentType];\n }\n zrUtil.each(\n currVertex.successor,\n isInTargetNameSet ? removeEdgeAndAdd : removeEdge\n );\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 if (graph[succComponentType].entryCount === 0) {\n stack.push(succComponentType);\n }\n }\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 function removeEdgeAndAdd(succComponentType) {\n targetNameSet[succComponentType] = true;\n removeEdge(succComponentType);\n }\n };\n\n /**\n * DepndencyGraph: {Object}\n * key: conponentType,\n * value: {\n * successor: [conponentTypes...],\n * originalDeps: [conponentTypes...],\n * entryCount: {number}\n * }\n */\n function makeDepndencyGraph(fullNameList) {\n var graph = {};\n var noEntryList = [];\n\n zrUtil.each(fullNameList, function (name) {\n\n var thisItem = createDependencyGraphItem(graph, name);\n var originalDeps = thisItem.originalDeps = dependencyGetter(name);\n\n var availableDeps = getAvailableDependencies(originalDeps, fullNameList);\n thisItem.entryCount = availableDeps.length;\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 var thatItem = createDependencyGraphItem(graph, dependentName);\n if (zrUtil.indexOf(thatItem.successor, dependentName) < 0) {\n thatItem.successor.push(name);\n }\n });\n });\n\n return {graph: graph, noEntryList: noEntryList};\n }\n\n function createDependencyGraphItem(graph, name) {\n if (!graph[name]) {\n graph[name] = {predecessor: [], successor: []};\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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* </licenses/LICENSE-d3>).\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\n\nvar RADIAN_EPSILON = 1e-4;\n\nfunction _trim(str) {\n return str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Linear mapping a value from domain to range\n * @memberOf module:echarts/util/number\n * @param {(number|Array.<number>)} val\n * @param {Array.<number>} domain Domain extent domain[0] can be bigger than domain[1]\n * @param {Array.<number>} range Range extent range[0] can be bigger than range[1]\n * @param {boolean} clamp\n * @return {(number|Array.<number>}\n */\nexport function 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\n ? range[0]\n : (range[0] + range[1]) / 2;\n }\n\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 if (clamp) {\n if (subDomain > 0) {\n if (val <= domain[0]) {\n return range[0];\n }\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 else if (val <= domain[1]) {\n return range[1];\n }\n }\n }\n else {\n if (val === domain[0]) {\n return range[0];\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/**\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 */\nexport function parsePercent(percent, all) {\n switch (percent) {\n case 'center':\n case 'middle':\n percent = '50%';\n break;\n case 'left':\n case 'top':\n percent = '0%';\n break;\n case 'right':\n case 'bottom':\n percent = '100%';\n break;\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/**\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 */\nexport function round(x, precision, returnStr) {\n if (precision == null) {\n precision = 10;\n }\n // Avoid range error\n precision = Math.min(Math.max(0, precision), 20);\n x = (+x).toFixed(precision);\n return returnStr ? x : +x;\n}\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 */\nexport function asc(arr) {\n arr.sort(function (a, b) {\n return a - b;\n });\n return arr;\n}\n\n/**\n * Get precision\n * @param {number} val\n */\nexport function getPrecision(val) {\n val = +val;\n if (isNaN(val)) {\n return 0;\n }\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 var e = 1;\n var count = 0;\n while (Math.round(val * e) / e !== val) {\n e *= 10;\n count++;\n }\n return count;\n}\n\n/**\n * @param {string|number} val\n * @return {number}\n */\nexport function getPrecisionSafe(val) {\n var str = val.toString();\n\n // Consider scientific notation: '3.4e-12' '3.4e+12'\n var eIndex = str.indexOf('e');\n if (eIndex > 0) {\n var precision = +str.slice(eIndex + 1);\n return precision < 0 ? -precision : 0;\n }\n else {\n var dotIndex = str.indexOf('.');\n return dotIndex < 0 ? 0 : str.length - 1 - dotIndex;\n }\n}\n\n/**\n * Minimal dicernible data precisioin according to a single pixel.\n *\n * @param {Array.<number>} dataExtent\n * @param {Array.<number>} pixelExtent\n * @return {number} precision\n */\nexport function 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);\n // toFixed() digits argument must be between 0 and 20.\n var precision = Math.min(Math.max(-dataQuantity + sizeQuantity, 0), 20);\n return !isFinite(precision) ? 20 : precision;\n}\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.<number>} 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 */\nexport function 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 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\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\n var remainder = zrUtil.map(votesPerQuota, function (votes, idx) {\n return votes - seats[idx];\n });\n\n // Has remainding votes.\n while (currentSum < targetSeats) {\n // Find next largest remainder.\n var max = Number.NEGATIVE_INFINITY;\n var maxId = null;\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 }\n\n // Add a vote to max remainder.\n ++seats[maxId];\n remainder[maxId] = 0;\n ++currentSum;\n }\n\n return seats[idx] / digits;\n}\n\n// Number.MAX_SAFE_INTEGER, ie do not support.\nexport var MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * To 0 - 2 * PI, considering negative radian.\n * @param {number} radian\n * @return {number}\n */\nexport function remRadian(radian) {\n var pi2 = Math.PI * 2;\n return (radian % pi2 + pi2) % pi2;\n}\n\n/**\n * @param {type} radian\n * @return {boolean}\n */\nexport function isRadianAroundZero(val) {\n return val > -RADIAN_EPSILON && val < RADIAN_EPSILON;\n}\n\n/* eslint-disable */\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/* 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 <https://momentjs.com/>).\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 */\nexport function parseDate(value) {\n if (value instanceof Date) {\n return value;\n }\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 }\n\n // Use local time when no timezone offset specifed.\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(\n +match[1],\n +(match[2] || 1) - 1,\n +match[3] || 1,\n +match[4] || 0,\n +(match[5] || 0),\n +match[6] || 0,\n +match[7] || 0\n );\n }\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 if (match[8].toUpperCase() !== 'Z') {\n hour -= match[8].slice(0, 3);\n }\n return new Date(Date.UTC(\n +match[1],\n +(match[2] || 1) - 1,\n +match[3] || 1,\n hour,\n +(match[5] || 0),\n +match[6] || 0,\n +match[7] || 0\n ));\n }\n }\n else if (value == null) {\n return new Date(NaN);\n }\n\n return new Date(Math.round(value));\n}\n\n/**\n * Quantity of a number. e.g. 0.1, 1, 10, 100\n *\n * @param {number} val\n * @return {number}\n */\nexport function quantity(val) {\n return Math.pow(10, quantityExponent(val));\n}\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 */\nexport function 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 if (val / Math.pow(10, exp) >= 10) {\n exp++;\n }\n return exp;\n}\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 */\nexport function nice(val, round) {\n var exponent = quantityExponent(val);\n var exp10 = Math.pow(10, exponent);\n var f = val / exp10; // 1 <= f < 10\n var nf;\n if (round) {\n if (f < 1.5) {\n nf = 1;\n }\n else if (f < 2.5) {\n nf = 2;\n }\n else if (f < 4) {\n nf = 3;\n }\n else if (f < 7) {\n nf = 5;\n }\n else {\n nf = 10;\n }\n }\n else {\n if (f < 1) {\n nf = 1;\n }\n else if (f < 2) {\n nf = 2;\n }\n else if (f < 3) {\n nf = 3;\n }\n else if (f < 5) {\n nf = 5;\n }\n else {\n nf = 10;\n }\n }\n val = nf * exp10;\n\n // Fix 3 * 0.1 === 0.30000000000000004 issue (see IEEE 754).\n // 20 is the uppper bound of toFixed.\n return exponent >= -20 ? +val.toFixed(exponent < 0 ? -exponent : 0) : val;\n}\n\n/**\n * This code was copied from \"d3.js\"\n * <https://github.com/d3/d3/blob/9cc9a875e636a1dcf36cc1e07bdf77e1ad6e2c74/src/arrays/quantile.js>.\n * See the license statement at the head of this file.\n * @param {Array.<number>} ascArr\n */\nexport function 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/**\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.<Object>} list, where `close` mean open or close\n * of the interval, and Infinity can be used.\n * @return {Array.<Object>} The origin list, which has been reformed.\n */\nexport function reformIntervals(list) {\n list.sort(function (a, b) {\n return littleThan(a, b, 0) ? -1 : 1;\n });\n\n var curr = -Infinity;\n var currClose = 1;\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 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 }\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]\n || (\n a.interval[lg] === b.interval[lg]\n && (\n (a.close[lg] - b.close[lg] === (!lg ? 1 : -1))\n || (!lg && littleThan(a, b, 1))\n )\n );\n }\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 */\nexport function isNumeric(v) {\n return v - parseFloat(v) >= 0;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as textContain from 'zrender/src/contain/text';\nimport * as numberUtil from './number';\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 */\nexport function addCommas(x) {\n if (isNaN(x)) {\n return '-';\n }\n x = (x + '').split('.');\n return x[0].replace(/(\\d{1,3})(?=(?:\\d{3})+(?!\\d))/g, '$1,')\n + (x.length > 1 ? ('.' + x[1]) : '');\n}\n\n/**\n * @param {string} str\n * @param {boolean} [upperCaseFirst=false]\n * @return {string} str\n */\nexport function 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\nexport var normalizeCssArray = zrUtil.normalizeCssArray;\n\n\nvar replaceReg = /([&<>\"'])/g;\nvar replaceMap = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n '\\'': '&#39;'\n};\n\nexport function encodeHTML(source) {\n return source == null\n ? ''\n : (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/**\n * Template formatter\n * @param {string} tpl\n * @param {Array.<Object>|Object} paramsList\n * @param {boolean} [encode=false]\n * @return {string}\n */\nexport function formatTpl(tpl, paramsList, encode) {\n if (!zrUtil.isArray(paramsList)) {\n paramsList = [paramsList];\n }\n var seriesLen = paramsList.length;\n if (!seriesLen) {\n return '';\n }\n\n var $vars = paramsList[0].$vars || [];\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 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(\n wrapVar(TPL_VAR_ALIAS[k], seriesIdx),\n encode ? encodeHTML(val) : val\n );\n }\n }\n\n return tpl;\n}\n\n/**\n * simple Template formatter\n *\n * @param {string} tpl\n * @param {Object} param\n * @param {boolean} [encode=false]\n * @return {string}\n */\nexport function formatTplSimple(tpl, param, encode) {\n zrUtil.each(param, function (value, key) {\n tpl = tpl.replace(\n '{' + key + '}',\n encode ? encodeHTML(value) : value\n );\n });\n return tpl;\n}\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 */\nexport function getTooltipMarker(opt, extraCssText) {\n opt = zrUtil.isString(opt) ? {color: opt, extraCssText: extraCssText} : (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 ? '<span style=\"display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;'\n + 'border-radius:4px;width:4px;height:4px;background-color:'\n + encodeHTML(color) + ';' + (extraCssText || '') + '\"></span>'\n : '<span style=\"display:inline-block;margin-right:5px;'\n + 'border-radius:10px;width:10px;height:10px;background-color:'\n + encodeHTML(color) + ';' + (extraCssText || '') + '\"></span>';\n }\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\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 */\nexport function formatTime(tpl, value, isUTC) {\n if (tpl === 'week'\n || tpl === 'month'\n || tpl === 'quarter'\n || tpl === 'half-year'\n || tpl === 'year'\n ) {\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\n tpl = tpl.replace('MM', pad(M, 2))\n .replace('M', M)\n .replace('yyyy', y)\n .replace('yy', y % 100)\n .replace('dd', pad(d, 2))\n .replace('d', d)\n .replace('hh', pad(h, 2))\n .replace('h', h)\n .replace('mm', pad(m, 2))\n .replace('m', m)\n .replace('ss', pad(s, 2))\n .replace('s', s)\n .replace('SSS', pad(S, 3));\n\n return tpl;\n}\n\n/**\n * Capital first\n * @param {string} str\n * @return {string}\n */\nexport function capitalFirst(str) {\n return str ? str.charAt(0).toUpperCase() + str.substr(1) : str;\n}\n\nexport var truncateText = textContain.truncateText;\n\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.<number>} [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 */\nexport function getTextBoundingRect(opt) {\n return textContain.getBoundingRect(\n opt.text,\n opt.font,\n opt.textAlign,\n opt.textVerticalAlign,\n opt.textPadding,\n opt.textLineHeight,\n opt.rich,\n opt.truncate\n );\n}\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 */\nexport function getTextRect(\n text, font, textAlign, textVerticalAlign, textPadding, rich, truncate, textLineHeight\n) {\n return textContain.getBoundingRect(\n text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate\n );\n}\n\n/**\n * open new tab\n * @param {string} link url\n * @param {string} target blank or self\n */\nexport function windowOpen(link, target) {\n if (target === '_blank' || target === 'blank') {\n var blank = window.open();\n blank.opener = null;\n blank.location = link;\n }\n else {\n window.open(link, target);\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// Layout helpers for each component positioning\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport BoundingRect from 'zrender/src/core/BoundingRect';\nimport {parsePercent} from './number';\nimport * as formatUtil from './format';\n\nvar each = zrUtil.each;\n\n/**\n * @public\n */\nexport var LOCATION_PARAMS = [\n 'left', 'right', 'top', 'bottom', 'width', 'height'\n];\n\n/**\n * @public\n */\nexport var HV_NAMES = [\n ['width', 'left', 'right'],\n ['height', 'top', 'bottom']\n];\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 if (maxHeight == null) {\n maxHeight = Infinity;\n }\n var currentLineMaxSize = 0;\n\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;\n // Wrap when width exceeds maxWidth or meet a `newline` group\n // FIXME compare before adding gap?\n if (nextX > maxWidth || child.newline) {\n x = 0;\n nextX = moveX;\n y += currentLineMaxSize + gap;\n currentLineMaxSize = rect.height;\n }\n else {\n // FIXME: consider rect.y is not `0`?\n currentLineMaxSize = Math.max(currentLineMaxSize, rect.height);\n }\n }\n else {\n var moveY = rect.height + (nextChildRect ? (-nextChildRect.y + rect.y) : 0);\n nextY = y + moveY;\n // Wrap when width exceeds maxHeight or meet a `newline` group\n if (nextY > maxHeight || child.newline) {\n x += currentLineMaxSize + gap;\n y = 0;\n nextY = moveY;\n currentLineMaxSize = rect.width;\n }\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\n orient === 'horizontal'\n ? (x = nextX + gap)\n : (y = nextY + gap);\n });\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 */\nexport var box = boxLayout;\n\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 */\nexport var vbox = zrUtil.curry(boxLayout, 'vertical');\n\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 */\nexport var hbox = zrUtil.curry(boxLayout, 'horizontal');\n\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 */\nexport function getAvailableSize(positionInfo, containerRect, margin) {\n var containerWidth = containerRect.width;\n var containerHeight = containerRect.height;\n\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\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\n margin = formatUtil.normalizeCssArray(margin || 0);\n\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/**\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 */\nexport function getLayoutRect(\n positionInfo, containerRect, margin\n) {\n margin = formatUtil.normalizeCssArray(margin || 0);\n\n var containerWidth = containerRect.width;\n var containerHeight = containerRect.height;\n\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\n var verticalMargin = margin[2] + margin[0];\n var horizontalMargin = margin[1] + margin[3];\n var aspect = positionInfo.aspect;\n\n // If width is not specified, calculate width from left and right\n if (isNaN(width)) {\n width = containerWidth - right - horizontalMargin - left;\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 }\n else {\n height = containerHeight * 0.8;\n }\n }\n\n // Calculate width or height with given aspect\n if (isNaN(width)) {\n width = aspect * height;\n }\n if (isNaN(height)) {\n height = width / aspect;\n }\n }\n\n // If left is not specified, calculate left from right and width\n if (isNaN(left)) {\n left = containerWidth - right - width - horizontalMargin;\n }\n if (isNaN(top)) {\n top = containerHeight - bottom - height - verticalMargin;\n }\n\n // Align left and top\n switch (positionInfo.left || positionInfo.right) {\n case 'center':\n left = containerWidth / 2 - width / 2 - margin[3];\n break;\n case 'right':\n left = containerWidth - width - horizontalMargin;\n break;\n }\n switch (positionInfo.top || positionInfo.bottom) {\n case 'middle':\n case 'center':\n top = containerHeight / 2 - height / 2 - margin[0];\n break;\n case 'bottom':\n top = containerHeight - height - verticalMargin;\n break;\n }\n // If something is wrong and left, top, width, height are calculated as NaN\n left = left || 0;\n top = top || 0;\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 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\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.<number>} [opt.hv=[1,1]] Only horizontal or only vertical.\n * @param {Array.<number>} [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 */\nexport function 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 if (boundingMode === 'raw') {\n rect = el.type === 'group'\n ? new BoundingRect(0, 0, +positionInfo.width || 0, +positionInfo.height || 0)\n : el.getBoundingRect();\n }\n else {\n rect = el.getBoundingRect();\n if (el.needLocalTransform()) {\n var transform = el.getLocalTransform();\n // Notice: raw rect may be inner object of el,\n // which should not be modified.\n rect = rect.clone();\n rect.applyTransform(transform);\n }\n }\n\n // The real width and height can not be specified but calculated by the given el.\n positionInfo = getLayoutRect(\n zrUtil.defaults(\n {width: rect.width, height: rect.height},\n positionInfo\n ),\n containerRect,\n margin\n );\n\n // 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 var elPos = el.position;\n var dx = h ? positionInfo.x - rect.x : 0;\n var dy = v ? positionInfo.y - rect.y : 0;\n\n el.attr('position', boundingMode === 'raw' ? [dx, dy] : [elPos[0] + dx, elPos[1] + dy]);\n}\n\n/**\n * @param {Object} option Contains some of the properties in HV_NAMES.\n * @param {number} hvIdx 0: horizontal; 1: vertical.\n */\nexport function sizeCalculable(option, hvIdx) {\n return option[HV_NAMES[hvIdx][0]] != null\n || (option[HV_NAMES[hvIdx][1]] != null && option[HV_NAMES[hvIdx][2]] != null);\n}\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.<boolean>} [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 */\nexport function mergeLayoutParam(targetOption, newOption, opt) {\n !zrUtil.isObject(opt) && (opt = {});\n\n var ignoreSize = opt.ignoreSize;\n !zrUtil.isArray(ignoreSize) && (ignoreSize = [ignoreSize, ignoreSize]);\n\n var hResult = merge(HV_NAMES[0], 0);\n var vResult = merge(HV_NAMES[1], 1);\n\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\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 }\n else if (hasValue(newOption, names[2])) {\n merged[names[1]] = null;\n }\n return merged;\n }\n\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 if (mergedValueCount === enoughParamNumber || !newValueCount) {\n return merged;\n }\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 }\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 if (!hasProp(newParams, name) && hasProp(targetOption, name)) {\n newParams[name] = targetOption[name];\n break;\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/**\n * Retrieve 'left', 'right', 'top', 'bottom', 'width', 'height' from object.\n * @param {Object} source\n * @return {Object} Result contains those props.\n */\nexport function getLayoutParams(source) {\n return copyLayoutParams({}, source);\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 */\nexport function 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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nexport 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};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport Model from './Model';\nimport * as componentUtil from '../util/component';\nimport {enableClassManagement, parseClassType} from '../util/clazz';\nimport {makeInner} from '../util/model';\nimport * as layout from '../util/layout';\nimport boxLayoutMixin from './mixin/boxLayout';\n\nvar inner = makeInner();\n\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 */\nvar ComponentModel = Model.extend({\n\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.<string, Array.<module:echarts/model/Model>>}\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\n $constructor: function (option, parentModel, ecModel, extraOpt) {\n Model.call(this, option, parentModel, ecModel, extraOpt);\n\n this.uid = componentUtil.getUID('ec_cpt_model');\n },\n\n init: function (option, parentModel, ecModel, extraOpt) {\n this.mergeDefaultAndTheme(option, ecModel);\n },\n\n mergeDefaultAndTheme: function (option, ecModel) {\n var layoutMode = this.layoutMode;\n var inputPositionParams = layoutMode\n ? layout.getLayoutParams(option) : {};\n\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\n mergeOption: function (option, extraOpt) {\n zrUtil.merge(this.option, option, true);\n\n var layoutMode = this.layoutMode;\n if (layoutMode) {\n layout.mergeLayoutParam(this.option, option, layoutMode);\n }\n },\n\n // Hooker after init or mergeOption\n optionUpdated: function (newCptOption, isInit) {},\n\n getDefaultOption: function () {\n var fields = inner(this);\n if (!fields.defaultOption) {\n var optList = [];\n var Class = this.constructor;\n while (Class) {\n var opt = Class.prototype.defaultOption;\n opt && optList.push(opt);\n Class = Class.superClass;\n }\n\n var defaultOption = {};\n for (var i = optList.length - 1; i >= 0; i--) {\n defaultOption = zrUtil.merge(defaultOption, optList[i], true);\n }\n fields.defaultOption = defaultOption;\n }\n return fields.defaultOption;\n },\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\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\n// this.uid = componentUtil.getUID('componentModel');\n\n// // this.setReadOnly([\n// // 'type', 'id', 'uid', 'name', 'mainType', 'subType',\n// // 'dependentModels', 'componentIndex'\n// // ]);\n// }\n// );\n\n// Add capability of registerClass, getClass, hasClass, registerSubTypeDefaulter and so on.\nenableClassManagement(\n ComponentModel, {registerWhenExtend: true}\n);\ncomponentUtil.enableSubTypeDefaulter(ComponentModel);\n\n// Add capability of ComponentModel.topologicalTravel.\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 });\n\n // Ensure main type.\n deps = zrUtil.map(deps, function (type) {\n return parseClassType(type).main;\n });\n\n // Hack dataset for convenience.\n if (componentType !== 'dataset' && zrUtil.indexOf(deps, 'dataset') <= 0) {\n deps.unshift('dataset');\n }\n\n return deps;\n}\n\nzrUtil.mixin(ComponentModel, boxLayoutMixin);\n\nexport default ComponentModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nvar platform = '';\n// Navigator not exists in node\nif (typeof navigator !== 'undefined') {\n platform = navigator.platform || '';\n}\n\nexport default {\n // backgroundColor: 'rgba(0,0,0,0)',\n\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: [\n '#c23531', '#2f4554', '#61a0a8', '#d48265', '#91c7ae', '#749f83',\n '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'\n ],\n\n gradientColor: ['#f6efa6', '#d88273', '#bf444c'],\n\n // If xAxis and yAxis declared, grid is created by default.\n // grid: {},\n\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\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\n animation: 'auto',\n animationDuration: 1000,\n animationDurationUpdate: 300,\n animationEasing: 'exponentialOut',\n animationEasingUpdate: 'cubicOut',\n\n animationThreshold: 2000,\n // Configuration for progressive/incremental rendering\n progressiveThreshold: 3000,\n progressive: 400,\n\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 <echarts/test/heatmap-large.html>.\n hoverLayerThreshold: 3000,\n\n // See: module:echarts/scale/Time\n useUTC: false\n};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {makeInner, normalizeToArray} from '../../util/model';\n\nvar inner = makeInner();\n\nfunction getNearestColorPalette(colors, requestColorNum) {\n var paletteNum = colors.length;\n // TODO colors must be in order\n for (var i = 0; i < paletteNum; i++) {\n if (colors[i].length > requestColorNum) {\n return colors[i];\n }\n }\n return colors[paletteNum - 1];\n}\n\nexport 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 || {};\n // Use `hasOwnProperty` to avoid conflict with Object.prototype.\n if (colorNameMap.hasOwnProperty(name)) {\n return colorNameMap[name];\n }\n var defaultColorPalette = normalizeToArray(this.get('color', true));\n var layeredColorPalette = this.get('colorLayer', true);\n var colorPalette = ((requestColorNum == null || !layeredColorPalette)\n ? defaultColorPalette : getNearestColorPalette(layeredColorPalette, requestColorNum));\n\n // In case can't find in layered color palette.\n colorPalette = colorPalette || defaultColorPalette;\n\n if (!colorPalette || !colorPalette.length) {\n return;\n }\n\n var color = colorPalette[colorIdx];\n if (name) {\n colorNameMap[name] = color;\n }\n scopeFields.colorIdx = (colorIdx + 1) % colorPalette.length;\n\n return color;\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// Avoid typo.\nexport var SOURCE_FORMAT_ORIGINAL = 'original';\nexport var SOURCE_FORMAT_ARRAY_ROWS = 'arrayRows';\nexport var SOURCE_FORMAT_OBJECT_ROWS = 'objectRows';\nexport var SOURCE_FORMAT_KEYED_COLUMNS = 'keyedColumns';\nexport var SOURCE_FORMAT_UNKNOWN = 'unknown';\n// ??? CHANGE A NAME\nexport var SOURCE_FORMAT_TYPED_ARRAY = 'typedArray';\n\nexport var SERIES_LAYOUT_BY_COLUMN = 'column';\nexport var SERIES_LAYOUT_BY_ROW = '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\nimport {createHashMap, isTypedArray} from 'zrender/src/core/util';\nimport {enableClassCheck} from '../util/clazz';\nimport {\n SOURCE_FORMAT_ORIGINAL,\n SERIES_LAYOUT_BY_COLUMN,\n SOURCE_FORMAT_UNKNOWN,\n SOURCE_FORMAT_TYPED_ARRAY,\n SOURCE_FORMAT_KEYED_COLUMNS\n} from './helper/sourceType';\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.<Object|string>} [dimensionsDefine]\n * @param {Objet|HashMap} [encodeDefine]\n * @param {number} [startIndex=0]\n * @param {number} [dimensionsDetectCount]\n */\nfunction Source(fields) {\n\n /**\n * @type {boolean}\n */\n this.fromDataset = fields.fromDataset;\n\n /**\n * Not null/undefined.\n * @type {Array|Object}\n */\n this.data = fields.data || (\n fields.sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS ? {} : []\n );\n\n /**\n * See also \"detectSourceFormat\".\n * Not null/undefined.\n * @type {string}\n */\n this.sourceFormat = fields.sourceFormat || SOURCE_FORMAT_UNKNOWN;\n\n /**\n * 'row' or 'column'\n * Not null/undefined.\n * @type {string} seriesLayoutBy\n */\n this.seriesLayoutBy = fields.seriesLayoutBy || SERIES_LAYOUT_BY_COLUMN;\n\n /**\n * dimensions definition in option.\n * can be null/undefined.\n * @type {Array.<Object|string>}\n */\n this.dimensionsDefine = fields.dimensionsDefine;\n\n /**\n * encode definition in option.\n * can be null/undefined.\n * @type {Objet|HashMap}\n */\n this.encodeDefine = fields.encodeDefine && createHashMap(fields.encodeDefine);\n\n /**\n * Not null/undefined, uint.\n * @type {number}\n */\n this.startIndex = fields.startIndex || 0;\n\n /**\n * Can be null/undefined (when unknown), uint.\n * @type {number}\n */\n this.dimensionsDetectCount = fields.dimensionsDetectCount;\n}\n\n/**\n * Wrap original series data for some compatibility cases.\n */\nSource.seriesDataToSource = function (data) {\n return new Source({\n data: data,\n sourceFormat: isTypedArray(data)\n ? SOURCE_FORMAT_TYPED_ARRAY\n : SOURCE_FORMAT_ORIGINAL,\n fromDataset: false\n });\n};\n\nenableClassCheck(Source);\n\nexport default Source;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {__DEV__} from '../../config';\nimport {makeInner, getDataItemValue} from '../../util/model';\nimport {\n createHashMap,\n each,\n map,\n isArray,\n isString,\n isObject,\n isTypedArray,\n isArrayLike,\n extend,\n assert\n} from 'zrender/src/core/util';\nimport Source from '../Source';\n\nimport {\n SOURCE_FORMAT_ORIGINAL,\n SOURCE_FORMAT_ARRAY_ROWS,\n SOURCE_FORMAT_OBJECT_ROWS,\n SOURCE_FORMAT_KEYED_COLUMNS,\n SOURCE_FORMAT_UNKNOWN,\n SOURCE_FORMAT_TYPED_ARRAY,\n SERIES_LAYOUT_BY_ROW\n} from './sourceType';\n\n// The result of `guessOrdinal`.\nexport var BE_ORDINAL = {\n Must: 1, // Encounter string but not '-' and not number-like.\n Might: 2, // Encounter string but number-like.\n Not: 3 // Other cases\n};\n\nvar inner = makeInner();\n\n/**\n * @see {module:echarts/data/Source}\n * @param {module:echarts/component/dataset/DatasetModel} datasetModel\n * @return {string} sourceFormat\n */\nexport function 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 }\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 }\n else if (isArray(item)) {\n sourceFormat = SOURCE_FORMAT_ARRAY_ROWS;\n break;\n }\n else if (isObject(item)) {\n sourceFormat = SOURCE_FORMAT_OBJECT_ROWS;\n break;\n }\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 }\n else if (data != null) {\n throw new Error('Invalid data');\n }\n\n inner(datasetModel).sourceFormat = sourceFormat;\n}\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 */\nexport function getSource(seriesModel) {\n return inner(seriesModel).source;\n}\n\n/**\n * MUST be called before mergeOption of all series.\n * @param {module:echarts/model/Global} ecModel\n */\nexport function resetSourceDefaulter(ecModel) {\n // `datasetMap` is used to make default encode.\n inner(ecModel).datasetMap = createHashMap();\n}\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 */\nexport function prepareSource(seriesModel) {\n var seriesOption = seriesModel.option;\n\n var data = seriesOption.data;\n var sourceFormat = isTypedArray(data)\n ? SOURCE_FORMAT_TYPED_ARRAY : SOURCE_FORMAT_ORIGINAL;\n var fromDataset = false;\n\n var seriesLayoutBy = seriesOption.seriesLayoutBy;\n var sourceHeader = seriesOption.sourceHeader;\n var dimensionsDefine = seriesOption.dimensions;\n\n var datasetModel = getDatasetModel(seriesModel);\n if (datasetModel) {\n var datasetOption = datasetModel.option;\n\n data = datasetOption.source;\n sourceFormat = inner(datasetModel).sourceFormat;\n fromDataset = true;\n\n // These settings from series has higher priority.\n seriesLayoutBy = seriesLayoutBy || datasetOption.seriesLayoutBy;\n sourceHeader == null && (sourceHeader = datasetOption.sourceHeader);\n dimensionsDefine = dimensionsDefine || datasetOption.dimensions;\n }\n\n var completeResult = completeBySourceData(\n data, sourceFormat, seriesLayoutBy, sourceHeader, dimensionsDefine\n );\n\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}\n\n// return {startIndex, dimensionsDefine, dimensionsCount}\nfunction completeBySourceData(data, sourceFormat, seriesLayoutBy, sourceHeader, dimensionsDefine) {\n if (!data) {\n return {dimensionsDefine: normalizeDimensionsDefine(dimensionsDefine)};\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 }\n else {\n startIndex = 0;\n }\n }\n // 10 is an experience number, avoid long loop.\n }, seriesLayoutBy, data, 10);\n }\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\n ? dimensionsDefine.length\n : seriesLayoutBy === SERIES_LAYOUT_BY_ROW\n ? data.length\n : data[0]\n ? data[0].length\n : null;\n }\n else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) {\n if (!dimensionsDefine) {\n dimensionsDefine = objectRowsCollectDimensions(data);\n }\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 }\n else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) {\n var value0 = getDataItemValue(data[0]);\n dimensionsDetectCount = isArray(value0) && value0.length || 1;\n }\n else if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) {\n if (__DEV__) {\n assert(!!dimensionsDefine, 'dimensions must be given if data is TypedArray.');\n }\n }\n\n return {\n startIndex: startIndex,\n dimensionsDefine: normalizeDimensionsDefine(dimensionsDefine),\n dimensionsDetectCount: dimensionsDetectCount\n };\n}\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.\nfunction normalizeDimensionsDefine(dimensionsDefine) {\n if (!dimensionsDefine) {\n // The meaning of null/undefined is different from empty array.\n return;\n }\n var nameMap = createHashMap();\n return map(dimensionsDefine, function (item, index) {\n item = extend({}, isObject(item) ? item : {name: item});\n\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 if (item.name == null) {\n return item;\n }\n\n // Also consider number form like 2012.\n item.name += '';\n // 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 if (item.displayName == null) {\n item.displayName = item.name;\n }\n\n var exist = nameMap.get(item.name);\n if (!exist) {\n nameMap.set(item.name, {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 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 }\n else {\n var value0 = data[0] || [];\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 while (firstIndex < data.length && !(obj = data[firstIndex++])) {} // jshint ignore: line\n if (obj) {\n var dimensions = [];\n each(obj, function (value, key) {\n dimensions.push(key);\n });\n return dimensions;\n }\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.<Object|string>} coordDimensions [{name: <string>, type: <string>, dimsDef: <Array>}, ...]\n * @param {module:model/Series} seriesModel\n * @param {module:data/Source} source\n * @return {Object} encode Never be `null/undefined`.\n */\nexport function makeSeriesEncodeForAxisCoordSys(coordDimensions, seriesModel, source) {\n var encode = {};\n\n var datasetModel = getDatasetModel(seriesModel);\n // Currently only make default when using dataset, util more reqirements occur.\n if (!datasetModel || !coordDimensions) {\n return encode;\n }\n\n var encodeItemName = [];\n var encodeSeriesName = [];\n\n var ecModel = seriesModel.ecModel;\n var datasetMap = inner(ecModel).datasetMap;\n var key = datasetModel.uid + '_' + source.seriesLayoutBy;\n\n var baseCategoryDimIndex;\n var categoryWayValueDimStart;\n coordDimensions = coordDimensions.slice();\n each(coordDimensions, function (coordDimInfo, coordDimIdx) {\n !isObject(coordDimInfo) && (coordDimensions[coordDimIdx] = {name: coordDimInfo});\n if (coordDimInfo.type === 'ordinal' && baseCategoryDimIndex == null) {\n baseCategoryDimIndex = coordDimIdx;\n categoryWayValueDimStart = getDataDimCountOnCoordDim(coordDimensions[coordDimIdx]);\n }\n encode[coordDimInfo.name] = [];\n });\n\n var datasetRecord = datasetMap.get(key)\n || datasetMap.set(key, {categoryWayDim: categoryWayValueDimStart, valueWayDim: 0});\n\n // TODO\n // Auto detect first time axis and do arrangement.\n each(coordDimensions, function (coordDimInfo, coordDimIdx) {\n var coordDimName = coordDimInfo.name;\n var count = getDataDimCountOnCoordDim(coordDimInfo);\n\n // In value way.\n if (baseCategoryDimIndex == null) {\n var start = datasetRecord.valueWayDim;\n pushDim(encode[coordDimName], start, count);\n pushDim(encodeSeriesName, start, count);\n datasetRecord.valueWayDim += count;\n\n // ??? 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 }\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 }\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\n return encode;\n}\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 */\nexport function makeSeriesEncodeForNameBased(seriesModel, source, dimCount) {\n var encode = {};\n\n var datasetModel = getDatasetModel(seriesModel);\n // Currently only make default when using dataset, util more reqirements occur.\n if (!datasetModel) {\n return encode;\n }\n\n var sourceFormat = source.sourceFormat;\n var dimensionsDefine = source.dimensionsDefine;\n\n var potentialNameDimIndex;\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 }\n\n // idxResult: {v, n}.\n var idxResult = (function () {\n\n var idxRes0 = {};\n var idxRes1 = {};\n var guessRecords = [];\n\n // 5 is an experience value.\n for (var i = 0, len = Math.min(5, dimCount); i < len; i++) {\n var guessResult = doGuessOrdinal(\n source.data, sourceFormat, source.seriesLayoutBy,\n dimensionsDefine, source.startIndex, i\n );\n guessRecords.push(guessResult);\n var isPureNumber = guessResult === BE_ORDINAL.Not;\n\n // [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 if (isPureNumber && idxRes0.v == null && i !== potentialNameDimIndex) {\n idxRes0.v = i;\n }\n if (idxRes0.n == null\n || (idxRes0.n === idxRes0.v)\n || (!isPureNumber && guessRecords[idxRes0.n] === BE_ORDINAL.Not)\n ) {\n idxRes0.n = i;\n }\n if (fulfilled(idxRes0) && guessRecords[idxRes0.n] !== BE_ORDINAL.Not) {\n return idxRes0;\n }\n\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 if (!isPureNumber) {\n if (guessResult === BE_ORDINAL.Might && idxRes1.v == null && i !== potentialNameDimIndex) {\n idxRes1.v = i;\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;\n // `potentialNameDimIndex` has highest priority.\n var nameDimIndex = potentialNameDimIndex != null ? potentialNameDimIndex : idxResult.n;\n // By default, label use itemName in charts.\n // So we dont set encodeLabel here.\n encode.itemName = [nameDimIndex];\n encode.seriesName = [nameDimIndex];\n }\n\n return encode;\n}\n\n/**\n * If return null/undefined, indicate that should not use datasetModel.\n */\nfunction getDatasetModel(seriesModel) {\n var option = seriesModel.option;\n // 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 var thisData = option.data;\n if (!thisData) {\n return seriesModel.ecModel.getComponent('dataset', option.datasetIndex || 0);\n }\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 */\nexport function guessOrdinal(source, dimIndex) {\n return doGuessOrdinal(\n source.data,\n source.sourceFormat,\n source.seriesLayoutBy,\n source.dimensionsDefine,\n source.startIndex,\n dimIndex\n );\n}\n\n// dimIndex may be overflow source data.\n// return {BE_ORDINAL}\nfunction doGuessOrdinal(\n data, sourceFormat, seriesLayoutBy, dimensionsDefine, startIndex, dimIndex\n) {\n var result;\n // Experience value.\n var maxLoop = 5;\n\n if (isTypedArray(data)) {\n return BE_ORDINAL.Not;\n }\n\n // When sourceType is 'objectRows' or 'keyedColumns', dimensionsDefine\n // always exists in source.\n var dimName;\n var dimType;\n if (dimensionsDefine) {\n var dimDefItem = dimensionsDefine[dimIndex];\n if (isObject(dimDefItem)) {\n dimName = dimDefItem.name;\n dimType = dimDefItem.type;\n }\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 for (var i = 0; i < (sample || []).length && i < maxLoop; i++) {\n if ((result = detectValue(sample[startIndex + i])) != null) {\n return result;\n }\n }\n }\n else {\n for (var i = 0; i < data.length && i < maxLoop; i++) {\n var row = data[startIndex + i];\n if (row && (result = detectValue(row[dimIndex])) != null) {\n return result;\n }\n }\n }\n }\n else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) {\n if (!dimName) {\n return BE_ORDINAL.Not;\n }\n for (var i = 0; i < data.length && i < maxLoop; i++) {\n var item = data[i];\n if (item && (result = detectValue(item[dimName])) != null) {\n return result;\n }\n }\n }\n else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) {\n if (!dimName) {\n return BE_ORDINAL.Not;\n }\n var sample = data[dimName];\n if (!sample || isTypedArray(sample)) {\n return BE_ORDINAL.Not;\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 }\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 if (!isArray(val)) {\n return BE_ORDINAL.Not;\n }\n if ((result = detectValue(val[dimIndex])) != null) {\n return result;\n }\n }\n }\n\n function detectValue(val) {\n var beStr = isString(val);\n // Consider usage convenience, '1', '2' will be treated as \"number\".\n // `isFinit('')` get `true`.\n if (val != null && isFinite(val) && val !== '') {\n return beStr ? BE_ORDINAL.Might : BE_ORDINAL.Not;\n }\n else if (beStr && val !== '-') {\n return BE_ORDINAL.Must;\n }\n }\n\n return BE_ORDINAL.Not;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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/**\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 */\n\nimport {__DEV__} from '../config';\nimport {\n each, filter, map, isArray, indexOf, isObject, isString,\n createHashMap, assert, clone, merge, extend, mixin\n} from 'zrender/src/core/util';\nimport * as modelUtil from '../util/model';\nimport Model from './Model';\nimport ComponentModel from './Component';\nimport globalDefault from './globalDefault';\nimport colorPaletteMixin from './mixin/colorPalette';\nimport {resetSourceDefaulter} from '../data/helper/sourceHelper';\n\nvar OPTION_INNER_KEY = '\\0_ec_inner';\n\n/**\n * @alias module:echarts/model/Global\n *\n * @param {Object} option\n * @param {module:echarts/model/Model} parentModel\n * @param {Object} theme\n */\nvar GlobalModel = Model.extend({\n\n init: function (option, parentModel, theme, optionManager) {\n theme = theme || {};\n\n this.option = null; // Mark as not initialized.\n\n /**\n * @type {module:echarts/model/Model}\n * @private\n */\n this._theme = new Model(theme);\n\n /**\n * @type {module:echarts/model/OptionManager}\n */\n this._optionManager = optionManager;\n },\n\n setOption: function (option, optionPreprocessorFuncs) {\n assert(\n !(OPTION_INNER_KEY in option),\n 'please use chart.getOption()'\n );\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 }\n else {\n this.restoreData();\n this.mergeOption(baseOption);\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 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\n resetSourceDefaulter(this);\n\n // If no component class, merge directly.\n // For example: color, animaiton options, etc.\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\n ? clone(componentOption)\n : merge(option[mainType], componentOption, true);\n }\n else if (mainType) {\n newCptTypes.push(mainType);\n }\n });\n\n ComponentModel.topologicalTravel(\n newCptTypes, ComponentModel.getAllClassMainTypes(), visitComponent, this\n );\n\n function visitComponent(mainType, dependencies) {\n\n var newCptOptionList = modelUtil.normalizeToArray(newOption[mainType]);\n\n var mapResult = modelUtil.mappingToExists(\n componentsMap.get(mainType), newCptOptionList\n );\n\n modelUtil.makeIdAndName(mapResult);\n\n // Set mainType and complete subType.\n each(mapResult, function (item, index) {\n var opt = item.option;\n if (isObject(opt)) {\n item.keyInfo.mainType = mainType;\n item.keyInfo.subType = determineSubType(mainType, opt, item.exist);\n }\n });\n\n var dependentModels = getComponentsByTypes(\n componentsMap, dependencies\n );\n\n option[mainType] = [];\n componentsMap.set(mainType, []);\n\n each(mapResult, function (resultItem, index) {\n var componentModel = resultItem.exist;\n var newCptOption = resultItem.option;\n\n assert(\n isObject(newCptOption) || componentModel,\n 'Empty component definition'\n );\n\n // Consider where is no new option and should be merged using {},\n // see removeEdgeAndAdd in topologicalTravel and\n // ComponentModel.getAllClassMainTypes.\n if (!newCptOption) {\n componentModel.mergeOption({}, this);\n componentModel.optionUpdated({}, false);\n }\n else {\n var ComponentModelClass = ComponentModel.getClass(\n mainType, resultItem.keyInfo.subType, true\n );\n\n if (componentModel && componentModel.constructor === ComponentModelClass) {\n componentModel.name = resultItem.keyInfo.name;\n // componentModel.settingTask && componentModel.settingTask.dirty();\n componentModel.mergeOption(newCptOption, this);\n componentModel.optionUpdated(newCptOption, false);\n }\n else {\n // PENDING Global as parent ?\n var extraOpt = extend(\n {\n dependentModels: dependentModels,\n componentIndex: index\n },\n resultItem.keyInfo\n );\n componentModel = new ComponentModelClass(\n newCptOption, this, this, extraOpt\n );\n extend(componentModel, extraOpt);\n componentModel.init(newCptOption, this, this, extraOpt);\n\n // 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 componentModel.optionUpdated(null, true);\n }\n }\n\n componentsMap.get(mainType)[index] = componentModel;\n option[mainType][index] = componentModel.option;\n }, this);\n\n // Backup series for filtering.\n if (mainType === 'series') {\n createSeriesIndices(this, componentsMap.get('series'));\n }\n }\n\n this._seriesIndicesMap = createHashMap(\n this._seriesIndices = this._seriesIndices || []\n );\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\n each(option, function (opts, mainType) {\n if (ComponentModel.hasClass(mainType)) {\n var opts = modelUtil.normalizeToArray(opts);\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 option[mainType] = opts;\n }\n });\n\n delete option[OPTION_INNER_KEY];\n\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 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.<number>} [condition.index] Either input index or id or name.\n * @param {string|Array.<string>} [condition.id] Either input index or id or name.\n * @param {string|Array.<string>} [condition.name] Either input index or id or name.\n * @return {Array.<module:echarts/model/Component>}\n */\n queryComponents: function (condition) {\n var mainType = condition.mainType;\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 result = filter(map(index, function (idx) {\n return cpts[idx];\n }), function (val) {\n return !!val;\n });\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)\n || (!isIdArray && cpt.id === id);\n });\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)\n || (!isNameArray && cpt.name === name);\n });\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.<module:echarts/model/Component>}\n */\n findComponents: function (condition) {\n var query = condition.query;\n var mainType = condition.mainType;\n\n var queryCond = getQueryCond(query);\n var result = queryCond\n ? this.queryComponents(queryCond)\n : this._componentsMap.get(mainType);\n\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 && (\n q[indexAttr] != null\n || q[idAttr] != null\n || q[nameAttr] != null\n )\n ? {\n mainType: mainType,\n // subType will be filtered finally.\n index: q[indexAttr],\n id: q[idAttr],\n name: q[nameAttr]\n }\n : null;\n }\n\n function doFilter(res) {\n return condition.filter\n ? filter(res, condition.filter)\n : 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 }\n else if (isString(mainType)) {\n each(componentsMap.get(mainType), cb, context);\n }\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.<module:echarts/model/Series>}\n */\n getSeriesByName: function (name) {\n var series = this._componentsMap.get('series');\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.<module:echarts/model/Series>}\n */\n getSeriesByType: function (subType) {\n var series = this._componentsMap.get('series');\n return filter(series, function (oneSeries) {\n return oneSeries.subType === subType;\n });\n },\n\n /**\n * @return {Array.<module:echarts/model/Series>}\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 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 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.<number>}\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(\n this._componentsMap.get('series'), cb, context\n );\n createSeriesIndices(this, filteredSeries);\n },\n\n restoreData: function (payload) {\n var componentsMap = this._componentsMap;\n\n createSeriesIndices(this, componentsMap.get('series'));\n\n var componentTypes = [];\n componentsMap.each(function (components, componentType) {\n componentTypes.push(componentType);\n });\n\n ComponentModel.topologicalTravel(\n componentTypes,\n ComponentModel.getAllClassMainTypes(),\n function (componentType, dependencies) {\n each(componentsMap.get(componentType), function (component) {\n (componentType !== 'series' || !isNotTargetSeries(component, payload))\n && component.restoreData();\n });\n }\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)\n || (id != null && seriesModel.id !== id)\n || (name != null && seriesModel.name !== name);\n }\n}\n\n/**\n * @inner\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\n each(theme, function (themeItem, name) {\n if (name === 'colorLayer' && notMergeColorLayer) {\n return;\n }\n // 如果有 component model 则把具体的 merge 逻辑交给该 model 处理\n if (!ComponentModel.hasClass(name)) {\n if (typeof themeItem === 'object') {\n option[name] = !option[name]\n ? clone(themeItem)\n : merge(option[name], themeItem, false);\n }\n else {\n if (option[name] == null) {\n option[name] = themeItem;\n }\n }\n }\n });\n}\n\nfunction initBase(baseOption) {\n baseOption = baseOption;\n\n // 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 this.option = {};\n this.option[OPTION_INNER_KEY] = 1;\n\n /**\n * Init with series: [], in case of calling findSeries method\n * before series initialized.\n * @type {Object.<string, Array.<module:echarts/model/Model>>}\n * @private\n */\n this._componentsMap = createHashMap({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.<nubmer>}\n * @private\n */\n this._seriesIndices;\n\n this._seriesIndicesMap;\n\n mergeTheme(baseOption, this._theme.option);\n\n // TODO Needs clone when merging to the unexisted property\n merge(baseOption, globalDefault, false);\n\n this.mergeOption(baseOption);\n}\n\n/**\n * @inner\n * @param {Array.<string>|string} types model types\n * @return {Object} key: {string} type, value: {Array.<Object>} models\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\n return ret;\n}\n\n/**\n * @inner\n */\nfunction determineSubType(mainType, newCptOption, existComponent) {\n var subType = newCptOption.type\n ? newCptOption.type\n : existComponent\n ? existComponent.subType\n // Use determineSubType only when there is no existComponent.\n : ComponentModel.determineSubType(mainType, newCptOption);\n\n // tooltip, markline, markpoint may always has no subType\n return subType;\n}\n\n/**\n * @inner\n */\nfunction createSeriesIndices(ecModel, seriesModels) {\n ecModel._seriesIndicesMap = createHashMap(\n ecModel._seriesIndices = map(seriesModels, function (series) {\n return series.componentIndex;\n }) || []\n );\n}\n\n/**\n * @inner\n */\nfunction filterBySubType(components, condition) {\n // Using hasOwnProperty for restrict. Consider\n // subType is undefined in user payload.\n return condition.hasOwnProperty('subType')\n ? filter(components, function (cpt) {\n return cpt.subType === condition.subType;\n })\n : components;\n}\n\n/**\n * @inner\n */\nfunction assertSeriesInitialized(ecModel) {\n // Components that use _seriesIndices should depends on series component,\n // which make sure that their initialization is after series.\n if (__DEV__) {\n if (!ecModel._seriesIndices) {\n throw new Error('Option should contains series.');\n }\n }\n}\n\nmixin(GlobalModel, colorPaletteMixin);\n\nexport default GlobalModel;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\n\nvar echartsAPIList = [\n 'getDom', 'getZr', 'getWidth', 'getHeight', 'getDevicePixelRatio', 'dispatchAction', 'isDisposed',\n 'on', 'off', 'getDataURL', 'getConnectedDataURL', 'getModel', 'getOption',\n 'getViewOfComponentModel', 'getViewOfSeriesModel'\n];\n// 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\nexport default ExtensionAPI;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\n\nvar coordinateSystemCreators = {};\n\nfunction CoordinateSystemManager() {\n\n this._coordinateSystems = [];\n}\n\nCoordinateSystemManager.prototype = {\n\n constructor: CoordinateSystemManager,\n\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\n this._coordinateSystems = coordinateSystems;\n },\n\n update: function (ecModel, api) {\n zrUtil.each(this._coordinateSystems, function (coordSys) {\n coordSys.update && coordSys.update(ecModel, api);\n });\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\nexport default CoordinateSystemManager;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as modelUtil from '../util/model';\nimport ComponentModel from './Component';\n\nvar each = zrUtil.each;\nvar clone = zrUtil.clone;\nvar map = zrUtil.map;\nvar merge = zrUtil.merge;\n\nvar QUERY_REG = /^(min|max)?(.+)$/;\n\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 */\nfunction OptionManager(api) {\n\n /**\n * @private\n * @type {module:echarts/ExtensionAPI}\n */\n this._api = api;\n\n /**\n * @private\n * @type {Array.<number>}\n */\n this._timelineOptions = [];\n\n /**\n * @private\n * @type {Array.<Object>}\n */\n this._mediaList = [];\n\n /**\n * @private\n * @type {Object}\n */\n this._mediaDefault;\n\n /**\n * -1, means default.\n * empty means no media.\n * @private\n * @type {Array.<number>}\n */\n this._currentMediaIndices = [];\n\n /**\n * @private\n * @type {Object}\n */\n this._optionBackup;\n\n /**\n * @private\n * @type {Object}\n */\n this._newBaseOption;\n}\n\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\nOptionManager.prototype = {\n\n constructor: OptionManager,\n\n /**\n * @public\n * @param {Object} rawOption Raw option.\n * @param {module:echarts/model/Global} ecModel\n * @param {Array.<Function>} 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 }\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 rawOption = clone(rawOption);\n\n // FIXME\n // 如果 timeline options 或者 media 中设置了某个属性而baseOption中没有设置则进行警告。\n\n var oldOptionBackup = this._optionBackup;\n var newParsedOption = parseRawOption.call(\n this, rawOption, optionPreprocessorFuncs, !oldOptionBackup\n );\n this._newBaseOption = newParsedOption.baseOption;\n\n // For setOption at second time (using merge mode);\n if (oldOptionBackup) {\n // Only baseOption can be merged.\n mergeOption(oldOptionBackup.baseOption, newParsedOption.baseOption);\n\n // 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 if (newParsedOption.timelineOptions.length) {\n oldOptionBackup.timelineOptions = newParsedOption.timelineOptions;\n }\n if (newParsedOption.mediaList.length) {\n oldOptionBackup.mediaList = newParsedOption.mediaList;\n }\n if (newParsedOption.mediaDefault) {\n oldOptionBackup.mediaDefault = newParsedOption.mediaDefault;\n }\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;\n\n // 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\n return clone(isRecreate\n // 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 /**\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 if (timelineModel) {\n option = clone(\n timelineOptions[timelineModel.getCurrentIndex()],\n true\n );\n }\n }\n\n return option;\n },\n\n /**\n * @param {module:echarts/model/Global} ecModel\n * @return {Array.<Object>}\n */\n getMediaOption: function (ecModel) {\n var ecWidth = this._api.getWidth();\n var ecHeight = this._api.getHeight();\n var mediaList = this._mediaList;\n var mediaDefault = this._mediaDefault;\n var indices = [];\n var result = [];\n\n // No media defined.\n if (!mediaList.length && !mediaDefault) {\n return result;\n }\n\n // Multi media may be applied, the latter defined media has higher priority.\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 }\n\n // FIXME\n // 是否mediaDefault应该强制用户设置否则可能修改不能回归。\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(\n index === -1 ? mediaDefault.option : mediaList[index].option\n );\n });\n }\n // Otherwise return nothing.\n\n this._currentMediaIndices = indices;\n\n return result;\n }\n};\n\nfunction parseRawOption(rawOption, optionPreprocessorFuncs, isNew) {\n var timelineOptions = [];\n var mediaList = [];\n var mediaDefault;\n var baseOption;\n\n // Compatible with ec2.\n var timelineOpt = rawOption.timeline;\n\n if (rawOption.baseOption) {\n baseOption = rawOption.baseOption;\n }\n\n // For timeline\n if (timelineOpt || rawOption.options) {\n baseOption = baseOption || {};\n timelineOptions = (rawOption.options || []).slice();\n }\n\n // For media query\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 }\n else if (!mediaDefault) {\n // Use the first media default.\n mediaDefault = singleMedia;\n }\n }\n });\n }\n\n // For normal option\n if (!baseOption) {\n baseOption = rawOption;\n }\n\n // Set timelineOpt to baseOption in ec3,\n // which is convenient for merge option.\n if (!baseOption.timeline) {\n baseOption.timeline = timelineOpt;\n }\n\n // Preprocess.\n each([baseOption].concat(timelineOptions)\n .concat(zrUtil.map(mediaList, function (media) {\n return media.option;\n })),\n function (option) {\n each(optionPreprocessorFuncs, function (preProcess) {\n preProcess(option, isNew);\n });\n }\n );\n\n return {\n baseOption: baseOption,\n timelineOptions: timelineOptions,\n mediaDefault: mediaDefault,\n mediaList: mediaList\n };\n}\n\n/**\n * @see <http://www.w3.org/TR/css3-mediaqueries/#media1>\n * Support: width, height, aspectRatio\n * Can use max or min as prefix.\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\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\n return applicatable;\n}\n\nfunction compare(real, expect, operator) {\n if (operator === 'min') {\n return real >= expect;\n }\n else if (operator === 'max') {\n return real <= expect;\n }\n else { // 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/**\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 */\nfunction mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n\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 }\n else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n\n oldOption[mainType] = map(mapResult, function (item) {\n return (item.option && item.exist)\n ? merge(item.exist, item.option, true)\n : (item.exist || item.option);\n });\n }\n });\n}\n\nexport default OptionManager;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as modelUtil from '../../util/model';\n\nvar each = zrUtil.each;\nvar isObject = zrUtil.isObject;\n\nvar POSSIBLE_STYLES = [\n 'areaStyle', 'lineStyle', 'nodeStyle', 'linkStyle',\n 'chordStyle', 'label', 'labelLine'\n];\n\nfunction compatEC2ItemStyle(opt) {\n var itemStyleOpt = opt && opt.itemStyle;\n if (!itemStyleOpt) {\n return;\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 if (normalItemStyleOpt && normalItemStyleOpt[styleName]) {\n opt[styleName] = opt[styleName] || {};\n if (!opt[styleName].normal) {\n opt[styleName].normal = normalItemStyleOpt[styleName];\n }\n else {\n zrUtil.merge(opt[styleName].normal, normalItemStyleOpt[styleName]);\n }\n normalItemStyleOpt[styleName] = null;\n }\n if (emphasisItemStyleOpt && emphasisItemStyleOpt[styleName]) {\n opt[styleName] = opt[styleName] || {};\n if (!opt[styleName].emphasis) {\n opt[styleName].emphasis = emphasisItemStyleOpt[styleName];\n }\n else {\n zrUtil.merge(opt[styleName].emphasis, emphasisItemStyleOpt[styleName]);\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 }\n else {\n opt[optType] = normalOpt;\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');\n // treemap\n convertNormalEmphasis(opt, 'upperLabel');\n // graph\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 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 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\n compatTextStyle(seriesOpt, 'label');\n // treemap\n compatTextStyle(seriesOpt, 'upperLabel');\n // graph\n compatTextStyle(seriesOpt, 'edgeLabel');\n if (seriesOpt.emphasis) {\n compatTextStyle(seriesOpt.emphasis, 'label');\n // treemap\n compatTextStyle(seriesOpt.emphasis, 'upperLabel');\n // graph\n compatTextStyle(seriesOpt.emphasis, 'edgeLabel');\n }\n\n var markPoint = seriesOpt.markPoint;\n if (markPoint) {\n compatEC2ItemStyle(markPoint);\n compatEC3CommonStyles(markPoint);\n }\n\n var markLine = seriesOpt.markLine;\n if (markLine) {\n compatEC2ItemStyle(markLine);\n compatEC3CommonStyles(markLine);\n }\n\n var markArea = seriesOpt.markArea;\n if (markArea) {\n compatEC3CommonStyles(markArea);\n }\n\n var data = seriesOpt.data;\n\n // 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 if (edgeData && !zrUtil.isTypedArray(edgeData)) {\n for (var i = 0; i < edgeData.length; i++) {\n compatEC3CommonStyles(edgeData[i]);\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 }\n\n // mark point data\n var markPoint = seriesOpt.markPoint;\n if (markPoint && markPoint.data) {\n var mpData = markPoint.data;\n for (var i = 0; i < mpData.length; i++) {\n compatEC3CommonStyles(mpData[i]);\n }\n }\n // mark line data\n var markLine = seriesOpt.markLine;\n if (markLine && markLine.data) {\n var mlData = markLine.data;\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 }\n else {\n compatEC3CommonStyles(mlData[i]);\n }\n }\n }\n\n // Series\n if (seriesOpt.type === 'gauge') {\n compatTextStyle(seriesOpt, 'axisLabel');\n compatTextStyle(seriesOpt, 'title');\n compatTextStyle(seriesOpt, 'detail');\n }\n else if (seriesOpt.type === 'treemap') {\n convertNormalEmphasis(seriesOpt.breadcrumb, 'itemStyle');\n zrUtil.each(seriesOpt.levels, function (opt) {\n removeEC3NormalStatus(opt);\n });\n }\n else if (seriesOpt.type === 'tree') {\n removeEC3NormalStatus(seriesOpt.leaves);\n }\n // sunburst starts from ec4, so it does not need to compat levels.\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\nexport default function (option, isTheme) {\n each(toArr(option.series), function (seriesOpt) {\n isObject(seriesOpt) && processSeries(seriesOpt);\n });\n\n var axes = ['xAxis', 'yAxis', 'radiusAxis', 'angleAxis', 'singleAxis', 'parallelAxis', 'radar'];\n isTheme && axes.push('valueAxis', 'categoryAxis', 'logAxis', 'timeAxis');\n\n each(\n axes,\n 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 );\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\n each(toArr(option.calendar), function (calendarOpt) {\n convertNormalEmphasis(calendarOpt, 'itemStyle');\n compatTextStyle(calendarOpt, 'dayLabel');\n compatTextStyle(calendarOpt, 'monthLabel');\n compatTextStyle(calendarOpt, 'yearLabel');\n });\n\n // radar.name.textStyle\n each(toArr(option.radar), function (radarOpt) {\n compatTextStyle(radarOpt, 'name');\n });\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\n each(toArr(option.timeline), function (timelineOpt) {\n compatEC3CommonStyles(timelineOpt);\n convertNormalEmphasis(timelineOpt, 'label');\n convertNormalEmphasis(timelineOpt, 'itemStyle');\n convertNormalEmphasis(timelineOpt, 'controlStyle', true);\n\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\n each(toArr(option.toolbox), function (toolboxOpt) {\n convertNormalEmphasis(toolboxOpt, 'iconStyle');\n each(toolboxOpt.feature, function (featureOpt) {\n convertNormalEmphasis(featureOpt, 'iconStyle');\n });\n });\n\n compatTextStyle(toObj(option.axisPointer), 'label');\n compatTextStyle(toObj(option.tooltip).axisPointer, 'label');\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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// Compatitable with 2.0\n\nimport {each, isArray, isObject} from 'zrender/src/core/util';\nimport compatStyle from './helper/compatStyle';\nimport {normalizeToArray} from '../util/model';\n\nfunction get(opt, path) {\n path = path.split(',');\n var obj = opt;\n for (var i = 0; i < path.length; i++) {\n obj = obj && obj[path[i]];\n if (obj == null) {\n break;\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 for (var i = 0; i < path.length - 1; i++) {\n key = path[i];\n if (obj[key] == null) {\n obj[key] = {};\n }\n obj = obj[key];\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 = [\n ['x', 'left'], ['y', 'top'], ['x2', 'right'], ['y2', 'bottom']\n];\n\nvar COMPATITABLE_COMPONENTS = [\n 'grid', 'geo', 'parallel', 'legend', 'toolbox', 'title', 'visualMap', 'dataZoom', 'timeline'\n];\n\nexport default function (option, isTheme) {\n compatStyle(option, isTheme);\n\n // Make sure series array for model initialization.\n option.series = normalizeToArray(option.series);\n\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 }\n else if (seriesType === 'pie' || seriesType === 'gauge') {\n if (seriesOpt.clockWise != null) {\n seriesOpt.clockwise = seriesOpt.clockWise;\n }\n }\n else if (seriesType === 'gauge') {\n var pointerColor = get(seriesOpt, 'pointer.color');\n pointerColor != null\n && set(seriesOpt, 'itemStyle.color', pointerColor);\n }\n\n compatLayoutProperties(seriesOpt);\n });\n\n // dataRange has changed to visualMap\n if (option.dataRange) {\n option.visualMap = option.dataRange;\n }\n\n each(COMPATITABLE_COMPONENTS, function (componentName) {\n var options = option[componentName];\n if (options) {\n if (!isArray(options)) {\n options = [options];\n }\n each(options, function (option) {\n compatLayoutProperties(option);\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\nimport {createHashMap, each} from 'zrender/src/core/util';\n\n// (1) [Caution]: the logic is correct based on the premises:\n// data processing stage is blocked in stream.\n// See <module:echarts/stream/Scheduler#performDataProcessorTasks>\n// (2) Only register once when import repeatly.\n// Should be executed after series filtered and before stack calculation.\nexport default function (ecModel) {\n var stackInfoMap = createHashMap();\n ecModel.eachSeries(function (seriesModel) {\n var stack = seriesModel.get('stack');\n // Compatibal: when `stack` is set as '', do not stack.\n if (stack) {\n var stackInfoList = stackInfoMap.get(stack) || stackInfoMap.set(stack, []);\n var data = seriesModel.getData();\n\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 };\n\n // If stacked on axis that do not support data stack.\n if (!stackInfo.stackedDimension\n || !(stackInfo.isStackedByIndex || stackInfo.stackedByDimension)\n ) {\n return;\n }\n\n stackInfoList.length && data.setCalculationInfo(\n 'stackedOnSeries', stackInfoList[stackInfoList.length - 1].seriesModel\n );\n\n stackInfoList.push(stackInfo);\n }\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;\n\n // Should not write on raw data, because stack series model list changes\n // depending on legend selection.\n var newData = targetData.map(dims, function (v0, v1, dataIndex) {\n var sum = targetData.get(targetStackInfo.stackedDimension, dataIndex);\n\n // Consider `connectNulls` of line area, if value is NaN, stackedOver\n // should also be NaN, to draw a appropriate belt area.\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 }\n else {\n byValue = targetData.get(targetStackInfo.stackedByDimension, dataIndex);\n }\n\n // If stackOver is NaN, chart view will render point on value start.\n var stackedOver = NaN;\n\n for (var j = idxInStack - 1; j >= 0; j--) {\n var stackInfo = stackInfoList[j];\n\n // Has been optimized by inverted indices on `stackedByDimension`.\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);\n\n // Considering positive stack, negative stack and empty data\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\n return resultVal;\n });\n\n targetData.hostModel.setData(newData);\n // Update for consequent calculation\n targetStackInfo.data = newData;\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// TODO\n// ??? refactor? check the outer usage of data provider.\n// merge with defaultDimValueGetter?\n\nimport {__DEV__} from '../../config';\nimport {isTypedArray, extend, assert, each, isObject} from 'zrender/src/core/util';\nimport {getDataItemValue, isDataItemOption} from '../../util/model';\nimport {parseDate} from '../../util/number';\nimport Source from '../Source';\nimport {\n SOURCE_FORMAT_TYPED_ARRAY,\n SOURCE_FORMAT_ARRAY_ROWS,\n SOURCE_FORMAT_ORIGINAL,\n SOURCE_FORMAT_OBJECT_ROWS\n} from './sourceType';\n\n/**\n * If normal array used, mutable chunk size is supported.\n * If typed array used, chunk size must be fixed.\n */\nexport function DefaultDataProvider(source, dimSize) {\n if (!Source.isInstance(source)) {\n source = Source.seriesDataToSource(source);\n }\n this._source = source;\n\n var data = this._data = source.data;\n var sourceFormat = source.sourceFormat;\n\n // Typed array. TODO IE10+?\n if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) {\n if (__DEV__) {\n if (dimSize == null) {\n throw new Error('Typed array data must specify dimension size');\n }\n }\n this._offset = 0;\n this._dimSize = dimSize;\n this._data = data;\n }\n\n var methods = providerMethods[\n sourceFormat === SOURCE_FORMAT_ARRAY_ROWS\n ? sourceFormat + '_' + source.seriesLayoutBy\n : sourceFormat\n ];\n\n if (__DEV__) {\n assert(methods, 'Invalide sourceFormat: ' + sourceFormat);\n }\n\n extend(this, methods);\n}\n\nvar providerProto = DefaultDataProvider.prototype;\n// If data is pure without style configuration\nproviderProto.pure = false;\n// If data is persistent and will not be released after use.\nproviderProto.persistent = true;\n\n// ???! FIXME legacy data provider do not has method getSource\nproviderProto.getSource = function () {\n return this._source;\n};\n\nvar providerMethods = {\n\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\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 for (var i = 0; i < data.length; i++) {\n var row = data[i];\n item.push(row ? row[idx] : null);\n }\n return item;\n },\n appendData: function () {\n throw new Error('Do not support appendData when set seriesLayoutBy: \"row\".');\n }\n },\n\n 'objectRows': {\n pure: true,\n count: countSimply,\n getItem: getItemSimply,\n appendData: appendDataSimply\n },\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 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 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 for (var i = 0; i < (newCol || []).length; i++) {\n oldCol.push(newCol[i]);\n }\n });\n }\n },\n\n 'original': {\n count: countSimply,\n getItem: getItemSimply,\n appendData: appendDataSimply\n },\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 for (var i = 0; i < this._dimSize; i++) {\n out[i] = this._data[offset + i];\n }\n return out;\n },\n appendData: function (newData) {\n if (__DEV__) {\n assert(\n isTypedArray(newData),\n 'Added data must be TypedArray if data in initialization is TypedArray'\n );\n }\n\n this._data = newData;\n },\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}\nfunction getItemSimply(idx) {\n return this._data[idx];\n}\nfunction appendDataSimply(newData) {\n for (var i = 0; i < newData.length; i++) {\n this._data.push(newData[i]);\n }\n}\n\n\n\nvar rawValueGetters = {\n\n arrayRows: getRawValueSimply,\n\n objectRows: function (dataItem, dataIndex, dimIndex, dimName) {\n return dimIndex != null ? dataItem[dimName] : dataItem;\n },\n\n keyedColumns: getRawValueSimply,\n\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))\n ? value\n : value[dimIndex];\n },\n\n typedArray: getRawValueSimply\n};\n\nfunction getRawValueSimply(dataItem, dataIndex, dimIndex, dimName) {\n return dimIndex != null ? dataItem[dimIndex] : dataItem;\n}\n\n\nexport var defaultDimValueGetters = {\n\n arrayRows: getDimValueSimply,\n\n objectRows: function (dataItem, dimName, dataIndex, dimIndex) {\n return converDataValue(dataItem[dimName], this._dimensionInfos[dimName]);\n },\n\n keyedColumns: getDimValueSimply,\n\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);\n\n // If any dataItem is like { value: 10 }\n if (!this._rawData.pure && isDataItemOption(dataItem)) {\n this.hasItemOption = true;\n }\n return converDataValue(\n (value instanceof Array)\n ? value[dimIndex]\n // If value is a single number or something else not array.\n : value,\n this._dimensionInfos[dimName]\n );\n },\n\n typedArray: function (dataItem, dimName, dataIndex, dimIndex) {\n return dataItem[dimIndex];\n }\n\n};\n\nfunction getDimValueSimply(dataItem, dimName, dataIndex, dimIndex) {\n return converDataValue(dataItem[dimIndex], this._dimensionInfos[dimName]);\n}\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 */\nfunction converDataValue(value, dimInfo) {\n // Performance sensitive.\n var dimType = dimInfo && dimInfo.type;\n if (dimType === 'ordinal') {\n // If given value is a category string\n var ordinalMeta = dimInfo && dimInfo.ordinalMeta;\n return ordinalMeta\n ? ordinalMeta.parseAndCollect(value)\n : value;\n }\n\n if (dimType === 'time'\n // spead up when using timestamp\n && typeof value !== 'number'\n && value != null\n && value !== '-'\n ) {\n value = +parseDate(value);\n }\n\n // dimType defaults 'number'.\n // If dimType is not ordinal and value is null or undefined or NaN or '-',\n // parse to NaN.\n return (value == null || value === '')\n ? NaN\n // If string (like '-'), using '+' parse to NaN\n // If object, also parse to NaN\n : +value;\n}\n\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 * @param {module:echarts/data/List} data\n * @param {number} dataIndex\n * @param {string|number} [dim] dimName or dimIndex\n * @return {Array.<number>|string|number} can be null/undefined.\n */\nexport function retrieveRawValue(data, dataIndex, dim) {\n if (!data) {\n return;\n }\n\n // Consider data may be not persistent.\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\n var dimInfo = data.getDimensionInfo(dim);\n if (dimInfo) {\n dimName = dimInfo.name;\n dimIndex = dimInfo.index;\n }\n\n return rawValueGetters[sourceFormat](dataItem, dataIndex, dimIndex, dimName);\n}\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 */\nexport function 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\n && sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS\n ) {\n return;\n }\n\n var dataItem = data.getRawDataItem(dataIndex);\n if (sourceFormat === SOURCE_FORMAT_ORIGINAL && !isObject(dataItem)) {\n dataItem = null;\n }\n if (dataItem) {\n return dataItem[attr];\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\nimport {retrieveRawValue} from '../../data/helper/dataProvider';\nimport {getTooltipMarker, formatTpl} from '../../util/format';\nimport { getTooltipRenderMode } from '../../util/model';\n\nvar DIMENSION_LABEL_REG = /\\{@(.+?)\\}/g;\n\n// PENDING A little ugly\nexport 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\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\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\n var params = this.getDataParams(dataIndex, dataType);\n if (dimIndex != null && (params.value instanceof Array)) {\n params.value = params.value[dimIndex];\n }\n\n var formatter = itemModel.get(\n status === 'normal'\n ? [labelProp || 'label', 'formatter']\n : [status, labelProp || 'label', 'formatter']\n );\n\n if (typeof formatter === 'function') {\n params.status = status;\n params.dimensionIndex = dimIndex;\n return formatter(params);\n }\n else if (typeof formatter === 'string') {\n var str = formatTpl(formatter, params);\n\n // Support 'aaa{@[3]}bbb{@product}ccc'.\n // Do not support '}' in dim name util have to.\n return str.replace(DIMENSION_LABEL_REG, function (origin, dim) {\n var len = dim.length;\n if (dim.charAt(0) === '[' && dim.charAt(len - 1) === ']') {\n dim = +dim.slice(1, len - 1); // Also: '[]' => 0\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 () {\n // Empty function\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\nimport {assert, isArray} from 'zrender/src/core/util';\nimport { __DEV__ } from '../config';\n\n/**\n * @param {Object} define\n * @return See the return of `createTask`.\n */\nexport function createTask(define) {\n return new Task(define);\n}\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 */\nfunction Task(define) {\n define = define || {};\n\n this._reset = define.reset;\n this._plan = define.plan;\n this._count = define.count;\n this._onDirty = define.onDirty;\n\n this._dirty = true;\n\n // Context must be specified implicitly, to\n // avoid miss update context when model changed.\n this.context;\n}\n\nvar taskProto = Task.prototype;\n\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 */\ntaskProto.perform = function (performArgs) {\n var upTask = this._upstream;\n var skip = performArgs && performArgs.skip;\n\n // TODO some refactor.\n // Pull data. Must pull data each time, because context.data\n // may be updated by Series.setData.\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 if (this._plan && !skip) {\n planResult = this._plan(this.context);\n }\n\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 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 if (lastModBy !== modBy || lastModDataCount !== modDataCount) {\n planResult = 'reset';\n }\n\n function normalizeModBy(val) {\n !(val >= 1) && (val = 1); // jshint ignore:line\n return val;\n }\n\n var forceFirstProgress;\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\n var step = performArgs && performArgs.step;\n\n if (upTask) {\n\n if (__DEV__) {\n assert(upTask._outputDueEnd != null);\n }\n this._dueEnd = upTask._outputDueEnd;\n }\n // DataTask or overallTask\n else {\n if (__DEV__) {\n assert(!this._progress || this._count);\n }\n this._dueEnd = this._count ? this._count(this.context) : Infinity;\n }\n\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 if (this._progress) {\n var start = this._dueIndex;\n var end = Math.min(\n step != null ? this._dueIndex + step : Infinity,\n this._dueEnd\n );\n\n if (!skip && (forceFirstProgress || start < end)) {\n var progress = this._progress;\n if (isArray(progress)) {\n for (var i = 0; i < progress.length; i++) {\n doProgress(this, progress[i], start, end, modBy, modDataCount);\n }\n }\n else {\n doProgress(this, progress, start, end, modBy, modDataCount);\n }\n }\n\n this._dueIndex = end;\n // If no `outputDueEnd`, assume that output data and\n // input data is the same, so use `dueIndex` as `outputDueEnd`.\n var outputDueEnd = this._settedOutputEnd != null\n ? this._settedOutputEnd : end;\n\n if (__DEV__) {\n // ??? Can not rollback.\n assert(outputDueEnd >= this._outputDueEnd);\n }\n\n this._outputDueEnd = outputDueEnd;\n }\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\n ? this._settedOutputEnd : this._dueEnd;\n }\n\n return this.unfinished();\n};\n\nvar iterator = (function () {\n\n var end;\n var current;\n var modBy;\n var modDataCount;\n var winCount;\n\n var it = {\n reset: function (s, e, sStep, sCount) {\n current = s;\n end = e;\n\n modBy = sStep;\n modDataCount = sCount;\n winCount = Math.ceil(modDataCount / modBy);\n\n it.next = (modBy > 1 && modDataCount > 0) ? modNext : sequentialNext;\n }\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\n ? null\n : dataIndex < modDataCount\n ? dataIndex\n // 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 taskIns._callingProgress({\n start: start, end: end, count: end - start, 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\n var progress;\n var forceFirstProgress;\n\n if (!skip && taskIns._reset) {\n progress = taskIns._reset(taskIns.context);\n if (progress && progress.progress) {\n forceFirstProgress = progress.forceFirstProgress;\n progress = progress.progress;\n }\n // To simplify no progress checking, array must has item.\n if (isArray(progress) && !progress.length) {\n progress = null;\n }\n }\n\n taskIns._progress = progress;\n taskIns._modBy = taskIns._modDataCount = null;\n\n var downstream = taskIns._downstream;\n downstream && downstream.dirty();\n\n return forceFirstProgress;\n}\n\n/**\n * @return {boolean}\n */\ntaskProto.unfinished = function () {\n return this._progress && this._dueIndex < this._dueEnd;\n};\n\n/**\n * @param {Object} downTask The downstream task.\n * @return {Object} The downstream task.\n */\ntaskProto.pipe = function (downTask) {\n if (__DEV__) {\n assert(downTask && !downTask._disposed && downTask !== this);\n }\n\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\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\n\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* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {__DEV__} from '../config';\nimport * as zrUtil from 'zrender/src/core/util';\nimport env from 'zrender/src/core/env';\nimport {\n formatTime,\n encodeHTML,\n addCommas,\n getTooltipMarker\n} from '../util/format';\nimport * as modelUtil from '../util/model';\nimport ComponentModel from './Component';\nimport colorPaletteMixin from './mixin/colorPalette';\nimport dataFormatMixin from '../model/mixin/dataFormat';\nimport {\n getLayoutParams,\n mergeLayoutParam\n} from '../util/layout';\nimport {createTask} from '../stream/task';\nimport {\n prepareSource,\n getSource\n} from '../data/helper/sourceHelper';\nimport {retrieveRawValue} from '../data/helper/dataProvider';\n\nvar inner = modelUtil.makeInner();\n\nvar SeriesModel = ComponentModel.extend({\n\n type: 'series.__base__',\n\n /**\n * @readOnly\n */\n seriesIndex: 0,\n\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\n init: function (option, parentModel, ecModel, extraOpt) {\n\n /**\n * @type {number}\n * @readOnly\n */\n this.seriesIndex = this.componentIndex;\n\n this.dataTask = createTask({\n count: dataTaskCount,\n reset: dataTaskReset\n });\n this.dataTask.context = {model: this};\n\n this.mergeDefaultAndTheme(option, ecModel);\n\n prepareSource(this);\n\n\n var data = this.getInitialData(option, ecModel);\n wrapData(data, this);\n this.dataTask.context.data = data;\n\n if (__DEV__) {\n zrUtil.assert(data, 'getInitialData returned invalid data.');\n }\n\n /**\n * @type {module:echarts/data/List|module:echarts/data/Tree|module:echarts/data/Graph}\n * @private\n */\n inner(this).dataBeforeProcessed = data;\n\n // 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\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\n ? getLayoutParams(option) : {};\n\n // 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 var themeSubType = this.subType;\n if (ComponentModel.hasClass(themeSubType)) {\n themeSubType += 'Series';\n }\n zrUtil.merge(\n option,\n ecModel.getTheme().get(this.subType)\n );\n zrUtil.merge(option, this.getDefaultOption());\n\n // Default label emphasis `show`\n modelUtil.defaultEmphasis(option, 'label', ['show']);\n\n this.fillDataTextStyle(option.data);\n\n if (layoutMode) {\n mergeLayoutParam(option, inputPositionParams, layoutMode);\n }\n },\n\n mergeOption: function (newSeriesOption, ecModel) {\n // this.settingTask.dirty();\n\n newSeriesOption = zrUtil.merge(this.option, newSeriesOption, true);\n this.fillDataTextStyle(newSeriesOption.data);\n\n var layoutMode = this.layoutMode;\n if (layoutMode) {\n mergeLayoutParam(this.option, newSeriesOption, layoutMode);\n }\n\n prepareSource(this);\n\n var data = this.getInitialData(newSeriesOption, ecModel);\n wrapData(data, this);\n this.dataTask.dirty();\n this.dataTask.context.data = data;\n\n inner(this).dataBeforeProcessed = data;\n\n autoSeriesName(this);\n },\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 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 if (task) {\n var data = task.context.data;\n return dataType == null ? data : data.getLinkedData(dataType);\n }\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 if (task) {\n var context = task.context;\n // Consider case: filter, data sample.\n if (context.data !== data && task.modifyOutputEnd) {\n task.setOutputEnd(data.count());\n }\n context.outputData = data;\n // 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 if (task !== this.dataTask) {\n context.data = data;\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\n // FIXME\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\n var series = this;\n renderMode = renderMode || 'html';\n var newLine = renderMode === 'html' ? '<br/>' : '\\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\n var result = [];\n\n tooltipDims.length\n ? zrUtil.each(tooltipDims, function (dim) {\n setEachItem(retrieveRawValue(data, dataIndex, dim), dim);\n })\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);\n // If `dimInfo.tooltip` is not set, show tooltip.\n if (!dimInfo || dimInfo.otherDims.tooltip === false) {\n return;\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\n var dimHeadStr = typeof dimHead === 'string' ? dimHead : dimHead.content;\n var valStr = (vertially\n ? dimHeadStr + encodeHTML(dimInfo.displayName || '-') + ': '\n : ''\n )\n // FIXME should not format time for raw data?\n + encodeHTML(dimType === 'ordinal'\n ? val + ''\n : dimType === 'time'\n ? (multipleSeries ? '' : formatTime('yyyy/MM/dd hh:mm:ss', val))\n : addCommas(val)\n );\n valStr && result.push(valStr);\n\n if (isRichText) {\n markers[markName] = color;\n ++markerId;\n }\n }\n\n var newLine = vertially ? (isRichText ? '\\n' : '<br/>') : '';\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\n var color = data.getItemVisual(dataIndex, 'color');\n if (zrUtil.isObject(color) && color.colorStops) {\n color = (color.colorStops[0] || {}).color;\n }\n color = color || 'transparent';\n\n // Complicated rule for pretty tooltip.\n var formattedValue = (tooltipDimLen > 1 || (isValueArr && !tooltipDimLen))\n ? formatArrayValue(value)\n : tooltipDimLen\n ? formatSingleValue(retrieveRawValue(data, dataIndex, tooltipDims[0]))\n : formatSingleValue(isValueArr ? value[0] : value);\n var content = formattedValue.content;\n\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\n var name = data.getName(dataIndex);\n\n var seriesName = this.name;\n if (!modelUtil.isNameSpecified(this)) {\n seriesName = '';\n }\n seriesName = seriesName\n ? encodeHTML(seriesName) + (!multipleSeries ? newLine : ': ')\n : '';\n\n var colorStr = typeof colorEl === 'string' ? colorEl : colorEl.content;\n var html = !multipleSeries\n ? seriesName + colorStr\n + (name\n ? encodeHTML(name) + ': ' + content\n : content\n )\n : colorStr + seriesName + content;\n\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 if (animationEnabled) {\n if (this.getData().count() > this.getShallow('animationThreshold')) {\n animationEnabled = false;\n }\n }\n return animationEnabled;\n },\n\n restoreData: function () {\n this.dataTask.dirty();\n },\n\n getColorFromPalette: function (name, scope, requestColorNum) {\n var ecModel = this.ecModel;\n // PENDING\n var color = colorPaletteMixin.getColorFromPalette.call(this, name, scope, requestColorNum);\n if (!color) {\n color = ecModel.getColorFromPalette(name, scope, requestColorNum);\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>|string} dim\n * @param {Array.<number>} 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.<number>} 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\n});\n\n\nzrUtil.mixin(SeriesModel, dataFormatMixin);\nzrUtil.mixin(SeriesModel, colorPaletteMixin);\n\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 */\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 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}\n\n// TODO refactor\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 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 if (task) {\n var agentStubMap = task.agentStubMap;\n if (agentStubMap) {\n task = agentStubMap.get(seriesModel.uid);\n }\n }\n return task;\n }\n}\n\nexport default SeriesModel;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport Group from 'zrender/src/container/Group';\nimport * as componentUtil from '../util/component';\nimport * as clazzUtil from '../util/clazz';\n\nvar Component = function () {\n /**\n * @type {module:zrender/container/Group}\n * @readOnly\n */\n this.group = new Group();\n\n /**\n * @type {string}\n * @readOnly\n */\n this.uid = componentUtil.getUID('viewComponent');\n};\n\nComponent.prototype = {\n\n constructor: Component,\n\n init: function (ecModel, api) {},\n\n render: function (componentModel, ecModel, api, payload) {},\n\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\n};\n\nvar componentProto = Component.prototype;\ncomponentProto.updateView =\n componentProto.updateLayout =\n componentProto.updateVisual =\n function (seriesModel, ecModel, api, payload) {\n // Do nothing;\n };\n// Enable Component.extend.\nclazzUtil.enableClassExtend(Component);\n\n// Enable capability of registerClass, getClass, hasClass, registerSubTypeDefaulter and so on.\nclazzUtil.enableClassManagement(Component, {registerWhenExtend: true});\n\nexport default Component;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {makeInner} from '../../util/model';\n\n/**\n * @return {string} If large mode changed, return string 'reset';\n */\nexport default function () {\n var inner = makeInner();\n\n return function (seriesModel) {\n var fields = inner(seriesModel);\n var pipelineContext = seriesModel.pipelineContext;\n\n var originalLarge = fields.large;\n var originalProgressive = fields.progressiveRender;\n\n // 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 var large = fields.large = pipelineContext && pipelineContext.large;\n var progressive = fields.progressiveRender = pipelineContext && pipelineContext.progressiveRender;\n\n return !!((originalLarge ^ large) || (originalProgressive ^ progressive)) && 'reset';\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\nimport {each} from 'zrender/src/core/util';\nimport Group from 'zrender/src/container/Group';\nimport * as componentUtil from '../util/component';\nimport * as clazzUtil from '../util/clazz';\nimport * as modelUtil from '../util/model';\nimport * as graphicUtil from '../util/graphic';\nimport {createTask} from '../stream/task';\nimport createRenderPlanner from '../chart/helper/createRenderPlanner';\n\nvar inner = modelUtil.makeInner();\nvar renderPlanner = createRenderPlanner();\n\nfunction Chart() {\n\n /**\n * @type {module:zrender/container/Group}\n * @readOnly\n */\n this.group = new Group();\n\n /**\n * @type {string}\n * @readOnly\n */\n this.uid = componentUtil.getUID('viewChart');\n\n this.renderTask = createTask({\n plan: renderTaskPlan,\n reset: renderTaskReset\n });\n this.renderTask.context = {view: this};\n}\n\nChart.prototype = {\n\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.<number>} 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\n};\n\nvar chartProto = Chart.prototype;\nchartProto.updateView =\nchartProto.updateLayout =\nchartProto.updateVisual =\n function (seriesModel, ecModel, api, payload) {\n this.render(seriesModel, ecModel, api, payload);\n };\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 */\nfunction elSetState(el, state, highlightDigit) {\n if (el) {\n el.trigger(state, highlightDigit);\n if (el.isGroup\n // Simple optimize.\n && !graphicUtil.isHighDownDispatcher(el)\n ) {\n for (var i = 0, len = el.childCount(); i < len; i++) {\n elSetState(el.childAt(i), state, highlightDigit);\n }\n }\n }\n}\n\n/**\n * @param {module:echarts/data/List} data\n * @param {Object} payload\n * @param {string} state 'normal'|'emphasis'\n */\nfunction toggleHighlight(data, payload, state) {\n var dataIndex = modelUtil.queryDataIndex(data, payload);\n\n var highlightDigit = (payload && payload.highlightKey != null)\n ? graphicUtil.getHighlightDigit(payload.highlightKey)\n : null;\n\n if (dataIndex != null) {\n each(modelUtil.normalizeToArray(dataIndex), function (dataIdx) {\n elSetState(data.getItemGraphicEl(dataIdx), state, highlightDigit);\n });\n }\n else {\n data.eachItemGraphicEl(function (el) {\n elSetState(el, state, highlightDigit);\n });\n }\n}\n\n// Enable Chart.extend.\nclazzUtil.enableClassExtend(Chart, ['dispose']);\n\n// Add capability of registerClass, getClass, hasClass, registerSubTypeDefaulter and so on.\nclazzUtil.enableClassManagement(Chart, {registerWhenExtend: true});\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;\n // ???! remove updateView updateVisual\n var progressiveRender = seriesModel.pipelineContext.progressiveRender;\n var view = context.view;\n\n var updateMethod = payload && inner(payload).updateMethod;\n var methodName = progressiveRender\n ? 'incrementalPrepareRender'\n : (updateMethod && view[updateMethod])\n ? updateMethod\n // `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(\n params, context.model, context.ecModel, context.api, context.payload\n );\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(\n context.model, context.ecModel, context.api, context.payload\n );\n }\n }\n};\n\nexport default Chart;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nvar ORIGIN_METHOD = '\\0__throttleOriginMethod';\nvar RATE = '\\0__throttleRate';\nvar THROTTLE_TYPE = '\\0__throttleType';\n\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 */\nexport function throttle(fn, delay, debounce) {\n\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\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\n clearTimeout(timer);\n\n // 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 if (thisDebounce) {\n timer = setTimeout(exec, thisDelay);\n }\n else {\n if (diff >= 0) {\n exec();\n }\n else {\n timer = setTimeout(exec, -diff);\n }\n }\n\n lastCall = currCall;\n };\n\n /**\n * Clear throttle.\n * @public\n */\n cb.clear = function () {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n };\n\n /**\n * Enable debounce once.\n */\n cb.debounceNextCall = function (debounceDelay) {\n debounceNextCall = debounceDelay;\n };\n\n return cb;\n}\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 */\nexport function 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(\n originFn, rate, throttleType === 'debounce'\n );\n fn[ORIGIN_METHOD] = originFn;\n fn[THROTTLE_TYPE] = throttleType;\n fn[RATE] = rate;\n }\n\n return fn;\n}\n\n/**\n * Clear throttle. Example see throttle.createOrUpdate.\n *\n * @public\n * @param {Object} obj\n * @param {string} fnAttr\n */\nexport function clear(obj, fnAttr) {\n var fn = obj[fnAttr];\n if (fn && fn[ORIGIN_METHOD]) {\n obj[fnAttr] = fn[ORIGIN_METHOD];\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\nimport Gradient from 'zrender/src/graphic/Gradient';\nimport {isFunction} from 'zrender/src/core/util';\n\nexport 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('.');\n // Set in itemStyle\n var color = seriesModel.get(colorAccessPath);\n var colorCallback = (isFunction(color) && !(color instanceof Gradient))\n ? color : null;\n // Default color\n if (!color || colorCallback) {\n color = seriesModel.getColorFromPalette(\n // TODO series count changed.\n seriesModel.name, null, ecModel.getSeriesCount()\n );\n }\n\n data.setVisual('color', color);\n\n var borderColorAccessPath = (seriesModel.visualBorderColorAccessPath || 'itemStyle.borderColor').split('.');\n var borderColor = seriesModel.get(borderColorAccessPath);\n data.setVisual('borderColor', borderColor);\n\n // Only visible series has each data be visual encoded\n if (!ecModel.isSeriesFiltered(seriesModel)) {\n if (colorCallback) {\n data.each(function (idx) {\n data.setItemVisual(\n idx, 'color', colorCallback(seriesModel.getDataParams(idx))\n );\n });\n }\n\n // itemStyle in each data item\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 if (color != null) {\n data.setItemVisual(idx, 'color', color);\n }\n if (borderColor != null) {\n data.setItemVisual(idx, 'borderColor', borderColor);\n }\n };\n\n return { dataEach: data.hasItemOption ? dataEach : null };\n }\n }\n};\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * Language: English.\n */\n\nexport default {\n legend: {\n selector: {\n all: 'All',\n inverse: 'Inv'\n }\n },\n toolbox: {\n brush: {\n title: {\n rect: 'Box Select',\n polygon: 'Lasso Select',\n lineX: 'Horizontally Select',\n lineY: 'Vertically Select',\n keep: 'Keep Selections',\n clear: 'Clear Selections'\n }\n },\n dataView: {\n title: 'Data View',\n lang: ['Data View', 'Close', 'Refresh']\n },\n dataZoom: {\n title: {\n zoom: 'Zoom',\n back: 'Zoom Reset'\n }\n },\n magicType: {\n title: {\n line: 'Switch to Line Chart',\n bar: 'Switch to Bar Chart',\n stack: 'Stack',\n tiled: 'Tile'\n }\n },\n restore: {\n title: 'Restore'\n },\n saveAsImage: {\n title: 'Save as Image',\n lang: ['Right Click to Save Image']\n }\n },\n series: {\n typeNames: {\n pie: 'Pie chart',\n bar: 'Bar chart',\n line: 'Line chart',\n scatter: 'Scatter plot',\n effectScatter: 'Ripple scatter plot',\n radar: 'Radar chart',\n tree: 'Tree',\n treemap: 'Treemap',\n boxplot: 'Boxplot',\n candlestick: 'Candlestick',\n k: 'K line chart',\n heatmap: 'Heat map',\n map: 'Map',\n parallel: 'Parallel coordinate map',\n lines: 'Line graph',\n graph: 'Relationship graph',\n sankey: 'Sankey diagram',\n funnel: 'Funnel chart',\n gauge: 'Guage',\n pictorialBar: 'Pictorial bar',\n themeRiver: 'Theme River Map',\n sunburst: 'Sunburst'\n }\n },\n aria: {\n general: {\n withTitle: 'This is a chart about \"{title}\"',\n withoutTitle: 'This is a chart'\n },\n series: {\n single: {\n prefix: '',\n withName: ' with type {seriesType} named {seriesName}.',\n withoutName: ' with type {seriesType}.'\n },\n multiple: {\n prefix: '. It consists of {seriesCount} series count.',\n withName: ' The {seriesId} series is a {seriesType} representing {seriesName}.',\n withoutName: ' The {seriesId} series is a {seriesType}.',\n separator: {\n middle: '',\n end: ''\n }\n }\n },\n data: {\n allData: 'The data is as follows: ',\n partialData: 'The first {displayCnt} items are: ',\n withName: 'the data for {name} is {value}',\n withoutName: '{value}',\n separator: {\n middle: ',',\n end: '.'\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\nimport * as zrUtil from 'zrender/src/core/util';\nimport lang from '../lang';\nimport { retrieveRawValue } from '../data/helper/dataProvider';\n\nexport default function (dom, ecModel) {\n var ariaModel = ecModel.getModel('aria');\n if (!ariaModel.get('show')) {\n return;\n }\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\n var maxDataCnt = ariaModel.get('data.maxCount') || 10;\n var maxSeriesCnt = ariaModel.get('series.maxCount') || 10;\n var displaySeriesCnt = Math.min(seriesCnt, maxSeriesCnt);\n\n var ariaLabel;\n if (seriesCnt < 1) {\n // No series, no aria label\n return;\n }\n else {\n var title = getTitle();\n if (title) {\n ariaLabel = replace(getConfig('general.withTitle'), {\n title: title\n });\n }\n else {\n ariaLabel = getConfig('general.withoutTitle');\n }\n\n var seriesLabels = [];\n var prefix = seriesCnt > 1\n ? 'series.multiple.prefix'\n : 'series.single.prefix';\n ariaLabel += replace(getConfig(prefix), { seriesCount: seriesCnt });\n\n ecModel.eachSeries(function (seriesModel, idx) {\n if (idx < displaySeriesCnt) {\n var seriesLabel;\n\n var seriesName = seriesModel.get('name');\n var seriesTpl = 'series.'\n + (seriesCnt > 1 ? 'multiple' : 'single') + '.';\n seriesLabel = getConfig(seriesName\n ? seriesTpl + 'withName'\n : seriesTpl + 'withoutName');\n\n seriesLabel = replace(seriesLabel, {\n seriesId: seriesModel.seriesIndex,\n seriesName: seriesModel.get('name'),\n seriesType: getSeriesTypeName(seriesModel.subType)\n });\n\n var data = seriesModel.getData();\n window.data = data;\n if (data.count() > maxDataCnt) {\n // Show part of data\n seriesLabel += replace(getConfig('data.partialData'), {\n displayCnt: maxDataCnt\n });\n }\n else {\n seriesLabel += getConfig('data.allData');\n }\n\n var dataLabels = [];\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(\n replace(\n name\n ? getConfig('data.withName')\n : getConfig('data.withoutName'),\n {\n name: name,\n value: value\n }\n )\n );\n }\n }\n seriesLabel += dataLabels\n .join(getConfig('data.separator.middle'))\n + getConfig('data.separator.end');\n\n seriesLabels.push(seriesLabel);\n }\n });\n\n ariaLabel += seriesLabels\n .join(getConfig('series.multiple.separator.middle'))\n + getConfig('series.multiple.separator.end');\n\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(\n new RegExp('\\\\{\\\\s*' + key + '\\\\s*\\\\}', 'g'),\n value\n );\n });\n return result;\n }\n\n function getConfig(path) {\n var userConfig = ariaModel.get(path);\n if (userConfig == null) {\n var pathArr = path.split('.');\n var result = lang.aria;\n for (var i = 0; i < pathArr.length; ++i) {\n result = result[pathArr[i]];\n }\n return result;\n }\n else {\n return userConfig;\n }\n }\n\n function getTitle() {\n var title = ecModel.getModel('title').option;\n if (title && title.length) {\n title = title[0];\n }\n return title && title.text;\n }\n\n function getSeriesTypeName(type) {\n return lang.series.typeNames[type] || '自定义图';\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\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../util/graphic';\nimport * as textContain from 'zrender/src/contain/text';\n\nvar PI = Math.PI;\n\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 */\nexport default function (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 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)\n .when(1000, {\n endAngle: PI * 3 / 2\n })\n .start('circularInOut');\n arc.animateShape(true)\n .when(1000, {\n startAngle: PI * 3 / 2\n })\n .delay(300)\n .start('circularInOut');\n group.add(arc);\n }\n // Inject resize\n group.resize = function () {\n var textWidth = textContain.getWidth(opts.text, font);\n var r = opts.showSpinner ? opts.spinnerRadius : 0;\n // cx = (containerWidth - arcDiameter - textDistance - textWidth) / 2\n // textDistance needs to be calculated when both animation and text exist\n var cx = (api.getWidth() - r * 2 - (opts.showSpinner && textWidth ? 10 : 0) - textWidth) / 2\n // 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\n mask.setShape({\n x: 0,\n y: 0,\n width: api.getWidth(),\n height: api.getHeight()\n });\n };\n group.resize();\n return group;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport {each, map, isFunction, createHashMap, noop} from 'zrender/src/core/util';\nimport {createTask} from './task';\nimport {getUID} from '../util/component';\nimport GlobalModel from '../model/Global';\nimport ExtensionAPI from '../ExtensionAPI';\nimport {normalizeToArray} from '../util/model';\n\n/**\n * @constructor\n */\nfunction Scheduler(ecInstance, api, dataProcessorHandlers, visualHandlers) {\n this.ecInstance = ecInstance;\n this.api = api;\n this.unfinished;\n\n // 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 var dataProcessorHandlers = this._dataProcessorHandlers = dataProcessorHandlers.slice();\n var visualHandlers = this._visualHandlers = visualHandlers.slice();\n this._allHandlers = dataProcessorHandlers.concat(visualHandlers);\n\n /**\n * @private\n * @type {\n * [handlerUID: string]: {\n * seriesTaskMap?: {\n * [seriesUID: string]: Task\n * },\n * overallTask?: Task\n * }\n * }\n */\n this._stageTaskMap = createHashMap();\n}\n\nvar proto = Scheduler.prototype;\n\n/**\n * @param {module:echarts/model/Global} ecModel\n * @param {Object} payload\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\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\n ecModel.restoreData(payload);\n\n // 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 this._stageTaskMap.each(function (taskRecord) {\n var overallTask = taskRecord.overallTask;\n overallTask && overallTask.dirty();\n });\n};\n\n// If seriesModel provided, incremental threshold is check by series data.\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 var pCtx = pipeline.context;\n var incremental = !isBlock\n && pipeline.progressiveEnabled\n && (!pCtx || pCtx.progressiveRender)\n && task.__idxInPipeline > pipeline.blockIndex;\n\n var step = incremental ? pipeline.step : null;\n var modDataCount = pCtx && pCtx.modDataCount;\n var modBy = modDataCount != null ? Math.ceil(modDataCount / step) : null;\n\n return {step: step, modBy: modBy, modDataCount: modDataCount};\n};\n\nproto.getPipeline = function (pipelineId) {\n return this._pipelineMap.get(pipelineId);\n};\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 */\nproto.updateStreamModes = function (seriesModel, view) {\n var pipeline = this._pipelineMap.get(seriesModel.uid);\n var data = seriesModel.getData();\n var dataLen = data.count();\n\n // `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 var progressiveRender = pipeline.progressiveEnabled\n && view.incrementalPrepareRender\n && dataLen >= pipeline.threshold;\n\n var large = seriesModel.get('large') && dataLen >= seriesModel.get('largeThreshold');\n\n // TODO: modDataCount should not updated if `appendData`, otherwise cause whole repaint.\n // see `test/candlestick-large3.html`\n var modDataCount = seriesModel.get('progressiveChunkMode') === 'mod' ? dataLen : null;\n\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\n ecModel.eachSeries(function (seriesModel) {\n var progressive = seriesModel.getProgressive();\n var pipelineId = seriesModel.uid;\n\n pipelineMap.set(pipelineId, {\n id: pipelineId,\n head: null,\n tail: null,\n threshold: seriesModel.getProgressiveThreshold(),\n progressiveEnabled: progressive\n && !(seriesModel.preventIncremental && seriesModel.preventIncremental()),\n blockIndex: -1,\n step: Math.round(progressive || 700),\n count: 0\n });\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\n each(this._allHandlers, function (handler) {\n var record = stageTaskMap.get(handler.uid) || stageTaskMap.set(handler.uid, []);\n\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\n context.model = model;\n context.ecModel = ecModel;\n context.api = api;\n\n renderTask.__block = !view.incrementalPrepareRender;\n\n pipe(this, model, renderTask);\n};\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, {block: true});\n};\n\n// opt\n// opt.visualType: 'visual' or 'layout'\n// opt.setDirty\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\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 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);\n // 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 agentStubMap.each(function (stub) {\n stub.perform(performArgs);\n });\n unfinished |= overallTask.perform(performArgs);\n }\n else if (seriesTaskMap) {\n seriesTaskMap.each(function (task, pipelineId) {\n if (needSetDirty(opt, task)) {\n task.dirty();\n }\n var performArgs = scheduler.getPerformArgs(task, opt.block);\n // 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 performArgs.skip = !stageHandler.performRawSeries\n && 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\n ecModel.eachSeries(function (seriesModel) {\n // Progress to the end for dataInit and dataRestore.\n unfinished |= seriesModel.dataTask.perform();\n });\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 do {\n if (task.__block) {\n pipeline.blockIndex = task.__idxInPipeline;\n break;\n }\n task = task.getUpstream();\n }\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\n || (stageHandlerRecord.seriesTaskMap = createHashMap());\n var seriesType = stageHandler.seriesType;\n var getTargetSeries = stageHandler.getTargetSeries;\n\n // 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 if (stageHandler.createOnAllSeries) {\n ecModel.eachRawSeries(create);\n }\n else if (seriesType) {\n ecModel.eachRawSeriesByType(seriesType, create);\n }\n else if (getTargetSeries) {\n getTargetSeries(ecModel, api).each(create);\n }\n\n function create(seriesModel) {\n var pipelineId = seriesModel.uid;\n\n // Init tasks for each seriesModel only once.\n // Reuse original task instance.\n var task = seriesTaskMap.get(pipelineId)\n || 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 }\n\n // Clear unused series tasks.\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\n // For overall task, the function only be called on reset stage.\n || createTask({reset: overallTaskReset});\n\n overallTask.context = {\n ecModel: ecModel,\n api: api,\n overallReset: stageHandler.overallReset,\n scheduler: scheduler\n };\n\n // Reuse orignal stubs.\n var agentStubMap = overallTask.agentStubMap = overallTask.agentStubMap || createHashMap();\n\n var seriesType = stageHandler.seriesType;\n var getTargetSeries = stageHandler.getTargetSeries;\n var overallProgress = true;\n var modifyOutputEnd = stageHandler.modifyOutputEnd;\n\n // 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 if (seriesType) {\n ecModel.eachRawSeriesByType(seriesType, createStub);\n }\n else if (getTargetSeries) {\n getTargetSeries(ecModel, api).each(createStub);\n }\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 if (!stub) {\n stub = agentStubMap.set(pipelineId, createTask(\n {reset: stubReset, onDirty: stubOnDirty}\n ));\n // When the result of `getTargetSeries` changed, the overallTask\n // should be set as dirty and re-performed.\n overallTask.dirty();\n }\n stub.context = {\n model: seriesModel,\n overallProgress: overallProgress,\n modifyOutputEnd: modifyOutputEnd\n };\n stub.agent = overallTask;\n stub.__block = overallProgress;\n\n pipe(scheduler, seriesModel, stub);\n }\n\n // Clear unused stubs.\n var pipelineMap = scheduler._pipelineMap;\n agentStubMap.each(function (stub, pipelineId) {\n if (!pipelineMap.get(pipelineId)) {\n stub.dispose();\n // When the result of `getTargetSeries` changed, the overallTask\n // should be set as dirty and re-performed.\n overallTask.dirty();\n agentStubMap.removeKey(pipelineId);\n }\n });\n}\n\nfunction overallTaskReset(context) {\n context.overallReset(\n context.ecModel, context.api, context.payload\n );\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(\n context.model, context.ecModel, context.api, context.payload\n );\n}\n\nfunction seriesTaskReset(context) {\n if (context.useClearVisual) {\n context.data.clearAllVisual();\n }\n var resetDefines = context.resetDefines = normalizeToArray(context.reset(\n context.model, context.ecModel, context.api, context.payload\n ));\n return resetDefines.length > 1\n ? map(resetDefines, function (v, idx) {\n return makeSeriesTaskProgress(idx);\n })\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 }\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 var pipeline = scheduler._pipelineMap.get(pipelineId);\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\n return stageHandler;\n};\n\n\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 */\nfunction detectSeriseType(legacyFunc) {\n seriesType = null;\n try {\n // Assume there is no async when calling `eachSeriesByType`.\n legacyFunc(ecModelMock, apiMock);\n }\n catch (e) {\n }\n return seriesType;\n}\n\nvar ecModelMock = {};\nvar apiMock = {};\nvar seriesType;\n\nmockMethods(ecModelMock, GlobalModel);\nmockMethods(apiMock, ExtensionAPI);\necModelMock.eachSeriesByType = ecModelMock.eachRawSeriesByType = function (type) {\n seriesType = type;\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\nexport default Scheduler;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar colorAll = [\n '#37A2DA', '#32C5E9', '#67E0E3', '#9FE6B8', '#FFDB5C', '#ff9f7f',\n '#fb7293', '#E062AE', '#E690D1', '#e7bcf3', '#9d96f5', '#8378EA', '#96BFFF'\n];\n\nexport default {\n\n color: colorAll,\n\n colorLayer: [\n ['#37A2DA', '#ffd85c', '#fd7b5f'],\n ['#37A2DA', '#67E0E3', '#FFDB5C', '#ff9f7f', '#E062AE', '#9d96f5'],\n ['#37A2DA', '#32C5E9', '#9FE6B8', '#FFDB5C', '#ff9f7f', '#fb7293', '#e7bcf3', '#8378EA', '#96BFFF'],\n colorAll\n ]\n};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar contrastColor = '#eee';\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 = [\n '#dd6b66', '#759aa0', '#e69d87', '#8dc1a9', '#ea7e53',\n '#eedd78', '#73a373', '#73b9bc', '#7289ab', '#91ca8c', '#f49f42'\n];\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\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;\n\nexport default theme;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport ComponentModel from '../model/Component';\nimport ComponentView from '../view/Component';\nimport {detectSourceFormat} from '../data/helper/sourceHelper';\nimport {SERIES_LAYOUT_BY_COLUMN} from '../data/helper/sourceType';\n\nComponentModel.extend({\n\n type: 'dataset',\n\n /**\n * @protected\n */\n defaultOption: {\n\n // 'row', 'column'\n seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN,\n\n // null/'auto': auto detect header, see \"module:echarts/data/helper/sourceHelper\"\n sourceHeader: null,\n\n dimensions: null,\n\n source: null\n },\n\n optionUpdated: function () {\n detectSourceFormat(this);\n }\n\n});\n\nComponentView.extend({\n\n type: 'dataset'\n\n});\n","/**\n * 椭圆形状\n * @module zrender/graphic/shape/Ellipse\n */\n\nimport Path from '../Path';\n\nexport default Path.extend({\n\n type: 'ellipse',\n\n shape: {\n cx: 0, cy: 0,\n rx: 0, ry: 0\n },\n\n buildPath: function (ctx, shape) {\n var k = 0.5522848;\n var x = shape.cx;\n var y = shape.cy;\n var a = shape.rx;\n var b = shape.ry;\n var ox = a * k; // 水平控制点偏移量\n var oy = b * k; // 垂直控制点偏移量\n // 从椭圆的左端点开始顺时针绘制四条三次贝塞尔曲线\n ctx.moveTo(x - a, y);\n ctx.bezierCurveTo(x - a, y - oy, x - ox, y - b, x, y - b);\n ctx.bezierCurveTo(x + ox, y - b, x + a, y - oy, x + a, y);\n ctx.bezierCurveTo(x + a, y + oy, x + ox, y + b, x, y + b);\n ctx.bezierCurveTo(x - ox, y + b, x - a, y + oy, x - a, y);\n ctx.closePath();\n }\n});","import Group from '../container/Group';\nimport ZImage from '../graphic/Image';\nimport Text from '../graphic/Text';\nimport Circle from '../graphic/shape/Circle';\nimport Rect from '../graphic/shape/Rect';\nimport Ellipse from '../graphic/shape/Ellipse';\nimport Line from '../graphic/shape/Line';\nimport Path from '../graphic/Path';\nimport Polygon from '../graphic/shape/Polygon';\nimport Polyline from '../graphic/shape/Polyline';\nimport LinearGradient from '../graphic/LinearGradient';\n// import RadialGradient from '../graphic/RadialGradient';\n// import Pattern from '../graphic/Pattern';\nimport Style from '../graphic/Style';\n// import * as vector from '../core/vector';\nimport * as matrix from '../core/matrix';\nimport { createFromString } from './path';\nimport { isString, extend, defaults, trim, each } from '../core/util';\n\n// Most of the values can be separated by comma and/or white space.\nvar DILIMITER_REG = /[\\s,]+/;\n\n/**\n * For big svg string, this method might be time consuming.\n *\n * @param {string} svg xml string\n * @return {Object} xml root.\n */\nexport function parseXML(svg) {\n if (isString(svg)) {\n var parser = new DOMParser();\n svg = parser.parseFromString(svg, 'text/xml');\n }\n\n // Document node. If using $.get, doc node may be input.\n if (svg.nodeType === 9) {\n svg = svg.firstChild;\n }\n // nodeName of <!DOCTYPE svg> is also 'svg'.\n while (svg.nodeName.toLowerCase() !== 'svg' || svg.nodeType !== 1) {\n svg = svg.nextSibling;\n }\n\n return svg;\n}\n\nfunction SVGParser() {\n this._defs = {};\n this._root = null;\n\n this._isDefine = false;\n this._isText = false;\n}\n\nSVGParser.prototype.parse = function (xml, opt) {\n opt = opt || {};\n\n var svg = parseXML(xml);\n\n if (!svg) {\n throw new Error('Illegal svg');\n }\n\n var root = new Group();\n this._root = root;\n // parse view port\n var viewBox = svg.getAttribute('viewBox') || '';\n\n // If width/height not specified, means \"100%\" of `opt.width/height`.\n // TODO: Other percent value not supported yet.\n var width = parseFloat(svg.getAttribute('width') || opt.width);\n var height = parseFloat(svg.getAttribute('height') || opt.height);\n // If width/height not specified, set as null for output.\n isNaN(width) && (width = null);\n isNaN(height) && (height = null);\n\n // Apply inline style on svg element.\n parseAttributes(svg, root, null, true);\n\n var child = svg.firstChild;\n while (child) {\n this._parseNode(child, root);\n child = child.nextSibling;\n }\n\n var viewBoxRect;\n var viewBoxTransform;\n\n if (viewBox) {\n var viewBoxArr = trim(viewBox).split(DILIMITER_REG);\n // Some invalid case like viewBox: 'none'.\n if (viewBoxArr.length >= 4) {\n viewBoxRect = {\n x: parseFloat(viewBoxArr[0] || 0),\n y: parseFloat(viewBoxArr[1] || 0),\n width: parseFloat(viewBoxArr[2]),\n height: parseFloat(viewBoxArr[3])\n };\n }\n }\n\n if (viewBoxRect && width != null && height != null) {\n viewBoxTransform = makeViewBoxTransform(viewBoxRect, width, height);\n\n if (!opt.ignoreViewBox) {\n // If set transform on the output group, it probably bring trouble when\n // some users only intend to show the clipped content inside the viewBox,\n // but not intend to transform the output group. So we keep the output\n // group no transform. If the user intend to use the viewBox as a\n // camera, just set `opt.ignoreViewBox` as `true` and set transfrom\n // manually according to the viewBox info in the output of this method.\n var elRoot = root;\n root = new Group();\n root.add(elRoot);\n elRoot.scale = viewBoxTransform.scale.slice();\n elRoot.position = viewBoxTransform.position.slice();\n }\n }\n\n // Some shapes might be overflow the viewport, which should be\n // clipped despite whether the viewBox is used, as the SVG does.\n if (!opt.ignoreRootClip && width != null && height != null) {\n root.setClipPath(new Rect({\n shape: {x: 0, y: 0, width: width, height: height}\n }));\n }\n\n // Set width/height on group just for output the viewport size.\n return {\n root: root,\n width: width,\n height: height,\n viewBoxRect: viewBoxRect,\n viewBoxTransform: viewBoxTransform\n };\n};\n\nSVGParser.prototype._parseNode = function (xmlNode, parentGroup) {\n\n var nodeName = xmlNode.nodeName.toLowerCase();\n\n // TODO\n // support <style>...</style> in svg, where nodeName is 'style',\n // CSS classes is defined globally wherever the style tags are declared.\n\n if (nodeName === 'defs') {\n // define flag\n this._isDefine = true;\n }\n else if (nodeName === 'text') {\n this._isText = true;\n }\n\n var el;\n if (this._isDefine) {\n var parser = defineParsers[nodeName];\n if (parser) {\n var def = parser.call(this, xmlNode);\n var id = xmlNode.getAttribute('id');\n if (id) {\n this._defs[id] = def;\n }\n }\n }\n else {\n var parser = nodeParsers[nodeName];\n if (parser) {\n el = parser.call(this, xmlNode, parentGroup);\n parentGroup.add(el);\n }\n }\n\n var child = xmlNode.firstChild;\n while (child) {\n if (child.nodeType === 1) {\n this._parseNode(child, el);\n }\n // Is text\n if (child.nodeType === 3 && this._isText) {\n this._parseText(child, el);\n }\n child = child.nextSibling;\n }\n\n // Quit define\n if (nodeName === 'defs') {\n this._isDefine = false;\n }\n else if (nodeName === 'text') {\n this._isText = false;\n }\n};\n\nSVGParser.prototype._parseText = function (xmlNode, parentGroup) {\n if (xmlNode.nodeType === 1) {\n var dx = xmlNode.getAttribute('dx') || 0;\n var dy = xmlNode.getAttribute('dy') || 0;\n this._textX += parseFloat(dx);\n this._textY += parseFloat(dy);\n }\n\n var text = new Text({\n style: {\n text: xmlNode.textContent,\n transformText: true\n },\n position: [this._textX || 0, this._textY || 0]\n });\n\n inheritStyle(parentGroup, text);\n parseAttributes(xmlNode, text, this._defs);\n\n var fontSize = text.style.fontSize;\n if (fontSize && fontSize < 9) {\n // PENDING\n text.style.fontSize = 9;\n text.scale = text.scale || [1, 1];\n text.scale[0] *= fontSize / 9;\n text.scale[1] *= fontSize / 9;\n }\n\n var rect = text.getBoundingRect();\n this._textX += rect.width;\n\n parentGroup.add(text);\n\n return text;\n};\n\nvar nodeParsers = {\n 'g': function (xmlNode, parentGroup) {\n var g = new Group();\n inheritStyle(parentGroup, g);\n parseAttributes(xmlNode, g, this._defs);\n\n return g;\n },\n 'rect': function (xmlNode, parentGroup) {\n var rect = new Rect();\n inheritStyle(parentGroup, rect);\n parseAttributes(xmlNode, rect, this._defs);\n\n rect.setShape({\n x: parseFloat(xmlNode.getAttribute('x') || 0),\n y: parseFloat(xmlNode.getAttribute('y') || 0),\n width: parseFloat(xmlNode.getAttribute('width') || 0),\n height: parseFloat(xmlNode.getAttribute('height') || 0)\n });\n\n // console.log(xmlNode.getAttribute('transform'));\n // console.log(rect.transform);\n\n return rect;\n },\n 'circle': function (xmlNode, parentGroup) {\n var circle = new Circle();\n inheritStyle(parentGroup, circle);\n parseAttributes(xmlNode, circle, this._defs);\n\n circle.setShape({\n cx: parseFloat(xmlNode.getAttribute('cx') || 0),\n cy: parseFloat(xmlNode.getAttribute('cy') || 0),\n r: parseFloat(xmlNode.getAttribute('r') || 0)\n });\n\n return circle;\n },\n 'line': function (xmlNode, parentGroup) {\n var line = new Line();\n inheritStyle(parentGroup, line);\n parseAttributes(xmlNode, line, this._defs);\n\n line.setShape({\n x1: parseFloat(xmlNode.getAttribute('x1') || 0),\n y1: parseFloat(xmlNode.getAttribute('y1') || 0),\n x2: parseFloat(xmlNode.getAttribute('x2') || 0),\n y2: parseFloat(xmlNode.getAttribute('y2') || 0)\n });\n\n return line;\n },\n 'ellipse': function (xmlNode, parentGroup) {\n var ellipse = new Ellipse();\n inheritStyle(parentGroup, ellipse);\n parseAttributes(xmlNode, ellipse, this._defs);\n\n ellipse.setShape({\n cx: parseFloat(xmlNode.getAttribute('cx') || 0),\n cy: parseFloat(xmlNode.getAttribute('cy') || 0),\n rx: parseFloat(xmlNode.getAttribute('rx') || 0),\n ry: parseFloat(xmlNode.getAttribute('ry') || 0)\n });\n return ellipse;\n },\n 'polygon': function (xmlNode, parentGroup) {\n var points = xmlNode.getAttribute('points');\n if (points) {\n points = parsePoints(points);\n }\n var polygon = new Polygon({\n shape: {\n points: points || []\n }\n });\n\n inheritStyle(parentGroup, polygon);\n parseAttributes(xmlNode, polygon, this._defs);\n\n return polygon;\n },\n 'polyline': function (xmlNode, parentGroup) {\n var path = new Path();\n inheritStyle(parentGroup, path);\n parseAttributes(xmlNode, path, this._defs);\n\n var points = xmlNode.getAttribute('points');\n if (points) {\n points = parsePoints(points);\n }\n var polyline = new Polyline({\n shape: {\n points: points || []\n }\n });\n\n return polyline;\n },\n 'image': function (xmlNode, parentGroup) {\n var img = new ZImage();\n inheritStyle(parentGroup, img);\n parseAttributes(xmlNode, img, this._defs);\n\n img.setStyle({\n image: xmlNode.getAttribute('xlink:href'),\n x: xmlNode.getAttribute('x'),\n y: xmlNode.getAttribute('y'),\n width: xmlNode.getAttribute('width'),\n height: xmlNode.getAttribute('height')\n });\n\n return img;\n },\n 'text': function (xmlNode, parentGroup) {\n var x = xmlNode.getAttribute('x') || 0;\n var y = xmlNode.getAttribute('y') || 0;\n var dx = xmlNode.getAttribute('dx') || 0;\n var dy = xmlNode.getAttribute('dy') || 0;\n\n this._textX = parseFloat(x) + parseFloat(dx);\n this._textY = parseFloat(y) + parseFloat(dy);\n\n var g = new Group();\n inheritStyle(parentGroup, g);\n parseAttributes(xmlNode, g, this._defs);\n\n return g;\n },\n 'tspan': function (xmlNode, parentGroup) {\n var x = xmlNode.getAttribute('x');\n var y = xmlNode.getAttribute('y');\n if (x != null) {\n // new offset x\n this._textX = parseFloat(x);\n }\n if (y != null) {\n // new offset y\n this._textY = parseFloat(y);\n }\n var dx = xmlNode.getAttribute('dx') || 0;\n var dy = xmlNode.getAttribute('dy') || 0;\n\n var g = new Group();\n\n inheritStyle(parentGroup, g);\n parseAttributes(xmlNode, g, this._defs);\n\n\n this._textX += dx;\n this._textY += dy;\n\n return g;\n },\n 'path': function (xmlNode, parentGroup) {\n // TODO svg fill rule\n // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule\n // path.style.globalCompositeOperation = 'xor';\n var d = xmlNode.getAttribute('d') || '';\n\n // Performance sensitive.\n\n var path = createFromString(d);\n\n inheritStyle(parentGroup, path);\n parseAttributes(xmlNode, path, this._defs);\n\n return path;\n }\n};\n\nvar defineParsers = {\n\n 'lineargradient': function (xmlNode) {\n var x1 = parseInt(xmlNode.getAttribute('x1') || 0, 10);\n var y1 = parseInt(xmlNode.getAttribute('y1') || 0, 10);\n var x2 = parseInt(xmlNode.getAttribute('x2') || 10, 10);\n var y2 = parseInt(xmlNode.getAttribute('y2') || 0, 10);\n\n var gradient = new LinearGradient(x1, y1, x2, y2);\n\n _parseGradientColorStops(xmlNode, gradient);\n\n return gradient;\n },\n\n 'radialgradient': function (xmlNode) {\n\n }\n};\n\nfunction _parseGradientColorStops(xmlNode, gradient) {\n\n var stop = xmlNode.firstChild;\n\n while (stop) {\n if (stop.nodeType === 1) {\n var offset = stop.getAttribute('offset');\n if (offset.indexOf('%') > 0) { // percentage\n offset = parseInt(offset, 10) / 100;\n }\n else if (offset) { // number from 0 to 1\n offset = parseFloat(offset);\n }\n else {\n offset = 0;\n }\n\n var stopColor = stop.getAttribute('stop-color') || '#000000';\n\n gradient.addColorStop(offset, stopColor);\n }\n stop = stop.nextSibling;\n }\n}\n\nfunction inheritStyle(parent, child) {\n if (parent && parent.__inheritedStyle) {\n if (!child.__inheritedStyle) {\n child.__inheritedStyle = {};\n }\n defaults(child.__inheritedStyle, parent.__inheritedStyle);\n }\n}\n\nfunction parsePoints(pointsString) {\n var list = trim(pointsString).split(DILIMITER_REG);\n var points = [];\n\n for (var i = 0; i < list.length; i += 2) {\n var x = parseFloat(list[i]);\n var y = parseFloat(list[i + 1]);\n points.push([x, y]);\n }\n return points;\n}\n\nvar attributesMap = {\n 'fill': 'fill',\n 'stroke': 'stroke',\n 'stroke-width': 'lineWidth',\n 'opacity': 'opacity',\n 'fill-opacity': 'fillOpacity',\n 'stroke-opacity': 'strokeOpacity',\n 'stroke-dasharray': 'lineDash',\n 'stroke-dashoffset': 'lineDashOffset',\n 'stroke-linecap': 'lineCap',\n 'stroke-linejoin': 'lineJoin',\n 'stroke-miterlimit': 'miterLimit',\n 'font-family': 'fontFamily',\n 'font-size': 'fontSize',\n 'font-style': 'fontStyle',\n 'font-weight': 'fontWeight',\n\n 'text-align': 'textAlign',\n 'alignment-baseline': 'textBaseline'\n};\n\nfunction parseAttributes(xmlNode, el, defs, onlyInlineStyle) {\n var zrStyle = el.__inheritedStyle || {};\n var isTextEl = el.type === 'text';\n\n // TODO Shadow\n if (xmlNode.nodeType === 1) {\n parseTransformAttribute(xmlNode, el);\n\n extend(zrStyle, parseStyleAttribute(xmlNode));\n\n if (!onlyInlineStyle) {\n for (var svgAttrName in attributesMap) {\n if (attributesMap.hasOwnProperty(svgAttrName)) {\n var attrValue = xmlNode.getAttribute(svgAttrName);\n if (attrValue != null) {\n zrStyle[attributesMap[svgAttrName]] = attrValue;\n }\n }\n }\n }\n }\n\n var elFillProp = isTextEl ? 'textFill' : 'fill';\n var elStrokeProp = isTextEl ? 'textStroke' : 'stroke';\n\n el.style = el.style || new Style();\n var elStyle = el.style;\n\n zrStyle.fill != null && elStyle.set(elFillProp, getPaint(zrStyle.fill, defs));\n zrStyle.stroke != null && elStyle.set(elStrokeProp, getPaint(zrStyle.stroke, defs));\n\n each([\n 'lineWidth', 'opacity', 'fillOpacity', 'strokeOpacity', 'miterLimit', 'fontSize'\n ], function (propName) {\n var elPropName = (propName === 'lineWidth' && isTextEl) ? 'textStrokeWidth' : propName;\n zrStyle[propName] != null && elStyle.set(elPropName, parseFloat(zrStyle[propName]));\n });\n\n if (!zrStyle.textBaseline || zrStyle.textBaseline === 'auto') {\n zrStyle.textBaseline = 'alphabetic';\n }\n if (zrStyle.textBaseline === 'alphabetic') {\n zrStyle.textBaseline = 'bottom';\n }\n if (zrStyle.textAlign === 'start') {\n zrStyle.textAlign = 'left';\n }\n if (zrStyle.textAlign === 'end') {\n zrStyle.textAlign = 'right';\n }\n\n each(['lineDashOffset', 'lineCap', 'lineJoin',\n 'fontWeight', 'fontFamily', 'fontStyle', 'textAlign', 'textBaseline'\n ], function (propName) {\n zrStyle[propName] != null && elStyle.set(propName, zrStyle[propName]);\n });\n\n if (zrStyle.lineDash) {\n el.style.lineDash = trim(zrStyle.lineDash).split(DILIMITER_REG);\n }\n\n if (elStyle[elStrokeProp] && elStyle[elStrokeProp] !== 'none') {\n // enable stroke\n el[elStrokeProp] = true;\n }\n\n el.__inheritedStyle = zrStyle;\n}\n\n\nvar urlRegex = /url\\(\\s*#(.*?)\\)/;\nfunction getPaint(str, defs) {\n // if (str === 'none') {\n // return;\n // }\n var urlMatch = defs && str && str.match(urlRegex);\n if (urlMatch) {\n var url = trim(urlMatch[1]);\n var def = defs[url];\n return def;\n }\n return str;\n}\n\nvar transformRegex = /(translate|scale|rotate|skewX|skewY|matrix)\\(([\\-\\s0-9\\.e,]*)\\)/g;\n\nfunction parseTransformAttribute(xmlNode, node) {\n var transform = xmlNode.getAttribute('transform');\n if (transform) {\n transform = transform.replace(/,/g, ' ');\n var m = null;\n var transformOps = [];\n transform.replace(transformRegex, function (str, type, value) {\n transformOps.push(type, value);\n });\n for (var i = transformOps.length - 1; i > 0; i -= 2) {\n var value = transformOps[i];\n var type = transformOps[i - 1];\n m = m || matrix.create();\n switch (type) {\n case 'translate':\n value = trim(value).split(DILIMITER_REG);\n matrix.translate(m, m, [parseFloat(value[0]), parseFloat(value[1] || 0)]);\n break;\n case 'scale':\n value = trim(value).split(DILIMITER_REG);\n matrix.scale(m, m, [parseFloat(value[0]), parseFloat(value[1] || value[0])]);\n break;\n case 'rotate':\n value = trim(value).split(DILIMITER_REG);\n matrix.rotate(m, m, parseFloat(value[0]));\n break;\n case 'skew':\n value = trim(value).split(DILIMITER_REG);\n console.warn('Skew transform is not supported yet');\n break;\n case 'matrix':\n var value = trim(value).split(DILIMITER_REG);\n m[0] = parseFloat(value[0]);\n m[1] = parseFloat(value[1]);\n m[2] = parseFloat(value[2]);\n m[3] = parseFloat(value[3]);\n m[4] = parseFloat(value[4]);\n m[5] = parseFloat(value[5]);\n break;\n }\n }\n node.setLocalTransform(m);\n }\n}\n\n// Value may contain space.\nvar styleRegex = /([^\\s:;]+)\\s*:\\s*([^:;]+)/g;\nfunction parseStyleAttribute(xmlNode) {\n var style = xmlNode.getAttribute('style');\n var result = {};\n\n if (!style) {\n return result;\n }\n\n var styleList = {};\n styleRegex.lastIndex = 0;\n var styleRegResult;\n while ((styleRegResult = styleRegex.exec(style)) != null) {\n styleList[styleRegResult[1]] = styleRegResult[2];\n }\n\n for (var svgAttrName in attributesMap) {\n if (attributesMap.hasOwnProperty(svgAttrName) && styleList[svgAttrName] != null) {\n result[attributesMap[svgAttrName]] = styleList[svgAttrName];\n }\n }\n\n return result;\n}\n\n/**\n * @param {Array.<number>} viewBoxRect\n * @param {number} width\n * @param {number} height\n * @return {Object} {scale, position}\n */\nexport function makeViewBoxTransform(viewBoxRect, width, height) {\n var scaleX = width / viewBoxRect.width;\n var scaleY = height / viewBoxRect.height;\n var scale = Math.min(scaleX, scaleY);\n // preserveAspectRatio 'xMidYMid'\n var viewBoxScale = [scale, scale];\n var viewBoxPosition = [\n -(viewBoxRect.x + viewBoxRect.width / 2) * scale + width / 2,\n -(viewBoxRect.y + viewBoxRect.height / 2) * scale + height / 2\n ];\n\n return {\n scale: viewBoxScale,\n position: viewBoxPosition\n };\n}\n\n/**\n * @param {string|XMLElement} xml\n * @param {Object} [opt]\n * @param {number} [opt.width] Default width if svg width not specified or is a percent value.\n * @param {number} [opt.height] Default height if svg height not specified or is a percent value.\n * @param {boolean} [opt.ignoreViewBox]\n * @param {boolean} [opt.ignoreRootClip]\n * @return {Object} result:\n * {\n * root: Group, The root of the the result tree of zrender shapes,\n * width: number, the viewport width of the SVG,\n * height: number, the viewport height of the SVG,\n * viewBoxRect: {x, y, width, height}, the declared viewBox rect of the SVG, if exists,\n * viewBoxTransform: the {scale, position} calculated by viewBox and viewport, is exists.\n * }\n */\nexport function parseSVG(xml, opt) {\n var parser = new SVGParser();\n return parser.parse(xml, opt);\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {__DEV__} from '../../config';\nimport {createHashMap, isString, isArray, each, assert} from 'zrender/src/core/util';\nimport {parseXML} from 'zrender/src/tool/parseSVG';\n\n\nvar storage = createHashMap();\n\n// For minimize the code size of common echarts package,\n// do not put too much logic in this module.\n\nexport default {\n\n // The format of record: see `echarts.registerMap`.\n // Compatible with previous `echarts.registerMap`.\n registerMap: function (mapName, rawGeoJson, rawSpecialAreas) {\n\n var records;\n\n if (isArray(rawGeoJson)) {\n records = rawGeoJson;\n }\n else if (rawGeoJson.svg) {\n records = [{\n type: 'svg',\n source: rawGeoJson.svg,\n specialAreas: rawGeoJson.specialAreas\n }];\n }\n else {\n // Backward compatibility.\n if (rawGeoJson.geoJson && !rawGeoJson.features) {\n rawSpecialAreas = rawGeoJson.specialAreas;\n rawGeoJson = rawGeoJson.geoJson;\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\n var parse = parsers[type];\n\n if (__DEV__) {\n assert(parse, 'Illegal map type: ' + type);\n }\n\n parse(record);\n });\n\n return storage.set(mapName, records);\n },\n\n retrieveMap: function (mapName) {\n return storage.get(mapName);\n }\n\n};\n\nvar parsers = {\n\n geoJSON: function (record) {\n var source = record.source;\n record.geoJSON = !isString(source)\n ? source\n : (typeof JSON !== 'undefined' && JSON.parse)\n ? JSON.parse(source)\n : (new Function('return (' + source + ');'))();\n },\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\n};\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport {__DEV__} from './config';\nimport * as zrender from 'zrender/src/zrender';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as colorTool from 'zrender/src/tool/color';\nimport env from 'zrender/src/core/env';\nimport timsort from 'zrender/src/core/timsort';\nimport Eventful from 'zrender/src/mixin/Eventful';\nimport GlobalModel from './model/Global';\nimport ExtensionAPI from './ExtensionAPI';\nimport CoordinateSystemManager from './CoordinateSystem';\nimport OptionManager from './model/OptionManager';\nimport backwardCompat from './preprocessor/backwardCompat';\nimport dataStack from './processor/dataStack';\nimport ComponentModel from './model/Component';\nimport SeriesModel from './model/Series';\nimport ComponentView from './view/Component';\nimport ChartView from './view/Chart';\nimport * as graphic from './util/graphic';\nimport * as modelUtil from './util/model';\nimport {throttle} from './util/throttle';\nimport seriesColor from './visual/seriesColor';\nimport aria from './visual/aria';\nimport loadingDefault from './loading/default';\nimport Scheduler from './stream/Scheduler';\nimport lightTheme from './theme/light';\nimport darkTheme from './theme/dark';\nimport './component/dataset';\nimport mapDataStorage from './coord/geo/mapDataStorage';\n\nvar assert = zrUtil.assert;\nvar each = zrUtil.each;\nvar isFunction = zrUtil.isFunction;\nvar isObject = zrUtil.isObject;\nvar parseClassType = ComponentModel.parseClassType;\n\nexport var version = '4.9.0';\n\nexport var dependencies = {\n zrender: '4.3.2'\n};\n\nvar TEST_FRAME_REMAIN_TIME = 1;\n\nvar PRIORITY_PROCESSOR_FILTER = 1000;\nvar PRIORITY_PROCESSOR_SERIES_FILTER = 800;\nvar PRIORITY_PROCESSOR_DATASTACK = 900;\nvar PRIORITY_PROCESSOR_STATISTIC = 5000;\n\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;\n// FIXME\n// necessary?\nvar PRIORITY_VISUAL_BRUSH = 5000;\n\nexport var 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};\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]).\nvar IN_MAIN_PROCESS = '__flagInMainProcess';\nvar OPTION_UPDATED = '__optionUpdated';\nvar ACTION_REG = /^[a-zA-Z0-9_]+$/;\n\n\nfunction createRegisterEventWithLowercaseName(method, ignoreDisposed) {\n return function (eventName, handler, context) {\n if (!ignoreDisposed && this._disposed) {\n disposedWarning(this.id);\n return;\n }\n\n // Event name is all lowercase\n eventName = eventName && eventName.toLowerCase();\n Eventful.prototype[method].call(this, eventName, handler, context);\n };\n}\n\n/**\n * @module echarts~MessageCenter\n */\nfunction MessageCenter() {\n Eventful.call(this);\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/**\n * @module echarts~ECharts\n */\nfunction ECharts(dom, theme, opts) {\n opts = opts || {};\n\n // Get theme by name\n if (typeof theme === 'string') {\n theme = themeStorage[theme];\n }\n\n /**\n * @type {string}\n */\n this.id;\n\n /**\n * Group id\n * @type {string}\n */\n this.group;\n\n /**\n * @type {HTMLElement}\n * @private\n */\n this._dom = dom;\n\n var defaultRenderer = 'canvas';\n if (__DEV__) {\n defaultRenderer = (\n typeof window === 'undefined' ? global : window\n ).__ECHARTS__DEFAULT__RENDERER__ || defaultRenderer;\n }\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 /**\n * Expect 60 fps.\n * @type {Function}\n * @private\n */\n this._throttledZrFlush = throttle(zrUtil.bind(zr.flush, zr), 17);\n\n var theme = zrUtil.clone(theme);\n theme && backwardCompat(theme, true);\n /**\n * @type {Object}\n * @private\n */\n this._theme = theme;\n\n /**\n * @type {Array.<module:echarts/view/Chart>}\n * @private\n */\n this._chartsViews = [];\n\n /**\n * @type {Object.<string, module:echarts/view/Chart>}\n * @private\n */\n this._chartsMap = {};\n\n /**\n * @type {Array.<module:echarts/view/Component>}\n * @private\n */\n this._componentsViews = [];\n\n /**\n * @type {Object.<string, module:echarts/view/Component>}\n * @private\n */\n this._componentsMap = {};\n\n /**\n * @type {module:echarts/CoordinateSystem}\n * @private\n */\n this._coordSysMgr = new CoordinateSystemManager();\n\n /**\n * @type {module:echarts/ExtensionAPI}\n * @private\n */\n var api = this._api = createExtensionAPI(this);\n\n // Sort on demand\n function prioritySortFunc(a, b) {\n return a.__prio - b.__prio;\n }\n timsort(visualFuncs, prioritySortFunc);\n timsort(dataProcessorFuncs, prioritySortFunc);\n\n /**\n * @type {module:echarts/stream/Scheduler}\n */\n this._scheduler = new Scheduler(this, api, dataProcessorFuncs, visualFuncs);\n\n Eventful.call(this, this._ecEventProcessor = new EventProcessor());\n\n /**\n * @type {module:echarts~MessageCenter}\n * @private\n */\n this._messageCenter = new MessageCenter();\n\n // Init mouse events\n this._initEvents();\n\n // In case some people write `window.onresize = chart.resize`\n this.resize = zrUtil.bind(this.resize, this);\n\n // Can't dispatch action during rendering procedure\n this._pendingActions = [];\n\n zr.animation.on('frame', this._onframe, this);\n\n bindRenderedEvent(zr, this);\n\n // ECharts instance can be used as value.\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;\n\n // Lazy update\n if (this[OPTION_UPDATED]) {\n var silent = this[OPTION_UPDATED].silent;\n\n this[IN_MAIN_PROCESS] = true;\n\n prepare(this);\n updateMethods.update.call(this);\n\n this[IN_MAIN_PROCESS] = false;\n\n this[OPTION_UPDATED] = false;\n\n flushPendingActions.call(this, silent);\n\n triggerUpdatedEvent.call(this, silent);\n }\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 do {\n var startTime = +new Date();\n\n scheduler.performSeriesTasks(ecModel);\n\n // Currently dataProcessorFuncs do not check threshold.\n scheduler.performDataProcessorTasks(ecModel);\n\n updateStreamModes(this, ecModel);\n\n // 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\n // console.log('--- ec frame visual ---', remainTime);\n scheduler.performVisualTasks(ecModel);\n\n renderSeries(this, this._model, api, 'remain');\n\n remainTime -= (+new Date() - startTime);\n }\n while (remainTime > 0 && scheduler.unfinished);\n\n // Call flush explicitly for trigger finished event.\n if (!scheduler.unfinished) {\n this._zr.flush();\n }\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 */\nechartsProto.getDom = function () {\n return this._dom;\n};\n\n/**\n * @return {module:zrender~ZRender}\n */\nechartsProto.getZr = function () {\n return this._zr;\n};\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 */\nechartsProto.setOption = function (option, notMerge, lazyUpdate) {\n if (__DEV__) {\n assert(!this[IN_MAIN_PROCESS], '`setOption` should not be called during main process.');\n }\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n\n var silent;\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] = {silent: silent};\n this[IN_MAIN_PROCESS] = false;\n }\n else {\n prepare(this);\n\n updateMethods.update.call(this);\n\n // Ensure zr refresh sychronously, and then pixel in canvas can be\n // fetched after `setOption`.\n this._zr.flush();\n\n this[OPTION_UPDATED] = false;\n this[IN_MAIN_PROCESS] = false;\n\n flushPendingActions.call(this, silent);\n triggerUpdatedEvent.call(this, silent);\n }\n};\n\n/**\n * @DEPRECATED\n */\nechartsProto.setTheme = function () {\n console.error('ECharts#setTheme() is DEPRECATED in ECharts 3.0');\n};\n\n/**\n * @return {module:echarts/model/Global}\n */\nechartsProto.getModel = function () {\n return this._model;\n};\n\n/**\n * @return {Object}\n */\nechartsProto.getOption = function () {\n return this._model && this._model.getOption();\n};\n\n/**\n * @return {number}\n */\nechartsProto.getWidth = function () {\n return this._zr.getWidth();\n};\n\n/**\n * @return {number}\n */\nechartsProto.getHeight = function () {\n return this._zr.getHeight();\n};\n\n/**\n * @return {number}\n */\nechartsProto.getDevicePixelRatio = function () {\n return this._zr.painter.dpr || window.devicePixelRatio || 1;\n};\n\n/**\n * Get canvas which has all thing rendered\n * @param {Object} opts\n * @param {string} [opts.backgroundColor]\n * @return {string}\n */\nechartsProto.getRenderedCanvas = function (opts) {\n if (!env.canvasSupported) {\n return;\n }\n opts = opts || {};\n opts.pixelRatio = opts.pixelRatio || 1;\n opts.backgroundColor = opts.backgroundColor\n || this._model.get('backgroundColor');\n var zr = this._zr;\n // 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 return zr.painter.getRenderedCanvas(opts);\n};\n\n/**\n * Get svg data url\n * @return {string}\n */\nechartsProto.getSvgDataURL = function () {\n if (!env.svgSupported) {\n return;\n }\n\n var zr = this._zr;\n var list = zr.storage.getDisplayList();\n // Stop animations\n zrUtil.each(list, function (el) {\n el.stopAnimation(true);\n });\n\n return zr.painter.toDataURL();\n};\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 */\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\n each(excludeComponents, function (componentType) {\n ecModel.eachComponent({\n mainType: componentType\n }, function (component) {\n var view = self._componentsMap[component.__viewId];\n if (!view.group.ignore) {\n excludesComponentViews.push(view);\n view.group.ignore = true;\n }\n });\n });\n\n var url = this._zr.painter.getType() === 'svg'\n ? this.getSvgDataURL()\n : this.getRenderedCanvas(opts).toDataURL(\n 'image/' + (opts && opts.type || 'png')\n );\n\n each(excludesComponentViews, function (view) {\n view.group.ignore = false;\n });\n\n return url;\n};\n\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 */\nechartsProto.getConnectedDataURL = function (opts) {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n\n if (!env.canvasSupported) {\n return;\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 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\n zrUtil.each(instances, function (chart, id) {\n if (chart.group === groupId) {\n var canvas = isSvg\n ? chart.getZr().painter.getSvgDom().innerHTML\n : 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\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 += '<g transform=\"translate(' + x + ','\n + y + ')\">' + item.dom + '</g>';\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 }\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\n zr.refreshImmediately();\n return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));\n }\n }\n else {\n return this.getDataURL(opts);\n }\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 */\nechartsProto.convertToPixel = zrUtil.curry(doConvertPixel, 'convertToPixel');\n\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 */\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 var coordSysList = this._coordSysMgr.getCoordinateSystems();\n var result;\n\n finder = modelUtil.parseFinder(ecModel, finder);\n\n for (var i = 0; i < coordSysList.length; i++) {\n var coordSys = coordSysList[i];\n if (coordSys[methodName]\n && (result = coordSys[methodName](ecModel, finder, value)) != null\n ) {\n return result;\n }\n }\n\n if (__DEV__) {\n console.warn(\n 'No coordinate system that supports ' + methodName + ' found by the given finder.'\n );\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 */\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\n finder = modelUtil.parseFinder(ecModel, finder);\n\n zrUtil.each(finder, function (models, key) {\n key.indexOf('Models') >= 0 && zrUtil.each(models, function (model) {\n var coordSys = model.coordinateSystem;\n if (coordSys && coordSys.containPoint) {\n result |= !!coordSys.containPoint(value);\n }\n else if (key === 'seriesModels') {\n var view = this._chartsMap[model.__viewId];\n if (view && view.containPoint) {\n result |= view.containPoint(value, model);\n }\n else {\n if (__DEV__) {\n console.warn(key + ': ' + (view\n ? 'The found component do not support containPoint.'\n : 'No view mapping to the found component.'\n ));\n }\n }\n }\n else {\n if (__DEV__) {\n console.warn(key + ': containPoint is not supported');\n }\n }\n }, this);\n }, this);\n\n return !!result;\n};\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 */\nechartsProto.getVisual = function (finder, visualType) {\n var ecModel = this._model;\n\n finder = modelUtil.parseFinder(ecModel, finder, {defaultMainType: 'series'});\n\n var seriesModel = finder.seriesModel;\n\n if (__DEV__) {\n if (!seriesModel) {\n console.warn('There is no specified seires model');\n }\n }\n\n var data = seriesModel.getData();\n\n var dataIndexInside = finder.hasOwnProperty('dataIndexInside')\n ? finder.dataIndexInside\n : finder.hasOwnProperty('dataIndex')\n ? data.indexOfRawIndex(finder.dataIndex)\n : null;\n\n return dataIndexInside != null\n ? data.getItemVisual(dataIndexInside, visualType)\n : data.getVisual(visualType);\n};\n\n/**\n * Get view of corresponding component model\n * @param {module:echarts/model/Component} componentModel\n * @return {module:echarts/view/Component}\n */\nechartsProto.getViewOfComponentModel = function (componentModel) {\n return this._componentsMap[componentModel.__viewId];\n};\n\n/**\n * Get view of corresponding series model\n * @param {module:echarts/model/Series} seriesModel\n * @return {module:echarts/view/Chart}\n */\nechartsProto.getViewOfSeriesModel = function (seriesModel) {\n return this._chartsMap[seriesModel.__viewId];\n};\n\nvar updateMethods = {\n\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\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;\n\n // update before setOption\n if (!ecModel) {\n return;\n }\n\n scheduler.restoreData(ecModel, payload);\n\n scheduler.performSeriesTasks(ecModel);\n\n // 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\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 coordSysMgr.create(ecModel, api);\n\n scheduler.performDataProcessorTasks(ecModel, payload);\n\n // 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 updateStreamModes(this, ecModel);\n\n // 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 coordSysMgr.update(ecModel, api);\n\n clearColorPalette(ecModel);\n scheduler.performVisualTasks(ecModel, payload);\n\n render(this, ecModel, api, payload);\n\n // Set background\n var backgroundColor = ecModel.get('backgroundColor') || 'transparent';\n\n // In IE8\n if (!env.canvasSupported) {\n var colorArr = colorTool.parse(backgroundColor);\n backgroundColor = colorTool.stringify(colorArr, 'rgb');\n if (colorArr[3] === 0) {\n backgroundColor = 'transparent';\n }\n }\n else {\n zr.setBackgroundColor(backgroundColor);\n }\n\n performPostUpdateFuncs(ecModel, api);\n\n // 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;\n\n // update before setOption\n if (!ecModel) {\n return;\n }\n\n // ChartView.markUpdateMethod(payload, 'updateTransform');\n\n var componentDirtyList = [];\n ecModel.eachComponent(function (componentType, componentModel) {\n var componentView = ecIns.getViewOfComponentModel(componentModel);\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 }\n else {\n componentDirtyList.push(componentView);\n }\n }\n });\n\n var seriesDirtyMap = zrUtil.createHashMap();\n ecModel.eachSeries(function (seriesModel) {\n var chartView = ecIns._chartsMap[seriesModel.__viewId];\n if (chartView.updateTransform) {\n var result = chartView.updateTransform(seriesModel, ecModel, api, payload);\n result && result.update && seriesDirtyMap.set(seriesModel.uid, 1);\n }\n else {\n seriesDirtyMap.set(seriesModel.uid, 1);\n }\n });\n\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, 'layout', true);\n this._scheduler.performVisualTasks(\n ecModel, payload, {setDirty: true, dirtyMap: seriesDirtyMap}\n );\n\n // Currently, not call render of components. Geo render cost a lot.\n // renderComponents(ecIns, ecModel, api, payload, componentDirtyList);\n renderSeries(ecIns, ecModel, api, payload, seriesDirtyMap);\n\n performPostUpdateFuncs(ecModel, this._api);\n },\n\n /**\n * @param {Object} payload\n * @private\n */\n updateView: function (payload) {\n var ecModel = this._model;\n\n // update before setOption\n if (!ecModel) {\n return;\n }\n\n ChartView.markUpdateMethod(payload, 'updateView');\n\n clearColorPalette(ecModel);\n\n // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline.\n this._scheduler.performVisualTasks(ecModel, payload, {setDirty: true});\n\n render(this, this._model, this._api, payload);\n\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);\n\n // var ecModel = this._model;\n\n // // update before setOption\n // if (!ecModel) {\n // return;\n // }\n\n // ChartView.markUpdateMethod(payload, 'updateVisual');\n\n // clearColorPalette(ecModel);\n\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\n // render(this, this._model, this._api, payload);\n\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);\n\n // var ecModel = this._model;\n\n // // update before setOption\n // if (!ecModel) {\n // return;\n // }\n\n // ChartView.markUpdateMethod(payload, 'updateLayout');\n\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\n // render(this, this._model, this._api, payload);\n\n // performPostUpdateFuncs(ecModel, this._api);\n }\n};\n\nfunction prepare(ecIns) {\n var ecModel = ecIns._model;\n var scheduler = ecIns._scheduler;\n\n scheduler.restorePipelines(ecModel);\n\n scheduler.prepareStageTasks();\n\n prepareView(ecIns, 'component', ecModel, scheduler);\n\n prepareView(ecIns, 'chart', ecModel, scheduler);\n\n scheduler.plan();\n}\n\n/**\n * @private\n */\nfunction updateDirectly(ecIns, method, payload, mainType, subType) {\n var ecModel = ecIns._model;\n\n // broadcast\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\n var condition = {mainType: mainType, query: query};\n subType && (condition.subType = subType); // subType may be '' by parseClassType;\n\n var excludeSeriesId = payload.excludeSeriesId;\n if (excludeSeriesId != null) {\n excludeSeriesId = zrUtil.createHashMap(modelUtil.normalizeToArray(excludeSeriesId));\n }\n\n // If dispatchAction before setOption, do nothing.\n ecModel && ecModel.eachComponent(condition, function (model) {\n if (!excludeSeriesId || excludeSeriesId.get(model.id) == null) {\n callView(ecIns[\n mainType === 'series' ? '_chartsMap' : '_componentsMap'\n ][model.__viewId]);\n }\n }, ecIns);\n\n function callView(view) {\n view && view.__alive && view[method] && view[method](\n view.__model, ecModel, ecIns._api, payload\n );\n }\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 */\nechartsProto.resize = function (opts) {\n if (__DEV__) {\n assert(!this[IN_MAIN_PROCESS], '`resize` should not be called during main process.');\n }\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n\n this._zr.resize(opts);\n\n var ecModel = this._model;\n\n // Resize loading effect\n this._loadingFX && this._loadingFX.resize();\n\n if (!ecModel) {\n return;\n }\n\n var optionChanged = ecModel.resetOption('media');\n\n var silent = opts && opts.silent;\n\n this[IN_MAIN_PROCESS] = true;\n\n optionChanged && prepare(this);\n updateMethods.update.call(this);\n\n this[IN_MAIN_PROCESS] = false;\n\n flushPendingActions.call(this, silent);\n\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/**\n * Show loading effect\n * @param {string} [name='default']\n * @param {Object} [cfg]\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 name = name || 'default';\n\n this.hideLoading();\n if (!loadingEffects[name]) {\n if (__DEV__) {\n console.warn('Loading effects ' + name + ' not exists.');\n }\n return;\n }\n var el = loadingEffects[name](this._api, cfg);\n var zr = this._zr;\n this._loadingFX = el;\n\n zr.add(el);\n};\n\n/**\n * Hide loading effect\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/**\n * @param {Object} eventObj\n * @return {Object}\n */\nechartsProto.makeActionFromEvent = function (eventObj) {\n var payload = zrUtil.extend({}, eventObj);\n payload.type = eventActionMap[eventObj.type];\n return payload;\n};\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 */\nechartsProto.dispatchAction = function (payload, opt) {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n\n if (!isObject(opt)) {\n opt = {silent: !!opt};\n }\n\n if (!actions[payload.type]) {\n return;\n }\n\n // Avoid dispatch action before setOption. Especially in `connect`.\n if (!this._model) {\n return;\n }\n\n // May dispatchAction in rendering procedure\n if (this[IN_MAIN_PROCESS]) {\n this._pendingActions.push(payload);\n return;\n }\n\n doDispatchAction.call(this, payload, opt.silent);\n\n if (opt.flush) {\n this._zr.flush(true);\n }\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\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\n var cptType = (actionInfo.update || 'update').split(':');\n var updateMethod = cptType.pop();\n cptType = cptType[0] != null && parseClassType(cptType[0]);\n\n this[IN_MAIN_PROCESS] = true;\n\n var payloads = [payload];\n var batched = false;\n // Batch action\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\n each(payloads, function (batchItem) {\n // Action can specify the event by return it.\n eventObj = actionWrap.action(batchItem, this._model, this._api);\n // Emit event outside\n eventObj = eventObj || zrUtil.extend({}, batchItem);\n // Convert type to eventType\n eventObj.type = actionInfo.event || eventObj.type;\n eventObjBatch.push(eventObj);\n\n // light update does not perform data process, layout and visual.\n if (isHighDown) {\n // method, payload, mainType, subType\n updateDirectly(this, updateMethod, batchItem, 'series');\n }\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 }\n else {\n updateMethods[updateMethod].call(this, payload);\n }\n }\n\n // Follow the rule of action batch\n if (batched) {\n eventObj = {\n type: actionInfo.event || payloadType,\n escapeConnect: escapeConnect,\n batch: eventObjBatch\n };\n }\n else {\n eventObj = eventObjBatch[0];\n }\n\n this[IN_MAIN_PROCESS] = false;\n\n !silent && this._messageCenter.trigger(eventObj.type, eventObj);\n}\n\nfunction flushPendingActions(silent) {\n var pendingActions = this._pendingActions;\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/**\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 */\nfunction bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n\n ecIns.trigger('rendered');\n\n // 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 if (\n // 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()\n && !ecIns[OPTION_UPDATED]\n && !ecIns._scheduler.unfinished\n && !ecIns._pendingActions.length\n ) {\n ecIns.trigger('finished');\n }\n });\n}\n\n/**\n * @param {Object} params\n * @param {number} params.seriesIndex\n * @param {Array|TypedArray} params.data\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\n if (__DEV__) {\n assert(params.data && seriesModel);\n }\n\n seriesModel.appendData(params);\n\n // 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/**\n * Register event\n * @method\n */\nechartsProto.on = createRegisterEventWithLowercaseName('on', false);\nechartsProto.off = createRegisterEventWithLowercaseName('off', false);\nechartsProto.one = createRegisterEventWithLowercaseName('one', false);\n\n/**\n * Prepare view instances of charts and components\n * @param {module:echarts/model/Global} ecModel\n * @private\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\n ? ecModel.eachComponent(function (componentType, model) {\n componentType !== 'series' && doPrepare(model);\n })\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 if (!view) {\n var classType = parseClassType(model.type);\n var Clazz = isComponent\n ? ComponentView.getClass(classType.main, classType.sub)\n : ChartView.getClass(classType.sub);\n\n if (__DEV__) {\n assert(Clazz, classType.sub + ' does not exist.');\n }\n\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 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 }\n else {\n i++;\n }\n }\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\nfunction clearColorPalette(ecModel) {\n ecModel.clearColorPalette();\n ecModel.eachSeries(function (seriesModel) {\n seriesModel.clearColorPalette();\n });\n}\n\nfunction render(ecIns, ecModel, api, payload) {\n\n renderComponents(ecIns, ecModel, api, payload);\n\n each(ecIns._chartsViews, function (chart) {\n chart.__alive = false;\n });\n\n renderSeries(ecIns, ecModel, api, payload);\n\n // Remove groups of unrendered charts\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\n updateZ(componentModel, componentView);\n });\n}\n\n/**\n * Render each chart and component\n * @private\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\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\n chartView.group.silent = !!seriesModel.get('silent');\n\n updateZ(seriesModel, chartView);\n\n updateBlend(seriesModel, chartView);\n });\n scheduler.unfinished |= unfinished;\n\n // If use hover layer\n updateHoverLayerStatus(ecIns, ecModel);\n\n // Add aria\n aria(ecIns._zr.dom, ecModel);\n}\n\nfunction performPostUpdateFuncs(ecModel, api) {\n each(postUpdateFuncs, function (func) {\n func(ecModel, api);\n });\n}\n\n\nvar MOUSE_EVENT_NAMES = [\n 'click', 'dblclick', 'mouseover', 'mouseout', 'mousemove',\n 'mousedown', 'mouseup', 'globalout', 'contextmenu'\n];\n\n/**\n * @private\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';\n\n // no e.target when 'globalout'.\n if (isGlobalOut) {\n params = {};\n }\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 }\n // If element has custom eventData of components\n else if (el && el.eventData) {\n params = zrUtil.extend({}, el.eventData);\n }\n\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 if (params) {\n var componentType = params.componentType;\n var componentIndex = params.componentIndex;\n // 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 if (componentType === 'markLine'\n || componentType === 'markPoint'\n || componentType === 'markArea'\n ) {\n componentType = 'series';\n componentIndex = params.seriesIndex;\n }\n var model = componentType && componentIndex != null\n && ecModel.getComponent(componentType, componentIndex);\n var view = model && this[\n model.mainType === 'series' ? '_chartsMap' : '_componentsMap'\n ][model.__viewId];\n\n if (__DEV__) {\n // `event.componentType` and `event[componentTpype + 'Index']` must not\n // be missed, otherwise there is no way to distinguish source component.\n // See `dataFormat.getDataParams`.\n if (!isGlobalOut && !(model && view)) {\n console.warn('model or view can not be found by params');\n }\n }\n\n params.event = e;\n params.type = eveName;\n\n this._ecEventProcessor.eventInfo = {\n targetEl: el,\n packedEvent: params,\n model: model,\n view: view\n };\n\n this.trigger(eveName, params);\n }\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 handler.zrEventfulCallAtLast = true;\n this._zr.on(eveName, handler, this);\n }, this);\n\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/**\n * @return {boolean}\n */\nechartsProto.isDisposed = function () {\n return this._disposed;\n};\n\n/**\n * Clear\n */\nechartsProto.clear = function () {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n this.setOption({ series: [] }, true);\n};\n\n/**\n * Dispose instance\n */\nechartsProto.dispose = function () {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n this._disposed = true;\n\n modelUtil.setAttribute(this.getDom(), DOM_ATTRIBUTE_KEY, '');\n\n var api = this._api;\n var ecModel = this._model;\n\n each(this._componentsViews, function (component) {\n component.dispose(ecModel, api);\n });\n each(this._chartsViews, function (chart) {\n chart.dispose(ecModel, api);\n });\n\n // Dispose after all views disposed\n this._zr.dispose();\n\n delete instances[this.id];\n};\n\nzrUtil.mixin(ECharts, Eventful);\n\nfunction disposedWarning(id) {\n if (__DEV__) {\n console.warn('Instance ' + id + ' has been disposed');\n }\n}\n\nfunction updateHoverLayerStatus(ecIns, ecModel) {\n var zr = ecIns._zr;\n var storage = zr.storage;\n var elCount = 0;\n\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 var chartView = ecIns._chartsMap[seriesModel.__viewId];\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/**\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 */\nfunction updateBlend(seriesModel, chartView) {\n var blendMode = seriesModel.get('blendMode') || null;\n if (__DEV__) {\n if (!env.canvasSupported && blendMode && blendMode !== 'source-over') {\n console.warn('Only canvas support blendMode');\n }\n }\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 if (el.eachPendingDisplayable) {\n el.eachPendingDisplayable(function (displayable) {\n displayable.setStyle('blend', blendMode);\n });\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 */\nfunction updateZ(model, view) {\n var z = model.get('z');\n var zlevel = model.get('zlevel');\n // Set z and zlevel\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(\n coordSysMgr.getCoordinateSystems, coordSysMgr\n ),\n getComponentByElement: function (el) {\n while (el) {\n var modelInfo = el.__ecComponentInfo;\n if (modelInfo != null) {\n return ecInstance._model.getComponent(modelInfo.mainType, modelInfo.index);\n }\n el = el.parent;\n }\n }\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 */\nfunction EventProcessor() {\n // These info required: targetEl, packedEvent, model, view\n this.eventInfo;\n}\nEventProcessor.prototype = {\n constructor: EventProcessor,\n\n normalizeQuery: function (query) {\n var cptQuery = {};\n var dataQuery = {};\n var otherQuery = {};\n\n // `query` is `mainType` or `mainType.subType` of component.\n if (zrUtil.isString(query)) {\n var condCptType = parseClassType(query);\n // `.main` and `.sub` may be ''.\n cptQuery.mainType = condCptType.main || null;\n cptQuery.subType = condCptType.sub || null;\n }\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 = {name: 1, dataIndex: 1, dataType: 1};\n zrUtil.each(query, function (val, key) {\n var reserved = false;\n for (var i = 0; i < suffixes.length; i++) {\n var propSuffix = suffixes[i];\n var suffixPos = key.lastIndexOf(propSuffix);\n if (suffixPos > 0 && suffixPos === key.length - propSuffix.length) {\n var mainType = key.slice(0, suffixPos);\n // Consider `dataIndex`.\n if (mainType !== 'data') {\n cptQuery.mainType = mainType;\n cptQuery[propSuffix.toLowerCase()] = val;\n reserved = true;\n }\n }\n }\n if (dataKeys.hasOwnProperty(key)) {\n dataQuery[key] = val;\n reserved = true;\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\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;\n\n // For event like 'globalout'.\n if (!model || !view) {\n return true;\n }\n\n var cptQuery = query.cptQuery;\n var dataQuery = query.dataQuery;\n\n return check(cptQuery, model, 'mainType')\n && check(cptQuery, model, 'subType')\n && check(cptQuery, model, 'index', 'componentIndex')\n && check(cptQuery, model, 'name')\n && check(cptQuery, model, 'id')\n && check(dataQuery, packedEvent, 'name')\n && check(dataQuery, packedEvent, 'dataIndex')\n && check(dataQuery, packedEvent, 'dataType')\n && (!view.filterForExposedEvent || view.filterForExposedEvent(\n eventType, query.otherQuery, targetEl, packedEvent\n ));\n\n function check(query, host, prop, propOnHost) {\n return query[prop] == null || host[propOnHost || prop] === query[prop];\n }\n },\n\n afterTrigger: function () {\n // Make sure the eventInfo wont be used in next trigger.\n this.eventInfo = null;\n }\n};\n\n\n/**\n * @type {Object} key: actionType.\n * @inner\n */\nvar actions = {};\n\n/**\n * Map eventType to actionType\n * @type {Object}\n */\nvar eventActionMap = {};\n\n/**\n * Data processor functions of each stage\n * @type {Array.<Object.<string, Function>>}\n * @inner\n */\nvar dataProcessorFuncs = [];\n\n/**\n * @type {Array.<Function>}\n * @inner\n */\nvar optionPreprocessorFuncs = [];\n\n/**\n * @type {Array.<Function>}\n * @inner\n */\nvar postUpdateFuncs = [];\n\n/**\n * Visual encoding functions of each stage\n * @type {Array.<Object.<string, Function>>}\n */\nvar visualFuncs = [];\n\n/**\n * Theme storage\n * @type {Object.<key, Object>}\n */\nvar themeStorage = {};\n/**\n * Loading effects\n */\nvar loadingEffects = {};\n\nvar instances = {};\nvar connectedGroups = {};\n\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\n each(instances, function (otherChart) {\n if (otherChart !== chart && otherChart.group === chart.group) {\n otherCharts.push(otherChart);\n }\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/**\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 */\nexport function init(dom, theme, opts) {\n if (__DEV__) {\n // Check version\n if ((zrender.version.replace('.', '') - 0) < (dependencies.zrender.replace('.', '') - 0)) {\n throw new Error(\n 'zrender/src ' + zrender.version\n + ' is too old for ECharts ' + version\n + '. Current version need ZRender '\n + dependencies.zrender + '+'\n );\n }\n\n if (!dom) {\n throw new Error('Initialize failed: invalid dom.');\n }\n }\n\n var existInstance = getInstanceByDom(dom);\n if (existInstance) {\n if (__DEV__) {\n console.warn('There is a chart instance already initialized on the dom.');\n }\n return existInstance;\n }\n\n if (__DEV__) {\n if (zrUtil.isDom(dom)\n && dom.nodeName.toUpperCase() !== 'CANVAS'\n && (\n (!dom.clientWidth && (!opts || opts.width == null))\n || (!dom.clientHeight && (!opts || opts.height == null))\n )\n ) {\n console.warn('Can\\'t get DOM width or height. Please check '\n + 'dom.clientWidth and dom.clientHeight. They should not be 0.'\n + 'For example, you may need to call this in the callback '\n + 'of window.onload.');\n }\n }\n\n var chart = new ECharts(dom, theme, opts);\n chart.id = 'ec_' + idBase++;\n instances[chart.id] = chart;\n\n modelUtil.setAttribute(dom, DOM_ATTRIBUTE_KEY, chart.id);\n\n enableConnect(chart);\n\n return chart;\n}\n\n/**\n * @return {string|Array.<module:echarts~ECharts>} groupId\n */\nexport function connect(groupId) {\n // Is array of charts\n if (zrUtil.isArray(groupId)) {\n var charts = groupId;\n groupId = null;\n // If any chart has group\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 connectedGroups[groupId] = true;\n return groupId;\n}\n\n/**\n * @DEPRECATED\n * @return {string} groupId\n */\nexport function disConnect(groupId) {\n connectedGroups[groupId] = false;\n}\n\n/**\n * @return {string} groupId\n */\nexport var disconnect = disConnect;\n\n/**\n * Dispose a chart instance\n * @param {module:echarts~ECharts|HTMLDomElement|string} chart\n */\nexport function dispose(chart) {\n if (typeof chart === 'string') {\n chart = instances[chart];\n }\n else if (!(chart instanceof ECharts)) {\n // Try to treat as dom\n chart = getInstanceByDom(chart);\n }\n if ((chart instanceof ECharts) && !chart.isDisposed()) {\n chart.dispose();\n }\n}\n\n/**\n * @param {HTMLElement} dom\n * @return {echarts~ECharts}\n */\nexport function getInstanceByDom(dom) {\n return instances[modelUtil.getAttribute(dom, DOM_ATTRIBUTE_KEY)];\n}\n\n/**\n * @param {string} key\n * @return {echarts~ECharts}\n */\nexport function getInstanceById(key) {\n return instances[key];\n}\n\n/**\n * Register theme\n */\nexport function registerTheme(name, theme) {\n themeStorage[name] = theme;\n}\n\n/**\n * Register option preprocessor\n * @param {Function} preprocessorFunc\n */\nexport function registerPreprocessor(preprocessorFunc) {\n optionPreprocessorFuncs.push(preprocessorFunc);\n}\n\n/**\n * @param {number} [priority=1000]\n * @param {Object|Function} processor\n */\nexport function registerProcessor(priority, processor) {\n normalizeRegister(dataProcessorFuncs, priority, processor, PRIORITY_PROCESSOR_FILTER);\n}\n\n/**\n * Register postUpdater\n * @param {Function} postUpdateFunc\n */\nexport function registerPostUpdate(postUpdateFunc) {\n postUpdateFuncs.push(postUpdateFunc);\n}\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 */\nexport function registerAction(actionInfo, eventName, action) {\n if (typeof eventName === 'function') {\n action = eventName;\n eventName = '';\n }\n var actionType = isObject(actionInfo)\n ? actionInfo.type\n : ([actionInfo, actionInfo = {\n event: eventName\n }][0]);\n\n // Event name is all lowercase\n actionInfo.event = (actionInfo.event || actionType).toLowerCase();\n eventName = actionInfo.event;\n\n // Validate action type and event name.\n assert(ACTION_REG.test(actionType) && ACTION_REG.test(eventName));\n\n if (!actions[actionType]) {\n actions[actionType] = {action: action, actionInfo: actionInfo};\n }\n eventActionMap[eventName] = actionType;\n}\n\n/**\n * @param {string} type\n * @param {*} CoordinateSystem\n */\nexport function registerCoordinateSystem(type, CoordinateSystem) {\n CoordinateSystemManager.register(type, CoordinateSystem);\n}\n\n/**\n * Get dimensions of specified coordinate system.\n * @param {string} type\n * @return {Array.<string|Object>}\n */\nexport function getCoordinateSystemDimensions(type) {\n var coordSysCreator = CoordinateSystemManager.get(type);\n if (coordSysCreator) {\n return coordSysCreator.getDimensionsInfo\n ? coordSysCreator.getDimensionsInfo()\n : coordSysCreator.dimensions.slice();\n }\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 */\nexport function registerLayout(priority, layoutTask) {\n normalizeRegister(visualFuncs, priority, layoutTask, PRIORITY_VISUAL_LAYOUT, 'layout');\n}\n\n/**\n * @param {number} [priority=3000]\n * @param {module:echarts/stream/Task} visualTask\n */\nexport function registerVisual(priority, visualTask) {\n normalizeRegister(visualFuncs, priority, visualTask, PRIORITY_VISUAL_CHART, 'visual');\n}\n\n/**\n * @param {Object|Function} fn: {seriesType, createOnAllSeries, performRawSeries, reset}\n */\nfunction normalizeRegister(targetList, priority, fn, defaultPriority, visualType) {\n if (isFunction(priority) || isObject(priority)) {\n fn = priority;\n priority = defaultPriority;\n }\n\n if (__DEV__) {\n if (isNaN(priority) || priority == null) {\n throw new Error('Illegal priority');\n }\n // Check duplicate\n each(targetList, function (wrap) {\n assert(wrap.__raw !== fn);\n });\n }\n\n var stageHandler = Scheduler.wrapStageHandler(fn, visualType);\n\n stageHandler.__prio = priority;\n stageHandler.__raw = fn;\n targetList.push(stageHandler);\n\n return stageHandler;\n}\n\n/**\n * @param {string} name\n */\nexport function registerLoading(name, loadingFx) {\n loadingEffects[name] = loadingFx;\n}\n\n/**\n * @param {Object} opts\n * @param {string} [superClass]\n */\nexport function extendComponentModel(opts/*, superClass*/) {\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/**\n * @param {Object} opts\n * @param {string} [superClass]\n */\nexport function extendComponentView(opts/*, superClass*/) {\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/**\n * @param {Object} opts\n * @param {string} [superClass]\n */\nexport function extendSeriesModel(opts/*, superClass*/) {\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/**\n * @param {Object} opts\n * @param {string} [superClass]\n */\nexport function extendChartView(opts/*, superClass*/) {\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/**\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 */\nexport function setCanvasCreator(creator) {\n zrUtil.$override('createCanvas', creator);\n}\n\n/**\n * @param {string} mapName\n * @param {Array.<Object>|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 */\nexport function registerMap(mapName, geoJson, specialAreas) {\n mapDataStorage.registerMap(mapName, geoJson, specialAreas);\n}\n\n/**\n * @param {string} mapName\n * @return {Object}\n */\nexport function 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);\n\n// Default actions\n\nregisterAction({\n type: 'highlight',\n event: 'highlight',\n update: 'highlight'\n}, zrUtil.noop);\n\nregisterAction({\n type: 'downplay',\n event: 'downplay',\n update: 'downplay'\n}, zrUtil.noop);\n\n// Default theme\nregisterTheme('light', lightTheme);\nregisterTheme('dark', darkTheme);\n\n// For backward compatibility, where the namespace `dataTool` will\n// be mounted on `echarts` is the extension `dataTool` is imported.\nexport var dataTool = {};\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nfunction defaultKeyGetter(item) {\n return item;\n}\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 */\nfunction DataDiffer(oldArr, newArr, oldKeyGetter, newKeyGetter, context) {\n this._old = oldArr;\n this._new = newArr;\n\n this._oldKeyGetter = oldKeyGetter || defaultKeyGetter;\n this._newKeyGetter = newKeyGetter || defaultKeyGetter;\n\n this.context = context;\n}\n\nDataDiffer.prototype = {\n\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\n execute: function () {\n var oldArr = this._old;\n var newArr = this._new;\n\n var oldDataIndexMap = {};\n var newDataIndexMap = {};\n var oldDataKeyArr = [];\n var newDataKeyArr = [];\n var i;\n\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];\n\n // idx can never be empty array here. see 'set null' logic below.\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 if (len) {\n len === 1 && (newDataIndexMap[key] = null);\n idx = idx.shift();\n }\n else {\n newDataIndexMap[key] = null;\n }\n this._update && this._update(idx, i);\n }\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 if (newDataIndexMap.hasOwnProperty(key)) {\n var idx = newDataIndexMap[key];\n if (idx == null) {\n continue;\n }\n // idx can never be empty array here. see 'set null' logic above.\n if (!idx.length) {\n this._add && this._add(idx);\n }\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 if (existence == null) {\n keyArr.push(key);\n map[key] = i;\n }\n else {\n if (!existence.length) {\n map[key] = existence = [existence];\n }\n existence.push(i);\n }\n }\n}\n\nexport default DataDiffer;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {each, createHashMap, assert} from 'zrender/src/core/util';\nimport { __DEV__ } from '../../config';\n\nexport var OTHER_DIMENSIONS = createHashMap([\n 'tooltip', 'label', 'itemName', 'itemId', 'seriesName'\n]);\n\nexport function summarizeDimensions(data) {\n var summary = {};\n var encode = summary.encode = {};\n var notExtraCoordDimMap = createHashMap();\n var defaultedLabel = [];\n var defaultedTooltip = [];\n\n // See the comment of `List.js#userOutput`.\n var userOutput = summary.userOutput = {\n dimensionNames: data.dimensions.slice(),\n encode: {}\n };\n\n each(data.dimensions, function (dimName) {\n var dimItem = data.getDimensionInfo(dimName);\n\n var coordDim = dimItem.coordDim;\n if (coordDim) {\n if (__DEV__) {\n assert(OTHER_DIMENSIONS.get(coordDim) == null);\n }\n\n var coordDimIndex = dimItem.coordDimIndex;\n getOrCreateEncodeArr(encode, coordDim)[coordDimIndex] = dimName;\n\n if (!dimItem.isExtraCoord) {\n notExtraCoordDimMap.set(coordDim, 1);\n\n // 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 if (mayLabelDimType(dimItem.type)) {\n defaultedLabel[0] = dimName;\n }\n\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 getOrCreateEncodeArr(userOutput.encode, coordDim)[coordDimIndex] = dimItem.index;\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\n var dimIndex = dimItem.otherDims[otherDim];\n if (dimIndex != null && dimIndex !== false) {\n encodeArr[dimIndex] = dimItem.name;\n }\n });\n });\n\n var dataDimsOnCoord = [];\n var encodeFirstDimNotExtra = {};\n\n notExtraCoordDimMap.each(function (v, coordDim) {\n var dimArr = encode[coordDim];\n // ??? 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 encodeFirstDimNotExtra[coordDim] = dimArr[0];\n // Not necessary to remove duplicate, because a data\n // dim canot on more than one coordDim.\n dataDimsOnCoord = dataDimsOnCoord.concat(dimArr);\n });\n\n summary.dataDimsOnCoord = dataDimsOnCoord;\n summary.encodeFirstDimNotExtra = encodeFirstDimNotExtra;\n\n var encodeLabel = encode.label;\n // 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 if (encodeLabel && encodeLabel.length) {\n defaultedLabel = encodeLabel.slice();\n }\n\n var encodeTooltip = encode.tooltip;\n if (encodeTooltip && encodeTooltip.length) {\n defaultedTooltip = encodeTooltip.slice();\n }\n else if (!defaultedTooltip.length) {\n defaultedTooltip = defaultedLabel.slice();\n }\n\n encode.defaultedLabel = defaultedLabel;\n encode.defaultedTooltip = defaultedTooltip;\n\n return summary;\n}\n\nfunction getOrCreateEncodeArr(encode, dim) {\n if (!encode.hasOwnProperty(dim)) {\n encode[dim] = [];\n }\n return encode[dim];\n}\n\nexport function getDimensionTypeByAxis(axisType) {\n return axisType === 'category'\n ? 'ordinal'\n : axisType === 'time'\n ? 'time'\n : '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}\n\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* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\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 /**\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 this.otherDims = {};\n\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\nexport default DataDimensionInfo;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport {__DEV__} from '../config';\nimport * as zrUtil from 'zrender/src/core/util';\nimport Model from '../model/Model';\nimport DataDiffer from './DataDiffer';\nimport Source from './Source';\nimport {defaultDimValueGetters, DefaultDataProvider} from './helper/dataProvider';\nimport {summarizeDimensions} from './helper/dimensionHelper';\nimport DataDimensionInfo from './DataDimensionInfo';\n\nvar isObject = zrUtil.isObject;\n\nvar UNDEFINED = 'undefined';\nvar INDEX_NOT_FOUND = -1;\n\n// Use prefix to avoid index to be the same as otherIdList[idx],\n// which will cause weird udpate animation.\nvar ID_PREFIX = 'e\\0\\0';\n\nvar dataCtors = {\n 'float': typeof Float64Array === UNDEFINED\n ? Array : Float64Array,\n 'int': typeof Int32Array === UNDEFINED\n ? Array : Int32Array,\n // Ordinal data type can be string or int\n 'ordinal': Array,\n 'number': Array,\n 'time': Array\n};\n\n// Caution: MUST not use `new CtorUint32Array(arr, 0, len)`, because the Ctor of array is\n// different from the Ctor of typed array.\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;\n // Only shallow clone is enough when Array.\n return Ctor === Array ? originalChunk.slice() : new Ctor(originalChunk);\n}\n\nvar TRANSFERABLE_PROPERTIES = [\n 'hasItemOption', '_nameList', '_idList', '_invertedIndicesMap',\n '_rawData', '_chunkSize', '_chunkCount', '_dimValueGetter',\n '_count', '_rawCount', '_nameDimIdx', '_idDimIdx'\n];\nvar CLONE_PROPERTIES = [\n '_extent', '_approximateExtent', '_rawExtent'\n];\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\n target.__wrappedMethods = source.__wrappedMethods;\n\n zrUtil.each(CLONE_PROPERTIES, function (propName) {\n target[propName] = zrUtil.clone(source[propName]);\n });\n\n target._calculationInfo = zrUtil.extend(source._calculationInfo);\n}\n\n\n\n\n\n/**\n * @constructor\n * @alias module:echarts/data/List\n *\n * @param {Array.<string|Object|module:data/DataDimensionInfo>} 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 */\nvar List = function (dimensions, hostModel) {\n\n dimensions = dimensions || ['x', 'y'];\n\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({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 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\n dimensionInfo.index = i;\n\n if (dimensionInfo.createInvertedIndices) {\n invertedIndicesMap[dimensionName] = [];\n }\n }\n\n /**\n * @readOnly\n * @type {Array.<string>}\n */\n this.dimensions = dimensionNames;\n\n /**\n * Infomation of each data dimension, like data type.\n * @type {Object}\n */\n this._dimensionInfos = dimensionInfos;\n\n /**\n * @type {module:echarts/model/Model}\n */\n this.hostModel = hostModel;\n\n /**\n * @type {module:echarts/model/Model}\n */\n this.dataType;\n\n /**\n * Indices stores the indices of data subset after filtered.\n * This data subset will be used in chart.\n * @type {Array.<number>}\n * @readOnly\n */\n this._indices = null;\n\n this._count = 0;\n this._rawCount = 0;\n\n /**\n * Data storage\n * @type {Object.<key, Array.<TypedArray|Array>>}\n * @private\n */\n this._storage = {};\n\n /**\n * @type {Array.<string>}\n */\n this._nameList = [];\n /**\n * @type {Array.<string>}\n */\n this._idList = [];\n\n /**\n * Models of data option is stored sparse for optimizing memory cost\n * @type {Array.<module:echarts/model/Model>}\n * @private\n */\n this._optionModels = [];\n\n /**\n * Global visual properties after visual coding\n * @type {Object}\n * @private\n */\n this._visual = {};\n\n /**\n * Globel layout properties.\n * @type {Object}\n * @private\n */\n this._layout = {};\n\n /**\n * Item visual properties after visual coding\n * @type {Array.<Object>}\n * @private\n */\n this._itemVisuals = [];\n\n /**\n * Key: visual type, Value: boolean\n * @type {Object}\n * @readOnly\n */\n this.hasItemVisual = {};\n\n /**\n * Item layout properties after layout\n * @type {Array.<Object>}\n * @private\n */\n this._itemLayouts = [];\n\n /**\n * Graphic elemnents\n * @type {Array.<module:zrender/Element>}\n * @private\n */\n this._graphicEls = [];\n\n /**\n * Max size of each chunk.\n * @type {number}\n * @private\n */\n this._chunkSize = 1e5;\n\n /**\n * @type {number}\n * @private\n */\n this._chunkCount = 0;\n\n /**\n * @type {Array.<Array|Object>}\n * @private\n */\n this._rawData;\n\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.<number>}\n * @type {Object}\n * @private\n */\n this._rawExtent = {};\n\n /**\n * @type {Object}\n * @private\n */\n this._extent = {};\n\n /**\n * key: dim\n * value: extent\n * @type {Object}\n * @private\n */\n this._approximateExtent = {};\n\n /**\n * Cache summary info for fast visit. See \"dimensionHelper\".\n * @type {Object}\n * @private\n */\n this._dimensionsSummary = summarizeDimensions(this);\n\n /**\n * @type {Object.<Array|TypedArray>}\n * @private\n */\n this._invertedIndicesMap = invertedIndicesMap;\n\n /**\n * @type {Object}\n * @private\n */\n this._calculationInfo = {};\n\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 this.userOutput = this._dimensionsSummary.userOutput;\n};\n\nvar listProto = List.prototype;\n\nlistProto.type = 'list';\n\n/**\n * If each data item has it's own option\n * @type {boolean}\n */\nlistProto.hasItemOption = true;\n\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 */\nlistProto.getDimension = function (dim) {\n if (typeof dim === 'number'\n // If being a number-like string but not being defined a dimension name.\n || (!isNaN(dim) && !this._dimensionInfos.hasOwnProperty(dim))\n ) {\n dim = this.dimensions[dim];\n }\n return dim;\n};\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 */\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/**\n * @return {Array.<string>} concrete dimension name list on coord.\n */\nlistProto.getDimensionsOnCoord = function () {\n return this._dimensionsSummary.dataDimsOnCoord.slice();\n};\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.<string>} 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 */\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\n // always return array if idx is `true`\n ? (dims || []).slice()\n : (dims && dims[idx]);\n};\n\n/**\n * Initialize from data\n * @param {Array.<Object|number|Array>} data source or data or data provider.\n * @param {Array.<string>} [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 */\nlistProto.initData = function (data, nameList, dimValueGetter) {\n\n var notProvider = Source.isInstance(data) || zrUtil.isArrayLike(data);\n if (notProvider) {\n data = new DefaultDataProvider(data, this.dimensions.length);\n }\n\n if (__DEV__) {\n if (!notProvider && (typeof data.getItem !== 'function' || typeof data.count !== 'function')) {\n throw new Error('Inavlid data provider.');\n }\n }\n\n this._rawData = data;\n\n // Clear\n this._storage = {};\n this._indices = null;\n\n this._nameList = nameList || [];\n\n this._idList = [];\n\n this._nameRepeatCount = {};\n\n if (!dimValueGetter) {\n this.hasItemOption = false;\n }\n\n /**\n * @readOnly\n */\n this.defaultDimValueGetter = defaultDimValueGetters[\n this._rawData.getSource().sourceFormat\n ];\n // Default dim value getter\n this._dimValueGetter = dimValueGetter = dimValueGetter\n || this.defaultDimValueGetter;\n this._dimValueGetterArrayRows = defaultDimValueGetters.arrayRows;\n\n // Reset raw extent.\n this._rawExtent = {};\n\n this._initDataFromProvider(0, data.count());\n\n // If data has no item option.\n if (data.pure) {\n this.hasItemOption = false;\n }\n};\n\nlistProto.getProvider = function () {\n return this._rawData;\n};\n\n/**\n * Caution: Can be only called on raw data (before `this._indices` created).\n */\nlistProto.appendData = function (data) {\n if (__DEV__) {\n zrUtil.assert(!this._indices, 'appendData can only be called on raw data.');\n }\n\n var rawData = this._rawData;\n var start = this.count();\n rawData.appendData(data);\n var end = rawData.count();\n if (!rawData.persistent) {\n end += start;\n }\n this._initDataFromProvider(start, end);\n};\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.<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.<string>} [names]\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\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 if (!rawExtent[dim]) {\n rawExtent[dim] = getInitialExtent();\n }\n if (!storage[dim]) {\n storage[dim] = [];\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 for (var idx = start; idx < end; idx++) {\n var sourceIdx = idx - start;\n var chunkIndex = Math.floor(idx / chunkSize);\n var chunkOffset = idx % chunkSize;\n\n // Store the data by dimensions\n for (var k = 0; k < dimLen; k++) {\n var dim = dimensions[k];\n var val = this._dimValueGetterArrayRows(\n values[sourceIdx] || emptyDataItem, dim, sourceIdx, k\n );\n storage[dim][chunkIndex][chunkOffset] = val;\n\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;\n\n // Reset data extent\n this._extent = {};\n\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\n var originalChunkCount = this._chunkCount;\n for (var i = 0; i < dimLen; i++) {\n var dim = dimensions[i];\n if (!rawExtent[dim]) {\n rawExtent[dim] = getInitialExtent();\n }\n\n var dimInfo = dimensionInfoMap[dim];\n if (dimInfo.otherDims.itemName === 0) {\n nameDimIdx = this._nameDimIdx = i;\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\n this._chunkCount = storage[dim].length;\n }\n\n var dataItem = new Array(dimLen);\n for (var idx = start; idx < end; idx++) {\n // NOTICE: Try not to write things into dataItem\n dataItem = rawData.getItem(idx, dataItem);\n // 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 var chunkIndex = Math.floor(idx / chunkSize);\n var chunkOffset = idx % chunkSize;\n\n // Store the data by dimensions\n for (var k = 0; k < dimLen; k++) {\n var dim = dimensions[k];\n var dimStorage = storage[dim][chunkIndex];\n // PENDING NULL is empty or zero\n var val = this._dimValueGetter(dataItem, dim, idx, k);\n dimStorage[chunkOffset] = val;\n\n var dimRawExtent = rawExtent[dim];\n val < dimRawExtent[0] && (dimRawExtent[0] = val);\n val > dimRawExtent[1] && (dimRawExtent[1] = val);\n }\n\n // ??? FIXME not check by pure but sourceFormat?\n // TODO refactor these logic.\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 }\n else if (nameDimIdx != null) {\n var nameDim = dimensions[nameDimIdx];\n var nameDimChunk = storage[nameDim][chunkIndex];\n if (nameDimChunk) {\n name = nameDimChunk[chunkOffset];\n var ordinalMeta = dimensionInfoMap[nameDim].ordinalMeta;\n if (ordinalMeta && ordinalMeta.categories.length) {\n name = ordinalMeta.categories[name];\n }\n }\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 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 if (nameRepeatCount[name] > 0) {\n id += '__ec__' + nameRepeatCount[name];\n }\n nameRepeatCount[name]++;\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;\n\n // Reset data extent\n this._extent = {};\n\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 if (resizeChunkArray && resizeChunkArray.length < chunkSize) {\n var newStore = new DataCtor(Math.min(end - lastChunkIndex * chunkSize, chunkSize));\n // The cost of the copy is probably inconsiderable\n // within the initial chunkSize.\n for (var j = 0; j < resizeChunkArray.length; j++) {\n newStore[j] = resizeChunkArray[j];\n }\n storage[dim][lastChunkIndex] = newStore;\n }\n\n // Create new chunks.\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];\n\n // Currently, only dimensions that has ordinalMeta can create inverted indices.\n var ordinalMeta = dimInfo.ordinalMeta;\n if (ordinalMeta) {\n invertedIndices = invertedIndicesMap[dim] = new CtorInt32Array(\n ordinalMeta.categories.length\n );\n // The default value of TypedArray is 0. To avoid miss\n // mapping to 0, we should set it as INDEX_NOT_FOUND.\n for (var i = 0; i < invertedIndices.length; i++) {\n invertedIndices[i] = INDEX_NOT_FOUND;\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 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 if (chunk) {\n val = chunk[chunkOffset];\n var ordinalMeta = list._dimensionInfos[dim].ordinalMeta;\n if (ordinalMeta && ordinalMeta.categories.length) {\n val = ordinalMeta.categories[val];\n }\n }\n }\n return val;\n}\n\n/**\n * @return {number}\n */\nlistProto.count = function () {\n return this._count;\n};\n\nlistProto.getIndices = function () {\n var newIndices;\n\n var indices = this._indices;\n if (indices) {\n var Ctor = indices.constructor;\n var thisCount = this._count;\n // `new Array(a, b, c)` is different from `new Uint32Array(a, b, c)`.\n if (Ctor === Array) {\n newIndices = new Ctor(thisCount);\n for (var i = 0; i < thisCount; i++) {\n newIndices[i] = indices[i];\n }\n }\n else {\n newIndices = new Ctor(indices.buffer, 0, thisCount);\n }\n }\n else {\n var Ctor = getIndicesCtor(this);\n var newIndices = new Ctor(this.count());\n for (var i = 0; i < newIndices.length; i++) {\n newIndices[i] = i;\n }\n }\n\n return newIndices;\n};\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 */\nlistProto.get = function (dim, idx /*, stack */) {\n if (!(idx >= 0 && idx < this._count)) {\n return NaN;\n }\n var storage = this._storage;\n if (!storage[dim]) {\n // TODO Warn ?\n return NaN;\n }\n\n idx = this.getRawIndex(idx);\n\n var chunkIndex = Math.floor(idx / this._chunkSize);\n var chunkOffset = idx % this._chunkSize;\n\n var chunkStore = storage[dim][chunkIndex];\n var value = chunkStore[chunkOffset];\n // 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/**\n * @param {string} dim concrete dim\n * @param {number} rawIndex\n * @return {number|string}\n */\nlistProto.getByRawIndex = function (dim, rawIdx) {\n if (!(rawIdx >= 0 && rawIdx < this._rawCount)) {\n return NaN;\n }\n var dimStore = this._storage[dim];\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/**\n * FIXME Use `get` on chrome maybe slow(in filterSelf and selectRange).\n * Hack a much simpler _getFast\n * @private\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/**\n * Get value for multi dimensions.\n * @param {Array.<string>} [dimensions] If ignored, using all dimensions.\n * @param {number} idx\n * @return {number}\n */\nlistProto.getValues = function (dimensions, idx /*, stack */) {\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 /*, stack */));\n }\n\n return values;\n};\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 */\nlistProto.hasValue = function (idx) {\n var dataDimsOnCoord = this._dimensionsSummary.dataDimsOnCoord;\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 return true;\n};\n\n/**\n * Get extent of data in one dimension\n * @param {string} dim\n * @param {boolean} stack\n */\nlistProto.getDataExtent = function (dim /*, stack */) {\n // Make sure use concrete dim as cache name.\n dim = this.getDimension(dim);\n var dimData = this._storage[dim];\n var initialExtent = getInitialExtent();\n\n // stack = !!((stack || false) && this.getCalculationInfo(dim));\n\n if (!dimData) {\n return initialExtent;\n }\n\n // Make more strict checkings to ensure hitting cache.\n var currEnd = this.count();\n // var cacheName = [dim, !!stack].join('_');\n // var cacheName = dim;\n\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 var useRaw = !this._indices; // && !stack;\n var dimExtent;\n\n if (useRaw) {\n return this._rawExtent[dim].slice();\n }\n dimExtent = this._extent[dim];\n if (dimExtent) {\n return dimExtent.slice();\n }\n dimExtent = initialExtent;\n\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 value < min && (min = value);\n value > max && (max = value);\n }\n\n dimExtent = [min, max];\n\n this._extent[dim] = dimExtent;\n\n return dimExtent;\n};\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 */\nlistProto.getApproximateExtent = function (dim /*, stack */) {\n dim = this.getDimension(dim);\n return this._approximateExtent[dim] || this.getDataExtent(dim /*, stack */);\n};\n\nlistProto.setApproximateExtent = function (extent, dim /*, stack */) {\n dim = this.getDimension(dim);\n this._approximateExtent[dim] = extent.slice();\n};\n\n/**\n * @param {string} key\n * @return {*}\n */\nlistProto.getCalculationInfo = function (key) {\n return this._calculationInfo[key];\n};\n\n/**\n * @param {string|Object} key or k-v object\n * @param {*} [value]\n */\nlistProto.setCalculationInfo = function (key, value) {\n isObject(key)\n ? zrUtil.extend(this._calculationInfo, key)\n : (this._calculationInfo[key] = value);\n};\n\n/**\n * Get sum of data in one dimension\n * @param {string} dim\n */\nlistProto.getSum = function (dim /*, stack */) {\n var dimData = this._storage[dim];\n var sum = 0;\n if (dimData) {\n for (var i = 0, len = this.count(); i < len; i++) {\n var value = this.get(dim, i /*, stack */);\n if (!isNaN(value)) {\n sum += value;\n }\n }\n }\n return sum;\n};\n\n/**\n * Get median of data in one dimension\n * @param {string} dim\n */\nlistProto.getMedian = function (dim /*, stack */) {\n var dimDataArray = [];\n // map all data of one dimension\n this.each(dim, function (val, idx) {\n if (!isNaN(val)) {\n dimDataArray.push(val);\n }\n });\n\n // TODO\n // Use quick select?\n\n // immutability & sort\n var sortedDimDataArray = [].concat(dimDataArray).sort(function (a, b) {\n return a - b;\n });\n var len = this.count();\n // calculate median\n return len === 0\n ? 0\n : len % 2 === 1\n ? sortedDimDataArray[(len - 1) / 2]\n : (sortedDimDataArray[len / 2] + sortedDimDataArray[len / 2 - 1]) / 2;\n};\n\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 */\nlistProto.rawIndexOf = function (dim, value) {\n var invertedIndices = dim && this._invertedIndicesMap[dim];\n if (__DEV__) {\n if (!invertedIndices) {\n throw new Error('Do not supported yet');\n }\n }\n var rawIndex = invertedIndices[value];\n if (rawIndex == null || isNaN(rawIndex)) {\n return INDEX_NOT_FOUND;\n }\n return rawIndex;\n};\n\n/**\n * Retreive the index with given name\n * @param {number} idx\n * @param {number} name\n * @return {number}\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/**\n * Retreive the index with given raw data index\n * @param {number} idx\n * @param {number} name\n * @return {number}\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 }\n\n // Indices are ascending\n var indices = this._indices;\n\n // If rawIndex === dataIndex\n var rawDataIndex = indices[rawIndex];\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 while (left <= right) {\n var mid = (left + right) / 2 | 0;\n if (indices[mid] < rawIndex) {\n left = mid + 1;\n }\n else if (indices[mid] > rawIndex) {\n right = mid - 1;\n }\n else {\n return mid;\n }\n }\n return -1;\n};\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.<number>} If and only if multiple indices has\n * the same value, they are put to the result.\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;\n\n // Check the test case of `test/ut/spec/data/List.js`.\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 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\n || (dist === minDist && diff >= 0 && minDiff < 0)\n ) {\n minDist = dist;\n minDiff = diff;\n nearestIndicesLen = 0;\n }\n if (diff === minDiff) {\n nearestIndices[nearestIndicesLen++] = i;\n }\n }\n }\n nearestIndices.length = nearestIndicesLen;\n\n return nearestIndices;\n};\n\n/**\n * Get raw data index\n * @param {number} idx\n * @return {number}\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 return -1;\n}\n\n/**\n * Get raw data item\n * @param {number} idx\n * @return {number}\n */\nlistProto.getRawDataItem = function (idx) {\n if (!this._rawData.persistent) {\n var val = [];\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 return val;\n }\n else {\n return this._rawData.getItem(this.getRawIndex(idx));\n }\n};\n\n/**\n * @param {number} idx\n * @param {boolean} [notDefaultIdx=false]\n * @return {string}\n */\nlistProto.getName = function (idx) {\n var rawIndex = this.getRawIndex(idx);\n return this._nameList[rawIndex]\n || getRawValueFromStore(this, this._nameDimIdx, rawIndex)\n || '';\n};\n\n/**\n * @param {number} idx\n * @param {boolean} [notDefaultIdx=false]\n * @return {string}\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 if (id == null) {\n id = getRawValueFromStore(list, list._idDimIdx, rawIndex);\n }\n if (id == null) {\n // FIXME Check the usage in graph, should not use prefix.\n id = ID_PREFIX + rawIndex;\n }\n return id;\n}\n\nfunction normalizeDimensions(dimensions) {\n if (!zrUtil.isArray(dimensions)) {\n dimensions = [dimensions];\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/**\n * Data iteration\n * @param {string|Array.<string>}\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 */\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 }\n\n // contextCompat just for compat echarts3\n context = context || contextCompat || this;\n\n dims = zrUtil.map(normalizeDimensions(dims), this.getDimension, this);\n\n if (__DEV__) {\n validateDimensions(this, dims);\n }\n\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 case 1:\n cb.call(context, this.get(dims[0], i), i);\n break;\n case 2:\n cb.call(context, this.get(dims[0], i), this.get(dims[1], i), i);\n break;\n default:\n var k = 0;\n var value = [];\n for (; k < dimSize; k++) {\n value[k] = this.get(dims[k], i);\n }\n // Index\n value[k] = i;\n cb.apply(context, value);\n }\n }\n};\n\n/**\n * Data filter\n * @param {string|Array.<string>}\n * @param {Function} cb\n * @param {*} [context=this]\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 }\n\n // contextCompat just for compat echarts3\n context = context || contextCompat || this;\n\n dimensions = zrUtil.map(\n normalizeDimensions(dimensions), this.getDimension, this\n );\n\n if (__DEV__) {\n validateDimensions(this, dimensions);\n }\n\n\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\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);\n // Simple optimization\n if (dimSize === 0) {\n keep = cb.call(context, i);\n }\n else if (dimSize === 1) {\n var val = this._getFast(dim0, rawIdx);\n keep = cb.call(context, val, i);\n }\n else {\n for (var k = 0; k < dimSize; k++) {\n value[k] = this._getFast(dim0, rawIdx);\n }\n value[k] = i;\n keep = cb.apply(context, value);\n }\n if (keep) {\n newIndices[offset++] = rawIdx;\n }\n }\n\n // Set indices after filtered.\n if (offset < count) {\n this._indices = newIndices;\n }\n this._count = offset;\n // Reset data extent\n this._extent = {};\n\n this.getRawIndex = this._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices;\n\n return this;\n};\n\n/**\n * Select data in range. (For optimization of filter)\n * (Manually inline code, support 5 million data filtering in data zoom.)\n */\nlistProto.selectRange = function (range) {\n 'use strict';\n\n if (!this._count) {\n return;\n }\n\n var dimensions = [];\n for (var dim in range) {\n if (range.hasOwnProperty(dim)) {\n dimensions.push(dim);\n }\n }\n\n if (__DEV__) {\n validateDimensions(this, dimensions);\n }\n\n var dimSize = dimensions.length;\n if (!dimSize) {\n return;\n }\n\n var originalCount = this.count();\n var Ctor = getIndicesCtor(this);\n var newIndices = new Ctor(originalCount);\n\n var offset = 0;\n var dim0 = dimensions[0];\n\n var min = range[dim0][0];\n var max = range[dim0][1];\n\n var quickFinished = false;\n if (!this._indices) {\n // Extreme optimization for common case. About 2x faster in chrome.\n var idx = 0;\n if (dimSize === 1) {\n var dimStorage = this._storage[dimensions[0]];\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 for (var i = 0; i < len; i++) {\n var val = chunkStorage[i];\n // 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 if (\n (val >= min && val <= max) || isNaN(val)\n ) {\n newIndices[offset++] = idx;\n }\n idx++;\n }\n }\n quickFinished = true;\n }\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 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 for (var i = 0; i < len; i++) {\n var val = chunkStorage[i];\n var val2 = chunkStorage2[i];\n // Do not filter NaN, see comment above.\n if ((\n (val >= min && val <= max) || isNaN(val)\n )\n && (\n (val2 >= min2 && val2 <= max2) || isNaN(val2)\n )\n ) {\n newIndices[offset++] = idx;\n }\n idx++;\n }\n }\n quickFinished = true;\n }\n }\n if (!quickFinished) {\n if (dimSize === 1) {\n for (var i = 0; i < originalCount; i++) {\n var rawIndex = this.getRawIndex(i);\n var val = this._getFast(dim0, rawIndex);\n // Do not filter NaN, see comment above.\n if (\n (val >= min && val <= max) || isNaN(val)\n ) {\n newIndices[offset++] = rawIndex;\n }\n }\n }\n else {\n for (var i = 0; i < originalCount; i++) {\n var keep = true;\n var rawIndex = this.getRawIndex(i);\n for (var k = 0; k < dimSize; k++) {\n var dimk = dimensions[k];\n var val = this._getFast(dim, rawIndex);\n // Do not filter NaN, see comment above.\n if (val < range[dimk][0] || val > range[dimk][1]) {\n keep = false;\n }\n }\n if (keep) {\n newIndices[offset++] = this.getRawIndex(i);\n }\n }\n }\n }\n\n // Set indices after filtered.\n if (offset < originalCount) {\n this._indices = newIndices;\n }\n this._count = offset;\n // Reset data extent\n this._extent = {};\n\n this.getRawIndex = this._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices;\n\n return this;\n};\n\n/**\n * Data mapping to a plain array\n * @param {string|Array.<string>} [dimensions]\n * @param {Function} cb\n * @param {*} [context=this]\n * @return {Array}\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 }\n\n // contextCompat just for compat echarts3\n context = context || contextCompat || this;\n\n var result = [];\n this.each(dimensions, function () {\n result.push(cb && cb.apply(this, arguments));\n }, context);\n return result;\n};\n\n// Data in excludeDimensions is copied, otherwise transfered.\nfunction cloneListForMapAndSample(original, excludeDimensions) {\n var allDimensions = original.dimensions;\n var list = new List(\n zrUtil.map(allDimensions, original.getDimensionInfo, original),\n original.hostModel\n );\n // FIXME If needs stackedOn, value may already been stacked\n transferProperties(list, original);\n\n var storage = list._storage = {};\n var originalStorage = original._storage;\n\n // Init storage\n for (var i = 0; i < allDimensions.length; i++) {\n var dim = allDimensions[i];\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 }\n else {\n // Direct reference for other dimensions\n storage[dim] = originalStorage[dim];\n }\n }\n }\n return list;\n}\n\nfunction cloneDimStore(originalDimStore) {\n var newDimStore = new Array(originalDimStore.length);\n for (var j = 0; j < originalDimStore.length; j++) {\n newDimStore[j] = cloneChunk(originalDimStore[j]);\n }\n return newDimStore;\n}\n\nfunction getInitialExtent() {\n return [Infinity, -Infinity];\n}\n\n/**\n * Data mapping to a new List with given dimensions\n * @param {string|Array.<string>} dimensions\n * @param {Function} cb\n * @param {*} [context=this]\n * @return {Array}\n */\nlistProto.map = function (dimensions, cb, context, contextCompat) {\n 'use strict';\n\n // contextCompat just for compat echarts3\n context = context || contextCompat || this;\n\n dimensions = zrUtil.map(\n normalizeDimensions(dimensions), this.getDimension, this\n );\n\n if (__DEV__) {\n validateDimensions(this, dimensions);\n }\n\n var list = cloneListForMapAndSample(this, dimensions);\n\n // Following properties are all immutable.\n // So we can reference to the same value\n list._indices = this._indices;\n list.getRawIndex = list._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices;\n\n var storage = list._storage;\n\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 /*, stack */);\n }\n values[dimSize] = dataIndex;\n\n var retValue = cb && cb.apply(context, values);\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\n var dimStore = storage[dim];\n if (dimStore) {\n dimStore[chunkIndex][chunkOffset] = val;\n }\n\n if (val < rawExtentOnDim[0]) {\n rawExtentOnDim[0] = val;\n }\n if (val > rawExtentOnDim[1]) {\n rawExtentOnDim[1] = val;\n }\n }\n }\n }\n\n return list;\n};\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 */\nlistProto.downSample = function (dimension, rate, sampleValue, sampleIndex) {\n var list = cloneListForMapAndSample(this, [dimension]);\n var targetStorage = list._storage;\n\n var frameValues = [];\n var frameSize = Math.floor(1 / rate);\n\n var dimStore = targetStorage[dimension];\n var len = this.count();\n var chunkSize = this._chunkSize;\n var rawExtentOnDim = list._rawExtent[dimension];\n\n var newIndices = new (getIndicesCtor(this))(len);\n\n var offset = 0;\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 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 var value = sampleValue(frameValues);\n var sampleFrameIdx = this.getRawIndex(\n Math.min(i + sampleIndex(frameValues, value) || 0, len - 1)\n );\n var sampleChunkIndex = Math.floor(sampleFrameIdx / chunkSize);\n var sampleChunkOffset = sampleFrameIdx % chunkSize;\n // Only write value on the filtered data\n dimStore[sampleChunkIndex][sampleChunkOffset] = value;\n\n if (value < rawExtentOnDim[0]) {\n rawExtentOnDim[0] = value;\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\n list.getRawIndex = getRawIndexWithIndices;\n\n return list;\n};\n\n/**\n * Get model of one data item.\n *\n * @param {number} idx\n */\n// FIXME Model proxy ?\nlistProto.getItemModel = function (idx) {\n var hostModel = this.hostModel;\n return new Model(this.getRawDataItem(idx), hostModel, hostModel && hostModel.ecModel);\n};\n\n/**\n * Create a data differ\n * @param {module:echarts/data/List} otherList\n * @return {module:echarts/data/DataDiffer}\n */\nlistProto.diff = function (otherList) {\n var thisList = this;\n\n return new DataDiffer(\n otherList ? otherList.getIndices() : [],\n this.getIndices(),\n function (idx) {\n return getId(otherList, idx);\n },\n function (idx) {\n return getId(thisList, idx);\n }\n );\n};\n/**\n * Get visual property.\n * @param {string} key\n */\nlistProto.getVisual = function (key) {\n var visual = this._visual;\n return visual && visual[key];\n};\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 */\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 return;\n }\n this._visual = this._visual || {};\n this._visual[key] = val;\n};\n\n/**\n * Set layout property.\n * @param {string|Object} key\n * @param {*} [val]\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 return;\n }\n this._layout[key] = val;\n};\n\n/**\n * Get layout property.\n * @param {string} key.\n * @return {*}\n */\nlistProto.getLayout = function (key) {\n return this._layout[key];\n};\n\n/**\n * Get layout of single data item\n * @param {number} idx\n */\nlistProto.getItemLayout = function (idx) {\n return this._itemLayouts[idx];\n};\n\n/**\n * Set layout of single data item\n * @param {number} idx\n * @param {Object} layout\n * @param {boolean=} [merge=false]\n */\nlistProto.setItemLayout = function (idx, layout, merge) {\n this._itemLayouts[idx] = merge\n ? zrUtil.extend(this._itemLayouts[idx] || {}, layout)\n : layout;\n};\n\n/**\n * Clear all layout of single data item\n */\nlistProto.clearItemLayouts = function () {\n this._itemLayouts.length = 0;\n};\n\n/**\n * Get visual property of single data item\n * @param {number} idx\n * @param {string} key\n * @param {boolean} [ignoreParent=false]\n */\nlistProto.getItemVisual = function (idx, key, ignoreParent) {\n var itemVisual = this._itemVisuals[idx];\n var val = itemVisual && itemVisual[key];\n if (val == null && !ignoreParent) {\n // Use global visual property\n return this.getVisual(key);\n }\n return val;\n};\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 */\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 return;\n }\n itemVisual[key] = value;\n hasItemVisual[key] = true;\n};\n\n/**\n * Clear itemVisuals and list visual.\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 */\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 if (el.type === 'group') {\n el.traverse(setItemDataAndSeriesIndex, el);\n }\n }\n\n this._graphicEls[idx] = el;\n};\n\n/**\n * @param {number} idx\n * @return {module:zrender/Element}\n */\nlistProto.getItemGraphicEl = function (idx) {\n return this._graphicEls[idx];\n};\n\n/**\n * @param {Function} cb\n * @param {*} context\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/**\n * Shallow clone a new list except visual and layout properties, and graph elements.\n * New list only change the indices.\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 }\n\n // FIXME\n list._storage = this._storage;\n\n transferProperties(list, this);\n\n // Clone will not change the data extent and indices\n if (this._indices) {\n var Ctor = this._indices.constructor;\n list._indices = new Ctor(this._indices);\n }\n else {\n list._indices = null;\n }\n list.getRawIndex = list._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices;\n\n return list;\n};\n\n/**\n * Wrap some method to add more feature\n * @param {string} methodName\n * @param {Function} injectFunction\n */\nlistProto.wrapMethod = function (methodName, injectFunction) {\n var originalMethod = this[methodName];\n if (typeof originalMethod !== 'function') {\n return;\n }\n this.__wrappedMethods = this.__wrappedMethods || [];\n this.__wrappedMethods.push(methodName);\n this[methodName] = function () {\n var res = originalMethod.apply(this, arguments);\n return injectFunction.apply(this, [res].concat(zrUtil.slice(arguments)));\n };\n};\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.\nlistProto.TRANSFERABLE_METHODS = ['cloneShallow', 'downSample', 'map'];\n// Methods that change indices of this list should be listed here.\nlistProto.CHANGABLE_METHODS = ['filterSelf', 'selectRange'];\n\nexport default List;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport {createHashMap, each, isString, defaults, extend, isObject, clone} from 'zrender/src/core/util';\nimport {normalizeToArray} from '../../util/model';\nimport {guessOrdinal, BE_ORDINAL} from './sourceHelper';\nimport Source from '../Source';\nimport {OTHER_DIMENSIONS} from './dimensionHelper';\nimport DataDimensionInfo from '../DataDimensionInfo';\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.<string>} 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.<Object|string>} [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.<module:data/DataDimensionInfo>}\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();\n // var valueCandidate;\n var result = [];\n\n var dimCount = getDimCount(source, sysDims, dimsDef, opt.dimCount);\n\n // Apply user defined dims (`name` and `type`) and init result.\n for (var i = 0; i < dimCount; i++) {\n var dimDefItem = dimsDef[i] = extend(\n {}, isObject(dimsDef[i]) ? dimsDef[i] : {name: dimsDef[i]}\n );\n var userDimName = dimDefItem.name;\n var resultItem = result[i] = new DataDimensionInfo();\n // Name will be applied later for avoiding duplication.\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 dimDefItem.type != null && (resultItem.type = dimDefItem.type);\n dimDefItem.displayName != null && (resultItem.displayName = dimDefItem.displayName);\n }\n\n var encodeDef = opt.encodeDef;\n if (!encodeDef && opt.encodeDefaulter) {\n encodeDef = opt.encodeDefaulter(source, dimCount);\n }\n encodeDef = createHashMap(encodeDef);\n\n // Set `coordDim` and `coordDimIndex` by `encodeDef` and normalize `encodeDef`.\n encodeDef.each(function (dataDims, coordDim) {\n dataDims = normalizeToArray(dataDims).slice();\n\n // 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 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 if (resultDimIdx != null && resultDimIdx < dimCount) {\n validDataDims[idx] = resultDimIdx;\n applyDim(result[resultDimIdx], coordDim, idx);\n }\n });\n });\n\n // Apply templetes and default order from `sysDims`.\n var availDimIdx = 0;\n each(sysDims, function (sysDimItem, sysDimIndex) {\n var coordDim;\n var sysDimItem;\n var sysDimItemDimsDef;\n var sysDimItemOtherDims;\n if (isString(sysDimItem)) {\n coordDim = sysDimItem;\n sysDimItem = {};\n }\n else {\n coordDim = sysDimItem.name;\n var ordinalMeta = sysDimItem.ordinalMeta;\n sysDimItem.ordinalMeta = null;\n sysDimItem = clone(sysDimItem);\n sysDimItem.ordinalMeta = ordinalMeta;\n // `coordDimIndex` should not be set directly.\n sysDimItemDimsDef = sysDimItem.dimsDef;\n sysDimItemOtherDims = sysDimItem.otherDims;\n sysDimItem.name = sysDimItem.coordDim = sysDimItem.coordDimIndex =\n sysDimItem.dimsDef = sysDimItem.otherDims = null;\n }\n\n var dataDims = encodeDef.get(coordDim);\n\n // negative resultDimIdx means no need to mapping.\n if (dataDims === false) {\n return;\n }\n\n var dataDims = normalizeToArray(dataDims);\n\n // dimensions provides default dim sequences.\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 availDimIdx < result.length && dataDims.push(availDimIdx++);\n }\n }\n\n // Apply templates.\n each(dataDims, function (resultDimIdx, coordDimIndex) {\n var resultItem = result[resultDimIdx];\n applyDim(defaults(resultItem, sysDimItem), coordDim, coordDimIndex);\n if (resultItem.name == null && sysDimItemDimsDef) {\n var sysDimItemDimsDefItem = sysDimItemDimsDef[coordDimIndex];\n !isObject(sysDimItemDimsDefItem) && (sysDimItemDimsDefItem = {name: sysDimItemDimsDefItem});\n resultItem.name = resultItem.displayName = sysDimItemDimsDefItem.name;\n resultItem.defaultTooltip = sysDimItemDimsDefItem.defaultTooltip;\n }\n // FIXME refactor, currently only used in case: {otherDims: {tooltip: false}}\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 }\n else {\n resultItem.coordDim = coordDim;\n resultItem.coordDimIndex = coordDimIndex;\n coordDimNameMap.set(coordDim, true);\n }\n }\n\n // Make sure the first extra dim is 'value'.\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';\n\n // Set dim `name` and other `coordDim` and other props.\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(\n extra, coordDimNameMap, fromZero\n );\n resultItem.coordDimIndex = 0;\n if (!generateCoord || generateCoordCount <= 0) {\n resultItem.isExtraCoord = true;\n }\n generateCoordCount--;\n }\n\n resultItem.name == null && (resultItem.name = genName(\n resultItem.coordDim,\n dataDimNameMap\n ));\n\n if (resultItem.type == null\n && (\n guessOrdinal(source, resultDimIdx, resultItem.name) === BE_ORDINAL.Must\n // 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\n && (resultItem.otherDims.itemName != null\n || resultItem.otherDims.seriesName != null\n )\n )\n )\n ) {\n resultItem.type = 'ordinal';\n }\n }\n\n return result;\n}\n\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?\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(\n source.dimensionsDetectCount || 1,\n sysDims.length,\n dimsDef.length,\n optDimCount || 0\n );\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 while (map.get(name + i) != null) {\n i++;\n }\n name += i;\n }\n map.set(name, true);\n return name;\n}\n\nexport default completeDimensions;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\nimport completeDimensions from './completeDimensions';\n\n/**\n * @param {module:echarts/data/Source|module:echarts/data/List} source or data.\n * @param {Object|Array} [opt]\n * @param {Array.<string|Object>} [opt.coordDimensions=[]]\n * @param {number} [opt.dimensionsCount]\n * @param {string} [opt.generateCoord]\n * @param {string} [opt.generateCoordCount]\n * @param {Array.<string|Object>} [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.<Object>} dimensionsInfo\n */\nexport default function (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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\n// TODO\n// merge relevant logic to this file?\n// check: \"modelHelper\" of tooltip and \"BrushTargetManager\".\n\nimport {__DEV__} from '../config';\nimport {createHashMap, retrieve, each} from 'zrender/src/core/util';\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.<string>}\n */\n this.coordSysDims = [];\n /**\n * @type {module:zrender/core/util#HashMap}\n */\n this.axisMap = createHashMap();\n /**\n * @type {module:zrender/core/util#HashMap}\n */\n this.categoryAxisMap = createHashMap();\n /**\n * @type {number}\n */\n this.firstCategoryDimIndex = null;\n}\n\n/**\n * @return {module:model/referHelper#CoordSysInfo}\n */\nexport function getCoordSysInfoBySeries(seriesModel) {\n var coordSysName = seriesModel.get('coordinateSystem');\n var result = new CoordSysInfo(coordSysName);\n var fetch = fetchers[coordSysName];\n if (fetch) {\n fetch(seriesModel, result, result.axisMap, result.categoryAxisMap);\n return result;\n }\n}\n\nvar fetchers = {\n\n cartesian2d: function (seriesModel, result, axisMap, categoryAxisMap) {\n var xAxisModel = seriesModel.getReferringComponents('xAxis')[0];\n var yAxisModel = seriesModel.getReferringComponents('yAxis')[0];\n\n if (__DEV__) {\n if (!xAxisModel) {\n throw new Error('xAxis \"' + retrieve(\n seriesModel.get('xAxisIndex'),\n seriesModel.get('xAxisId'),\n 0\n ) + '\" not found');\n }\n if (!yAxisModel) {\n throw new Error('yAxis \"' + retrieve(\n seriesModel.get('xAxisIndex'),\n seriesModel.get('yAxisId'),\n 0\n ) + '\" not found');\n }\n }\n\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 if (isCategory(yAxisModel)) {\n categoryAxisMap.set('y', yAxisModel);\n result.firstCategoryDimIndex == null & (result.firstCategoryDimIndex = 1);\n }\n },\n\n singleAxis: function (seriesModel, result, axisMap, categoryAxisMap) {\n var singleAxisModel = seriesModel.getReferringComponents('singleAxis')[0];\n\n if (__DEV__) {\n if (!singleAxisModel) {\n throw new Error('singleAxis should be specified.');\n }\n }\n\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\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\n if (__DEV__) {\n if (!angleAxisModel) {\n throw new Error('angleAxis option not found');\n }\n if (!radiusAxisModel) {\n throw new Error('radiusAxis option not found');\n }\n }\n\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 if (isCategory(angleAxisModel)) {\n categoryAxisMap.set('angle', angleAxisModel);\n result.firstCategoryDimIndex == null && (result.firstCategoryDimIndex = 1);\n }\n },\n\n geo: function (seriesModel, result, axisMap, categoryAxisMap) {\n result.coordSysDims = ['lng', 'lat'];\n },\n\n parallel: function (seriesModel, result, axisMap, categoryAxisMap) {\n var ecModel = seriesModel.ecModel;\n var parallelModel = ecModel.getComponent(\n 'parallel', seriesModel.get('parallelIndex')\n );\n var coordSysDims = result.coordSysDims = parallelModel.dimensions.slice();\n\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\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {each, isString} from 'zrender/src/core/util';\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.<string|Object>} dimensionInfoList The same as the input of <module:echarts/data/List>.\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 */\nexport function enableDataStack(seriesModel, dimensionInfoList, opt) {\n opt = opt || {};\n var byIndex = opt.byIndex;\n var stackedCoordDimension = opt.stackedCoordDimension;\n\n // Compatibal: when `stack` is set as '', do not stack.\n var mayStack = !!(seriesModel && seriesModel.get('stack'));\n var stackedByDimInfo;\n var stackedDimInfo;\n var stackResultDimension;\n var stackedOverDimension;\n\n each(dimensionInfoList, function (dimensionInfo, index) {\n if (isString(dimensionInfo)) {\n dimensionInfoList[index] = dimensionInfo = {name: dimensionInfo};\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 }\n // Find the first stackable dimension as the stackedDimInfo.\n if (!stackedDimInfo\n && dimensionInfo.type !== 'ordinal'\n && dimensionInfo.type !== 'time'\n && (!stackedCoordDimension || stackedCoordDimension === dimensionInfo.coordDim)\n ) {\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 }\n\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 if (stackedDimInfo) {\n // Use a weird name that not duplicated with other names.\n stackResultDimension = '__\\0ecstackresult';\n stackedOverDimension = '__\\0ecstackedover';\n\n // Create inverted index to fast query index by value.\n if (stackedByDimInfo) {\n stackedByDimInfo.createInvertedIndices = true;\n }\n\n var stackedDimCoordDim = stackedDimInfo.coordDim;\n var stackedDimType = stackedDimInfo.type;\n var stackedDimCoordIndex = 0;\n\n each(dimensionInfoList, function (dimensionInfo) {\n if (dimensionInfo.coordDim === stackedDimCoordDim) {\n stackedDimCoordIndex++;\n }\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\n stackedDimCoordIndex++;\n\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/**\n * @param {module:echarts/data/List} data\n * @param {string} stackedDim\n */\nexport function isDimensionStacked(data, stackedDim /*, stackedByDim*/) {\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 // && (\n // stackedByDim != null\n // ? stackedByDim === data.getCalculationInfo('stackedByDimension')\n // : data.getCalculationInfo('isStackedByIndex')\n // );\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 */\nexport function getStackedDimension(data, targetDim) {\n return isDimensionStacked(data, targetDim)\n ? data.getCalculationInfo('stackResultDimension')\n : targetDim;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport List from '../../data/List';\nimport createDimensions from '../../data/helper/createDimensions';\nimport {SOURCE_FORMAT_ORIGINAL} from '../../data/helper/sourceType';\nimport {getDimensionTypeByAxis} from '../../data/helper/dimensionHelper';\nimport {getDataItemValue} from '../../util/model';\nimport CoordinateSystem from '../../CoordinateSystem';\nimport {getCoordSysInfoBySeries} from '../../model/referHelper';\nimport Source from '../../data/Source';\nimport {enableDataStack} from '../../data/helper/dataStackHelper';\nimport {makeSeriesEncodeForAxisCoordSys} from '../../data/helper/sourceHelper';\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\n var coordSysInfo = getCoordSysInfoBySeries(seriesModel);\n\n var coordSysDimDefs;\n\n if (coordSysInfo) {\n coordSysDimDefs = zrUtil.map(coordSysInfo.coordSysDims, function (dim) {\n var dimInfo = {name: dim};\n var axisModel = coordSysInfo.axisMap.get(dim);\n if (axisModel) {\n var axisType = axisModel.get('type');\n dimInfo.type = getDimensionTypeByAxis(axisType);\n // dimInfo.stackable = isStackable(axisType);\n }\n return dimInfo;\n });\n }\n\n if (!coordSysDimDefs) {\n // Get dimensions from registered coordinate system\n coordSysDimDefs = (registeredCoordSys && (\n registeredCoordSys.getDimensionsInfo\n ? registeredCoordSys.getDimensionsInfo()\n : registeredCoordSys.dimensions.slice()\n )) || ['x', 'y'];\n }\n\n var dimInfoList = createDimensions(source, {\n coordDimensions: coordSysDimDefs,\n generateCoord: opt.generateCoord,\n encodeDefaulter: opt.useEncodeDefaulter\n ? zrUtil.curry(makeSeriesEncodeForAxisCoordSys, coordSysDimDefs, seriesModel)\n : null\n });\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 if (categoryAxisModel) {\n if (firstCategoryDimIndex == null) {\n firstCategoryDimIndex = dimIndex;\n }\n dimInfo.ordinalMeta = categoryAxisModel.getOrdinalMeta();\n }\n if (dimInfo.otherDims.itemName != null) {\n hasNameEncode = true;\n }\n });\n if (!hasNameEncode && firstCategoryDimIndex != null) {\n dimInfoList[firstCategoryDimIndex].otherDims.itemName = 0;\n }\n\n var stackCalculationInfo = enableDataStack(seriesModel, dimInfoList);\n\n var list = new List(dimInfoList, seriesModel);\n\n list.setCalculationInfo(stackCalculationInfo);\n\n var dimValueGetter = (firstCategoryDimIndex != null && isNeedCompleteOrdinalData(source))\n ? function (itemOpt, dimName, dataIndex, dimIndex) {\n // Use dataIndex as ordinal value in categoryAxis\n return dimIndex === firstCategoryDimIndex\n ? dataIndex\n : this.defaultDimValueGetter(itemOpt, dimName, dataIndex, dimIndex);\n }\n : null;\n\n list.hasItemOption = false;\n list.initData(source, null, dimValueGetter);\n\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\n && !zrUtil.isArray(getDataItemValue(sampleItem));\n }\n}\n\nfunction firstDataNotNull(data) {\n var i = 0;\n while (i < data.length && data[i] == null) {\n i++;\n }\n return data[i];\n}\n\nexport default createListFromArray;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport * as clazzUtil from '../util/clazz';\n\n/**\n * @param {Object} [setting]\n */\nfunction Scale(setting) {\n this._setting = setting || {};\n\n /**\n * Extent\n * @type {Array.<number>}\n * @protected\n */\n this._extent = [Infinity, -Infinity];\n\n /**\n * Step is calculated in adjustExtent\n * @type {Array.<number>}\n * @protected\n */\n this._interval = 0;\n\n this.init && this.init.apply(this, arguments);\n}\n\n/**\n * Parse input val to valid inner number.\n * @param {*} val\n * @return {number}\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/**\n * Normalize value to linear [0, 1], return 0.5 if extent span is 0\n * @param {number} val\n * @return {number}\n */\nScale.prototype.normalize = function (val) {\n var extent = this._extent;\n if (extent[1] === extent[0]) {\n return 0.5;\n }\n return (val - extent[0]) / (extent[1] - extent[0]);\n};\n\n/**\n * Scale normalized value\n * @param {number} val\n * @return {number}\n */\nScale.prototype.scale = function (val) {\n var extent = this._extent;\n return val * (extent[1] - extent[0]) + extent[0];\n};\n\n/**\n * Set extent from data\n * @param {Array.<number>} other\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]);\n // not setExtent because in log axis it may transformed to power\n // this.setExtent(extent[0], extent[1]);\n};\n\n/**\n * Set extent from data\n * @param {module:echarts/data/List} data\n * @param {string} dim\n */\nScale.prototype.unionExtentFromData = function (data, dim) {\n this.unionExtent(data.getApproximateExtent(dim));\n};\n\n/**\n * Get extent\n * @return {Array.<number>}\n */\nScale.prototype.getExtent = function () {\n return this._extent.slice();\n};\n\n/**\n * Set extent\n * @param {number} start\n * @param {number} end\n */\nScale.prototype.setExtent = function (start, end) {\n var thisExtent = this._extent;\n if (!isNaN(start)) {\n thisExtent[0] = start;\n }\n if (!isNaN(end)) {\n thisExtent[1] = end;\n }\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 */\nScale.prototype.isBlank = function () {\n return this._isBlank;\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 */\nScale.prototype.setBlank = function (isBlank) {\n this._isBlank = isBlank;\n};\n\n/**\n * @abstract\n * @param {*} tick\n * @return {string} label of the tick.\n */\nScale.prototype.getLabel = null;\n\n\nclazzUtil.enableClassExtend(Scale);\nclazzUtil.enableClassManagement(Scale, {\n registerWhenExtend: true\n});\n\nexport default Scale;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {createHashMap, isObject, map} from 'zrender/src/core/util';\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 /**\n * @readOnly\n * @type {Array.<string>}\n */\n this.categories = opt.categories || [];\n\n /**\n * @private\n * @type {boolean}\n */\n this._needCollect = opt.needCollect;\n\n /**\n * @private\n * @type {boolean}\n */\n this._deduplication = opt.deduplication;\n\n /**\n * @private\n * @type {boolean}\n */\n this._map;\n}\n\n/**\n * @param {module:echarts/model/Model} axisModel\n * @return {module:echarts/data/OrdinalMeta}\n */\nOrdinalMeta.createByAxisModel = function (axisModel) {\n var option = axisModel.option;\n var data = option.data;\n var categories = data && map(data, getName);\n\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/**\n * @param {string} category\n * @return {number} ordinal\n */\nproto.getOrdinal = function (category) {\n return getOrCreateMap(this).get(category);\n};\n\n/**\n * @param {*} category\n * @return {number} The ordinal. If not found, return NaN.\n */\nproto.parseAndCollect = function (category) {\n var index;\n var needCollect = this._needCollect;\n\n // 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 if (typeof category !== 'string' && !needCollect) {\n return category;\n }\n\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 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 }\n else {\n index = NaN;\n }\n }\n\n return index;\n};\n\n// Consider big data, do not create map until needed.\nfunction getOrCreateMap(ordinalMeta) {\n return ordinalMeta._map || (\n ordinalMeta._map = createHashMap(ordinalMeta.categories)\n );\n}\n\nfunction getName(obj) {\n if (isObject(obj) && obj.value != null) {\n return obj.value;\n }\n else {\n return obj + '';\n }\n}\n\nexport default OrdinalMeta;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\n// FIXME only one data\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport Scale from './Scale';\nimport OrdinalMeta from '../data/OrdinalMeta';\n\nvar scaleProto = Scale.prototype;\n\nvar OrdinalScale = Scale.extend({\n\n type: 'ordinal',\n\n /**\n * @param {module:echarts/data/OrdianlMeta|Array.<string>} 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({categories: ordinalMeta});\n }\n this._ordinalMeta = ordinalMeta;\n this._extent = extent || [0, ordinalMeta.categories.length - 1];\n },\n\n parse: function (val) {\n return typeof val === 'string'\n ? this._ordinalMeta.getOrdinal(val)\n // val might be float.\n : Math.round(val);\n },\n\n contain: function (rank) {\n rank = this.parse(rank);\n return scaleProto.contain.call(this, rank)\n && 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\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\n getOrdinalMeta: function () {\n return this._ordinalMeta;\n },\n\n niceTicks: zrUtil.noop,\n niceExtent: zrUtil.noop\n});\n\n/**\n * @return {module:echarts/scale/Time}\n */\nOrdinalScale.create = function () {\n return new OrdinalScale();\n};\n\nexport default OrdinalScale;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport * as numberUtil from '../util/number';\n\nvar roundNumber = numberUtil.round;\n\n/**\n * @param {Array.<number>} 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 */\nexport function intervalScaleNiceTicks(extent, splitNumber, minInterval, maxInterval) {\n var result = {};\n var span = extent[1] - extent[0];\n\n var interval = result.interval = numberUtil.nice(span / splitNumber, true);\n if (minInterval != null && interval < minInterval) {\n interval = result.interval = minInterval;\n }\n if (maxInterval != null && interval > maxInterval) {\n interval = result.interval = maxInterval;\n }\n // Tow more digital for tick.\n var precision = result.intervalPrecision = getIntervalPrecision(interval);\n // Niced extent inside original extent\n var niceTickExtent = result.niceTickExtent = [\n roundNumber(Math.ceil(extent[0] / interval) * interval, precision),\n roundNumber(Math.floor(extent[1] / interval) * interval, precision)\n ];\n\n fixExtent(niceTickExtent, extent);\n\n return result;\n}\n\n/**\n * @param {number} interval\n * @return {number} interval precision\n */\nexport function 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}\n\n// In some cases (e.g., splitNumber is 1), niceTickExtent may be out of extent.\nexport function 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 if (niceTickExtent[0] > niceTickExtent[1]) {\n niceTickExtent[0] = niceTickExtent[1];\n }\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * Interval scale\n * @module echarts/scale/Interval\n */\n\n\nimport * as numberUtil from '../util/number';\nimport * as formatUtil from '../util/format';\nimport Scale from './Scale';\nimport * as helper from './helper';\n\nvar roundNumber = numberUtil.round;\n\n/**\n * @alias module:echarts/coord/scale/Interval\n * @constructor\n */\nvar IntervalScale = Scale.extend({\n\n type: 'interval',\n\n _interval: 0,\n\n _intervalPrecision: 2,\n\n setExtent: function (start, end) {\n var thisExtent = this._extent;\n //start,end may be a Number like '25',so...\n if (!isNaN(start)) {\n thisExtent[0] = parseFloat(start);\n }\n if (!isNaN(end)) {\n thisExtent[1] = parseFloat(end);\n }\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]);\n\n // unionExtent may called by it's sub classes\n IntervalScale.prototype.setExtent.call(this, extent[0], extent[1]);\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;\n // 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 this._niceExtent = this._extent.slice();\n\n this._intervalPrecision = helper.getIntervalPrecision(interval);\n },\n\n /**\n * @param {boolean} [expandToNicedExtent=false] If expand the ticks to niced extent.\n * @return {Array.<number>}\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\n var ticks = [];\n // If interval is 0, return [];\n if (!interval) {\n return ticks;\n }\n\n // Consider this case: using dataZoom toolbox, zoom and zoom.\n var safeLimit = 10000;\n\n if (extent[0] < niceTickExtent[0]) {\n if (expandToNicedExtent) {\n ticks.push(roundNumber(niceTickExtent[0] - interval, intervalPrecision));\n }\n else {\n ticks.push(extent[0]);\n }\n }\n var tick = niceTickExtent[0];\n\n while (tick <= niceTickExtent[1]) {\n ticks.push(tick);\n // Avoid rounding error\n tick = roundNumber(tick + interval, intervalPrecision);\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 if (ticks.length > safeLimit) {\n return [];\n }\n }\n // Consider this case: the last item of ticks is smaller\n // than niceTickExtent[1] and niceTickExtent[1] === extent[1].\n var lastNiceTick = ticks.length ? ticks[ticks.length - 1] : niceTickExtent[1];\n if (extent[1] > lastNiceTick) {\n if (expandToNicedExtent) {\n ticks.push(roundNumber(lastNiceTick + interval, intervalPrecision));\n }\n else {\n ticks.push(extent[1]);\n }\n }\n\n return ticks;\n },\n\n /**\n * @param {number} [splitNumber=5]\n * @return {Array.<Array.<number>>}\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);\n\n // For the first and last interval. The count may be less than splitNumber.\n if (minorTick > extent[0] && minorTick < extent[1]) {\n minorTicksGroup.push(minorTick);\n }\n count++;\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 }\n else if (precision === 'auto') {\n // Should be more precise then tick.\n precision = this._intervalPrecision;\n }\n\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 data = roundNumber(data, precision, true);\n\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 if (!isFinite(span)) {\n return;\n }\n // User may set axis min 0 and data are all negative\n // FIXME If it needs to reverse ?\n if (span < 0) {\n span = -span;\n extent.reverse();\n }\n\n var result = helper.intervalScaleNiceTicks(\n extent, splitNumber, minInterval, maxInterval\n );\n\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;\n // If extent start and end are same, expand them\n if (extent[0] === extent[1]) {\n if (extent[0] !== 0) {\n // Expand extent\n var expandSize = extent[0];\n // 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 if (!opt.fixMax) {\n extent[1] += expandSize / 2;\n extent[0] -= expandSize / 2;\n }\n else {\n extent[0] -= expandSize / 2;\n }\n }\n else {\n extent[1] = 1;\n }\n }\n var span = extent[1] - extent[0];\n // If there are no data and extent are [Infinity, -Infinity]\n if (!isFinite(span)) {\n extent[0] = 0;\n extent[1] = 1;\n }\n\n this.niceTicks(opt.splitNumber, opt.minInterval, opt.maxInterval);\n\n // var extent = this._extent;\n var interval = this._interval;\n\n if (!opt.fixMin) {\n extent[0] = roundNumber(Math.floor(extent[0] / interval) * interval);\n }\n if (!opt.fixMax) {\n extent[1] = roundNumber(Math.ceil(extent[1] / interval) * interval);\n }\n }\n});\n\n/**\n * @return {module:echarts/scale/Time}\n */\nIntervalScale.create = function () {\n return new IntervalScale();\n};\n\nexport default IntervalScale;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport * as zrUtil from 'zrender/src/core/util';\nimport {parsePercent} from '../util/number';\nimport {isDimensionStacked} from '../data/helper/dataStackHelper';\nimport createRenderPlanner from '../chart/helper/createRenderPlanner';\n\nvar STACK_PREFIX = '__ec_stack_';\nvar LARGE_BAR_MIN_WIDTH = 0.5;\n\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/**\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 */\nexport function getLayoutOnAxis(opt) {\n var params = [];\n var baseAxis = opt.axis;\n var axisKey = 'axis0';\n\n if (baseAxis.type !== 'category') {\n return;\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 var widthAndOffsets = doCalBarWidthAndOffset(params);\n\n var result = [];\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\nexport function 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\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 */\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 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 for (var i = 0, cnt = data.count(); i < cnt; ++i) {\n var value = data.get(dim, i);\n if (!axisValues[key]) {\n // No previous data for the axis\n axisValues[key] = [value];\n }\n else {\n // No value in previous series\n axisValues[key].push(value);\n }\n // Ignore duplicated time values in the same axis\n }\n });\n\n var axisMinGaps = [];\n for (var key in axisValues) {\n if (axisValues.hasOwnProperty(key)) {\n var valuesInAxis = axisValues[key];\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\n var min = null;\n for (var j = 1; j < valuesInAxis.length; ++j) {\n var delta = valuesInAxis[j] - valuesInAxis[j - 1];\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 }\n // Set to null if only have one data\n axisMinGaps[key] = min;\n }\n }\n }\n return axisMinGaps;\n}\n\nexport function makeColumnLayout(barSeries) {\n var axisMinGaps = getValueAxesMinGaps(barSeries);\n\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\n var bandWidth;\n if (baseAxis.type === 'category') {\n bandWidth = baseAxis.getBandWidth();\n }\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\n ? extentSpan / scaleSpan * minGap\n : extentSpan; // When there is only one data value\n }\n else {\n var data = seriesModel.getData();\n bandWidth = Math.abs(axisExtent[1] - axisExtent[0]) / data.count();\n }\n\n var barWidth = parsePercent(\n seriesModel.get('barWidth'), bandWidth\n );\n var barMaxWidth = parsePercent(\n seriesModel.get('barMaxWidth'), bandWidth\n );\n var barMinWidth = parsePercent(\n // 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 );\n var barGap = seriesModel.get('barGap');\n var barCategoryGap = seriesModel.get('barCategoryGap');\n\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\n return doCalBarWidthAndOffset(seriesInfoList);\n}\n\nfunction doCalBarWidthAndOffset(seriesInfoList) {\n // Columns info on each category axis. Key is cartesian name\n var columnsMap = {};\n\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\n var stackId = seriesInfo.stackId;\n\n if (!stacks[stackId]) {\n columnsOnAxis.autoWidthCount++;\n }\n stacks[stackId] = stacks[stackId] || {\n width: 0,\n maxWidth: 0\n };\n\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 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\n var result = {};\n\n zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {\n\n result[coordSysName] = {};\n\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\n var remainedWidth = columnsOnAxis.remainedWidth;\n var autoWidthCount = columnsOnAxis.autoWidthCount;\n var autoWidth = (remainedWidth - categoryGap)\n / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n\n // Find if any auto calculated bar exceeded maxBarWidth\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 if (maxWidth && maxWidth < finalWidth) {\n finalWidth = Math.min(maxWidth, remainedWidth);\n }\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 if (minWidth && minWidth > finalWidth) {\n finalWidth = minWidth;\n }\n if (finalWidth !== autoWidth) {\n column.width = finalWidth;\n remainedWidth -= finalWidth + barGapPercent * finalWidth;\n autoWidthCount--;\n }\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 if (maxWidth) {\n finalWidth = Math.min(finalWidth, maxWidth);\n }\n // `minWidth` has higher priority, as described above\n if (minWidth) {\n finalWidth = Math.max(finalWidth, minWidth);\n }\n column.width = finalWidth;\n remainedWidth -= finalWidth + barGapPercent * finalWidth;\n autoWidthCount--;\n }\n });\n\n // Recalculate width again\n autoWidth = (remainedWidth - categoryGap)\n / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n\n autoWidth = Math.max(autoWidth, 0);\n\n\n var widthSum = 0;\n var lastColumn;\n zrUtil.each(stacks, function (column, idx) {\n if (!column.width) {\n column.width = autoWidth;\n }\n lastColumn = column;\n widthSum += column.width * (1 + barGapPercent);\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\n offset += column.width * (1 + barGapPercent);\n });\n });\n\n return result;\n}\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 */\nexport function retrieveColumnLayout(barWidthAndOffset, axis, seriesModel) {\n if (barWidthAndOffset && axis) {\n var result = barWidthAndOffset[getAxisKey(axis)];\n if (result != null && seriesModel != null) {\n result = result[getSeriesStackId(seriesModel)];\n }\n return result;\n }\n}\n\n/**\n * @param {string} seriesType\n * @param {module:echarts/model/Global} ecModel\n */\nexport function layout(seriesType, ecModel) {\n\n var seriesModels = prepareLayoutBarSeries(seriesType, ecModel);\n var barWidthAndOffset = makeColumnLayout(seriesModels);\n\n var lastStackCoords = {};\n var lastStackCoordsOrigin = {};\n\n zrUtil.each(seriesModels, function (seriesModel) {\n\n var data = seriesModel.getData();\n var cartesian = seriesModel.coordinateSystem;\n var baseAxis = cartesian.getBaseAxis();\n\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\n var barMinHeight = seriesModel.get('barMinHeight') || 0;\n\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\n var valueDim = data.mapDimension(valueAxis.dim);\n var baseDim = data.mapDimension(baseAxis.dim);\n var stacked = isDimensionStacked(data, valueDim /*, baseDim*/);\n var isValueAxisH = valueAxis.isHorizontal();\n\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\n var sign = value >= 0 ? 'p' : 'n';\n var baseCoord = valueAxisStart;\n\n // Because of the barMinHeight, we can not use the value in\n // stackResultDimension directly.\n if (stacked) {\n // Only ordinal axis can be stacked.\n if (!lastStackCoords[stackId][baseValue]) {\n lastStackCoords[stackId][baseValue] = {\n p: valueAxisStart, // Positive stack\n n: valueAxisStart // Negative stack\n };\n }\n // Should also consider #4243\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 }\n // Ignore stack from NaN value\n if (!isNaN(width)) {\n stacked && (lastStackCoords[stackId][baseValue][sign] += width);\n }\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 }\n // Ignore stack from NaN value\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\n }, this);\n}\n\n// TODO: Do not support stack in large mode yet.\nexport var largeLayout = {\n\n seriesType: 'bar',\n\n plan: createRenderPlanner(),\n\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\n var barWidth = retrieveColumnLayout(\n makeColumnLayout([seriesModel]), baseAxis, seriesModel\n ).width;\n if (!(barWidth > LARGE_BAR_MIN_WIDTH)) { // jshint ignore:line\n barWidth = LARGE_BAR_MIN_WIDTH;\n }\n\n return {progress: progress};\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\n coord = cartesian.dataToPoint(valuePair, null, coord);\n // Data index might not be in order, depends on `progressiveChunkMode`.\n largeBackgroundPoints[pointsOffset] = valueAxisHorizontal\n ? coordLayout.x + coordLayout.width : coord[0];\n largePoints[pointsOffset++] = coord[0];\n largeBackgroundPoints[pointsOffset] = valueAxisHorizontal\n ? 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}\n\n// See cases in `test/bar-start.html` and `#7412`, `#8747`.\nfunction getValueAxisStart(baseAxis, valueAxis, stacked) {\n return valueAxis.toGlobalCoord(valueAxis.dataToCoord(valueAxis.type === 'log' ? 1 : 0));\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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* </licenses/LICENSE-d3>).\n*/\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.\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as numberUtil from '../util/number';\nimport * as formatUtil from '../util/format';\nimport * as scaleHelper from './helper';\nimport IntervalScale from './Interval';\n\nvar intervalScaleProto = IntervalScale.prototype;\n\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;\n\n// FIXME 公用?\nvar bisect = function (a, x, lo, hi) {\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (a[mid][1] < x) {\n lo = mid + 1;\n }\n else {\n hi = mid;\n }\n }\n return lo;\n};\n\n/**\n * @alias module:echarts/coord/scale/Time\n * @constructor\n */\nvar TimeScale = IntervalScale.extend({\n type: 'time',\n\n /**\n * @override\n */\n getLabel: function (val) {\n var stepLvl = this._stepLvl;\n\n var date = new Date(val);\n\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;\n // If extent start and end are same, expand them\n if (extent[0] === extent[1]) {\n // Expand extent\n extent[0] -= ONE_DAY;\n extent[1] += ONE_DAY;\n }\n // If there are no data and extent are [Infinity, -Infinity]\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);\n\n // var extent = this._extent;\n var interval = this._interval;\n\n if (!opt.fixMin) {\n extent[0] = numberUtil.round(mathFloor(extent[0] / interval) * interval);\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\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 if (maxInterval != null && approxInterval > maxInterval) {\n approxInterval = maxInterval;\n }\n\n var scaleLevelsLen = scaleLevels.length;\n var idx = bisect(scaleLevels, approxInterval, 0, scaleLevelsLen);\n\n var level = scaleLevels[Math.min(idx, scaleLevelsLen - 1)];\n var interval = level[1];\n // Same with interval scale if span is much larger than 1 year\n if (level[0] === 'year') {\n var yearSpan = span / interval;\n\n // From \"Nice Numbers for Graph Labels\" of Graphic Gems\n // var niceYearSpan = numberUtil.nice(yearSpan, false);\n var yearStep = numberUtil.nice(yearSpan / approxTickNum, true);\n\n interval *= yearStep;\n }\n\n var timezoneOffset = this.getSetting('useUTC')\n ? 0 : (new Date(+extent[0] || +extent[1])).getTimezoneOffset() * 60 * 1000;\n var niceExtent = [\n Math.round(mathCeil((extent[0] - timezoneOffset) / interval) * interval + timezoneOffset),\n Math.round(mathFloor((extent[1] - timezoneOffset) / interval) * interval + timezoneOffset)\n ];\n\n scaleHelper.fixExtent(niceExtent, extent);\n\n this._stepLvl = level;\n // Interval will be used in getTicks\n this._interval = interval;\n this._niceExtent = niceExtent;\n },\n\n parse: function (val) {\n // val might be float.\n return +numberUtil.parseDate(val);\n }\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/**\n * This implementation was originally copied from \"d3.js\"\n * <https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/time/scale.js>\n * with some modifications made for this program.\n * See the license statement at the head of this file.\n */\nvar scaleLevels = [\n // 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/**\n * @param {module:echarts/model/Model}\n * @return {module:echarts/scale/Time}\n */\nTimeScale.create = function (model) {\n return new TimeScale({useUTC: model.ecModel.get('useUTC')});\n};\n\nexport default TimeScale;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport * as zrUtil from 'zrender/src/core/util';\nimport Scale from './Scale';\nimport * as numberUtil from '../util/number';\n\n// Use some method of IntervalScale\nimport IntervalScale from './Interval';\n\nvar scaleProto = Scale.prototype;\nvar intervalScaleProto = IntervalScale.prototype;\n\nvar getPrecisionSafe = numberUtil.getPrecisionSafe;\nvar roundingErrorFix = numberUtil.round;\n\nvar mathFloor = Math.floor;\nvar mathCeil = Math.ceil;\nvar mathPow = Math.pow;\n\nvar mathLog = Math.log;\n\nvar LogScale = Scale.extend({\n\n type: 'log',\n\n base: 10,\n\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.<number>}\n */\n getTicks: function (expandToNicedExtent) {\n var originalScale = this._originalScale;\n var extent = this._extent;\n var originalExtent = originalScale.getExtent();\n\n return zrUtil.map(intervalScaleProto.getTicks.call(this, expandToNicedExtent), function (val) {\n var powVal = numberUtil.round(mathPow(this.base, val));\n\n // Fix #4158\n powVal = (val === extent[0] && originalScale.__fixMin)\n ? fixRoundingError(powVal, originalExtent[0])\n : powVal;\n powVal = (val === extent[1] && originalScale.__fixMax)\n ? fixRoundingError(powVal, originalExtent[1])\n : powVal;\n\n return powVal;\n }, this);\n },\n\n /**\n * @param {number} splitNumber\n * @return {Array.<Array.<number>>}\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]);\n\n // Fix #4158\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\n return extent;\n },\n\n /**\n * @param {Array.<number>} 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 if (span === Infinity || span <= 0) {\n return;\n }\n\n var interval = numberUtil.quantity(span);\n var err = approxTickNum / span * interval;\n\n // Filter ticks to get closer to the desired count.\n if (err <= 0.5) {\n interval *= 10;\n }\n\n // Interval should be integer\n while (!isNaN(interval) && Math.abs(interval) < 1 && Math.abs(interval) > 0) {\n interval *= 10;\n }\n\n var niceExtent = [\n numberUtil.round(mathCeil(extent[0] / interval) * interval),\n numberUtil.round(mathFloor(extent[1] / interval) * interval)\n ];\n\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\n var originalScale = this._originalScale;\n originalScale.__fixMin = opt.fixMin;\n originalScale.__fixMax = opt.fixMax;\n }\n\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\nexport default LogScale;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {__DEV__} from '../config';\nimport * as zrUtil from 'zrender/src/core/util';\nimport OrdinalScale from '../scale/Ordinal';\nimport IntervalScale from '../scale/Interval';\nimport Scale from '../scale/Scale';\nimport * as numberUtil from '../util/number';\nimport {\n prepareLayoutBarSeries,\n makeColumnLayout,\n retrieveColumnLayout\n} from '../layout/barGrid';\nimport BoundingRect from 'zrender/src/core/BoundingRect';\n\nimport '../scale/Time';\nimport '../scale/Log';\n\n/**\n * Get axis scale extent before niced.\n * Item of returned array can only be number (including Infinity and NaN).\n */\nexport function getScaleExtent(scale, model) {\n var scaleType = scale.type;\n\n var min = model.getMin();\n var max = model.getMax();\n var originalExtent = scale.getExtent();\n\n var axisDataLen;\n var boundaryGap;\n var span;\n if (scaleType === 'ordinal') {\n axisDataLen = model.getCategories().length;\n }\n else {\n boundaryGap = model.get('boundaryGap');\n if (!zrUtil.isArray(boundaryGap)) {\n boundaryGap = [boundaryGap || 0, boundaryGap || 0];\n }\n if (typeof boundaryGap[0] === 'boolean') {\n if (__DEV__) {\n console.warn('Boolean type for boundaryGap is only '\n + 'allowed for ordinal axis. Please use string in '\n + 'percentage instead, e.g., \"20%\". Currently, '\n + 'boundaryGap is set to be 0.');\n }\n boundaryGap = [0, 0];\n }\n boundaryGap[0] = numberUtil.parsePercent(boundaryGap[0], 1);\n boundaryGap[1] = numberUtil.parsePercent(boundaryGap[1], 1);\n span = (originalExtent[1] - originalExtent[0])\n || Math.abs(originalExtent[0]);\n }\n\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\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 if (min === 'dataMin') {\n min = originalExtent[0];\n }\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 }\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'\n ? (axisDataLen ? 0 : NaN)\n : originalExtent[0] - boundaryGap[0] * span;\n }\n if (max == null) {\n max = scaleType === 'ordinal'\n ? (axisDataLen ? axisDataLen - 1 : NaN)\n : originalExtent[1] + boundaryGap[1] * span;\n }\n\n (min == null || !isFinite(min)) && (min = NaN);\n (max == null || !isFinite(max)) && (max = NaN);\n\n scale.setBlank(\n zrUtil.eqNaN(min)\n || zrUtil.eqNaN(max)\n || (scaleType === 'ordinal' && !scale.getOrdinalMeta().categories.length)\n );\n\n // Evaluate if axis needs cross zero\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 }\n // Axis is under zero and max is not set\n if (min < 0 && max < 0 && !fixMax) {\n max = 0;\n }\n }\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 var ecModel = model.ecModel;\n if (ecModel && (scaleType === 'time' /*|| scaleType === 'interval' */)) {\n var barSeriesModels = prepareLayoutBarSeries('bar', ecModel);\n var isBaseAxisAndHasBarSeries;\n\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);\n\n // Adjust axis min and max to account for overflow\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\n // Get Axis Length\n var axisExtent = model.axis.getExtent();\n var axisLength = axisExtent[1] - axisExtent[0];\n\n // Get bars on current base axis and calculate min and max overflow\n var barsOnCurrentAxis = retrieveColumnLayout(barWidthAndOffset, model.axis);\n if (barsOnCurrentAxis === undefined) {\n return {min: min, max: max};\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;\n\n // Calulate required buffer based on old range and overflow\n var oldRange = max - min;\n var oldRangePercentOfNew = (1 - (minOverflow + maxOverflow) / axisLength);\n var overflowBuffer = ((oldRange / oldRangePercentOfNew) - oldRange);\n\n max += overflowBuffer * (maxOverflow / totalOverFlow);\n min -= overflowBuffer * (minOverflow / totalOverFlow);\n\n return {min: min, max: max};\n}\n\nexport function niceScaleExtent(scale, model) {\n var extentInfo = getScaleExtent(scale, model);\n var extent = extentInfo.extent;\n\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')\n ? model.get('minInterval') : null,\n maxInterval: (scaleType === 'interval' || scaleType === 'time')\n ? model.get('maxInterval') : null\n });\n\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 var interval = model.get('interval');\n if (interval != null) {\n scale.setInterval && scale.setInterval(interval);\n }\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 */\nexport function createScaleByModel(model, axisType) {\n axisType = axisType || model.get('type');\n if (axisType) {\n switch (axisType) {\n // Buildin scale\n case 'category':\n return new OrdinalScale(\n model.getOrdinalMeta\n ? model.getOrdinalMeta()\n : model.getCategories(),\n [Infinity, -Infinity]\n );\n case 'value':\n return new IntervalScale();\n // Extended scale, like time and log\n default:\n return (Scale.getClass(axisType) || IntervalScale).create(model);\n }\n }\n}\n\n/**\n * Check if the axis corss 0\n */\nexport function 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/**\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 */\nexport function 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);\n // Consider empty array\n return labelFormatter;\n }\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 return labelFormatter(getAxisRawValue(axis, tickValue), idx);\n };\n }\n else {\n return function (tick) {\n return axis.scale.getLabel(tick);\n };\n }\n}\n\nexport function 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/**\n * @param {module:echarts/coord/Axis} axis\n * @return {module:zrender/core/BoundingRect} Be null/undefined if no labels.\n */\nexport function 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\n var realNumberScaleTicks;\n var tickCount;\n var categoryScaleExtent = scale.getExtent();\n\n // Optimize for large category data, avoid call `getTicks()`.\n if (isCategory) {\n tickCount = scale.count();\n }\n else {\n realNumberScaleTicks = scale.getTicks();\n tickCount = realNumberScaleTicks.length;\n }\n\n var axisLabelModel = axis.getLabelModel();\n var labelFormatter = makeLabelFormatter(axis);\n\n var rect;\n var step = 1;\n // Simple optimization for large amount of labels\n if (tickCount > 40) {\n step = Math.ceil(tickCount / 40);\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\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\n return rotatedRect;\n}\n\n/**\n * @param {module:echarts/src/model/Model} model axisLabelModel or axisTickModel\n * @return {number|String} Can be null|'auto'|number|function\n */\nexport function getOptionCategoryInterval(model) {\n var interval = model.get('interval');\n return interval == null ? 'auto' : interval;\n}\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 */\nexport function shouldShowAllLabels(axis) {\n return axis.type === 'category'\n && getOptionCategoryInterval(axis.getLabelModel()) === 0;\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\nimport * as zrUtil from 'zrender/src/core/util';\n// import * as axisHelper from './axisHelper';\n\nexport default {\n\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)\n ? option.rangeStart : option.min;\n\n if (this.axis\n && min != null\n && min !== 'dataMin'\n && typeof min !== 'function'\n && !zrUtil.eqNaN(min)\n ) {\n min = this.axis.scale.parse(min);\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)\n ? option.rangeEnd : option.max;\n\n if (this.axis\n && max != null\n && max !== 'dataMax'\n && typeof max !== 'function'\n && !zrUtil.eqNaN(max)\n ) {\n max = this.axis.scale.parse(max);\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)\n ? 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};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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// Symbol factory\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from './graphic';\nimport BoundingRect from 'zrender/src/core/BoundingRect';\nimport {calculateTextPosition} from 'zrender/src/contain/text';\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/**\n * Diamond shape\n * @inner\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/**\n * Pin shape\n * @inner\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\n buildPath: function (path, shape) {\n var x = shape.x;\n var y = shape.y;\n var w = shape.width / 5 * 3;\n // Height must be larger than width\n var h = Math.max(w, shape.height);\n var r = w / 2;\n\n // Dist on y with tangent point and circle center\n var dy = r * r / (h - r);\n var cy = y - h + r + dy;\n var angle = Math.asin(dy / r);\n // Dist on x with tangent point and circle center\n var dx = Math.cos(angle) * r;\n\n var tanX = Math.sin(angle);\n var tanY = Math.cos(angle);\n\n var cpLen = r * 0.6;\n var cpLen2 = r * 0.7;\n\n path.moveTo(x - dx, cy + dy);\n\n path.arc(\n x, cy, r,\n Math.PI - angle,\n Math.PI * 2 + angle\n );\n path.bezierCurveTo(\n x + dx - tanX * cpLen, cy + dy + tanY * cpLen,\n x, y - cpLen2,\n x, y\n );\n path.bezierCurveTo(\n x, y - cpLen2,\n x - dx + tanX * cpLen, cy + dy + tanY * cpLen,\n x - dx, cy + dy\n );\n path.closePath();\n }\n});\n\n/**\n * Arrow shape\n * @inner\n */\nvar Arrow = graphic.extendShape({\n\n type: 'arrow',\n\n shape: {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n },\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/**\n * Map of path contructors\n * @type {Object.<string, module:zrender/graphic/Path>}\n */\nvar symbolCtors = {\n\n line: graphic.Line,\n\n rect: graphic.Rect,\n\n roundRect: graphic.Rect,\n\n square: graphic.Rect,\n\n circle: graphic.Circle,\n\n diamond: Diamond,\n\n pin: Pin,\n\n arrow: Arrow,\n\n triangle: Triangle\n};\n\nvar symbolShapeMakers = {\n\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\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\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\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\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\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\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\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\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};\n\nvar symbolBuildProxies = {};\nzrUtil.each(symbolCtors, function (Ctor, name) {\n symbolBuildProxies[name] = new Ctor();\n});\n\nvar SymbolClz = graphic.extendShape({\n\n type: 'symbol',\n\n shape: {\n symbolType: '',\n x: 0,\n y: 0,\n width: 0,\n height: 0\n },\n\n calculateTextPosition: function (out, style, rect) {\n var res = calculateTextPosition(out, style, rect);\n var shape = this.shape;\n if (shape && shape.symbolType === 'pin' && style.textPosition === 'inside') {\n res.y = rect.y + rect.height * 0.4;\n }\n return res;\n },\n\n buildPath: function (ctx, shape, inBundle) {\n var symbolType = shape.symbolType;\n if (symbolType !== 'none') {\n var proxySymbol = symbolBuildProxies[symbolType];\n if (!proxySymbol) {\n // Default rect\n symbolType = 'rect';\n proxySymbol = symbolBuildProxies[symbolType];\n }\n symbolShapeMakers[symbolType](\n shape.x, shape.y, shape.width, shape.height, proxySymbol.shape\n );\n proxySymbol.buildPath(ctx, proxySymbol.shape, inBundle);\n }\n }\n});\n\n// Provide setColor helper method to avoid determine if set the fill or stroke outside\nfunction symbolPathSetColor(color, innerColor) {\n if (this.type !== 'image') {\n var symbolStyle = this.style;\n var symbolShape = this.shape;\n if (symbolShape && symbolShape.symbolType === 'line') {\n symbolStyle.stroke = color;\n }\n else if (this.__isEmptyBrush) {\n symbolStyle.stroke = color;\n symbolStyle.fill = innerColor || '#fff';\n }\n else {\n // FIXME 判断图形默认是填充还是描边,使用 onlyStroke ?\n symbolStyle.fill && (symbolStyle.fill = color);\n symbolStyle.stroke && (symbolStyle.stroke = color);\n }\n this.dirty(false);\n }\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 */\nexport function createSymbol(symbolType, x, y, w, h, color, keepAspect) {\n // TODO Support image object, DynamicImage.\n\n var isEmpty = symbolType.indexOf('empty') === 0;\n if (isEmpty) {\n symbolType = symbolType.substr(5, 1).toLowerCase() + symbolType.substr(6);\n }\n var symbolPath;\n\n if (symbolType.indexOf('image://') === 0) {\n symbolPath = graphic.makeImage(\n symbolType.slice(8),\n new BoundingRect(x, y, w, h),\n keepAspect ? 'center' : 'cover'\n );\n }\n else if (symbolType.indexOf('path://') === 0) {\n symbolPath = graphic.makePath(\n symbolType.slice(7),\n {},\n new BoundingRect(x, y, w, h),\n keepAspect ? 'center' : 'cover'\n );\n }\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\n symbolPath.setColor = symbolPathSetColor;\n\n symbolPath.setColor(color);\n\n return symbolPath;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport createListFromArray from './chart/helper/createListFromArray';\n// import createGraphFromNodeEdge from './chart/helper/createGraphFromNodeEdge';\nimport * as axisHelper from './coord/axisHelper';\nimport axisModelCommonMixin from './coord/axisModelCommonMixin';\nimport Model from './model/Model';\nimport {getLayoutRect} from './util/layout';\nimport {\n enableDataStack,\n isDimensionStacked,\n getStackedDimension\n} from './data/helper/dataStackHelper';\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 */\nexport function createList(seriesModel) {\n return createListFromArray(seriesModel.getSource(), seriesModel);\n}\n\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\nexport {getLayoutRect};\n\n/**\n * // TODO: @deprecated\n */\nexport {default as completeDimensions} from './data/helper/completeDimensions';\n\nexport {default as createDimensions} from './data/helper/createDimensions';\n\nexport var dataStack = {\n isDimensionStacked: isDimensionStacked,\n enableDataStack: enableDataStack,\n getStackedDimension: getStackedDimension\n};\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 */\nexport {createSymbol} from './util/symbol';\n\n/**\n * Create scale\n * @param {Array.<number>} dataExtent\n * @param {Object|module:echarts/Model} option\n */\nexport function createScale(dataExtent, option) {\n var axisModel = option;\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\n axisHelper.niceScaleExtent(scale, axisModel);\n return scale;\n}\n\n/**\n * Mixin common methods to axis model,\n *\n * Inlcude methods\n * `getFormattedLabels() => Array.<string>`\n * `getCategories() => Array.<string>`\n * `getMin(origin: boolean) => number`\n * `getMax(origin: boolean) => number`\n * `getNeedCrossZero() => boolean`\n * `setRange(start: number, end: number)`\n * `resetRange()`\n */\nexport function mixinAxisModelCommonMethods(Model) {\n zrUtil.mixin(Model, axisModelCommonMixin);\n}","import windingLine from './windingLine';\n\nvar EPSILON = 1e-8;\n\nfunction isAroundEqual(a, b) {\n return Math.abs(a - b) < EPSILON;\n}\n\nexport function contain(points, x, y) {\n var w = 0;\n var p = points[0];\n\n if (!p) {\n return false;\n }\n\n for (var i = 1; i < points.length; i++) {\n var p2 = points[i];\n w += windingLine(p[0], p[1], p2[0], p2[1], x, y);\n p = p2;\n }\n\n // Close polygon\n var p0 = points[0];\n if (!isAroundEqual(p[0], p0[0]) || !isAroundEqual(p[1], p0[1])) {\n w += windingLine(p[0], p[1], p0[0], p0[1], x, y);\n }\n\n return w !== 0;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport BoundingRect from 'zrender/src/core/BoundingRect';\nimport * as bbox from 'zrender/src/core/bbox';\nimport * as vec2 from 'zrender/src/core/vector';\nimport * as polygonContain from 'zrender/src/contain/polygon';\n\n/**\n * @param {string|Region} name\n * @param {Array} geometries\n * @param {Array.<number>} cp\n */\nfunction Region(name, geometries, cp) {\n\n /**\n * @type {string}\n * @readOnly\n */\n this.name = name;\n\n /**\n * @type {Array.<Array>}\n * @readOnly\n */\n this.geometries = geometries;\n\n if (!cp) {\n var rect = this.getBoundingRect();\n cp = [\n rect.x + rect.width / 2,\n rect.y + rect.height / 2\n ];\n }\n else {\n cp = [cp[0], cp[1]];\n }\n /**\n * @type {Array.<number>}\n */\n this.center = cp;\n}\n\nRegion.prototype = {\n\n constructor: Region,\n\n properties: null,\n\n /**\n * @return {module:zrender/core/BoundingRect}\n */\n getBoundingRect: function () {\n var rect = this._rect;\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 for (var i = 0; i < geometries.length; i++) {\n // Only support polygon\n if (geometries[i].type !== 'polygon') {\n continue;\n }\n // Doesn't consider hole\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 }\n // No data\n if (i === 0) {\n min[0] = min[1] = max[0] = max[1] = 0;\n }\n\n return (this._rect = new BoundingRect(\n min[0], min[1], max[0] - min[0], max[1] - min[1]\n ));\n },\n\n /**\n * @param {<Array.<number>} coord\n * @return {boolean}\n */\n contain: function (coord) {\n var rect = this.getBoundingRect();\n var geometries = this.geometries;\n if (!rect.contain(coord[0], coord[1])) {\n return false;\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 var exterior = geometries[i].exterior;\n var interiors = geometries[i].interiors;\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 return true;\n }\n }\n return false;\n },\n\n transformTo: function (x, y, width, height) {\n var rect = this.getBoundingRect();\n var aspect = rect.width / rect.height;\n if (!width) {\n width = aspect * height;\n }\n else if (!height) {\n height = width / aspect;\n }\n var target = new BoundingRect(x, y, width, height);\n var transform = rect.calculateTransform(target);\n var geometries = this.geometries;\n for (var i = 0; i < geometries.length; i++) {\n // Only support polygon.\n if (geometries[i].type !== 'polygon') {\n continue;\n }\n var exterior = geometries[i].exterior;\n var interiors = geometries[i].interiors;\n for (var p = 0; p < exterior.length; p++) {\n vec2.applyTransform(exterior[p], exterior[p], transform);\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 rect = this._rect;\n rect.copy(target);\n // Update center\n this.center = [\n rect.x + rect.width / 2,\n rect.y + rect.height / 2\n ];\n },\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 return newRegion;\n }\n};\n\nexport default Region;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport Region from './Region';\n\nfunction decode(json) {\n if (!json.UTF8Encoding) {\n return json;\n }\n var encodeScale = json.UTF8Scale;\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(\n coordinate,\n encodeOffsets[c],\n encodeScale\n );\n }\n else if (geometry.type === 'MultiPolygon') {\n for (var c2 = 0; c2 < coordinate.length; c2++) {\n var polygon = coordinate[c2];\n coordinate[c2] = decodePolygon(\n polygon,\n encodeOffsets[c][c2],\n encodeScale\n );\n }\n }\n }\n }\n // Has been decoded\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;\n // ZigZag decoding\n x = (x >> 1) ^ (-(x & 1));\n y = (y >> 1) ^ (-(y & 1));\n // Delta deocding\n x += prevX;\n y += prevY;\n\n prevX = x;\n prevY = y;\n // Dequantize\n result.push([x / encodeScale, y / encodeScale]);\n }\n\n return result;\n}\n\n/**\n * @alias module:echarts/coord/geo/parseGeoJson\n * @param {Object} geoJson\n * @param {string} nameProperty\n * @return {module:zrender/container/Group}\n */\nexport default function (geoJson, nameProperty) {\n\n decode(geoJson);\n\n return zrUtil.map(zrUtil.filter(geoJson.features, function (featureObj) {\n // Output of mapshaper may have geometry null\n return featureObj.geometry\n && featureObj.properties\n && featureObj.geometry.coordinates.length > 0;\n }), function (featureObj) {\n var properties = featureObj.properties;\n var geo = featureObj.geometry;\n\n var coordinates = geo.coordinates;\n\n var geometries = [];\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 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(\n properties[nameProperty || 'name'],\n geometries,\n properties.cp\n );\n region.properties = properties;\n return 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\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as textContain from 'zrender/src/contain/text';\nimport {makeInner} from '../util/model';\nimport {\n makeLabelFormatter,\n getOptionCategoryInterval,\n shouldShowAllLabels\n} from './axisHelper';\n\nvar inner = makeInner();\n\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 */\nexport function createAxisLabels(axis) {\n // Only ordinal scale support tick interval\n return axis.type === 'category'\n ? makeCategoryLabels(axis)\n : makeRealNumberLabels(axis);\n}\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.<number>\n * tickCategoryInterval: number\n * }\n */\nexport function createAxisTicks(axis, tickModel) {\n // Only ordinal scale support tick interval\n return axis.type === 'category'\n ? makeCategoryTicks(axis, tickModel)\n : {ticks: axis.scale.getTicks()};\n}\n\nfunction makeCategoryLabels(axis) {\n var labelModel = axis.getLabelModel();\n var result = makeCategoryLabelsActually(axis, labelModel);\n\n return (!labelModel.get('show') || axis.scale.isBlank())\n ? {labels: [], 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 }\n else {\n numericLabelInterval = optionLabelInterval === 'auto'\n ? makeAutoCategoryInterval(axis) : optionLabelInterval;\n labels = makeLabelsByNumericCategoryInterval(axis, numericLabelInterval);\n }\n\n // Cache to avoid calling interval function repeatly.\n return listCacheSet(labelsCache, optionLabelInterval, {\n labels: labels, 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;\n\n // Optimize for the case that large category data and no label displayed,\n // we should not return all ticks.\n if (!tickModel.get('show') || axis.scale.isBlank()) {\n ticks = [];\n }\n\n if (zrUtil.isFunction(optionTickInterval)) {\n ticks = makeLabelsByCustomizedCategoryInterval(axis, optionTickInterval, true);\n }\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 }\n else {\n tickCategoryInterval = optionTickInterval;\n ticks = makeLabelsByNumericCategoryInterval(axis, tickCategoryInterval, true);\n }\n\n // Cache to avoid calling interval function repeatly.\n return listCacheSet(ticksCache, optionTickInterval, {\n ticks: ticks, 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}\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.\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({key: key, value: value});\n return value;\n}\n\nfunction makeAutoCategoryInterval(axis) {\n var result = inner(axis).autoInterval;\n return result != null\n ? result\n : (inner(axis).autoInterval = axis.calculateCategoryInterval());\n}\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 */\nexport function calculateCategoryInterval(axis) {\n var params = fetchAutoCategoryIntervalCalculationParams(axis);\n var labelFormatter = makeLabelFormatter(axis);\n var rotation = (params.axisRotate - params.labelRotate) / 180 * Math.PI;\n\n var ordinalScale = axis.scale;\n var ordinalExtent = ordinalScale.getExtent();\n // Providing this method is for optimization:\n // avoid generating a long array by `getTicks`\n // in large category data case.\n var tickCount = ordinalScale.count();\n\n if (ordinalExtent[1] - ordinalExtent[0] < 1) {\n return 0;\n }\n\n var step = 1;\n // Simple optimization. Empirical value: tick count should less than 40.\n if (tickCount > 40) {\n step = Math.max(1, Math.floor(tickCount / 40));\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\n var maxW = 0;\n var maxH = 0;\n\n // Caution: Performance sensitive for large category data.\n // Consider dataZoom, we should make appropriate step to avoid O(n) loop.\n for (; tickValue <= ordinalExtent[1]; tickValue += step) {\n var width = 0;\n var height = 0;\n\n // Not precise, do not consider align and vertical align\n // and each distance from axis line yet.\n var rect = textContain.getBoundingRect(\n labelFormatter(tickValue), params.font, 'center', 'top'\n );\n // Magic number\n width = rect.width * 1.3;\n height = rect.height * 1.3;\n\n // Min size, void long loop.\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;\n // 0/0 is NaN, 1/0 is Infinity.\n isNaN(dw) && (dw = Infinity);\n isNaN(dh) && (dh = Infinity);\n var interval = Math.max(0, Math.floor(Math.min(dw, dh)));\n\n var cache = inner(axis.model);\n var axisExtent = axis.getExtent();\n var lastAutoInterval = cache.lastAutoInterval;\n var lastTickCount = cache.lastTickCount;\n\n // 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 if (lastAutoInterval != null\n && lastTickCount != null\n && Math.abs(lastAutoInterval - interval) <= 1\n && Math.abs(lastTickCount - tickCount) <= 1\n // Always choose the bigger one, otherwise the critical\n // point is not the same when zooming in or zooming out.\n && lastAutoInterval > interval\n // 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]\n && cache.axisExtend1 === axisExtent[1]\n ) {\n interval = lastAutoInterval;\n }\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\n ? axis.getRotate()\n : (axis.isHorizontal && !axis.isHorizontal())\n ? 90\n : 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 = [];\n\n // 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();\n\n // 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 if (startTick !== 0 && step > 1 && tickCount / step > 2) {\n startTick = Math.round(Math.ceil(startTick / step) * step);\n }\n\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 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 }\n\n // Optimize: avoid generating large array by `ordinalScale.getTicks()`.\n var tickValue = startTick;\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\n ? tVal\n : {\n formattedLabel: labelFormatter(tVal),\n rawLabel: ordinalScale.getLabel(tVal),\n tickValue: tVal\n }\n );\n }\n\n return result;\n}\n\n// When interval is function, the result `false` means ignore the tick.\n// It is time consuming for large category data.\nfunction makeLabelsByCustomizedCategoryInterval(axis, categoryInterval, onlyTick) {\n var ordinalScale = axis.scale;\n var labelFormatter = makeLabelFormatter(axis);\n var result = [];\n\n zrUtil.each(ordinalScale.getTicks(), function (tickValue) {\n var rawLabel = ordinalScale.getLabel(tickValue);\n if (categoryInterval(tickValue, rawLabel)) {\n result.push(onlyTick\n ? tickValue\n : {\n formattedLabel: labelFormatter(tickValue),\n rawLabel: rawLabel,\n tickValue: tickValue\n }\n );\n }\n });\n\n return result;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {each, map} from 'zrender/src/core/util';\nimport {linearMap, getPixelPrecision, round} from '../util/number';\nimport {\n createAxisTicks,\n createAxisLabels,\n calculateCategoryInterval\n} from './axisTickLabelBuilder';\n\nvar NORMALIZED_EXTENT = [0, 1];\n\n/**\n * Base class of Axis.\n * @constructor\n */\nvar Axis = function (dim, scale, extent) {\n\n /**\n * Axis dimension. Such as 'x', 'y', 'z', 'angle', 'radius'.\n * @type {string}\n */\n this.dim = dim;\n\n /**\n * Axis scale\n * @type {module:echarts/coord/scale/*}\n */\n this.scale = scale;\n\n /**\n * @type {Array.<number>}\n * @private\n */\n this._extent = extent || [0, 0];\n\n /**\n * @type {boolean}\n */\n this.inverse = false;\n\n /**\n * Usually true when axis has a ordinal scale\n * @type {boolean}\n */\n this.onBand = false;\n};\n\nAxis.prototype = {\n\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.<number>}\n */\n getExtent: function () {\n return this._extent.slice();\n },\n\n /**\n * Get precision used for formatting\n * @param {Array.<number>} [dataExtent]\n * @return {number}\n */\n getPixelPrecision: function (dataExtent) {\n return getPixelPrecision(\n dataExtent || this.scale.getExtent(),\n this._extent\n );\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\n return this.scale.scale(t);\n },\n\n /**\n * Convert pixel point to data in axis\n * @param {Array.<number>} point\n * @param {boolean} clamp\n * @return {number} data\n */\n pointToData: function (point, clamp) {\n // 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.<Object>} [{\n * coord: ...,\n * tickValue: ...\n * }, ...]\n */\n getTicksCoords: function (opt) {\n opt = opt || {};\n\n var tickModel = opt.tickModel || this.getTickModel();\n var result = createAxisTicks(this, tickModel);\n var ticks = result.ticks;\n\n var ticksCoords = map(ticks, function (tickValue) {\n return {\n coord: this.dataToCoord(tickValue),\n tickValue: tickValue\n };\n }, this);\n\n var alignWithLabel = tickModel.get('alignWithLabel');\n\n fixOnBandTicksCoords(\n this, ticksCoords, alignWithLabel, opt.clamp\n );\n\n return ticksCoords;\n },\n\n /**\n * @return {Array.<Array.<Object>>} [{ 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');\n // Protection.\n if (!(splitNumber > 0 && splitNumber < 100)) {\n splitNumber = 5;\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.<Object>} [{\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\n var len = dataExtent[1] - dataExtent[0] + (this.onBand ? 1 : 0);\n // Fix #2728, avoid NaN when only one data.\n len === 0 && (len = 1);\n\n var size = Math.abs(axisExtent[1] - axisExtent[0]);\n\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};\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}\n\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).\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 if (ticksLen === 1) {\n ticksCoords[0].coord = axisExtent[0];\n last = ticksCoords[1] = {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\n each(ticksCoords, function (ticksItem) {\n ticksItem.coord -= shift / 2;\n });\n\n var dataExtent = axis.scale.getExtent();\n diffSize = 1 + dataExtent[1] - ticksCoords[ticksLen - 1].tickValue;\n\n last = {coord: ticksCoords[ticksLen - 1].coord + shift * diffSize};\n\n ticksCoords.push(last);\n }\n\n var inverse = axisExtent[0] > axisExtent[1];\n\n // Handling clamp.\n if (littleThan(ticksCoords[0].coord, axisExtent[0])) {\n clamp ? (ticksCoords[0].coord = axisExtent[0]) : ticksCoords.shift();\n }\n if (clamp && littleThan(axisExtent[0], ticksCoords[0].coord)) {\n ticksCoords.unshift({coord: axisExtent[0]});\n }\n if (littleThan(axisExtent[1], last.coord)) {\n clamp ? (last.coord = axisExtent[1]) : ticksCoords.pop();\n }\n if (clamp && littleThan(last.coord, axisExtent[1])) {\n ticksCoords.push({coord: axisExtent[1]});\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\nexport default Axis;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport * as zrender from 'zrender/src/zrender';\nimport * as matrix from 'zrender/src/core/matrix';\nimport * as vector from 'zrender/src/core/vector';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as colorTool from 'zrender/src/tool/color';\nimport * as graphicUtil from './util/graphic';\nimport * as numberUtil from './util/number';\nimport * as formatUtil from './util/format';\nimport {throttle} from './util/throttle';\nimport * as ecHelper from './helper';\nimport parseGeoJSON from './coord/geo/parseGeoJson';\n\n\nexport {zrender};\nexport {default as List} from './data/List';\nexport {default as Model} from './model/Model';\nexport {default as Axis} from './coord/Axis';\nexport {numberUtil as number};\nexport {formatUtil as format};\nexport {throttle};\nexport {ecHelper as helper};\nexport {matrix};\nexport {vector};\nexport {colorTool as color};\nexport {default as env} from 'zrender/src/core/env';\n\nexport {parseGeoJSON};\nexport var parseGeoJson = parseGeoJSON;\n\nvar ecUtil = {};\nzrUtil.each(\n [\n 'map', 'each', 'filter', 'indexOf', 'inherits', 'reduce', 'filter',\n 'bind', 'curry', 'isArray', 'isString', 'isObject', 'isFunction',\n 'extend', 'defaults', 'clone', 'merge'\n ],\n function (name) {\n ecUtil[name] = zrUtil[name];\n }\n);\nexport {ecUtil as util};\n\nvar graphic = {};\nzrUtil.each(\n [\n 'extendShape', 'extendPath', 'makePath', 'makeImage',\n 'mergePath', 'resizePath', 'createIcon',\n 'setHoverStyle', 'setLabelStyle', 'setTextStyle', 'setText',\n 'getFont', 'updateProps', 'initProps', 'getTransform',\n 'clipPointsByRect', 'clipRectByRect',\n 'registerShape', 'getShapeClass',\n 'Group',\n 'Image',\n 'Text',\n 'Circle',\n 'Sector',\n 'Ring',\n 'Polygon',\n 'Polyline',\n 'Rect',\n 'Line',\n 'BezierCurve',\n 'Arc',\n 'IncrementalDisplayable',\n 'CompoundPath',\n 'LinearGradient',\n 'RadialGradient',\n 'BoundingRect'\n ],\n function (name) {\n graphic[name] = graphicUtil[name];\n }\n);\nexport {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\nimport {__DEV__} from '../../config';\nimport createListFromArray from '../helper/createListFromArray';\nimport SeriesModel from '../../model/Series';\n\nexport default SeriesModel.extend({\n\n type: 'series.line',\n\n dependencies: ['grid', 'polar'],\n\n getInitialData: function (option, ecModel) {\n if (__DEV__) {\n var coordSys = option.coordinateSystem;\n if (coordSys !== 'polar' && coordSys !== 'cartesian2d') {\n throw new Error('Line not support coordinateSystem besides cartesian and polar');\n }\n }\n return createListFromArray(this.getSource(), this, {useEncodeDefaulter: true});\n },\n\n defaultOption: {\n zlevel: 0,\n z: 2,\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n\n hoverAnimation: true,\n // stack: null\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n\n // polarIndex: 0,\n\n // If clip the overflow value\n clip: true,\n // cursor: null,\n\n label: {\n position: 'top'\n },\n // itemStyle: {\n // },\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\n // Disabled if step is true\n smooth: false,\n smoothMonotone: null,\n symbol: 'emptyCircle',\n symbolSize: 4,\n symbolRotate: null,\n\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\n // Whether to connect break point.\n connectNulls: false,\n\n // Sampling for large data. Can be: 'average', 'max', 'min', 'sum'.\n sampling: 'none',\n\n animationEasing: 'linear',\n\n // Disable progressive\n progressive: 0,\n hoverLayerThreshold: Infinity\n }\n});","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {retrieveRawValue} from '../../data/helper/dataProvider';\n\n/**\n * @param {module:echarts/data/List} data\n * @param {number} dataIndex\n * @return {string} label string. Not null/undefined\n */\nexport function getDefaultLabel(data, dataIndex) {\n var labelDims = data.mapDimension('defaultedLabel', true);\n var len = labelDims.length;\n\n // Simple optimization (in lots of cases, label dims length is 1)\n if (len === 1) {\n return retrieveRawValue(data, dataIndex, labelDims[0]);\n }\n else if (len) {\n var vals = [];\n for (var i = 0; i < labelDims.length; i++) {\n var val = retrieveRawValue(data, dataIndex, labelDims[i]);\n vals.push(val);\n }\n return vals.join(' ');\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 * @module echarts/chart/helper/Symbol\n */\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport {createSymbol} from '../../util/symbol';\nimport * as graphic from '../../util/graphic';\nimport {parsePercent} from '../../util/number';\nimport {getDefaultLabel} from './labelHelper';\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/**\n * @public\n * @static\n * @param {module:echarts/data/List} data\n * @param {number} dataIndex\n * @return {Array.<number>} [width, height]\n */\nvar getSymbolSize = SymbolClz.getSymbolSize = function (data, idx) {\n var symbolSize = data.getItemVisual(idx, 'symbolSize');\n return symbolSize instanceof Array\n ? symbolSize.slice()\n : [+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 (\n symbolType,\n data,\n idx,\n symbolSize,\n keepAspect\n) {\n // Remove paths created before\n this.removeAll();\n\n var color = data.getItemVisual(idx, 'color');\n\n // 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 var symbolPath = createSymbol(\n symbolType, -1, -1, 2, 2, color, keepAspect\n );\n\n symbolPath.attr({\n z2: 100,\n culling: true,\n scale: getScale(symbolSize)\n });\n // Rewrite drift method\n symbolPath.drift = driftSymbol;\n\n this._symbolType = symbolType;\n\n this.add(symbolPath);\n};\n\n/**\n * Stop animation\n * @param {boolean} toLastFrame\n */\nsymbolProto.stopSymbolAnimation = function (toLastFrame) {\n this.childAt(0).stopAnimation(toLastFrame);\n};\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 */\nsymbolProto.getSymbolPath = function () {\n return this.childAt(0);\n};\n\n/**\n * Get scale(aka, current symbol size).\n * Including the change caused by animation\n */\nsymbolProto.getScale = function () {\n return this.childAt(0).scale;\n};\n\n/**\n * Highlight symbol\n */\nsymbolProto.highlight = function () {\n this.childAt(0).trigger('emphasis');\n};\n\n/**\n * Downplay symbol\n */\nsymbolProto.downplay = function () {\n this.childAt(0).trigger('normal');\n};\n\n/**\n * @param {number} zlevel\n * @param {number} z\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/**\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 */\nsymbolProto.updateData = function (data, idx, seriesScope) {\n this.silent = false;\n\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 this._createSymbol(symbolType, data, idx, symbolSize, keepAspect);\n }\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\n var target = {scale: symbolPath.scale.slice()};\n fadeIn && (target.style = {opacity: symbolPath.style.opacity});\n\n symbolPath.scale = [0, 0];\n fadeIn && (symbolPath.style.opacity = 0);\n\n graphic.initProps(symbolPath, target, seriesModel, idx);\n }\n\n this._seriesModel = seriesModel;\n};\n\n// Update common properties\nvar normalStyleAccessPath = ['itemStyle'];\nvar emphasisStyleAccessPath = ['emphasis', 'itemStyle'];\nvar normalLabelAccessPath = ['label'];\nvar emphasisLabelAccessPath = ['emphasis', 'label'];\n\n/**\n * @param {module:echarts/data/List} data\n * @param {number} idx\n * @param {Array.<number>} symbolSize\n * @param {Object} [seriesScope]\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');\n\n // Reset style\n if (symbolPath.type !== 'image') {\n symbolPath.useStyle({\n strokeNoScale: true\n });\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)\n ? seriesScope.itemModel : data.getItemModel(idx);\n\n // Color must be excluded.\n // Because symbol provide setColor individually to set fill and stroke\n itemStyle = itemModel.getModel(normalStyleAccessPath).getItemStyle(['color']);\n hoverItemStyle = itemModel.getModel(emphasisStyleAccessPath).getItemStyle();\n\n symbolOffset = itemModel.getShallow('symbolOffset');\n\n labelModel = itemModel.getModel(normalLabelAccessPath);\n hoverLabelModel = itemModel.getModel(emphasisLabelAccessPath);\n hoverAnimation = itemModel.getShallow('hoverAnimation');\n cursorStyle = itemModel.getShallow('cursor');\n }\n else {\n hoverItemStyle = zrUtil.extend({}, hoverItemStyle);\n }\n\n var elStyle = symbolPath.style;\n\n var symbolRotate = data.getItemVisual(idx, 'symbolRotate');\n\n symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0);\n\n if (symbolOffset) {\n symbolPath.attr('position', [\n parsePercent(symbolOffset[0], symbolSize[0]),\n parsePercent(symbolOffset[1], symbolSize[1])\n ]);\n }\n\n cursorStyle && symbolPath.attr('cursor', cursorStyle);\n\n // PENDING setColor before setStyle!!!\n symbolPath.setColor(color, seriesScope && seriesScope.symbolInnerColor);\n\n symbolPath.setStyle(itemStyle);\n\n var opacity = data.getItemVisual(idx, 'opacity');\n if (opacity != null) {\n elStyle.opacity = opacity;\n }\n\n var liftZ = data.getItemVisual(idx, 'liftZ');\n var z2Origin = symbolPath.__z2Origin;\n if (liftZ != null) {\n if (z2Origin == null) {\n symbolPath.__z2Origin = symbolPath.z2;\n symbolPath.z2 += liftZ;\n }\n }\n else if (z2Origin != null) {\n symbolPath.z2 = z2Origin;\n symbolPath.__z2Origin = null;\n }\n\n var useNameLabel = seriesScope && seriesScope.useNameLabel;\n\n graphic.setLabelStyle(\n elStyle, hoverItemStyle, labelModel, hoverLabelModel,\n {\n labelFetcher: seriesModel,\n labelDataIndex: idx,\n defaultText: getLabelDefaultText,\n isRectText: true,\n autoColor: color\n }\n );\n\n // Do not execute util needed.\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 = (\n hoverAnimation && seriesModel.isAnimationEnabled()\n ) ? highDownOnUpdate : null;\n\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: [\n Math.max(scale[0] * 1.1, scale[0] + 3),\n Math.max(scale[1] * 1.1, scale[1] + 3 * ratio)\n ]\n };\n // FIXME\n // modify it after support stop specified animation.\n // toState === fromState\n // ? (this.stopAnimation(), this.attr(emphasisOpt))\n this.animateTo(emphasisOpt, 400, 'elasticOut');\n }\n else if (toState === 'normal') {\n this.animateTo({\n scale: this.__symbolOriginalScale\n }, 400, 'elasticOut');\n }\n}\n\n/**\n * @param {Function} cb\n * @param {Object} [opt]\n * @param {Object} [opt.keepLabel=true]\n */\nsymbolProto.fadeOut = function (cb, opt) {\n var symbolPath = this.childAt(0);\n // Avoid mistaken hover when fading out\n this.silent = symbolPath.silent = true;\n // Not show text when animating\n !(opt && opt.keepLabel) && (symbolPath.style.text = null);\n\n graphic.updateProps(\n symbolPath,\n {\n style: {opacity: 0},\n scale: [0, 0]\n },\n this._seriesModel,\n this.dataIndex,\n cb\n );\n};\n\nzrUtil.inherits(SymbolClz, graphic.Group);\n\nexport default SymbolClz;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport * as graphic from '../../util/graphic';\nimport SymbolClz from './Symbol';\nimport { isObject } from 'zrender/src/core/util';\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\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])\n && !(opt.isIgnore && opt.isIgnore(idx))\n // We do not set clipShape on group, because it will cut part of\n // the symbol element shape. We use the same clip shape here as\n // the line clip.\n && !(opt.clipShape && !opt.clipShape.contain(point[0], point[1]))\n && data.getItemVisual(idx, 'symbol') !== 'none';\n}\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 */\nsymbolDrawProto.updateData = function (data, opt) {\n opt = normalizeUpdateOpt(opt);\n\n var group = this.group;\n var seriesModel = data.hostModel;\n var oldData = this._data;\n var SymbolCtor = this._symbolCtor;\n\n var seriesScope = makeSeriesScope(data);\n\n // There is no oldLineData only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n if (!oldData) {\n group.removeAll();\n }\n\n data.diff(oldData)\n .add(function (newIdx) {\n var point = data.getItemLayout(newIdx);\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 })\n .update(function (newIdx, oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n var point = data.getItemLayout(newIdx);\n if (!symbolNeedsDraw(data, point, newIdx, opt)) {\n group.remove(symbolEl);\n return;\n }\n if (!symbolEl) {\n symbolEl = new SymbolCtor(data, newIdx);\n symbolEl.attr('position', point);\n }\n else {\n symbolEl.updateData(data, newIdx, seriesScope);\n graphic.updateProps(symbolEl, {\n position: point\n }, seriesModel);\n }\n\n // Add back\n group.add(symbolEl);\n\n data.setItemGraphicEl(newIdx, symbolEl);\n })\n .remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && el.fadeOut(function () {\n group.remove(el);\n });\n })\n .execute();\n\n this._data = data;\n};\n\nsymbolDrawProto.isPersistent = function () {\n return true;\n};\n\nsymbolDrawProto.updateLayout = function () {\n var data = this._data;\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/**\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 */\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 for (var idx = taskParams.start; idx < taskParams.end; idx++) {\n var point = data.getItemLayout(idx);\n if (symbolNeedsDraw(data, point, idx, opt)) {\n var el = new this._symbolCtor(data, idx, this._seriesScope);\n el.traverse(updateIncrementalAndHover);\n el.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 = {isIgnore: opt};\n }\n return opt || {};\n}\n\nsymbolDrawProto.remove = function (enableAnimation) {\n var group = this.group;\n var data = this._data;\n // Incremental model do not have this._data.\n if (data && enableAnimation) {\n data.eachItemGraphicEl(function (el) {\n el.fadeOut(function () {\n group.remove(el);\n });\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\nexport default SymbolDraw;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {isDimensionStacked} from '../../data/helper/dataStackHelper';\nimport {map} from 'zrender/src/core/util';\n\n/**\n * @param {Object} coordSys\n * @param {module:echarts/data/List} data\n * @param {string} valueOrigin lineSeries.option.areaStyle.origin\n */\nexport function prepareDataCoordInfo(coordSys, data, valueOrigin) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var valueStart = getValueStart(valueAxis, valueOrigin);\n\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\n var dims = map(coordSys.dimensions, function (coordDim) {\n return data.mapDimension(coordDim);\n });\n\n var stacked;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n if (stacked |= isDimensionStacked(data, dims[0] /*, dims[1]*/)) { // jshint ignore:line\n dims[0] = stackResultDim;\n }\n if (stacked |= isDimensionStacked(data, dims[1] /*, dims[0]*/)) { // 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 }\n else if (valueOrigin === 'end') {\n valueStart = extent[1];\n }\n // auto\n else {\n // Both positive\n if (extent[0] > 0) {\n valueStart = extent[0];\n }\n // Both negative\n else if (extent[1] < 0) {\n valueStart = extent[1];\n }\n // If is one positive, and one negative, onZero shall be true\n }\n\n return valueStart;\n}\n\nexport function getStackedOnPoint(dataCoordInfo, coordSys, data, idx) {\n var value = NaN;\n if (dataCoordInfo.stacked) {\n value = data.get(data.getCalculationInfo('stackedOverDimension'), idx);\n }\n if (isNaN(value)) {\n value = dataCoordInfo.valueStart;\n }\n\n var baseDataOffset = dataCoordInfo.baseDataOffset;\n var stackedData = [];\n stackedData[baseDataOffset] = data.get(dataCoordInfo.baseDim, idx);\n stackedData[1 - baseDataOffset] = value;\n\n return coordSys.dataToPoint(stackedData);\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {prepareDataCoordInfo, getStackedOnPoint} from './helper';\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\n// function convertToIntId(newIdList, oldIdList) {\n// // Generate int id instead of string id.\n// // Compare string maybe slow in score function of arrDiff\n\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// }\n\nfunction diffData(oldData, newData) {\n var diffResult = [];\n\n newData.diff(oldData)\n .add(function (idx) {\n diffResult.push({cmd: '+', idx: idx});\n })\n .update(function (newIdx, oldIdx) {\n diffResult.push({cmd: '=', idx: oldIdx, idx1: newIdx});\n })\n .remove(function (idx) {\n diffResult.push({cmd: '-', idx: idx});\n })\n .execute();\n\n return diffResult;\n}\n\nexport default function (\n oldData, newData,\n oldStackedOnPoints, newStackedOnPoints,\n oldCoordSys, newCoordSys,\n oldValueOrigin, newValueOrigin\n) {\n var diff = diffData(oldData, newData);\n\n // var newIdList = newData.mapArray(newData.getId);\n // var oldIdList = oldData.mapArray(oldData.getId);\n\n // convertToIntId(newIdList, oldIdList);\n\n // // FIXME One data ?\n // diff = arrayDiff(oldIdList, newIdList);\n\n var currPoints = [];\n var nextPoints = [];\n // Points for stacking base line\n var currStackedPoints = [];\n var nextStackedPoints = [];\n\n var status = [];\n var sortedIndices = [];\n var rawIndices = [];\n\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;\n\n // FIXME, animation is not so perfect when dataZoom window moves fast\n // Which is in case remvoing or add more than one data in the tail or head\n switch (diffItem.cmd) {\n case '=':\n var currentPt = oldData.getItemLayout(diffItem.idx);\n var nextPt = newData.getItemLayout(diffItem.idx1);\n // If previous data is NaN, use next point directly\n if (isNaN(currentPt[0]) || isNaN(currentPt[1])) {\n currentPt = nextPt.slice();\n }\n currPoints.push(currentPt);\n nextPoints.push(nextPt);\n\n currStackedPoints.push(oldStackedOnPoints[diffItem.idx]);\n nextStackedPoints.push(newStackedOnPoints[diffItem.idx1]);\n\n rawIndices.push(newData.getRawIndex(diffItem.idx1));\n break;\n case '+':\n var idx = diffItem.idx;\n currPoints.push(\n oldCoordSys.dataToPoint([\n newData.get(newDataOldCoordInfo.dataDimsForPoint[0], idx),\n newData.get(newDataOldCoordInfo.dataDimsForPoint[1], idx)\n ])\n );\n\n nextPoints.push(newData.getItemLayout(idx).slice());\n\n currStackedPoints.push(\n getStackedOnPoint(newDataOldCoordInfo, oldCoordSys, newData, idx)\n );\n nextStackedPoints.push(newStackedOnPoints[idx]);\n\n rawIndices.push(newData.getRawIndex(idx));\n break;\n case '-':\n var idx = diffItem.idx;\n var rawIndex = oldData.getRawIndex(idx);\n // Data is replaced. In the case of dynamic data queue\n // FIXME FIXME FIXME\n if (rawIndex !== idx) {\n currPoints.push(oldData.getItemLayout(idx));\n nextPoints.push(newCoordSys.dataToPoint([\n oldData.get(oldDataNewCoordInfo.dataDimsForPoint[0], idx),\n oldData.get(oldDataNewCoordInfo.dataDimsForPoint[1], idx)\n ]));\n\n currStackedPoints.push(oldStackedOnPoints[idx]);\n nextStackedPoints.push(\n getStackedOnPoint(oldDataNewCoordInfo, newCoordSys, oldData, idx)\n );\n\n rawIndices.push(rawIndex);\n }\n else {\n pointAdded = false;\n }\n }\n\n // Original indices\n if (pointAdded) {\n status.push(diffItem);\n sortedIndices.push(sortedIndices.length);\n }\n }\n\n // Diff result may be crossed if all items are changed\n // Sort by data index\n sortedIndices.sort(function (a, b) {\n return rawIndices[a] - rawIndices[b];\n });\n\n var sortedCurrPoints = [];\n var sortedNextPoints = [];\n\n var sortedCurrStackedPoints = [];\n var sortedNextStackedPoints = [];\n\n var sortedStatus = [];\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\n sortedCurrStackedPoints[i] = currStackedPoints[idx];\n sortedNextStackedPoints[i] = nextStackedPoints[idx];\n\n sortedStatus[i] = status[idx];\n }\n\n return {\n current: sortedCurrPoints,\n next: sortedNextPoints,\n\n stackedOnCurrent: sortedCurrStackedPoints,\n stackedOnNext: sortedNextStackedPoints,\n\n status: sortedStatus\n };\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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// Poly path support NaN point\n\nimport Path from 'zrender/src/graphic/Path';\nimport * as vec2 from 'zrender/src/core/vector';\nimport fixClipWithShadow from 'zrender/src/graphic/helper/fixClipWithShadow';\n\nvar vec2Min = vec2.min;\nvar vec2Max = vec2.max;\n\nvar scaleAndAdd = vec2.scaleAndAdd;\nvar v2Copy = vec2.copy;\n\n// Temporary variable\nvar v = [];\nvar cp0 = [];\nvar cp1 = [];\n\nfunction isPointNull(p) {\n return isNaN(p[0]) || isNaN(p[1]);\n}\n\nfunction drawSegment(\n ctx, points, start, segLen, allLen,\n dir, smoothMin, smoothMax, smooth, smoothMonotone, connectNulls\n) {\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 }\n else {\n return drawMono.apply(this, arguments);\n }\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\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 */\nfunction drawMono(\n ctx, points, start, segLen, allLen,\n dir, smoothMin, smoothMax, smooth, smoothMonotone, connectNulls\n) {\n var prevIdx = 0;\n var idx = start;\n for (var k = 0; k < segLen; k++) {\n var p = points[idx];\n if (idx >= allLen || idx < 0) {\n break;\n }\n if (isPointNull(p)) {\n if (connectNulls) {\n idx += dir;\n continue;\n }\n break;\n }\n\n if (idx === start) {\n ctx[dir > 0 ? 'moveTo' : 'lineTo'](p[0], p[1]);\n }\n else {\n if (smooth > 0) {\n var prevP = points[prevIdx];\n var dim = smoothMonotone === 'y' ? 1 : 0;\n\n // Length of control point to p, either in x or y, but not both\n var ctrlLen = (p[dim] - prevP[dim]) * smooth;\n\n v2Copy(cp0, prevP);\n cp0[dim] = prevP[dim] + ctrlLen;\n\n v2Copy(cp1, p);\n cp1[dim] = p[dim] - ctrlLen;\n\n ctx.bezierCurveTo(\n cp0[0], cp0[1],\n cp1[0], cp1[1],\n p[0], p[1]\n );\n }\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/**\n * Draw smoothed line in non-monotone, in may cause undesired curve in extreme\n * situations. This should be used when points are non-monotone neither in x or\n * y dimension.\n */\nfunction drawNonMono(\n ctx, points, start, segLen, allLen,\n dir, smoothMin, smoothMax, smooth, smoothMonotone, connectNulls\n) {\n var prevIdx = 0;\n var idx = start;\n for (var k = 0; k < segLen; k++) {\n var p = points[idx];\n if (idx >= allLen || idx < 0) {\n break;\n }\n if (isPointNull(p)) {\n if (connectNulls) {\n idx += dir;\n continue;\n }\n break;\n }\n\n if (idx === start) {\n ctx[dir > 0 ? 'moveTo' : 'lineTo'](p[0], p[1]);\n v2Copy(cp0, p);\n }\n else {\n if (smooth > 0) {\n var nextIdx = idx + dir;\n var nextP = points[nextIdx];\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];\n // Last point\n if (!nextP || isPointNull(nextP)) {\n v2Copy(cp1, p);\n }\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\n var lenPrevSeg;\n var lenNextSeg;\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 }\n else {\n lenPrevSeg = vec2.dist(p, prevP);\n lenNextSeg = vec2.dist(p, nextP);\n }\n\n // Use ratio of seg length\n ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg);\n\n scaleAndAdd(cp1, p, v, -smooth * (1 - ratioNextSeg));\n }\n // Smooth constraint\n vec2Min(cp0, cp0, smoothMax);\n vec2Max(cp0, cp0, smoothMin);\n vec2Min(cp1, cp1, smoothMax);\n vec2Max(cp1, cp1, smoothMin);\n\n ctx.bezierCurveTo(\n cp0[0], cp0[1],\n cp1[0], cp1[1],\n p[0], p[1]\n );\n // cp0 of next segment\n scaleAndAdd(cp0, p, v, smooth * ratioNextSeg);\n }\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 if (smoothConstraint) {\n for (var i = 0; i < points.length; i++) {\n var pt = points[i];\n if (pt[0] < ptMin[0]) {\n ptMin[0] = pt[0];\n }\n if (pt[1] < ptMin[1]) {\n ptMin[1] = pt[1];\n }\n if (pt[0] > ptMax[0]) {\n ptMax[0] = pt[0];\n }\n if (pt[1] > ptMax[1]) {\n ptMax[1] = pt[1];\n }\n }\n }\n return {\n min: smoothConstraint ? ptMin : ptMax,\n max: smoothConstraint ? ptMax : ptMin\n };\n}\n\nexport var Polyline = Path.extend({\n\n type: 'ec-polyline',\n\n shape: {\n points: [],\n\n smooth: 0,\n\n smoothConstraint: true,\n\n smoothMonotone: null,\n\n connectNulls: false\n },\n\n style: {\n fill: null,\n\n stroke: '#000'\n },\n\n brush: fixClipWithShadow(Path.prototype.brush),\n\n buildPath: function (ctx, shape) {\n var points = shape.points;\n\n var i = 0;\n var len = points.length;\n\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 for (; i < len; i++) {\n if (!isPointNull(points[i])) {\n break;\n }\n }\n }\n while (i < len) {\n i += drawSegment(\n ctx, points, i, len, len,\n 1, result.min, result.max, shape.smooth,\n shape.smoothMonotone, shape.connectNulls\n ) + 1;\n }\n }\n});\n\nexport var Polygon = Path.extend({\n\n type: 'ec-polygon',\n\n shape: {\n points: [],\n\n // Offset between stacked base points and points\n stackedOnPoints: [],\n\n smooth: 0,\n\n stackedOnSmooth: 0,\n\n smoothConstraint: true,\n\n smoothMonotone: null,\n\n connectNulls: false\n },\n\n brush: fixClipWithShadow(Path.prototype.brush),\n\n buildPath: function (ctx, shape) {\n var points = shape.points;\n var stackedOnPoints = shape.stackedOnPoints;\n\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 for (; i < len; i++) {\n if (!isPointNull(points[i])) {\n break;\n }\n }\n }\n while (i < len) {\n var k = drawSegment(\n ctx, points, i, len, len,\n 1, bbox.min, bbox.max, shape.smooth,\n smoothMonotone, shape.connectNulls\n );\n drawSegment(\n ctx, stackedOnPoints, i + k - 1, k, len,\n -1, stackedOnBBox.min, stackedOnBBox.max, shape.stackedOnSmooth,\n smoothMonotone, shape.connectNulls\n );\n i += k + 1;\n\n ctx.closePath();\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*/\nimport * as graphic from '../../util/graphic';\nimport {round} from '../../util/number';\n\nfunction createGridClipPath(cartesian, hasAnimation, seriesModel) {\n var rect = cartesian.getArea();\n var isHorizontal = cartesian.getBaseAxis().isHorizontal();\n\n var x = rect.x;\n var y = rect.y;\n var width = rect.width;\n var height = rect.height;\n\n var lineWidth = seriesModel.get('lineStyle.width') || 2;\n // Expand the clip path a bit to avoid the border is clipped and looks thinner\n x -= lineWidth / 2;\n y -= lineWidth / 2;\n width += lineWidth;\n height += lineWidth;\n\n // fix: https://github.com/apache/incubator-echarts/issues/11369\n x = Math.floor(x);\n width = Math.round(width);\n\n var clipPath = new graphic.Rect({\n shape: {\n x: x,\n y: y,\n width: width,\n height: height\n }\n });\n\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();\n // 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 return clipPath;\n}\n\nfunction createClipPath(coordSys, hasAnimation, seriesModel) {\n if (!coordSys) {\n return null;\n }\n else if (coordSys.type === 'polar') {\n return createPolarClipPath(coordSys, hasAnimation, seriesModel);\n }\n else if (coordSys.type === 'cartesian2d') {\n return createGridClipPath(coordSys, hasAnimation, seriesModel);\n }\n return null;\n}\n\nexport {\n createGridClipPath,\n createPolarClipPath,\n createClipPath\n};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n// FIXME step not support polar\n\nimport {__DEV__} from '../../config';\nimport * as zrUtil from 'zrender/src/core/util';\nimport {fromPoints} from 'zrender/src/core/bbox';\nimport SymbolDraw from '../helper/SymbolDraw';\nimport SymbolClz from '../helper/Symbol';\nimport lineAnimationDiff from './lineAnimationDiff';\nimport * as graphic from '../../util/graphic';\nimport * as modelUtil from '../../util/model';\nimport {Polyline, Polygon} from './poly';\nimport ChartView from '../../view/Chart';\nimport {prepareDataCoordInfo, getStackedOnPoint} from './helper';\nimport {createGridClipPath, createPolarClipPath} from '../helper/createClipPathFromCoordSys';\n\nfunction isPointsSame(points1, points2) {\n if (points1.length !== points2.length) {\n return;\n }\n for (var i = 0; i < points1.length; i++) {\n var p1 = points1[i];\n var p2 = points2[i];\n if (p1[0] !== p2[0] || p1[1] !== p2[1]) {\n return;\n }\n }\n return true;\n}\n\nfunction getBoundingDiff(points1, points2) {\n var min1 = [];\n var max1 = [];\n\n var min2 = [];\n var max2 = [];\n\n fromPoints(points1, min1, max1);\n fromPoints(points2, min2, max2);\n\n // Get a max value from each corner of two boundings.\n return Math.max(\n Math.abs(min1[0] - min2[0]),\n Math.abs(min1[1] - min2[1]),\n\n Math.abs(max1[0] - max2[0]),\n Math.abs(max1[1] - max2[1])\n );\n}\n\nfunction getSmooth(smooth) {\n return typeof (smooth) === 'number' ? smooth : (smooth ? 0.5 : 0);\n}\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.<Array.<number>>} points\n */\nfunction getStackedOnPoints(coordSys, data, dataCoordInfo) {\n if (!dataCoordInfo.valueDim) {\n return [];\n }\n\n var points = [];\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\n var stepPoints = [];\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\n var stepPt = [];\n switch (stepTurnAt) {\n case 'end':\n stepPt[baseIndex] = nextPt[baseIndex];\n stepPt[1 - baseIndex] = pt[1 - baseIndex];\n // default is start\n stepPoints.push(stepPt);\n break;\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 default:\n stepPt[baseIndex] = pt[baseIndex];\n stepPt[1 - baseIndex] = nextPt[1 - baseIndex];\n // default is start\n stepPoints.push(stepPt);\n }\n }\n // Last points\n points[i] && stepPoints.push(points[i]);\n return stepPoints;\n}\n\nfunction getVisualGradient(data, coordSys) {\n var visualMetaList = data.getVisual('visualMeta');\n if (!visualMetaList || !visualMetaList.length || !data.count()) {\n // When data.count() is 0, gradient range can not be calculated.\n return;\n }\n\n if (coordSys.type !== 'cartesian2d') {\n if (__DEV__) {\n console.warn('Visual map on line style is only supported on cartesian2d.');\n }\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;\n // Can only be x or y\n if (coordDim === 'x' || coordDim === 'y') {\n visualMeta = visualMetaList[i];\n break;\n }\n }\n\n if (!visualMeta) {\n if (__DEV__) {\n console.warn('Visual map on line style only support x or y dimension.');\n }\n return;\n }\n\n // If the area to be rendered is bigger than area defined by LinearGradient,\n // the canvas spec prescribes that the color of the first stop and the last\n // stop should be used. But if two stops are added at offset 0, in effect\n // browsers use the color of the second stop to render area outside\n // LinearGradient. So we can only infinitesimally extend area defined in\n // LinearGradient to render `outerColors`.\n\n var axis = coordSys.getAxis(coordDim);\n\n // dataToCoor mapping may not be linear, but must be monotonic.\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 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({ // notice colorStops.length have been changed.\n offset: stopLen ? colorStops[0].offset : 0.5,\n color: outerColors[0] || 'transparent'\n });\n\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\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 if (!categoryAxis) {\n return;\n }\n\n // Note that category label interval strategy might bring some weird effect\n // in some scenario: users may wonder why some of the symbols are not\n // displayed. So we show all symbols as possible as we can.\n if (isAuto\n // Simplify the logic, do not determine label overlap here.\n && canShowAllSymbolForCategory(categoryAxis, data)\n ) {\n return;\n }\n\n // Otherwise follow the label interval strategy on category axis.\n var categoryDataDim = data.mapDimension(categoryAxis.dim);\n var labelMap = {};\n\n zrUtil.each(categoryAxis.getViewLabels(), function (labelItem) {\n labelMap[labelItem.tickValue] = 1;\n });\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\n // Sampling some points, max 5.\n var dataLen = data.count();\n var step = Math.max(1, Math.round(dataLen / 5));\n for (var dataIndex = 0; dataIndex < dataLen; dataIndex += step) {\n if (SymbolClz.getSymbolSize(\n data, dataIndex\n // Only for cartesian, where `isHorizontal` exists.\n )[categoryAxis.isHorizontal() ? 1 : 0]\n // Empirical number\n * 1.5 > availSize\n ) {\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);\n // Expand clip shape to avoid clipping when line value exceeds axis\n if (!seriesModel.get('clip', true)) {\n var rectShape = clipPath.shape;\n var expandSize = Math.max(rectShape.width, rectShape.height);\n if (isHorizontal) {\n rectShape.y -= expandSize;\n rectShape.height += expandSize * 2;\n }\n else {\n rectShape.x -= expandSize;\n rectShape.width += expandSize * 2;\n }\n }\n return clipPath;\n }\n else {\n return createPolarClipPath(coordSys, hasAnimation, seriesModel);\n }\n\n}\n\nexport default ChartView.extend({\n\n type: 'line',\n\n init: function () {\n var lineGroup = new graphic.Group();\n\n var symbolDraw = new SymbolDraw();\n this.group.add(symbolDraw.group);\n\n this._symbolDraw = symbolDraw;\n this._lineGroup = lineGroup;\n },\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\n var points = data.mapArray(data.getItemLayout);\n\n var isCoordSysPolar = coordSys.type === 'polar';\n var prevCoordSys = this._coordSys;\n\n var symbolDraw = this._symbolDraw;\n var polyline = this._polyline;\n var polygon = this._polygon;\n\n var lineGroup = this._lineGroup;\n\n var hasAnimation = seriesModel.get('animation');\n\n var isAreaChart = !areaStyleModel.isEmpty();\n\n var valueOrigin = areaStyleModel.get('origin');\n var dataCoordInfo = prepareDataCoordInfo(coordSys, data, valueOrigin);\n\n var stackedOnPoints = getStackedOnPoints(coordSys, data, dataCoordInfo);\n\n var showSymbol = seriesModel.get('showSymbol');\n\n var isIgnoreFunc = showSymbol && !isCoordSysPolar\n && getIsIgnoreFunc(seriesModel, data, coordSys);\n\n // Remove temporary symbols\n var oldData = this._data;\n oldData && oldData.eachItemGraphicEl(function (el, idx) {\n if (el.__temp) {\n group.remove(el);\n oldData.setItemGraphicEl(idx, null);\n }\n });\n\n // Remove previous created symbols if showSymbol changed to false\n if (!showSymbol) {\n symbolDraw.remove();\n }\n\n group.add(lineGroup);\n\n // FIXME step not support polar\n var step = !isCoordSysPolar && seriesModel.get('step');\n var clipShapeForSymbol;\n if (coordSys && coordSys.getArea && seriesModel.get('clip', true)) {\n clipShapeForSymbol = coordSys.getArea();\n // Avoid float number rounding error for symbol on the edge of axis extent.\n // See #7913 and `test/dataZoom-clip.html`.\n if (clipShapeForSymbol.width != null) {\n clipShapeForSymbol.x -= 0.1;\n clipShapeForSymbol.y -= 0.1;\n clipShapeForSymbol.width += 0.2;\n clipShapeForSymbol.height += 0.2;\n }\n else if (clipShapeForSymbol.r0) {\n clipShapeForSymbol.r0 -= 0.5;\n clipShapeForSymbol.r1 += 0.5;\n }\n }\n this._clipShapeForSymbol = clipShapeForSymbol;\n // Initialization animation or coordinate system changed\n if (\n !(polyline && prevCoordSys.type === coordSys.type && step === this._step)\n ) {\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 if (isAreaChart) {\n polygon = this._newPolygon(\n points, stackedOnPoints,\n coordSys, hasAnimation\n );\n }\n lineGroup.setClipPath(createLineClipPath(coordSys, true, seriesModel));\n }\n else {\n if (isAreaChart && !polygon) {\n // If areaStyle is added\n polygon = this._newPolygon(\n points, stackedOnPoints,\n coordSys, hasAnimation\n );\n }\n else if (polygon && !isAreaChart) {\n // If areaStyle is removed\n lineGroup.remove(polygon);\n polygon = this._polygon = null;\n }\n\n // Update clipPath\n lineGroup.setClipPath(createLineClipPath(coordSys, false, seriesModel));\n\n // Always update, or it is wrong in the case turning on legend\n // because points are not changed\n showSymbol && symbolDraw.updateData(data, {\n isIgnore: isIgnoreFunc,\n clipShape: clipShapeForSymbol\n });\n\n // Stop symbol animation and sync with line points\n // FIXME performance?\n data.eachItemGraphicEl(function (el) {\n el.stopAnimation(true);\n });\n\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 if (!isPointsSame(this._stackedOnPoints, stackedOnPoints)\n || !isPointsSame(this._points, points)\n ) {\n if (hasAnimation) {\n this._updateAnimation(\n data, stackedOnPoints, coordSys, api, step, valueOrigin\n );\n }\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\n polyline.useStyle(zrUtil.defaults(\n // Use color in lineStyle first\n lineStyleModel.getLineStyle(),\n {\n fill: 'none',\n stroke: visualColor,\n lineJoin: 'bevel'\n }\n ));\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\n polygon.useStyle(zrUtil.defaults(\n areaStyleModel.getAreaStyle(),\n {\n fill: visualColor,\n opacity: 0.7,\n lineJoin: 'bevel'\n }\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;\n // Save the coordinate system for transition animation when data changed\n this._coordSys = coordSys;\n this._stackedOnPoints = stackedOnPoints;\n this._points = points;\n this._step = step;\n this._valueOrigin = valueOrigin;\n },\n\n dispose: function () {},\n\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 if (!symbol) {\n // Create a temporary symbol if it is not exists\n var pt = data.getItemLayout(dataIndex);\n if (!pt) {\n // Null data\n return;\n }\n // fix #11360: should't draw symbol outside clipShapeForSymbol\n if (this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(pt[0], pt[1])) {\n return;\n }\n symbol = new SymbolClz(data, dataIndex);\n symbol.position = pt;\n symbol.setZ(\n seriesModel.get('zlevel'),\n seriesModel.get('z')\n );\n symbol.ignore = isNaN(pt[0]) || isNaN(pt[1]);\n symbol.__temp = true;\n data.setItemGraphicEl(dataIndex, symbol);\n\n // Stop scale animation\n symbol.stopSymbolAnimation(true);\n\n this.group.add(symbol);\n }\n symbol.highlight();\n }\n else {\n // Highlight whole series\n ChartView.prototype.highlight.call(\n this, seriesModel, ecModel, api, payload\n );\n }\n },\n\n downplay: function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, payload);\n if (dataIndex != null && dataIndex >= 0) {\n var symbol = data.getItemGraphicEl(dataIndex);\n if (symbol) {\n if (symbol.__temp) {\n data.setItemGraphicEl(dataIndex, null);\n this.group.remove(symbol);\n }\n else {\n symbol.downplay();\n }\n }\n }\n else {\n // FIXME\n // can not downplay completely.\n // Downplay whole series\n ChartView.prototype.downplay.call(\n this, seriesModel, ecModel, api, payload\n );\n }\n },\n\n /**\n * @param {module:zrender/container/Group} group\n * @param {Array.<Array.<number>>} points\n * @private\n */\n _newPolyline: function (points) {\n var polyline = this._polyline;\n // Remove previous created polyline\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\n return polyline;\n },\n\n /**\n * @param {module:zrender/container/Group} group\n * @param {Array.<Array.<number>>} stackedOnPoints\n * @param {Array.<Array.<number>>} points\n * @private\n */\n _newPolygon: function (points, stackedOnPoints) {\n var polygon = this._polygon;\n // Remove previous created polygon\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\n var diff = lineAnimationDiff(\n this._data, data,\n this._stackedOnPoints, stackedOnPoints,\n this._coordSys, coordSys,\n this._valueOrigin, valueOrigin\n );\n\n var current = diff.current;\n var stackedOnCurrent = diff.stackedOnCurrent;\n var next = diff.next;\n var stackedOnNext = diff.stackedOnNext;\n if (step) {\n // TODO If stacked series is not step\n current = turnPointsIntoStep(diff.current, coordSys, step);\n stackedOnCurrent = turnPointsIntoStep(diff.stackedOnCurrent, coordSys, step);\n next = turnPointsIntoStep(diff.next, coordSys, step);\n stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step);\n }\n // Don't apply animation if diff is large.\n // For better result and avoid memory explosion problems like\n // https://github.com/apache/incubator-echarts/issues/12229\n if (getBoundingDiff(current, next) > 3000\n || (polygon && getBoundingDiff(stackedOnCurrent, stackedOnNext) > 3000)\n ) {\n polyline.setShape({\n points: next\n });\n if (polygon) {\n polygon.setShape({\n points: next,\n stackedOnPoints: stackedOnNext\n });\n }\n return;\n }\n\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 polyline.shape.__points = diff.current;\n polyline.shape.points = current;\n\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 if (cmd === '=') {\n var el = data.getItemGraphicEl(diffStatus[i].idx1);\n if (el) {\n updatedDataInfo.push({\n el: el,\n ptIdx: i // Index of points\n });\n }\n }\n }\n\n if (polyline.animators && polyline.animators.length) {\n polyline.animators[0].during(function () {\n 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\n remove: function (ecModel) {\n var group = this.group;\n var oldData = this._data;\n this._lineGroup.removeAll();\n this._symbolDraw.remove(true);\n // Remove temporary created elements when highlighting\n oldData && oldData.eachItemGraphicEl(function (el, idx) {\n if (el.__temp) {\n group.remove(el);\n oldData.setItemGraphicEl(idx, null);\n }\n });\n\n this._polyline =\n this._polygon =\n this._coordSys =\n this._points =\n this._stackedOnPoints =\n this._data = null;\n }\n});","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {isFunction} from 'zrender/src/core/util';\n\nexport default function (seriesType, defaultSymbolType, legendSymbol) {\n // Encoding visual for all series include which is filtered for legend drawing\n return {\n seriesType: seriesType,\n\n // For legend.\n performRawSeries: true,\n\n reset: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n\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\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\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 });\n\n // Only visible series has each data be visual encoded\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);\n\n // If has item symbol\n if (itemSymbolType != null) {\n data.setItemVisual(idx, 'symbol', itemSymbolType);\n }\n if (itemSymbolSize != null) {\n // PENDING Transform symbolSize ?\n data.setItemVisual(idx, 'symbolSize', itemSymbolSize);\n }\n if (itemSymbolRotate != null) {\n data.setItemVisual(idx, 'symbolRotate', itemSymbolRotate);\n }\n if (itemSymbolKeepAspect != null) {\n data.setItemVisual(idx, 'symbolKeepAspect', itemSymbolKeepAspect);\n }\n }\n }\n\n return { dataEach: (data.hasItemOption || hasCallback) ? dataEach : null };\n }\n };\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/* global Float32Array */\n\nimport {map} from 'zrender/src/core/util';\nimport createRenderPlanner from '../chart/helper/createRenderPlanner';\nimport {isDimensionStacked} from '../data/helper/dataStackHelper';\n\nexport default function (seriesType) {\n return {\n seriesType: seriesType,\n\n plan: createRenderPlanner(),\n\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\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n if (isDimensionStacked(data, dims[0] /*, dims[1]*/)) {\n dims[0] = stackResultDim;\n }\n if (isDimensionStacked(data, dims[1] /*, dims[0]*/)) {\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 }\n else {\n var x = tmpIn[0] = data.get(dims[0], i);\n var y = tmpIn[1] = data.get(dims[1], i);\n // Also {Array.<number>}, not undefined to avoid if...else... statement\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 }\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 && {progress: progress};\n }\n };\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\nvar samplers = {\n average: function (frame) {\n var sum = 0;\n var count = 0;\n for (var i = 0; i < frame.length; i++) {\n if (!isNaN(frame[i])) {\n sum += frame[i];\n count++;\n }\n }\n // Return NaN if count is 0\n return count === 0 ? NaN : sum / count;\n },\n sum: function (frame) {\n var sum = 0;\n for (var i = 0; i < frame.length; i++) {\n // Ignore NaN\n sum += frame[i] || 0;\n }\n return sum;\n },\n max: function (frame) {\n var max = -Infinity;\n for (var i = 0; i < frame.length; i++) {\n frame[i] > max && (max = frame[i]);\n }\n // NaN will cause illegal axis extent.\n return isFinite(max) ? max : NaN;\n },\n min: function (frame) {\n var min = Infinity;\n for (var i = 0; i < frame.length; i++) {\n frame[i] < min && (min = frame[i]);\n }\n // NaN will cause illegal axis extent.\n return isFinite(min) ? min : NaN;\n },\n // 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\nexport default function (seriesType) {\n return {\n\n seriesType: seriesType,\n\n modifyOutputEnd: true,\n\n reset: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var sampling = seriesModel.get('sampling');\n var coordSys = seriesModel.coordinateSystem;\n // Only cartesian2d support down sampling\n if (coordSys.type === 'cartesian2d' && sampling) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var extent = baseAxis.getExtent();\n // Coordinste system has been resized\n var size = Math.abs(extent[1] - extent[0]);\n var rate = Math.round(data.count() / size);\n if (rate > 1) {\n var sampler;\n if (typeof sampling === 'string') {\n sampler = samplers[sampling];\n }\n else if (typeof sampling === 'function') {\n sampler = sampling;\n }\n if (sampler) {\n // Only support sample the first dim mapped from value axis.\n seriesModel.setData(data.downSample(\n data.mapDimension(valueAxis.dim), 1 / rate, sampler, indexSampler\n ));\n }\n }\n }\n }\n };\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * Cartesian coordinate system\n * @module echarts/coord/Cartesian\n *\n */\n\nimport * as zrUtil from 'zrender/src/core/util';\n\nfunction dimAxisMapper(dim) {\n return this._axes[dim];\n}\n\n/**\n * @alias module:echarts/coord/Cartesian\n * @constructor\n */\nvar Cartesian = function (name) {\n this._axes = {};\n\n this._dimList = [];\n\n /**\n * @type {string}\n */\n this.name = name || '';\n};\n\nCartesian.prototype = {\n\n constructor: Cartesian,\n\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.<module:echarts/coord/Cartesian~Axis>}\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(\n this.getAxes(),\n function (axis) {\n return axis.scale.type === scaleType;\n }\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\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.<number>|Object.<string, number>} val\n * @return {Array.<number>|Object.<string, number>}\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.<number>|Object.<string, number>} val\n * @return {Array.<number>|Object.<string, number>}\n */\n coordToData: function (val) {\n return this._dataCoordConvert(val, 'coordToData');\n },\n\n _dataCoordConvert: function (input, method) {\n var dimList = this._dimList;\n\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\n output[dim] = axis[method](input[dim]);\n }\n\n return output;\n }\n};\n\nexport default Cartesian;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport * as zrUtil from 'zrender/src/core/util';\nimport BoundingRect from 'zrender/src/core/BoundingRect';\nimport Cartesian from './Cartesian';\n\nfunction Cartesian2D(name) {\n\n Cartesian.call(this, name);\n}\n\nCartesian2D.prototype = {\n\n constructor: Cartesian2D,\n\n type: 'cartesian2d',\n\n /**\n * @type {Array.<string>}\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]\n || this.getAxesByScale('time')[0]\n || this.getAxis('x');\n },\n\n /**\n * If contain point\n * @param {Array.<number>} 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]))\n && axisY.contain(axisY.toLocalCoord(point[1]));\n },\n\n /**\n * If contain data\n * @param {Array.<number>} data\n * @return {boolean}\n */\n containData: function (data) {\n return this.getAxis('x').containData(data[0])\n && this.getAxis('y').containData(data[1]);\n },\n\n /**\n * @param {Array.<number>} data\n * @param {Array.<number>} out\n * @return {Array.<number>}\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.<number>} data\n * @param {Array.<number>} out\n * @return {Array.<number>}\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(\n Math.max(Math.min(xAxisExtent[0], xAxisExtent[1]), x),\n Math.max(xAxisExtent[0], xAxisExtent[1])\n );\n out[1] = Math.min(\n Math.max(Math.min(yAxisExtent[0], yAxisExtent[1]), y),\n Math.max(yAxisExtent[0], yAxisExtent[1])\n );\n\n return out;\n },\n\n /**\n * @param {Array.<number>} point\n * @param {Array.<number>} out\n * @return {Array.<number>}\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\n var rect = new BoundingRect(x, y, width, height);\n return rect;\n }\n\n};\n\nzrUtil.inherits(Cartesian2D, Cartesian);\n\nexport default Cartesian2D;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport Axis from '../Axis';\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.<number>} 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 this.type = axisType || 'value';\n\n /**\n * Axis position\n * - 'top'\n * - 'bottom'\n * - 'left'\n * - 'right'\n */\n this.position = position || 'bottom';\n};\n\nAxis2D.prototype = {\n\n constructor: Axis2D,\n\n /**\n * Index of axis, can be used as key\n */\n index: 0,\n\n /**\n * Implemented in <module:echarts/coord/cartesian/Grid>.\n * @return {Array.<module:echarts/coord/cartesian/Axis2D>}\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\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.<number>}\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\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\n};\n\nzrUtil.inherits(Axis2D, Axis);\n\nexport default Axis2D;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\n\nvar defaultOption = {\n show: true,\n zlevel: 0,\n z: 0,\n // Inverse the axis.\n inverse: false,\n\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\n // Default `false` to support tooltip.\n silent: false,\n // Default `false` to avoid legacy user event listener fail.\n triggerEvent: false,\n\n tooltip: {\n show: false\n },\n\n axisPointer: {},\n\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};\n\nvar axisDefault = {};\n\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);\n\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\n // TODO\n // min/max: [30, datamin, 60] or [20, datamin] or [datamin, 60]\n\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\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\n // Readonly prop, specifies start value of the range when using data zoom.\n // rangeStart: null\n\n // Readonly prop, specifies end value of the range when using data zoom.\n // rangeEnd: null\n\n // Optional value can be:\n // + `false`: always include value 0.\n // + `true`: the extent do not consider value 0.\n // scale: false,\n\n // AxisTick and axisLabel and splitLine are caculated based on splitNumber.\n splitNumber: 5,\n\n // Interval specifies the span of the ticks is mandatorily.\n // interval: null\n\n // Specify min interval when auto calculate tick interval.\n // minInterval: null\n\n // Specify max interval when auto calculate tick interval.\n // maxInterval: null\n\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\n // Same inside with axisTick\n\n // Line style\n lineStyle: {\n // Default to be same with axisTick\n }\n },\n\n minorSplitLine: {\n show: false,\n\n lineStyle: {\n color: '#eee',\n width: 1\n }\n }\n}, defaultOption);\n\naxisDefault.timeAxis = zrUtil.defaults({\n scale: true,\n min: 'dataMin',\n max: 'dataMax'\n}, axisDefault.valueAxis);\n\naxisDefault.logAxis = zrUtil.defaults({\n scale: true,\n logBase: 10\n}, axisDefault.valueAxis);\n\nexport default axisDefault;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport axisDefault from './axisDefault';\nimport ComponentModel from '../model/Component';\nimport {\n getLayoutParams,\n mergeLayoutParam\n} from '../util/layout';\nimport OrdinalMeta from '../data/OrdinalMeta';\n\n\n// FIXME axisType is fixed ?\nvar AXIS_TYPES = ['value', 'category', 'time', 'log'];\n\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 */\nexport default function (axisName, BaseAxisModelClass, axisTypeDefaulter, extraDefaultOption) {\n\n zrUtil.each(AXIS_TYPES, function (axisType) {\n\n BaseAxisModelClass.extend({\n\n /**\n * @readOnly\n */\n type: axisName + 'Axis.' + axisType,\n\n mergeDefaultAndTheme: function (option, ecModel) {\n var layoutMode = this.layoutMode;\n var inputPositionParams = layoutMode\n ? getLayoutParams(option) : {};\n\n var themeModel = ecModel.getTheme();\n zrUtil.merge(option, themeModel.get(axisType + 'Axis'));\n zrUtil.merge(option, this.getDefaultOption());\n\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 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;\n // FIXME\n // warning if called before all of 'getInitailData' finished.\n if (option.type === 'category') {\n if (rawData) {\n return option.data;\n }\n return this.__ordinalMeta.categories;\n }\n },\n\n getOrdinalMeta: function () {\n return this.__ordinalMeta;\n },\n\n defaultOption: zrUtil.mergeAll(\n [\n {},\n axisDefault[axisType + 'Axis'],\n extraDefaultOption\n ],\n true\n )\n });\n });\n\n ComponentModel.registerSubTypeDefaulter(\n axisName + 'Axis',\n zrUtil.curry(axisTypeDefaulter, axisName)\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\nimport * as zrUtil from 'zrender/src/core/util';\nimport ComponentModel from '../../model/Component';\nimport axisModelCreator from '../axisModelCreator';\nimport axisModelCommonMixin from '../axisModelCommonMixin';\n\nvar AxisModel = ComponentModel.extend({\n\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});\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);\n\nvar extraOption = {\n // gridIndex: 0,\n // gridId: '',\n\n // Offset is for multiple axis on the same position\n offset: 0\n};\n\naxisModelCreator('x', AxisModel, getAxisType, extraOption);\naxisModelCreator('y', AxisModel, getAxisType, extraOption);\n\nexport default AxisModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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// Grid 是在有直角坐标系的时候必须要存在的\n// 所以这里也要被 Cartesian2D 依赖\n\nimport './AxisModel';\nimport ComponentModel from '../../model/Component';\n\nexport default ComponentModel.extend({\n\n type: 'grid',\n\n dependencies: ['xAxis', 'yAxis'],\n\n layoutMode: 'box',\n\n /**\n * @type {module:echarts/coord/cartesian/Grid}\n */\n coordinateSystem: null,\n\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* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport {__DEV__} from '../../config';\nimport {isObject, each, map, indexOf, retrieve} from 'zrender/src/core/util';\nimport {getLayoutRect} from '../../util/layout';\nimport {\n createScaleByModel,\n ifAxisCrossZero,\n niceScaleExtent,\n estimateLabelUnionRect\n} from '../../coord/axisHelper';\nimport Cartesian2D from './Cartesian2D';\nimport Axis2D from './Axis2D';\nimport CoordinateSystem from '../../CoordinateSystem';\nimport {getStackedDimension} from '../../data/helper/dataStackHelper';\n\n// Depends on GridModel, AxisModel, which performs preprocess.\nimport './GridModel';\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.<string, module:echarts/coord/cartesian/Cartesian2D>}\n * @private\n */\n this._coordsMap = {};\n\n /**\n * @type {Array.<module:echarts/coord/cartesian/Cartesian>}\n * @private\n */\n this._coordsList = [];\n\n /**\n * @type {Object.<string, Array.<module:echarts/coord/cartesian/Axis2D>>}\n * @private\n */\n this._axesMap = {};\n\n /**\n * @type {Array.<module:echarts/coord/cartesian/Axis2D>}\n * @private\n */\n this._axesList = [];\n\n this._initCartesian(gridModel, ecModel, api);\n\n this.model = gridModel;\n}\n\nvar gridProto = Grid.prototype;\n\ngridProto.type = 'grid';\n\ngridProto.axisPointerEnabled = true;\n\ngridProto.getRect = function () {\n return this._rect;\n};\n\ngridProto.update = function (ecModel, api) {\n\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 });\n\n // Key: axisDim_axisIndex, value: boolean, whether onZero target.\n var onZeroRecords = {};\n\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 });\n\n // Resize again if containLabel is enabled\n // FIXME It may cause getting wrong grid size in data processing stage\n this.resize(this.model, api);\n};\n\nfunction fixAxisOnZero(axesMap, otherAxisDim, axis, onZeroRecords) {\n\n axis.getAxesOnZeroOf = function () {\n // TODO: onZero of multiple axes.\n return otherAxisOnZeroOf ? [otherAxisOnZeroOf] : [];\n };\n\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 var otherAxes = axesMap[otherAxisDim];\n\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 }\n\n // If target axis is specified.\n if (onZeroAxisIndex != null) {\n if (canOnZeroToAxis(otherAxes[onZeroAxisIndex])) {\n otherAxisOnZeroOf = otherAxes[onZeroAxisIndex];\n }\n }\n else {\n // Find the first available other axis.\n for (var idx in otherAxes) {\n if (otherAxes.hasOwnProperty(idx)\n && canOnZeroToAxis(otherAxes[idx])\n // Consider that two Y axes on one value axis,\n // if both onZero, the two Y axes overlap.\n && !onZeroRecords[getOnZeroRecordKey(otherAxes[idx])]\n ) {\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/**\n * Resize the grid\n * @param {module:echarts/coord/cartesian/GridModel} gridModel\n * @param {module:echarts/ExtensionAPI} api\n */\ngridProto.resize = function (gridModel, api, ignoreContainLabel) {\n\n var gridRect = getLayoutRect(\n gridModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n\n this._rect = gridRect;\n\n var axesList = this._axesList;\n\n adjustAxes();\n\n // Minus label size\n if (!ignoreContainLabel && gridModel.get('containLabel')) {\n each(axesList, function (axis) {\n if (!axis.model.get('axisLabel.inside')) {\n var labelUnionRect = estimateLabelUnionRect(axis);\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 if (axis.position === 'top') {\n gridRect.y += labelUnionRect.height + margin;\n }\n else if (axis.position === 'left') {\n gridRect.x += labelUnionRect.width + margin;\n }\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/**\n * @param {string} axisType\n * @param {number} [axisIndex]\n */\ngridProto.getAxis = function (axisType, axisIndex) {\n var axesMapOnDim = this._axesMap[axisType];\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 return axesMapOnDim[axisIndex];\n }\n};\n\n/**\n * @return {Array.<module:echarts/coord/Axis>}\n */\ngridProto.getAxes = function () {\n return this._axesList.slice();\n};\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 */\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 }\n // When only xAxisIndex or yAxisIndex given, find its first cartesian.\n for (var i = 0, coordList = this._coordsList; i < coordList.length; i++) {\n if (coordList[i].getAxis('x').index === xAxisIndex\n || coordList[i].getAxis('y').index === yAxisIndex\n ) {\n return coordList[i];\n }\n }\n};\n\ngridProto.getCartesians = function () {\n return this._coordsList.slice();\n};\n\n/**\n * @implements\n * see {module:echarts/CoodinateSystem}\n */\ngridProto.convertToPixel = function (ecModel, finder, value) {\n var target = this._findConvertTarget(ecModel, finder);\n\n return target.cartesian\n ? target.cartesian.dataToPoint(value)\n : target.axis\n ? target.axis.toGlobalCoord(target.axis.dataToCoord(value))\n : null;\n};\n\n/**\n * @implements\n * see {module:echarts/CoodinateSystem}\n */\ngridProto.convertFromPixel = function (ecModel, finder, value) {\n var target = this._findConvertTarget(ecModel, finder);\n\n return target.cartesian\n ? target.cartesian.pointToData(value)\n : target.axis\n ? target.axis.coordToData(target.axis.toLocalCoord(value))\n : null;\n};\n\n/**\n * @inner\n */\ngridProto._findConvertTarget = function (ecModel, finder) {\n var seriesModel = finder.seriesModel;\n var xAxisModel = finder.xAxisModel\n || (seriesModel && seriesModel.getReferringComponents('xAxis')[0]);\n var yAxisModel = finder.yAxisModel\n || (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 }\n else if (xAxisModel && yAxisModel) {\n cartesian = this.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n }\n else if (xAxisModel) {\n axis = this.getAxis('x', xAxisModel.componentIndex);\n }\n else if (yAxisModel) {\n axis = this.getAxis('y', yAxisModel.componentIndex);\n }\n // Lowest priority.\n else if (gridModel) {\n var grid = gridModel.coordinateSystem;\n if (grid === this) {\n cartesian = this._coordsList[0];\n }\n }\n\n return {cartesian: cartesian, axis: axis};\n};\n\n/**\n * @implements\n * see {module:echarts/CoodinateSystem}\n */\ngridProto.containPoint = function (point) {\n var coord = this._coordsList[0];\n if (coord) {\n return coord.containPoint(point);\n }\n};\n\n/**\n * Initialize cartesian coordinate systems\n * @private\n */\ngridProto._initCartesian = function (gridModel, ecModel, api) {\n var axisPositionUsed = {\n left: false,\n right: false,\n top: false,\n bottom: false\n };\n\n var axesMap = {\n x: {},\n y: {}\n };\n var axesCount = {\n x: 0,\n y: 0\n };\n\n /// Create axis\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;\n\n /// Create cartesian2d\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\n cartesian.grid = this;\n cartesian.model = gridModel;\n\n this._coordsMap[key] = cartesian;\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 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 }\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 axisPositionUsed[axisPosition] = true;\n\n var axis = new Axis2D(\n axisType, createScaleByModel(axisModel),\n [0, 0],\n axisModel.get('type'),\n axisPosition\n );\n\n var isCategory = axis.type === 'category';\n axis.onBand = isCategory && axisModel.get('boundaryGap');\n axis.inverse = axisModel.get('inverse');\n\n // Inject axis into axisModel\n axisModel.axis = axis;\n\n // Inject axisModel into axis\n axis.model = axisModel;\n\n // Inject grid info axis\n axis.grid = this;\n\n // Index of axis, can be used as key\n axis.index = idx;\n\n this._axesList.push(axis);\n\n axesMap[axisType][idx] = axis;\n axesCount[axisType]++;\n };\n }\n};\n\n/**\n * Update cartesian properties from series\n * @param {module:echarts/model/Option} option\n * @private\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)\n || !isAxisUsedInTheGrid(yAxisModel, gridModel, ecModel)\n ) {\n return;\n }\n\n var cartesian = this.getCartesian(\n xAxisModel.componentIndex, yAxisModel.componentIndex\n );\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(\n // 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\n/**\n * @param {string} [dim] 'x' or 'y' or 'auto' or null/undefined\n * @return {Object} {baseAxes: [], otherAxes: []}\n */\ngridProto.getTooltipAxes = function (dim) {\n var baseAxes = [];\n var otherAxes = [];\n\n each(this.getCartesians(), function (cartesian) {\n var baseAxis = (dim != null && dim !== 'auto')\n ? 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\n return {baseAxes: baseAxes, otherAxes: otherAxes};\n};\n\n/**\n * @inner\n */\nfunction updateAxisTransform(axis, coordBase) {\n var axisExtent = axis.getExtent();\n var axisExtentSum = axisExtent[0] + axisExtent[1];\n\n // Fast transform\n axis.toGlobalCoord = axis.dim === 'x'\n ? function (coord) {\n return coord + coordBase;\n }\n : function (coord) {\n return axisExtentSum - coord + coordBase;\n };\n axis.toLocalCoord = axis.dim === 'x'\n ? function (coord) {\n return coord - coordBase;\n }\n : function (coord) {\n return axisExtentSum - coord + coordBase;\n };\n}\n\nvar axesTypes = ['xAxis', 'yAxis'];\n/**\n * @inner\n */\nfunction findAxesModels(seriesModel, ecModel) {\n return map(axesTypes, function (axisType) {\n var axisModel = seriesModel.getReferringComponents(axisType)[0];\n\n if (__DEV__) {\n if (!axisModel) {\n throw new Error(axisType + ' \"' + retrieve(\n seriesModel.get(axisType + 'Index'),\n seriesModel.get(axisType + 'Id'),\n 0\n ) + '\" not found');\n }\n }\n return axisModel;\n });\n}\n\n/**\n * @inner\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;\n // dataSampling requires axis extent, so resize\n // should be performed in create stage.\n grid.resize(gridModel, api, true);\n\n gridModel.coordinateSystem = grid;\n\n grids.push(grid);\n });\n\n // Inject the coordinateSystems into seriesModel\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\n var gridModel = xAxisModel.getCoordSysModel();\n\n if (__DEV__) {\n if (!gridModel) {\n throw new Error(\n 'Grid \"' + retrieve(\n xAxisModel.get('gridIndex'),\n xAxisModel.get('gridId'),\n 0\n ) + '\" not found'\n );\n }\n if (xAxisModel.getCoordSysModel() !== yAxisModel.getCoordSysModel()) {\n throw new Error('xAxis and yAxis must use the same grid');\n }\n }\n\n var grid = gridModel.coordinateSystem;\n\n seriesModel.coordinateSystem = grid.getCartesian(\n xAxisModel.componentIndex, yAxisModel.componentIndex\n );\n });\n\n return grids;\n};\n\n// For deciding which dimensions to use when creating list data\nGrid.dimensions = Grid.prototype.dimensions = Cartesian2D.prototype.dimensions;\n\nCoordinateSystem.register('cartesian2d', Grid);\n\nexport default Grid;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {retrieve, defaults, extend, each} from 'zrender/src/core/util';\nimport * as formatUtil from '../../util/format';\nimport * as graphic from '../../util/graphic';\nimport Model from '../../model/Model';\nimport {isRadianAroundZero, remRadian} from '../../util/number';\nimport {createSymbol} from '../../util/symbol';\nimport * as matrixUtil from 'zrender/src/core/matrix';\nimport {applyTransform as v2ApplyTransform} from 'zrender/src/core/vector';\nimport {shouldShowAllLabels} from '../../coord/axisHelper';\n\n\nvar PI = Math.PI;\n\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.<number>} 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 */\nvar AxisBuilder = function (axisModel, opt) {\n\n /**\n * @readOnly\n */\n this.opt = opt;\n\n /**\n * @readOnly\n */\n this.axisModel = axisModel;\n\n // Default value\n defaults(\n opt,\n {\n labelOffset: 0,\n nameDirection: 1,\n tickDirection: 1,\n labelDirection: 1,\n silent: true\n }\n );\n\n /**\n * @readOnly\n */\n this.group = new graphic.Group();\n\n // FIXME Not use a seperate text group?\n var dumbGroup = new graphic.Group({\n position: opt.position.slice(),\n rotation: opt.rotation\n });\n\n // this.group.add(dumbGroup);\n // this._dumbGroup = dumbGroup;\n\n dumbGroup.updateTransform();\n this._transform = dumbGroup.transform;\n\n this._dumbGroup = dumbGroup;\n};\n\nAxisBuilder.prototype = {\n\n constructor: AxisBuilder,\n\n hasBuilder: function (name) {\n return !!builders[name];\n },\n\n add: function (name) {\n builders[name].call(this);\n },\n\n getGroup: function () {\n return this.group;\n }\n\n};\n\nvar builders = {\n\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\n var matrix = this._transform;\n var pt1 = [extent[0], 0];\n var pt2 = [extent[1], 0];\n if (matrix) {\n v2ApplyTransform(pt1, pt1, matrix);\n v2ApplyTransform(pt2, pt2, matrix);\n }\n\n var lineStyle = extend(\n {\n lineCap: 'round'\n },\n axisModel.getModel('axisLine.lineStyle').getLineStyle()\n );\n\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\n var arrows = axisModel.get('axisLine.symbol');\n var arrowSize = axisModel.get('axisLine.symbolSize');\n\n var arrowOffset = axisModel.get('axisLine.symbolOffset') || 0;\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 if (typeof arrowSize === 'string'\n || typeof arrowSize === 'number'\n ) {\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\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])\n + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1]))\n }], function (point, index) {\n if (arrows[index] !== 'none' && arrows[index] != null) {\n var symbol = createSymbol(\n arrows[index],\n -symbolWidth / 2,\n -symbolHeight / 2,\n symbolWidth,\n symbolHeight,\n lineStyle.stroke,\n true\n );\n\n // Calculate arrow position with offset\n var r = point.r + point.offset;\n var pos = [\n pt1[0] + r * Math.cos(opt.rotation),\n pt1[1] - r * Math.sin(opt.rotation)\n ];\n\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\n var ticksEls = buildAxisMajorTicks(this, axisModel, opt);\n var labelEls = buildAxisLabel(this, axisModel, opt);\n\n fixMinMaxLabelShow(axisModel, labelEls, ticksEls);\n\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\n var extent = this.axisModel.axis.getExtent();\n var gapSignal = extent[0] > extent[1] ? -1 : 1;\n var pos = [\n nameLocation === 'start'\n ? extent[0] - gapSignal * gap\n : nameLocation === 'end'\n ? extent[1] + gapSignal * gap\n : (extent[0] + extent[1]) / 2, // 'middle'\n // Reuse labelOffset.\n isNameLocationCenter(nameLocation) ? opt.labelOffset + nameDirection * gap : 0\n ];\n\n var labelLayout;\n\n var nameRotation = axisModel.get('nameRotate');\n if (nameRotation != null) {\n nameRotation = nameRotation * PI / 180; // To radian.\n }\n\n var axisNameAvailableWidth;\n\n if (isNameLocationCenter(nameLocation)) {\n labelLayout = innerTextLayout(\n opt.rotation,\n nameRotation != null ? nameRotation : opt.rotation, // Adapt to axis.\n nameDirection\n );\n }\n else {\n labelLayout = endTextLayout(\n opt, nameLocation, nameRotation || 0, extent\n );\n\n axisNameAvailableWidth = opt.axisNameAvailableWidth;\n if (axisNameAvailableWidth != null) {\n axisNameAvailableWidth = Math.abs(\n axisNameAvailableWidth / Math.sin(labelLayout.rotation)\n );\n !isFinite(axisNameAvailableWidth) && (axisNameAvailableWidth = null);\n }\n }\n\n var textFont = textStyleModel.getFont();\n\n var truncateOpt = axisModel.get('nameTruncate', true) || {};\n var ellipsis = truncateOpt.ellipsis;\n var maxWidth = retrieve(\n opt.nameTruncateMaxWidth, truncateOpt.maxWidth, axisNameAvailableWidth\n );\n // FIXME\n // truncate rich text? (consider performance)\n var truncatedText = (ellipsis != null && maxWidth != null)\n ? formatUtil.truncateText(\n name, maxWidth, textFont, ellipsis,\n {minChar: 2, placeholder: truncateOpt.placeholder}\n )\n : name;\n\n var tooltipOpt = axisModel.get('tooltip', true);\n\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\n var textEl = new graphic.Text({\n // Id for animation\n anid: 'name',\n\n __fullText: name,\n __truncatedText: truncatedText,\n\n position: pos,\n rotation: labelLayout.rotation,\n silent: isLabelSilent(axisModel),\n z2: 1,\n tooltip: (tooltipOpt && tooltipOpt.show)\n ? extend({\n content: name,\n formatter: function () {\n return name;\n },\n formatterParams: formatterParams\n }, tooltipOpt)\n : null\n });\n\n graphic.setTextStyle(textEl.style, textStyleModel, {\n text: truncatedText,\n textFont: textFont,\n textFill: textStyleModel.getTextColor()\n || axisModel.get('axisLine.lineStyle.color'),\n textAlign: textStyleModel.get('align')\n || labelLayout.textAlign,\n textVerticalAlign: textStyleModel.get('verticalAlign')\n || 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 }\n\n // FIXME\n this._dumbGroup.add(textEl);\n textEl.updateTransform();\n\n this.group.add(textEl);\n\n textEl.decomposeTransform();\n }\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/**\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 */\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)) { // Label is parallel with axis line.\n textVerticalAlign = direction > 0 ? 'top' : 'bottom';\n textAlign = 'center';\n }\n else if (isRadianAroundZero(rotationDiff - PI)) { // Label is inverse parallel with axis line.\n textVerticalAlign = direction > 0 ? 'bottom' : 'top';\n textAlign = 'center';\n }\n else {\n textVerticalAlign = 'middle';\n\n if (rotationDiff > 0 && rotationDiff < PI) {\n textAlign = direction > 0 ? 'right' : 'left';\n }\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)\n || (textPosition !== 'start' && inverse);\n\n if (isRadianAroundZero(rotationDiff - PI / 2)) {\n textVerticalAlign = onLeft ? 'bottom' : 'top';\n textAlign = 'center';\n }\n else if (isRadianAroundZero(rotationDiff - PI * 1.5)) {\n textVerticalAlign = onLeft ? 'top' : 'bottom';\n textAlign = 'center';\n }\n else {\n textVerticalAlign = 'middle';\n if (rotationDiff < PI * 1.5 && rotationDiff > PI / 2) {\n textAlign = onLeft ? 'left' : 'right';\n }\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')\n // Consider mouse cursor, add these restrictions.\n || !(\n axisModel.get('triggerEvent') || (tooltipOpt && tooltipOpt.show)\n );\n};\n\nfunction fixMinMaxLabelShow(axisModel, labelEls, tickEls) {\n if (shouldShowAllLabels(axisModel.axis)) {\n return;\n }\n\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 var showMinLabel = axisModel.get('axisLabel.showMinLabel');\n var showMaxLabel = axisModel.get('axisLabel.showMaxLabel');\n\n // FIXME\n // Have not consider onBand yet, where tick els is more than label els.\n\n labelEls = labelEls || [];\n tickEls = tickEls || [];\n\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\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 }\n else if (isTwoLabelOverlapped(firstLabel, nextLabel)) {\n if (showMinLabel) {\n ignoreEl(nextLabel);\n ignoreEl(nextTick);\n }\n else {\n ignoreEl(firstLabel);\n ignoreEl(firstTick);\n }\n }\n\n if (showMaxLabel === false) {\n ignoreEl(lastLabel);\n ignoreEl(lastTick);\n }\n else if (isTwoLabelOverlapped(prevLabel, lastLabel)) {\n if (showMaxLabel) {\n ignoreEl(prevLabel);\n ignoreEl(prevTick);\n }\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 }\n\n // When checking intersect of two rotated labels, we use mRotationBack\n // to avoid that boundingRect is enlarge when using `boundingRect.applyTransform`.\n var mRotationBack = matrixUtil.identity([]);\n matrixUtil.rotate(mRotationBack, mRotationBack, -current.rotation);\n\n firstRect.applyTransform(matrixUtil.mul([], mRotationBack, current.getLocalTransform()));\n nextRect.applyTransform(matrixUtil.mul([], mRotationBack, next.getLocalTransform()));\n\n return firstRect.intersect(nextRect);\n}\n\nfunction isNameLocationCenter(nameLocation) {\n return nameLocation === 'middle' || nameLocation === 'center';\n}\n\n\nfunction createTicks(ticksCoords, tickTransform, tickEndCoord, tickLineStyle, aniid) {\n var tickEls = [];\n var pt1 = [];\n var pt2 = [];\n for (var i = 0; i < ticksCoords.length; i++) {\n var tickCoord = ticksCoords[i].coord;\n\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 }\n // Tick line, Not use group transform to have better line draw\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 return tickEls;\n}\n\nfunction buildAxisMajorTicks(axisBuilder, axisModel, opt) {\n var axis = axisModel.axis;\n\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\n var ticksCoords = axis.getTicksCoords();\n\n var ticksEls = createTicks(ticksCoords, axisBuilder._transform, tickEndCoord, defaults(\n lineStyleModel.getLineStyle(),\n {\n stroke: axisModel.get('axisLine.lineStyle.color')\n }\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\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 if (!minorTicksCoords.length) {\n return;\n }\n\n var lineStyleModel = minorTickModel.getModel('lineStyle');\n var tickEndCoord = opt.tickDirection * minorTickModel.get('length');\n\n var minorTickLineStyle = defaults(\n lineStyleModel.getLineStyle(),\n defaults(\n axisModel.getModel('axisTick').getLineStyle(),\n {\n stroke: axisModel.get('axisLine.lineStyle.color')\n }\n )\n );\n\n for (var i = 0; i < minorTicksCoords.length; i++) {\n var minorTicksEls = createTicks(\n 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();\n\n // Special label rotate.\n var labelRotation = (\n retrieve(opt.labelRotate, labelModel.get('rotate')) || 0\n ) * PI / 180;\n\n var labelLayout = innerTextLayout(opt.rotation, labelRotation, opt.labelDirection);\n var rawCategoryData = axisModel.getCategories && axisModel.getCategories(true);\n\n var labelEls = [];\n var silent = isLabelSilent(axisModel);\n var triggerEvent = axisModel.get('triggerEvent');\n\n each(labels, function (labelItem, index) {\n var tickValue = labelItem.tickValue;\n var formattedLabel = labelItem.formattedLabel;\n var rawLabel = labelItem.rawLabel;\n\n var itemLabelModel = labelModel;\n if (rawCategoryData && rawCategoryData[tickValue] && rawCategoryData[tickValue].textStyle) {\n itemLabelModel = new Model(\n rawCategoryData[tickValue].textStyle, labelModel, axisModel.ecModel\n );\n }\n\n var textColor = itemLabelModel.getTextColor()\n || axisModel.get('axisLine.lineStyle.color');\n\n var tickCoord = axis.dataToCoord(tickValue);\n var pos = [\n tickCoord,\n opt.labelOffset + opt.labelDirection * labelMargin\n ];\n\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\n graphic.setTextStyle(textEl.style, itemLabelModel, {\n text: formattedLabel,\n textAlign: itemLabelModel.getShallow('align', true)\n || labelLayout.textAlign,\n textVerticalAlign: itemLabelModel.getShallow('verticalAlign', true)\n || itemLabelModel.getShallow('baseline', true)\n || labelLayout.textVerticalAlign,\n textFill: typeof textColor === 'function'\n ? textColor(\n // (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'\n ? rawLabel\n : axis.type === 'value'\n ? tickValue + ''\n : tickValue,\n index\n )\n : textColor\n });\n\n // Pack data for mouse event\n if (triggerEvent) {\n textEl.eventData = makeAxisEventDataBase(axisModel);\n textEl.eventData.targetType = 'axisLabel';\n textEl.eventData.value = rawLabel;\n }\n\n // FIXME\n axisBuilder._dumbGroup.add(textEl);\n textEl.updateTransform();\n\n labelEls.push(textEl);\n axisBuilder.group.add(textEl);\n\n textEl.decomposeTransform();\n\n });\n\n return labelEls;\n}\n\n\nexport default AxisBuilder;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport Model from '../../model/Model';\n\nvar each = zrUtil.each;\nvar curry = zrUtil.curry;\n\n// Build axisPointerModel, mergin tooltip.axisPointer model for each axis.\n// allAxesInfo should be updated when setOption performed.\nexport function 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 * key: makeKey(coordSys.model)\n * value: Object: key makeKey(axis.model), value: axisInfo\n */\n coordSysAxesInfo: {},\n coordSysMap: {}\n };\n\n collectAxesInfo(result, ecModel, api);\n\n // Check seriesInvolved for performance, in case too many series in some chart.\n result.seriesInvolved && collectSeriesInfo(result, ecModel);\n\n return result;\n}\n\nfunction collectAxesInfo(result, ecModel, api) {\n var globalTooltipModel = ecModel.getComponent('tooltip');\n var globalAxisPointerModel = ecModel.getComponent('axisPointer');\n // links can only be set on global.\n var linksOption = globalAxisPointerModel.get('link', true) || [];\n var linkGroups = [];\n\n // Collect axes info.\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;\n\n // Set tooltip (like 'cross') is a convienent way to show axisPointer\n // for user. So we enable seting tooltip on coordSys model.\n var coordSysModel = coordSys.model;\n var baseTooltipModel = coordSysModel.getModel('tooltip', globalTooltipModel);\n\n each(coordSys.getAxes(), curry(saveTooltipAxisInfo, false, null));\n\n // If axis tooltip used, choose tooltip axis for each coordSys.\n // Notice this case: coordSys is `grid` but not `cartesian2D` here.\n if (coordSys.getTooltipAxes\n && globalTooltipModel\n // If tooltip.showContent is set as false, tooltip will not\n // show but axisPointer will show as normal.\n && baseTooltipModel.get('show')\n ) {\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 if (triggerAxis || cross) {\n each(tooltipAxes.baseAxes, curry(\n saveTooltipAxisInfo, cross ? 'cross' : true, triggerAxis\n ));\n }\n if (cross) {\n each(tooltipAxes.otherAxes, curry(saveTooltipAxisInfo, 'cross', false));\n }\n }\n\n // fromTooltip: true | false | 'cross'\n // triggerTooltip: true | false | null\n function saveTooltipAxisInfo(fromTooltip, triggerTooltip, axis) {\n var axisPointerModel = axis.model.getModel('axisPointer', globalAxisPointerModel);\n\n var axisPointerShow = axisPointerModel.get('show');\n if (!axisPointerShow || (\n axisPointerShow === 'auto'\n && !fromTooltip\n && !isHandleTrigger(axisPointerModel)\n )) {\n return;\n }\n\n if (triggerTooltip == null) {\n triggerTooltip = axisPointerModel.get('triggerTooltip');\n }\n\n axisPointerModel = fromTooltip\n ? makeAxisPointerModel(\n axis, baseTooltipModel, globalAxisPointerModel, ecModel,\n fromTooltip, triggerTooltip\n )\n : axisPointerModel;\n\n var snap = axisPointerModel.get('snap');\n var key = makeKey(axis.model);\n var involveSeries = triggerTooltip || snap || axis.type === 'category';\n\n // If result.axesInfo[key] exist, override it (tooltip has higher priority).\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\n var groupIndex = getLinkGroupIndex(linksOption, axis);\n if (groupIndex != null) {\n var linkGroup = linkGroups[groupIndex] || (linkGroups[groupIndex] = {axesInfo: {}});\n linkGroup.axesInfo[key] = axisInfo;\n linkGroup.mapper = linksOption[groupIndex].mapper;\n axisInfo.linkGroup = linkGroup;\n }\n }\n });\n}\n\nfunction makeAxisPointerModel(\n axis, baseTooltipModel, globalAxisPointerModel, ecModel, fromTooltip, triggerTooltip\n) {\n var tooltipAxisPointerModel = baseTooltipModel.getModel('axisPointer');\n var volatileOption = {};\n\n each(\n [\n 'type', 'snap', 'lineStyle', 'shadowStyle', 'label',\n 'animation', 'animationDurationUpdate', 'animationEasingUpdate', 'z'\n ],\n function (field) {\n volatileOption[field] = zrUtil.clone(tooltipAxisPointerModel.get(field));\n }\n );\n\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 volatileOption.snap = axis.type !== 'category' && !!triggerTooltip;\n\n // Compatibel with previous behavior, tooltip axis do not show label by default.\n // Only these properties can be overrided from tooltip to axisPointer.\n if (tooltipAxisPointerModel.get('type') === 'cross') {\n volatileOption.type = 'line';\n }\n var labelOption = volatileOption.label || (volatileOption.label = {});\n // Follow the convention, do not show label when triggered by tooltip by default.\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;\n // If triggerTooltip, this is a base axis, which should better not use cross style\n // (cross style is dashed by default)\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(\n 'axisPointer',\n new Model(volatileOption, globalAxisPointerModel, ecModel)\n );\n}\n\nfunction collectSeriesInfo(result, ecModel) {\n // Prepare data for axis trigger\n ecModel.eachSeries(function (seriesModel) {\n\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 if (!coordSys\n || seriesTooltipTrigger === 'none'\n || seriesTooltipTrigger === false\n || seriesTooltipTrigger === 'item'\n || seriesTooltipShow === false\n || seriesModel.get('axisPointer.show', true) === false\n ) {\n return;\n }\n\n each(result.coordSysAxesInfo[makeKey(coordSys.model)], function (axisInfo) {\n var axis = axisInfo.axis;\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\n }, this);\n}\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 */\nfunction getLinkGroupIndex(linksOption, axis) {\n var axisModel = axis.model;\n var dim = axis.dim;\n for (var i = 0; i < linksOption.length; i++) {\n var linkOption = linksOption[i] || {};\n if (checkPropInLink(linkOption[dim + 'AxisId'], axisModel.id)\n || checkPropInLink(linkOption[dim + 'AxisIndex'], axisModel.componentIndex)\n || checkPropInLink(linkOption[dim + 'AxisName'], axisModel.name)\n ) {\n return i;\n }\n }\n}\n\nfunction checkPropInLink(linkPropValue, axisPropValue) {\n return linkPropValue === 'all'\n || (zrUtil.isArray(linkPropValue) && zrUtil.indexOf(linkPropValue, axisPropValue) >= 0)\n || linkPropValue === axisPropValue;\n}\n\nexport function fixValue(axisModel) {\n var axisInfo = getAxisInfo(axisModel);\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');\n\n // Parse init value for category and time axis.\n if (value != null) {\n value = scale.parse(value);\n }\n\n var useHandle = isHandleTrigger(axisPointerModel);\n // If `handle` used, `axisPointer` will always be displayed, so value\n // and status should be initialized.\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\n // 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 ) {\n // Make handle displayed on the end of the axis when init, which looks better.\n value = extent[1];\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\nexport function getAxisInfo(axisModel) {\n var coordSysAxesInfo = (axisModel.ecModel.getComponent('axisPointer') || {}).coordSysAxesInfo;\n return coordSysAxesInfo && coordSysAxesInfo.axesInfo[makeKey(axisModel)];\n}\n\nexport function 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/**\n * @param {module:echarts/model/Model} model\n * @return {string} unique key\n */\nexport function makeKey(model) {\n return model.type + '||' + model.id;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {__DEV__} from '../../config';\nimport * as echarts from '../../echarts';\nimport * as axisPointerModelHelper from '../axisPointer/modelHelper';\n\n/**\n * Base class of AxisView.\n */\nvar AxisView = echarts.extendComponentView({\n\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\n AxisView.superApply(this, 'render', arguments);\n\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});\n\nfunction updateAxisPointer(axisView, axisModel, ecModel, api, payload, forceRender) {\n var Clazz = AxisView.getAxisPointerClass(axisView.axisPointerClass);\n if (!Clazz) {\n return;\n }\n var axisPointerModel = axisPointerModelHelper.getAxisPointerModel(axisModel);\n axisPointerModel\n ? (axisView._axisPointer || (axisView._axisPointer = new Clazz()))\n .render(axisModel, axisPointerModel, api, forceRender)\n : 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 if (__DEV__) {\n if (axisPointerClazz[type]) {\n throw new Error('axisPointer ' + type + ' exists');\n }\n }\n axisPointerClazz[type] = clazz;\n};\n\nAxisView.getAxisPointerClass = function (type) {\n return type && axisPointerClazz[type];\n};\n\nexport default AxisView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\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 */\nexport function 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\n var rawAxisPosition = axis.position;\n var axisPosition = otherAxisOnZeroOf ? 'onZero' : rawAxisPosition;\n var axisDim = axis.dim;\n\n var rect = grid.getRect();\n var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height];\n var idx = {left: 0, right: 1, top: 0, bottom: 1, onZero: 2};\n var axisOffset = axisModel.get('offset') || 0;\n\n var posBound = axisDim === 'x'\n ? [rectBound[2] - axisOffset, rectBound[3] + axisOffset]\n : [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 }\n\n // Axis position\n layout.position = [\n axisDim === 'y' ? posBound[idx[axisPosition]] : rectBound[0],\n axisDim === 'x' ? posBound[idx[axisPosition]] : rectBound[3]\n ];\n\n // Axis rotation\n layout.rotation = Math.PI / 2 * (axisDim === 'x' ? 0 : 1);\n\n // Tick and label direction, x y is axisDim\n var dirMap = {top: -1, bottom: 1, left: -1, 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 if (zrUtil.retrieve(opt.labelInside, axisModel.get('axisLabel.inside'))) {\n layout.labelDirection = -layout.labelDirection;\n }\n\n // Special label rotation\n var labelRotate = axisModel.get('axisLabel.rotate');\n layout.labelRotate = axisPosition === 'top' ? -labelRotate : labelRotate;\n\n // Over splitLine and splitArea\n layout.z2 = 1;\n\n return 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\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../../util/graphic';\n\n\nexport function 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\n var gridRect = gridModel.coordinateSystem.getRect();\n\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitAreaModel,\n clamp: true\n });\n\n if (!ticksCoords.length) {\n return;\n }\n\n // For Making appropriate splitArea animation, the color and anid\n // should be corresponding to previous one if possible.\n var areaColorsLen = areaColors.length;\n var lastSplitAreaColors = axisView.__splitAreaColors;\n var newSplitAreaColors = zrUtil.createHashMap();\n var colorIndex = 0;\n if (lastSplitAreaColors) {\n for (var i = 0; i < ticksCoords.length; i++) {\n var cIndex = lastSplitAreaColors.get(ticksCoords[i].tickValue);\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\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\n var x;\n var y;\n var width;\n var height;\n if (axis.isHorizontal()) {\n x = prev;\n y = gridRect.y;\n width = tickCoord - x;\n height = gridRect.height;\n prev = x + width;\n }\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\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\n colorIndex = (colorIndex + 1) % areaColorsLen;\n }\n\n axisView.__splitAreaColors = newSplitAreaColors;\n}\n\nexport function rectCoordAxisHandleRemove(axisView) {\n axisView.__splitAreaColors = null;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../../util/graphic';\nimport AxisBuilder from './AxisBuilder';\nimport AxisView from './AxisView';\nimport * as cartesianAxisHelper from '../../coord/cartesian/cartesianAxisHelper';\nimport {rectCoordAxisBuildSplitArea, rectCoordAxisHandleRemove} from './axisSplitHelper';\n\nvar axisBuilderAttrs = [\n 'axisLine', 'axisTickLabel', 'axisName'\n];\nvar selfBuilderAttrs = [\n 'splitArea', 'splitLine', 'minorSplitLine'\n];\n\nvar CartesianAxisView = AxisView.extend({\n\n type: 'cartesianAxis',\n\n axisPointerClass: 'CartesianAxisPointer',\n\n /**\n * @override\n */\n render: function (axisModel, ecModel, api, payload) {\n\n this.group.removeAll();\n\n var oldAxisGroup = this._axisGroup;\n this._axisGroup = new graphic.Group();\n\n this.group.add(this._axisGroup);\n\n if (!axisModel.get('show')) {\n return;\n }\n\n var gridModel = axisModel.getCoordSysModel();\n\n var layout = cartesianAxisHelper.layout(gridModel, axisModel);\n\n var axisBuilder = new AxisBuilder(axisModel, layout);\n\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\n graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);\n\n CartesianAxisView.superCall(this, 'render', axisModel, ecModel, api, payload);\n },\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\n lineColors = zrUtil.isArray(lineColors) ? lineColors : [lineColors];\n\n var gridRect = gridModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n\n var lineCount = 0;\n\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitLineModel\n });\n\n var p1 = [];\n var p2 = [];\n\n var lineStyle = lineStyleModel.getLineStyle();\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 }\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 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\n var minorSplitLineModel = axisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n\n var gridRect = gridModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n\n var minorTicksCoords = axis.getMinorTicksCoords();\n if (!minorTicksCoords.length) {\n return;\n }\n var p1 = [];\n var p2 = [];\n\n var lineStyle = lineStyleModel.getLineStyle();\n\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 }\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});\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\nimport '../coord/cartesian/AxisModel';\nimport './axis/CartesianAxisView';","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../util/graphic';\n\nimport '../coord/cartesian/Grid';\nimport './axis';\n\n// Grid view\necharts.extendComponentView({\n\n type: 'grid',\n\n render: function (gridModel, ecModel) {\n this.group.removeAll();\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\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* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../echarts';\n\nimport './line/LineSeries';\nimport './line/LineView';\nimport visualSymbol from '../visual/symbol';\nimport layoutPoints from '../layout/points';\nimport dataSample from '../processor/dataSample';\n\n// In case developer forget to include grid component\nimport '../component/gridSimple';\n\necharts.registerVisual(visualSymbol('line', 'circle', 'line'));\necharts.registerLayout(layoutPoints('line'));\n\n// Down sample after filter\necharts.registerProcessor(\n echarts.PRIORITY.PROCESSOR.STATISTIC,\n dataSample('line')\n);\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport SeriesModel from '../../model/Series';\nimport createListFromArray from '../helper/createListFromArray';\n\nexport default SeriesModel.extend({\n\n type: 'series.__base_bar__',\n\n getInitialData: function (option, ecModel) {\n return createListFromArray(this.getSource(), this, {useEncodeDefaulter: true});\n },\n\n getMarkerPosition: function (value) {\n var coordSys = this.coordinateSystem;\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 return [NaN, NaN];\n },\n\n defaultOption: {\n zlevel: 0, // 一级层叠\n z: 2, // 二级层叠\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n // stack: null\n\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n\n // 最小高度改为0\n barMinHeight: 0,\n // 最小角度为0仅对极坐标系下的柱状图有效\n barMinAngle: 0,\n // cursor: null,\n\n large: false,\n largeThreshold: 400,\n progressive: 3e3,\n progressiveChunkMode: 'mod',\n\n // barMaxWidth: null,\n\n // In cartesian, the default value is 1. Otherwise null.\n // barMinWidth: null,\n\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* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport BaseBarSeries from './BaseBarSeries';\n\nexport default BaseBarSeries.extend({\n\n type: 'series.bar',\n\n dependencies: ['grid', 'polar'],\n\n brushSelector: 'rect',\n\n /**\n * @override\n */\n getProgressive: function () {\n // Do not support progressive in normal mode.\n return this.get('large')\n ? this.get('progressive')\n : 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 if (largeThreshold > progressiveThreshold) {\n progressiveThreshold = largeThreshold;\n }\n return progressiveThreshold;\n },\n\n defaultOption: {\n // If clipped\n // Only available on cartesian2d\n clip: true,\n\n // If use caps on two sides of bars\n // Only available on tangential polar bar\n roundCap: false,\n\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as graphic from '../../util/graphic';\nimport {getDefaultLabel} from '../helper/labelHelper';\n\nexport function setLabel(\n normalStyle, hoverStyle, itemModel, color, seriesModel, dataIndex, labelPositionOutside\n) {\n var labelModel = itemModel.getModel('label');\n var hoverLabelModel = itemModel.getModel('emphasis.label');\n\n graphic.setLabelStyle(\n normalStyle, hoverStyle, labelModel, hoverLabelModel,\n {\n labelFetcher: seriesModel,\n labelDataIndex: dataIndex,\n defaultText: getDefaultLabel(seriesModel.getData(), dataIndex),\n isRectText: true,\n autoColor: color\n }\n );\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport makeStyleMapper from '../../model/mixin/makeStyleMapper';\n\nvar getBarItemStyle = makeStyleMapper(\n [\n ['fill', 'color'],\n ['stroke', 'borderColor'],\n ['lineWidth', 'borderWidth'],\n // Compatitable with 2\n ['stroke', 'barBorderColor'],\n ['lineWidth', 'barBorderWidth'],\n ['opacity'],\n ['shadowBlur'],\n ['shadowOffsetX'],\n ['shadowOffsetY'],\n ['shadowColor']\n ]\n);\n\nexport default {\n getBarItemStyle: function (excludes) {\n var style = getBarItemStyle(this, excludes);\n if (this.getBorderLineDash) {\n var lineDash = this.getBorderLineDash();\n lineDash && (style.lineDash = lineDash);\n }\n return style;\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\nimport {extendShape} from '../graphic';\n\n/**\n * Sausage: similar to sector, but have half circle on both sides\n * @public\n */\nexport default extendShape({\n\n type: 'sausage',\n\n shape: {\n\n cx: 0,\n\n cy: 0,\n\n r0: 0,\n\n r: 0,\n\n startAngle: 0,\n\n endAngle: Math.PI * 2,\n\n clockwise: true\n },\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\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\n var lessThanCircle = clockwise\n ? endAngle - startAngle < Math.PI * 2\n : startAngle - endAngle < Math.PI * 2;\n\n if (lessThanCircle) {\n ctx.moveTo(unitStartX * r0 + x, unitStartY * r0 + y);\n\n ctx.arc(\n unitStartX * rCenter + x, unitStartY * rCenter + y, dr,\n -Math.PI + startAngle, startAngle, !clockwise\n );\n }\n\n ctx.arc(x, y, r, startAngle, endAngle, !clockwise);\n\n ctx.moveTo(unitEndX * r + x, unitEndY * r + y);\n\n ctx.arc(\n unitEndX * rCenter + x, unitEndY * rCenter + y, dr,\n endAngle - Math.PI * 2, endAngle - Math.PI, !clockwise\n );\n\n if (r0 !== 0) {\n ctx.arc(x, y, r0, endAngle, startAngle, clockwise);\n\n ctx.moveTo(unitStartX * r0 + x, unitEndY * r0 + y);\n }\n\n ctx.closePath();\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\nimport {__DEV__} from '../../config';\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../../util/graphic';\nimport {setLabel} from './helper';\nimport Model from '../../model/Model';\nimport barItemStyle from './barItemStyle';\nimport Path from 'zrender/src/graphic/Path';\nimport Group from 'zrender/src/container/Group';\nimport {throttle} from '../../util/throttle';\nimport {createClipPath} from '../helper/createClipPathFromCoordSys';\nimport Sausage from '../../util/shape/sausage';\n\nvar BAR_BORDER_WIDTH_QUERY = ['itemStyle', 'barBorderWidth'];\nvar _eventPos = [0, 0];\n\n// FIXME\n// Just for compatible with ec2.\nzrUtil.extend(Model.prototype, barItemStyle);\n\nfunction getClipArea(coord, data) {\n var coordSysClipArea = coord.getArea && coord.getArea();\n if (coord.type === 'cartesian2d') {\n var baseAxis = coord.getBaseAxis();\n // When boundaryGap is false or using time axis. bar may exceed the grid.\n // We should not clip this part.\n // See test/bar2.html\n if (baseAxis.type !== 'category' || !baseAxis.onBand) {\n var expandWidth = data.getLayout('bandWidth');\n if (baseAxis.isHorizontal()) {\n coordSysClipArea.x -= expandWidth;\n coordSysClipArea.width += expandWidth * 2;\n }\n else {\n coordSysClipArea.y -= expandWidth;\n coordSysClipArea.height += expandWidth * 2;\n }\n }\n }\n\n return coordSysClipArea;\n}\n\nexport default echarts.extendChartView({\n\n type: 'bar',\n\n render: function (seriesModel, ecModel, api) {\n this._updateDrawMode(seriesModel);\n\n var coordinateSystemType = seriesModel.get('coordinateSystem');\n\n if (coordinateSystemType === 'cartesian2d'\n || coordinateSystemType === 'polar'\n ) {\n this._isLargeDraw\n ? this._renderLarge(seriesModel, ecModel, api)\n : this._renderNormal(seriesModel, ecModel, api);\n }\n else if (__DEV__) {\n console.warn('Only cartesian2d and polar supported for bar.');\n }\n\n return this.group;\n },\n\n incrementalPrepareRender: function (seriesModel, ecModel, api) {\n this._clear();\n this._updateDrawMode(seriesModel);\n },\n\n incrementalRender: function (params, seriesModel, ecModel, api) {\n // Do not support progressive in normal mode.\n this._incrementalRenderLarge(params, seriesModel);\n },\n\n _updateDrawMode: function (seriesModel) {\n var isLargeDraw = seriesModel.pipelineContext.large;\n if (this._isLargeDraw == null || isLargeDraw ^ this._isLargeDraw) {\n this._isLargeDraw = isLargeDraw;\n this._clear();\n }\n },\n\n _renderNormal: function (seriesModel, ecModel, api) {\n var group = this.group;\n var data = seriesModel.getData();\n var oldData = this._data;\n\n var coord = seriesModel.coordinateSystem;\n var baseAxis = coord.getBaseAxis();\n var isHorizontalOrRadial;\n\n if (coord.type === 'cartesian2d') {\n isHorizontalOrRadial = baseAxis.isHorizontal();\n }\n else if (coord.type === 'polar') {\n isHorizontalOrRadial = baseAxis.dim === 'angle';\n }\n\n var animationModel = seriesModel.isAnimationEnabled() ? seriesModel : null;\n\n var needsClip = seriesModel.get('clip', true);\n var coordSysClipArea = getClipArea(coord, data);\n // If there is clipPath created in large mode. Remove it.\n group.removeClipPath();\n // We don't use clipPath in normal mode because we needs a perfect animation\n // And don't want the label are clipped.\n\n var roundCap = seriesModel.get('roundCap', true);\n\n var drawBackground = seriesModel.get('showBackground', true);\n var backgroundModel = seriesModel.getModel('backgroundStyle');\n var barBorderRadius = backgroundModel.get('barBorderRadius') || 0;\n\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());\n // Only cartesian2d support borderRadius.\n if (coord.type === 'cartesian2d') {\n bgEl.setShape('r', barBorderRadius);\n }\n bgEls[dataIndex] = bgEl;\n return bgEl;\n };\n\n data.diff(oldData)\n .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 }\n\n // If dataZoom in filteMode: 'empty', the baseValue can be set as NaN in \"axisProxy\".\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 if (isClipped) {\n group.remove(el);\n return;\n }\n }\n\n var el = elementCreator[coord.type](\n dataIndex, layout, isHorizontalOrRadial, animationModel, false, roundCap\n );\n data.setItemGraphicEl(dataIndex, el);\n group.add(el);\n\n updateStyle(\n el, data, dataIndex, itemModel, layout,\n seriesModel, isHorizontalOrRadial, coord.type === 'polar'\n );\n })\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 if (oldBgEls.length === 0) {\n bgEl = createBackground(oldIndex);\n }\n else {\n bgEl = oldBgEls[oldIndex];\n bgEl.useStyle(backgroundModel.getBarItemStyle());\n // Only cartesian2d support borderRadius.\n if (coord.type === 'cartesian2d') {\n bgEl.setShape('r', barBorderRadius);\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, { shape: shape }, animationModel, newIndex);\n }\n\n var el = oldData.getItemGraphicEl(oldIndex);\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 if (isClipped) {\n group.remove(el);\n return;\n }\n }\n\n if (el) {\n graphic.updateProps(el, {shape: layout}, animationModel, newIndex);\n }\n else {\n el = elementCreator[coord.type](\n newIndex, layout, isHorizontalOrRadial, animationModel, true, roundCap\n );\n }\n\n data.setItemGraphicEl(newIndex, el);\n // Add back\n group.add(el);\n\n updateStyle(\n el, data, newIndex, itemModel, layout,\n seriesModel, isHorizontalOrRadial, coord.type === 'polar'\n );\n })\n .remove(function (dataIndex) {\n var el = oldData.getItemGraphicEl(dataIndex);\n if (coord.type === 'cartesian2d') {\n el && removeRect(dataIndex, animationModel, el);\n }\n else {\n el && removeSector(dataIndex, animationModel, el);\n }\n })\n .execute();\n\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 group.add(bgGroup);\n this._backgroundEls = bgEls;\n\n this._data = data;\n },\n\n _renderLarge: function (seriesModel, ecModel, api) {\n this._clear();\n createLarge(seriesModel, this.group);\n\n // Use clipPath in large mode.\n var clipPath = seriesModel.get('clip', true)\n ? createClipPath(seriesModel.coordinateSystem, false, seriesModel)\n : null;\n if (clipPath) {\n this.group.setClipPath(clipPath);\n }\n else {\n this.group.removeClipPath();\n }\n },\n\n _incrementalRenderLarge: function (params, seriesModel) {\n this._removeBackground();\n createLarge(seriesModel, this.group, true);\n },\n\n dispose: zrUtil.noop,\n\n remove: function (ecModel) {\n this._clear(ecModel);\n },\n\n _clear: function (ecModel) {\n var group = this.group;\n var data = this._data;\n if (ecModel && ecModel.get('animation') && data && !this._isLargeDraw) {\n this._removeBackground();\n this._backgroundEls = [];\n\n data.eachItemGraphicEl(function (el) {\n if (el.type === 'sector') {\n removeSector(el.dataIndex, ecModel, el);\n }\n else {\n removeRect(el.dataIndex, ecModel, el);\n }\n });\n }\n else {\n group.removeAll();\n }\n this._data = null;\n },\n\n _removeBackground: function () {\n this.group.remove(this._backgroundGroup);\n this._backgroundGroup = null;\n }\n\n});\n\nvar mathMax = Math.max;\nvar mathMin = Math.min;\n\nvar clip = {\n cartesian2d: function (coordSysBoundingRect, layout) {\n var signWidth = layout.width < 0 ? -1 : 1;\n var signHeight = layout.height < 0 ? -1 : 1;\n // Needs positive width and height\n if (signWidth < 0) {\n layout.x += layout.width;\n layout.width = -layout.width;\n }\n if (signHeight < 0) {\n layout.y += layout.height;\n layout.height = -layout.height;\n }\n\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\n layout.x = x;\n layout.y = y;\n layout.width = x2 - x;\n layout.height = y2 - y;\n\n var clipped = layout.width < 0 || layout.height < 0;\n\n // Reverse back\n if (signWidth < 0) {\n layout.x += layout.width;\n layout.width = -layout.width;\n }\n if (signHeight < 0) {\n layout.y += layout.height;\n layout.height = -layout.height;\n }\n\n return clipped;\n },\n\n polar: function (coordSysClipArea, layout) {\n var signR = layout.r0 <= layout.r ? 1 : -1;\n // Make sure r is larger than r0\n if (signR < 0) {\n var 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\n layout.r = r;\n layout.r0 = r0;\n\n var clipped = r - r0 < 0;\n\n // Reverse back\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};\n\nvar elementCreator = {\n\n cartesian2d: function (\n dataIndex, layout, isHorizontal,\n animationModel, isUpdate\n ) {\n var rect = new graphic.Rect({\n shape: zrUtil.extend({}, layout),\n z2: 1\n });\n\n rect.name = 'item';\n\n // Animation\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\n polar: function (\n dataIndex, layout, isRadial,\n animationModel, isUpdate, roundCap\n ) {\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\n var ShapeClass = (!isRadial && roundCap) ? Sausage : graphic.Sector;\n\n var sector = new ShapeClass({\n shape: zrUtil.defaults({clockwise: clockwise}, layout),\n z2: 1\n });\n\n sector.name = 'item';\n\n // Animation\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;\n\n // fix layout with lineWidth\n var signX = layout.width > 0 ? 1 : -1;\n var signY = layout.height > 0 ? 1 : -1;\n return {\n x: layout.x + signX * fixedLineWidth / 2,\n y: layout.y + signY * fixedLineWidth / 2,\n width: layout.width - signX * fixedLineWidth,\n height: layout.height - signY * fixedLineWidth\n };\n },\n\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\n && layout.endAngle != null\n && layout.startAngle === layout.endAngle;\n}\n\nfunction updateStyle(\n el, data, dataIndex, itemModel, layout, seriesModel, isHorizontal, isPolar\n) {\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 {\n stroke: isZeroOnPolar(layout) ? 'none' : stroke,\n fill: isZeroOnPolar(layout) ? 'none' : color,\n opacity: opacity\n },\n itemStyleModel.getBarItemStyle()\n ));\n\n var cursorStyle = itemModel.getShallow('cursor');\n cursorStyle && el.attr('cursor', cursorStyle);\n\n var labelPositionOutside = isHorizontal\n ? (layout.height > 0 ? 'bottom' : 'top')\n : (layout.width > 0 ? 'left' : 'right');\n\n if (!isPolar) {\n setLabel(\n el.style, hoverStyle, itemModel, color,\n seriesModel, dataIndex, labelPositionOutside\n );\n }\n if (isZeroOnPolar(layout)) {\n hoverStyle.fill = hoverStyle.stroke = 'none';\n }\n graphic.setHoverStyle(el, hoverStyle);\n}\n\n// In case width or height are too small.\nfunction getLineWidth(itemModel, rawLayout) {\n var lineWidth = itemModel.get(BAR_BORDER_WIDTH_QUERY) || 0;\n // width or height may be NaN for empty data\n var width = isNaN(rawLayout.width) ? Number.MAX_VALUE : Math.abs(rawLayout.width);\n var height = isNaN(rawLayout.height) ? Number.MAX_VALUE : Math.abs(rawLayout.height);\n return Math.min(lineWidth, width, height);\n}\n\n\nvar LargePath = Path.extend({\n\n type: 'largeBar',\n\n shape: {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\n var largeDataIndices = data.getLayout('largeDataIndices');\n var barWidth = data.getLayout('barWidth');\n\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\n var bgEl = new LargePath({\n shape: {points: points},\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: {points: data.getLayout('largePoints')},\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);\n\n // Enable tooltip and user mouse/touch event handlers.\n el.seriesIndex = seriesModel.seriesIndex;\n\n if (!seriesModel.get('silent')) {\n el.on('mousedown', largePathUpdateDataIndex);\n el.on('mousemove', largePathUpdateDataIndex);\n }\n}\n\n// Use throttle to avoid frequently traverse to find dataIndex.\nvar largePathUpdateDataIndex = throttle(function (event) {\n var largePath = this;\n var dataIndex = largePathFindDataIndex(largePath, event.offsetX, event.offsetY);\n 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\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 if (\n barBaseVal >= baseLowerBound && barBaseVal <= baseUpperBound\n && (\n startValueVal <= barValueVal\n ? (pointerValueVal >= startValueVal && pointerValueVal <= barValueVal)\n : (pointerValueVal >= barValueVal && pointerValueVal <= startValueVal)\n )\n ) {\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\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\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 if (isPolar) {\n coordLayout = coord.getArea();\n }\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 }\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport {layout, largeLayout} from '../layout/barGrid';\n\nimport '../coord/cartesian/Grid';\nimport './bar/BarSeries';\nimport './bar/BarView';\n// In case developer forget to include grid component\nimport '../component/gridSimple';\n\n\necharts.registerLayout(echarts.PRIORITY.VISUAL.LAYOUT, zrUtil.curry(layout, 'bar'));\n// 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`.\necharts.registerLayout(echarts.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, largeLayout);\n\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\n\nimport createDimensions from '../../data/helper/createDimensions';\nimport List from '../../data/List';\nimport {extend, isArray} from 'zrender/src/core/util';\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.<string|Object>} opt opt or coordDimensions\n * The options in opt, see `echarts/data/helper/createDimensions`\n * @param {Array.<string>} [nameList]\n * @return {module:echarts/data/List}\n */\nexport default function (seriesModel, opt, nameList) {\n opt = isArray(opt) && {coordDimensions: opt} || extend({}, opt);\n\n var source = seriesModel.getSource();\n\n var dimensionsInfo = createDimensions(source, opt);\n\n var list = new List(dimensionsInfo, seriesModel);\n list.initData(source, nameList);\n\n return list;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport * as zrUtil from 'zrender/src/core/util';\n\nexport default {\n\n /**\n * @param {Array.<Object>} 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\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\n ? this._targetList[id]\n : this._selectTargetMap.get(name);\n var selectedMode = this.get('selectedMode');\n if (selectedMode === 'single') {\n this._selectTargetMap.each(function (target) {\n target.selected = false;\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\n ? this._targetList[id]\n : this._selectTargetMap.get(name);\n // var selectedMode = this.get('selectedMode');\n // selectedMode !== 'single' && target && (target.selected = false);\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\n ? this._targetList[id]\n : this._selectTargetMap.get(name);\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\n ? this._targetList[id]\n : this._selectTargetMap.get(name);\n return target && target.selected;\n }\n};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * 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();\n // 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 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\nexport default LegendVisualProvider;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport createListSimply from '../helper/createListSimply';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as modelUtil from '../../util/model';\nimport {getPercentWithPrecision} from '../../util/number';\nimport dataSelectableMixin from '../../component/helper/selectableMixin';\nimport {retrieveRawAttr} from '../../data/helper/dataProvider';\nimport {makeSeriesEncodeForNameBased} from '../../data/helper/sourceHelper';\nimport LegendVisualProvider from '../../visual/LegendVisualProvider';\n\n\nvar PieSeries = echarts.extendSeriesModel({\n\n type: 'series.pie',\n\n // Overwrite\n init: function (option) {\n PieSeries.superApply(this, 'init', arguments);\n\n // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n this.legendVisualProvider = new LegendVisualProvider(\n zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this)\n );\n\n this.updateSelectedMap(this._createSelectableList());\n\n this._defaultLabelLine(option);\n },\n\n // Overwrite\n mergeOption: function (newOption) {\n PieSeries.superCall(this, 'mergeOption', newOption);\n\n this.updateSelectedMap(this._createSelectableList());\n },\n\n getInitialData: function (option, ecModel) {\n return createListSimply(this, {\n coordDimensions: ['value'],\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this)\n });\n },\n\n _createSelectableList: function () {\n var data = this.getRawData();\n var valueDim = data.mapDimension('value');\n var targetList = [];\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 return targetList;\n },\n\n // Overwrite\n getDataParams: function (dataIndex) {\n var data = this.getData();\n var params = PieSeries.superCall(this, 'getDataParams', dataIndex);\n // FIXME toFixed?\n\n var valueList = [];\n data.each(data.mapDimension('value'), function (value) {\n valueList.push(value);\n });\n\n params.percent = getPercentWithPrecision(\n valueList,\n dataIndex,\n data.hostModel.get('percentPrecision')\n );\n\n params.$vars.push('percent');\n return params;\n },\n\n _defaultLabelLine: function (option) {\n // Extend labelLine emphasis\n modelUtil.defaultEmphasis(option, 'labelLine', ['show']);\n\n var labelLineNormalOpt = option.labelLine;\n var labelLineEmphasisOpt = option.emphasis.labelLine;\n // Not show label line if `label.normal.show = false`\n labelLineNormalOpt.show = labelLineNormalOpt.show\n && option.label.show;\n labelLineEmphasisOpt.show = labelLineEmphasisOpt.show\n && option.emphasis.label.show;\n },\n\n defaultOption: {\n zlevel: 0,\n z: 2,\n legendHoverLink: true,\n\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\n // If the angle of a sector less than `minShowLabelAngle`,\n // the label will not be displayed.\n minShowLabelAngle: 0,\n\n // 选中时扇区偏移量\n selectedOffset: 10,\n // 高亮扇区偏移量\n hoverOffset: 10,\n\n // If use strategy to avoid label overlapping\n avoidLabelOverlap: true,\n // 选择模式默认关闭可选singlemultiple\n // selectedMode: false,\n // 南丁格尔玫瑰图模式,'radius'(半径) | 'area'(面积)\n // roseType: null,\n\n percentPrecision: 2,\n\n // If still show when all data zero.\n stillShowZeroSum: true,\n\n // cursor: null,\n\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n width: null,\n height: null,\n\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\n // formatter: 标签文本格式器同Tooltip.formatter不支持异步回调\n // 默认使用全局文本样式详见TEXTSTYLE\n // distance: 当position为inner时有效为label位置到圆心的距离与圆半径(环状图为内外半径和)的比例系数\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\n // Animation type. Valid values: expansion, scale\n animationType: 'expansion',\n\n // Animation type when update. Valid values: transition, expansion\n animationTypeUpdate: 'transition',\n\n animationEasing: 'cubicOut'\n }\n});\n\nzrUtil.mixin(PieSeries, dataSelectableMixin);\n\nexport default PieSeries;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../../util/graphic';\nimport ChartView from '../../view/Chart';\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\n api.dispatchAction({\n type: 'pieToggleSelect',\n from: uid,\n name: name,\n seriesId: seriesModel.id\n });\n\n data.each(function (idx) {\n toggleItemSelected(\n data.getItemGraphicEl(idx),\n data.getItemLayout(idx),\n seriesModel.isSelected(data.getName(idx)),\n selectedOffset,\n hasAnimation\n );\n });\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 */\nfunction toggleItemSelected(el, layout, isSelected, selectedOffset, hasAnimation) {\n var midAngle = (layout.startAngle + layout.endAngle) / 2;\n\n var dx = Math.cos(midAngle);\n var dy = Math.sin(midAngle);\n\n var offset = isSelected ? selectedOffset : 0;\n var position = [dx * offset, dy * offset];\n\n hasAnimation\n // animateTo will stop revious animation like update transition\n ? el.animate()\n .when(200, {\n position: position\n })\n .start('bounceOut')\n : el.attr('position', position);\n}\n\n/**\n * Piece of pie including Sector, Label, LabelLine\n * @constructor\n * @extends {module:zrender/graphic/Group}\n */\nfunction PiePiece(data, idx) {\n\n graphic.Group.call(this);\n\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\n this.updateData(data, idx, true);\n}\n\nvar piePieceProto = PiePiece.prototype;\n\npiePieceProto.updateData = function (data, idx, firstCreate) {\n\n var sector = this.childAt(0);\n var labelLine = this.childAt(1);\n var labelText = this.childAt(2);\n\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\n var animationTypeUpdate = seriesModel.getShallow('animationTypeUpdate');\n\n if (firstCreate) {\n sector.setShape(sectorShape);\n\n var animationType = seriesModel.getShallow('animationType');\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 }\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\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 }\n else {\n // Transition animation from the old shape\n graphic.updateProps(sector, {\n shape: sectorShape\n }, seriesModel, idx);\n }\n }\n\n // Update common style\n var visualColor = data.getItemVisual(idx, 'color');\n\n sector.useStyle(\n zrUtil.defaults(\n {\n lineJoin: 'bevel',\n fill: visualColor\n },\n itemModel.getModel('itemStyle').getItemStyle()\n )\n );\n sector.hoverStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle();\n\n var cursorStyle = itemModel.getShallow('cursor');\n cursorStyle && sector.attr('cursor', cursorStyle);\n\n // Toggle selected\n toggleItemSelected(\n this,\n data.getItemLayout(idx),\n seriesModel.isSelected(data.getName(idx)),\n seriesModel.get('selectedOffset'),\n seriesModel.get('animation')\n );\n\n // Label and text animation should be applied only for transition type animation when update\n var withAnimation = !firstCreate && animationTypeUpdate === 'transition';\n this._updateLabel(data, idx, withAnimation);\n\n this.highDownOnUpdate = !seriesModel.get('silent')\n ? function (fromState, toState) {\n var hasAnimation = seriesModel.isAnimationEnabled() && itemModel.get('hoverAnimation');\n if (toState === 'emphasis') {\n labelLine.ignore = labelLine.hoverIgnore;\n labelText.ignore = labelText.hoverIgnore;\n\n // Sector may has animation of updating data. Force to move to the last frame\n // Or it may stopped on the wrong shape\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 }\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 }\n : null;\n\n graphic.setHoverStyle(this);\n};\n\npiePieceProto._updateLabel = function (data, idx, withAnimation) {\n\n var labelLine = this.childAt(1);\n var labelText = this.childAt(2);\n\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 =\n labelLine.ignore = labelLine.normalIgnore = labelLine.hoverIgnore = true;\n return;\n }\n\n var targetLineShape = {\n points: labelLayout.linePoints || [\n [labelLayout.x, labelLayout.y], [labelLayout.x, labelLayout.y], [labelLayout.x, labelLayout.y]\n ]\n };\n var targetTextStyle = {\n x: labelLayout.x,\n y: labelLayout.y\n };\n if (withAnimation) {\n graphic.updateProps(labelLine, {\n shape: targetLineShape\n }, seriesModel, idx);\n\n graphic.updateProps(labelText, {\n style: targetTextStyle\n }, seriesModel, idx);\n }\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\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\n graphic.setLabelStyle(\n labelText.style, labelText.hoverStyle = {}, labelModel, labelHoverModel,\n {\n labelFetcher: data.hostModel,\n labelDataIndex: idx,\n defaultText: labelLayout.text,\n autoColor: visualColor,\n useInsideStyle: !!labelLayout.inside\n },\n {\n textAlign: labelLayout.textAlign,\n textVerticalAlign: labelLayout.verticalAlign,\n opacity: data.getItemVisual(idx, 'opacity')\n }\n );\n\n labelText.ignore = labelText.normalIgnore = !labelModel.get('show');\n labelText.hoverIgnore = !labelHoverModel.get('show');\n\n labelLine.ignore = labelLine.normalIgnore = !labelLineModel.get('show');\n labelLine.hoverIgnore = !labelLineHoverModel.get('show');\n\n // Default use item visual color\n labelLine.setStyle({\n stroke: visualColor,\n opacity: data.getItemVisual(idx, 'opacity')\n });\n labelLine.setStyle(labelLineModel.getModel('lineStyle').getLineStyle());\n\n labelLine.hoverStyle = labelLineHoverModel.getModel('lineStyle').getLineStyle();\n\n var smooth = labelLineModel.get('smooth');\n if (smooth && smooth === true) {\n smooth = 0.4;\n }\n labelLine.setShape({\n smooth: smooth\n });\n};\n\nzrUtil.inherits(PiePiece, graphic.Group);\n\n\n// Pie view\nvar PieView = ChartView.extend({\n\n type: 'pie',\n\n init: function () {\n var sectorGroup = new graphic.Group();\n this._sectorGroup = sectorGroup;\n },\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\n var hasAnimation = ecModel.get('animation');\n var isFirstRender = !oldData;\n var animationType = seriesModel.get('animationType');\n var animationTypeUpdate = seriesModel.get('animationTypeUpdate');\n\n var onSectorClick = zrUtil.curry(\n updateDataSelected, this.uid, seriesModel, hasAnimation, api\n );\n\n var selectedMode = seriesModel.get('selectedMode');\n data.diff(oldData)\n .add(function (idx) {\n var piePiece = new PiePiece(data, idx);\n // Default expansion animation\n if (isFirstRender && animationType !== 'scale') {\n piePiece.eachChild(function (child) {\n child.stopAnimation(true);\n });\n }\n\n selectedMode && piePiece.on('click', onSectorClick);\n\n data.setItemGraphicEl(idx, piePiece);\n\n group.add(piePiece);\n })\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\n piePiece.off('click');\n selectedMode && piePiece.on('click', onSectorClick);\n group.add(piePiece);\n data.setItemGraphicEl(newIdx, piePiece);\n })\n .remove(function (idx) {\n var piePiece = oldData.getItemGraphicEl(idx);\n group.remove(piePiece);\n })\n .execute();\n\n if (\n hasAnimation && data.count() > 0\n && (isFirstRender ? animationType !== 'scale' : animationTypeUpdate !== 'transition')\n ) {\n var shape = data.getItemLayout(0);\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\n var removeClipPath = zrUtil.bind(group.removeClipPath, group);\n group.setClipPath(this._createClipPath(\n shape.cx, shape.cy, r, shape.startAngle, shape.clockwise, removeClipPath, seriesModel, isFirstRender\n ));\n }\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\n dispose: function () {},\n\n _createClipPath: function (\n cx, cy, r, startAngle, clockwise, cb, seriesModel, isFirstRender\n ) {\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\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\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 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\n});\n\nexport default PieView;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\n\nexport default function (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 echarts.registerAction(actionInfo, function (payload, ecModel) {\n var selected = {};\n ecModel.eachComponent(\n {mainType: 'series', subType: seriesType, query: payload},\n function (seriesModel) {\n if (seriesModel[actionInfo.method]) {\n seriesModel[actionInfo.method](\n payload.name,\n payload.dataIndex\n );\n }\n var data = seriesModel.getData();\n // Create selected map\n data.each(function (idx) {\n var name = data.getName(idx);\n selected[name] = seriesModel.isSelected(name)\n || false;\n });\n }\n );\n return {\n name: payload.name,\n selected: selected,\n seriesId: payload.seriesId\n };\n });\n });\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n// 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).\nimport {createHashMap} from 'zrender/src/core/util';\n\nexport default function (seriesType) {\n return {\n getTargetSeries: function (ecModel) {\n // Pie and funnel may use diferrent scope\n var paletteScope = {};\n var seiresModelMap = createHashMap();\n\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n seriesModel.__paletteScope = paletteScope;\n seiresModelMap.set(seriesModel.uid, seriesModel);\n });\n\n return seiresModelMap;\n },\n reset: function (seriesModel, ecModel) {\n var dataAll = seriesModel.getRawData();\n var idxMap = {};\n var data = seriesModel.getData();\n\n data.each(function (idx) {\n var rawIdx = data.getRawIndex(idx);\n idxMap[rawIdx] = idx;\n });\n\n dataAll.each(function (rawIdx) {\n var filteredIdx = idxMap[rawIdx];\n\n // If series.itemStyle.normal.color is a function. itemVisual may be encoded\n var singleDataColor = filteredIdx != null\n && data.getItemVisual(filteredIdx, 'color', true);\n\n var singleDataBorderColor = filteredIdx != null\n && data.getItemVisual(filteredIdx, 'borderColor', true);\n\n var itemModel;\n if (!singleDataColor || !singleDataBorderColor) {\n // FIXME Performance\n itemModel = dataAll.getItemModel(rawIdx);\n }\n\n if (!singleDataColor) {\n var color = itemModel.get('itemStyle.color')\n || seriesModel.getColorFromPalette(\n dataAll.getName(rawIdx) || (rawIdx + ''), seriesModel.__paletteScope,\n dataAll.count()\n );\n // Data is not filtered\n if (filteredIdx != null) {\n data.setItemVisual(filteredIdx, 'color', color);\n }\n }\n\n if (!singleDataBorderColor) {\n var borderColor = itemModel.get('itemStyle.borderColor');\n\n // Data is not filtered\n if (filteredIdx != null) {\n data.setItemVisual(filteredIdx, 'borderColor', borderColor);\n }\n }\n });\n }\n };\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n// FIXME emphasis label position is not same with normal label position\n\nimport * as textContain from 'zrender/src/contain/text';\nimport {parsePercent} from '../../util/number';\n\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 if (j > start\n && j + 1 < end\n && list[j + 1].y > list[j].y + list[j].height\n ) {\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 if (j > 0\n && list[j].y > list[j - 1].y + list[j - 1].height\n ) {\n break;\n }\n }\n }\n\n function changeX(list, isDownList, cx, cy, r, dir) {\n var lastDeltaX = dir > 0\n ? 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)\n ? Math.sqrt(\n (r + length + length2) * (r + length + length2)\n - deltaY * deltaY\n )\n : Math.abs(list[i].x - cx);\n if (isDownList && deltaX >= lastDeltaX) {\n // right-down, left-down\n deltaX = lastDeltaX - 10;\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 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 if (delta < 0) {\n shiftDown(i, len, -delta, dir);\n }\n lastY = list[i].y + list[i].height;\n }\n if (viewHeight - lastY < 0) {\n shiftUp(len - 1, lastY - viewHeight);\n }\n for (var i = 0; i < len; i++) {\n if (list[i].y >= cy) {\n downList.push(list[i]);\n }\n else {\n upList.push(list[i]);\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 for (var i = 0; i < labelLayoutList.length; i++) {\n if (isPositionCenter(labelLayoutList[i])) {\n continue;\n }\n if (labelLayoutList[i].x < cx) {\n leftmostX = Math.min(leftmostX, labelLayoutList[i].x);\n leftList.push(labelLayoutList[i]);\n }\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 if (isPositionCenter(layout)) {\n continue;\n }\n\n var linePoints = layout.linePoints;\n if (linePoints) {\n var isAlignToEdge = layout.labelAlignTo === 'edge';\n\n var realTextWidth = layout.textRect.width;\n var targetTextWidth;\n if (isAlignToEdge) {\n if (layout.x < cx) {\n targetTextWidth = linePoints[2][0] - layout.labelDistance\n - viewLeft - layout.labelMargin;\n }\n else {\n targetTextWidth = viewLeft + viewWidth - layout.labelMargin\n - linePoints[2][0] - layout.labelDistance;\n }\n }\n else {\n if (layout.x < cx) {\n targetTextWidth = layout.x - viewLeft - layout.bleedMargin;\n }\n else {\n targetTextWidth = viewLeft + viewWidth - layout.x - layout.bleedMargin;\n }\n }\n if (targetTextWidth < layout.textRect.width) {\n layout.text = textContain.truncateText(layout.text, targetTextWidth, layout.font);\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 if (isAlignToEdge) {\n if (layout.x < cx) {\n linePoints[2][0] = viewLeft + layout.labelMargin + realTextWidth + layout.labelDistance;\n }\n else {\n linePoints[2][0] = viewLeft + viewWidth - layout.labelMargin\n - realTextWidth - layout.labelDistance;\n }\n }\n else {\n if (layout.x < cx) {\n linePoints[2][0] = layout.x + layout.labelDistance;\n }\n else {\n linePoints[2][0] = layout.x - layout.labelDistance;\n }\n linePoints[1][0] = linePoints[2][0] + dist;\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\nexport default function (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\n data.each(function (idx) {\n var layout = data.getItemLayout(idx);\n\n var itemModel = data.getItemModel(idx);\n var labelModel = itemModel.getModel('label');\n // Use position in normal or emphasis\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\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\n var textX;\n var textY;\n var linePoints;\n var textAlign;\n\n cx = layout.cx;\n cy = layout.cy;\n\n var text = seriesModel.getFormattedLabel(idx, 'normal')\n || data.getName(idx);\n var textRect = textContain.getBoundingRect(\n text, font, textAlign, 'top'\n );\n\n var isLabelInside = labelPosition === 'inside' || labelPosition === 'inner';\n if (labelPosition === 'center') {\n textX = layout.cx;\n textY = layout.cy;\n textAlign = 'center';\n }\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\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\n ? viewLeft + labelMargin\n : viewLeft + viewWidth - labelMargin;\n }\n else {\n textX = x3 + (dx < 0 ? -labelDistance : labelDistance);\n }\n textY = y3;\n linePoints = [[x1, y1], [x2, y2], [x3, y3]];\n }\n\n textAlign = isLabelInside\n ? 'center'\n : (labelAlignTo === 'edge'\n ? (dx > 0 ? 'right' : 'left')\n : (dx > 0 ? 'left' : 'right'));\n }\n\n var labelRotate;\n var rotate = labelModel.get('rotate');\n if (typeof rotate === 'number') {\n labelRotate = rotate * (Math.PI / 180);\n }\n else {\n labelRotate = rotate\n ? (dx < 0 ? -midAngle + Math.PI : -midAngle)\n : 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 };\n\n // Not layout the inside label\n if (!isLabelInside) {\n labelLayoutList.push(layout.label);\n }\n });\n if (!hasLabelRotate && seriesModel.get('avoidLabelOverlap')) {\n avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight, viewLeft, viewTop);\n }\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport {parsePercent, linearMap} from '../../util/number';\nimport * as layout from '../../util/layout';\nimport labelLayout from './labelLayout';\nimport * as zrUtil from 'zrender/src/core/util';\n\nvar PI2 = Math.PI * 2;\nvar RADIAN = Math.PI / 180;\n\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(\n seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n }\n );\n}\n\nexport default function (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\n var center = seriesModel.get('center');\n var radius = seriesModel.get('radius');\n\n if (!zrUtil.isArray(radius)) {\n radius = [0, radius];\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\n var startAngle = -seriesModel.get('startAngle') * RADIAN;\n\n var minAngle = seriesModel.get('minAngle') * RADIAN;\n\n var validDataCount = 0;\n data.each(valueDim, function (value) {\n !isNaN(value) && validDataCount++;\n });\n\n var sum = data.getSum(valueDim);\n // Sum may be 0\n var unitRadian = Math.PI / (sum || validDataCount) * 2;\n\n var clockwise = seriesModel.get('clockwise');\n\n var roseType = seriesModel.get('roseType');\n var stillShowZeroSum = seriesModel.get('stillShowZeroSum');\n\n // [0...max]\n var extent = data.getDataExtent(valueDim);\n extent[0] = 0;\n\n // In the case some sector angle is smaller than minAngle\n var restAngle = PI2;\n var valueSumLargerThanMinAngle = 0;\n\n var currentAngle = startAngle;\n var dir = clockwise ? 1 : -1;\n\n data.each(valueDim, function (value, idx) {\n var angle;\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\n ? NaN\n : r,\n viewRect: viewRect\n });\n return;\n }\n\n // FIXME 兼容 2.0 但是 roseType 是 area 的时候才是这样?\n if (roseType !== 'area') {\n angle = (sum === 0 && stillShowZeroSum)\n ? unitRadian : (value * unitRadian);\n }\n else {\n angle = PI2 / validDataCount;\n }\n\n if (angle < minAngle) {\n angle = minAngle;\n restAngle -= minAngle;\n }\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\n ? linearMap(value, extent, [r0, r])\n : r,\n viewRect: viewRect\n });\n\n currentAngle = endAngle;\n });\n\n // Some sector is constrained by minAngle\n // Rest sectors needs recalculate angle\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 }\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\n ? 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* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nexport default function (seriesType) {\n return {\n seriesType: seriesType,\n reset: function (seriesModel, ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n if (!legendModels || !legendModels.length) {\n return;\n }\n var data = seriesModel.getData();\n data.filterSelf(function (idx) {\n var name = data.getName(idx);\n // If in any legend component the status is not selected.\n for (var i = 0; i < legendModels.length; i++) {\n if (!legendModels[i].isSelected(name)) {\n return false;\n }\n }\n return true;\n });\n }\n };\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\n\nimport './pie/PieSeries';\nimport './pie/PieView';\n\nimport createDataSelectAction from '../action/createDataSelectAction';\nimport dataColor from '../visual/dataColor';\nimport pieLayout from './pie/pieLayout';\nimport dataFilter from '../processor/dataFilter';\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}]);\n\necharts.registerVisual(dataColor('pie'));\necharts.registerLayout(zrUtil.curry(pieLayout, 'pie'));\necharts.registerProcessor(dataFilter('pie'));","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport createListFromArray from '../helper/createListFromArray';\nimport SeriesModel from '../../model/Series';\n\nexport default SeriesModel.extend({\n\n type: 'series.scatter',\n\n dependencies: ['grid', 'polar', 'geo', 'singleAxis', 'calendar'],\n\n getInitialData: function (option, ecModel) {\n return createListFromArray(this.getSource(), this, {useEncodeDefaulter: true});\n },\n\n brushSelector: 'point',\n\n getProgressive: function () {\n var progressive = this.option.progressive;\n if (progressive == null) {\n // PENDING\n return this.option.large ? 5e3 : this.get('progressive');\n }\n return progressive;\n },\n\n getProgressiveThreshold: function () {\n var progressiveThreshold = this.option.progressiveThreshold;\n if (progressiveThreshold == null) {\n // PENDING\n return this.option.large ? 1e4 : this.get('progressiveThreshold');\n }\n return progressiveThreshold;\n },\n\n defaultOption: {\n coordinateSystem: 'cartesian2d',\n zlevel: 0,\n z: 2,\n legendHoverLink: true,\n\n hoverAnimation: true,\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n\n // Polar coordinate system\n // polarIndex: 0,\n\n // Geo coordinate system\n // geoIndex: 0,\n\n // symbol: null, // 图形类型\n symbolSize: 10, // 图形大小半宽半径参数当图形为方向或菱形则总宽度为symbolSize * 2\n // symbolRotate: null, // 图形旋转控制\n\n large: false,\n // Available when large is true\n largeThreshold: 2000,\n // cursor: null,\n\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\n // color: 各异\n },\n\n // If clip the overflow graphics\n // Works on cartesian / polar series\n clip: true\n\n // progressive: null\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/* global Float32Array */\n\n// TODO Batch by color\n\nimport * as graphic from '../../util/graphic';\nimport {createSymbol} from '../../util/symbol';\nimport IncrementalDisplayable from 'zrender/src/graphic/IncrementalDisplayable';\n\nvar BOOST_SIZE_THRESHOLD = 4;\n\nvar LargeSymbolPath = graphic.extendShape({\n\n shape: {\n points: null\n },\n\n symbolProxy: null,\n\n softClipShape: null,\n\n buildPath: function (path, shape) {\n var points = shape.points;\n var size = shape.size;\n\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;\n\n // Do draw in afterBrush.\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 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\n symbolProxy.buildPath(path, symbolProxyShape, true);\n }\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);\n // PENDING If style or other canvas status changed?\n for (var i = 0; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n if (isNaN(x) || isNaN(y)) {\n continue;\n }\n if (this.softClipShape && !this.softClipShape.contain(x, y)) {\n continue;\n }\n // fillRect is faster than building a rect path and draw.\n // And it support light globalCompositeOperation.\n ctx.fillRect(\n x - size[0] / 2, y - size[1] / 2,\n size[0], size[1]\n );\n }\n\n this.restoreTransform(ctx);\n },\n\n findDataIndex: function (x, y) {\n // TODO ???\n // Consider transform\n\n var shape = this.shape;\n var points = shape.points;\n var size = shape.size;\n\n var w = Math.max(size[0], 4);\n var h = Math.max(size[1], 4);\n\n // Not consider transform\n // Treat each element as a rect\n // top down traverse\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 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/**\n * Update symbols draw by new data\n * @param {module:echarts/data/List} data\n * @param {Object} opt\n * @param {Object} [opt.clipShape]\n */\nlargeSymbolProto.updateData = function (data, opt) {\n this.group.removeAll();\n var symbolEl = new LargeSymbolPath({\n rectHover: true,\n cursor: 'default'\n });\n\n symbolEl.setShape({\n points: data.getLayout('symbolPoints')\n });\n this._setCommon(symbolEl, data, false, opt);\n this.group.add(symbolEl);\n\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 child.setShape('points', points);\n });\n};\n\nlargeSymbolProto.incrementalPrepareUpdate = function (data) {\n this.group.removeAll();\n\n this._clearIncremental();\n // Only use incremental displayables when data amount is larger than 2 million.\n // PENDING Incremental data?\n if (data.count() > 2e6) {\n if (!this._incremental) {\n this._incremental = new IncrementalDisplayable({\n silent: true\n });\n }\n this.group.add(this._incremental);\n }\n else {\n this._incremental = null;\n }\n};\n\nlargeSymbolProto.incrementalUpdate = function (taskParams, data, opt) {\n var symbolEl;\n if (this._incremental) {\n symbolEl = new LargeSymbolPath();\n this._incremental.addDisplayable(symbolEl, true);\n }\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 this._setCommon(symbolEl, data, !!this._incremental, opt);\n};\n\nlargeSymbolProto._setCommon = function (symbolEl, data, isIncremental, opt) {\n var hostModel = data.hostModel;\n\n opt = opt || {};\n // 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 var size = data.getVisual('symbolSize');\n symbolEl.setShape('size', (size instanceof Array) ? size : [size, size]);\n // }\n\n symbolEl.softClipShape = opt.clipShape || null;\n // Create symbolProxy to build path for each data\n symbolEl.symbolProxy = createSymbol(\n data.getVisual('symbol'), 0, 0, 0, 0\n );\n // Use symbolProxy setColor method\n symbolEl.setColor = symbolEl.symbolProxy.setColor;\n\n var extrudeShadow = symbolEl.shape.size[0] < BOOST_SIZE_THRESHOLD;\n symbolEl.useStyle(\n // Draw shadow when doing fillRect is extremely slow.\n hostModel.getModel('itemStyle').getItemStyle(extrudeShadow ? ['color', 'shadowBlur', 'shadowColor'] : ['color'])\n );\n\n var visualColor = data.getVisual('color');\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 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 this._incremental = null;\n this.group.removeAll();\n};\n\nlargeSymbolProto._clearIncremental = function () {\n var incremental = this._incremental;\n if (incremental) {\n incremental.clearDisplaybles();\n }\n};\n\nexport default LargeSymbolDraw;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport SymbolDraw from '../helper/SymbolDraw';\nimport LargeSymbolDraw from '../helper/LargeSymbolDraw';\n\nimport pointsLayout from '../../layout/points';\n\necharts.extendChartView({\n\n type: 'scatter',\n\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\n this._finished = true;\n },\n\n incrementalPrepareRender: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var symbolDraw = this._updateSymbolDraw(data, seriesModel);\n\n symbolDraw.incrementalPrepareUpdate(data);\n\n this._finished = false;\n },\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\n updateTransform: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n // Must mark group dirty and make sure the incremental layer will be cleared\n // PENDING\n this.group.dirty();\n\n if (!this._finished || data.count() > 1e4 || !this._symbolDraw.isPersistent()) {\n return {\n update: true\n };\n }\n else {\n var res = pointsLayout().reset(seriesModel);\n if (res.progress) {\n res.progress({ start: 0, end: data.count() }, data);\n }\n\n this._symbolDraw.updateLayout(data);\n }\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\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\n ? new LargeSymbolDraw()\n : new SymbolDraw();\n this._isLargeDraw = isLargeDraw;\n this.group.removeAll();\n }\n\n this.group.add(symbolDraw.group);\n\n return symbolDraw;\n },\n\n remove: function (ecModel, api) {\n this._symbolDraw && this._symbolDraw.remove(true);\n this._symbolDraw = null;\n },\n\n dispose: 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\nimport * as echarts from '../echarts';\n// import * as zrUtil from 'zrender/src/core/util';\n\nimport './scatter/ScatterSeries';\nimport './scatter/ScatterView';\n\nimport visualSymbol from '../visual/symbol';\nimport layoutPoints from '../layout/points';\n\n// In case developer forget to include grid component\nimport '../component/gridSimple';\n\necharts.registerVisual(visualSymbol('scatter', 'circle'));\necharts.registerLayout(layoutPoints('scatter'));\n\n// 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\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\n// data.selectRange(range);\n// });\n// });","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport Axis from '../Axis';\n\nfunction IndicatorAxis(dim, scale, radiusExtent) {\n Axis.call(this, dim, scale, radiusExtent);\n\n /**\n * Axis type\n * - 'category'\n * - 'value'\n * - 'time'\n * - 'log'\n * @type {string}\n */\n this.type = 'value';\n\n this.angle = 0;\n\n /**\n * Indicator name\n * @type {string}\n */\n this.name = '';\n /**\n * @type {module:echarts/model/Model}\n */\n this.model;\n}\n\nzrUtil.inherits(IndicatorAxis, Axis);\n\nexport default IndicatorAxis;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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// TODO clockwise\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport IndicatorAxis from './IndicatorAxis';\nimport IntervalScale from '../../scale/Interval';\nimport * as numberUtil from '../../util/number';\nimport {\n getScaleExtent,\n niceScaleExtent\n} from '../axisHelper';\nimport CoordinateSystem from '../../CoordinateSystem';\nimport LogScale from '../../scale/Log';\n\nfunction Radar(radarModel, ecModel, api) {\n\n this._model = radarModel;\n /**\n * Radar dimensions\n * @type {Array.<string>}\n */\n this.dimensions = [];\n\n this._indicatorAxes = zrUtil.map(radarModel.getIndicatorModels(), function (indicatorModel, idx) {\n var dim = 'indicator_' + idx;\n var indicatorAxis = new IndicatorAxis(dim,\n (indicatorModel.get('axisType') === 'log') ? new LogScale() : new IntervalScale());\n indicatorAxis.name = indicatorModel.get('name');\n // Inject model and axis\n indicatorAxis.model = indicatorModel;\n indicatorModel.axis = indicatorAxis;\n this.dimensions.push(dim);\n return indicatorAxis;\n }, this);\n\n this.resize(radarModel, api);\n\n /**\n * @type {number}\n * @readOnly\n */\n this.cx;\n /**\n * @type {number}\n * @readOnly\n */\n this.cy;\n /**\n * @type {number}\n * @readOnly\n */\n this.r;\n /**\n * @type {number}\n * @readOnly\n */\n this.r0;\n /**\n * @type {number}\n * @readOnly\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\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\n var radian = Math.atan2(-dy, dx);\n\n // Find the closest angle\n // FIXME index can calculated directly\n var minRadianDiff = Infinity;\n var closestAxis;\n var closestAxisIdx = -1;\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 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\n this.startAngle = radarModel.get('startAngle') * Math.PI / 180;\n\n // radius may be single value like `20`, `'80%'`, or array like `[10, '80%']`\n var radius = radarModel.get('radius');\n if (typeof radius === 'string' || typeof radius === 'number') {\n radius = [0, radius];\n }\n this.r0 = numberUtil.parsePercent(radius[0], viewSize);\n this.r = numberUtil.parsePercent(radius[1], viewSize);\n\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);\n // Normalize to [-PI, PI]\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'\n || ecModel.getComponent('radar', radarSeries.get('radarIndex')) !== radarModel\n ) {\n return;\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\n var splitNumber = radarModel.get('splitNumber');\n\n function increaseInterval(interval) {\n var exp10 = Math.pow(10, Math.floor(Math.log(interval) / Math.LN10));\n // Increase interval\n var f = interval / exp10;\n if (f === 2) {\n f = 5;\n }\n else { // f is 2 or 5\n f *= 2;\n }\n return f * exp10;\n }\n // Force all the axis fixing the maxSplitNumber.\n zrUtil.each(indicatorAxes, function (indicatorAxis, idx) {\n var rawExtent = getScaleExtent(indicatorAxis.scale, indicatorAxis.model).extent;\n niceScaleExtent(indicatorAxis.scale, indicatorAxis.model);\n\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\n if (fixedMin != null && fixedMax != null) {\n // User set min, max, divide to get new interval\n scale.setExtent(+fixedMin, +fixedMax);\n scale.setInterval(\n (fixedMax - fixedMin) / splitNumber\n );\n }\n else if (fixedMin != null) {\n var max;\n // User set min, expand extent on the other side\n do {\n max = fixedMin + interval * splitNumber;\n scale.setExtent(+fixedMin, max);\n // Interval must been set after extent\n // FIXME\n scale.setInterval(interval);\n\n interval = increaseInterval(interval);\n } while (max < rawExtent[1] && isFinite(max) && isFinite(rawExtent[1]));\n }\n else if (fixedMax != null) {\n var min;\n // User set min, expand extent on the other side\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 }\n else {\n var nicedSplitNumber = scale.getTicks().length - 1;\n if (nicedSplitNumber > splitNumber) {\n interval = increaseInterval(interval);\n }\n // TODO\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/**\n * Radar dimensions is based on the data\n * @type {Array}\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);\n\nexport default Radar;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport axisDefault from '../axisDefault';\nimport Model from '../../model/Model';\nimport axisModelCommonMixin from '../axisModelCommonMixin';\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\n type: 'radar',\n\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\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 }\n else if (indicatorOpt.min != null && indicatorOpt.min < 0 && !indicatorOpt.max) {\n indicatorOpt.max = 0;\n }\n var iNameTextStyle = nameTextStyle;\n if (indicatorOpt.color != null) {\n iNameTextStyle = zrUtil.defaults({color: indicatorOpt.color}, nameTextStyle);\n }\n // Use same configuration\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 if (!showName) {\n indicatorOpt.name = '';\n }\n if (typeof nameFormatter === 'string') {\n var indName = indicatorOpt.name;\n indicatorOpt.name = nameFormatter.replace('{value}', indName != null ? indName : '');\n }\n else if (typeof nameFormatter === 'function') {\n indicatorOpt.name = nameFormatter(\n indicatorOpt.name, indicatorOpt\n );\n }\n var model = zrUtil.extend(\n new Model(indicatorOpt, null, this.ecModel),\n axisModelCommonMixin\n );\n\n // For triggerEvent.\n model.mainType = 'radar';\n model.componentIndex = this.componentIndex;\n\n return model;\n }, this);\n\n this.getIndicatorModels = function () {\n return indicatorModels;\n };\n },\n\n defaultOption: {\n\n zlevel: 0,\n\n z: 0,\n\n center: ['50%', '50%'],\n\n radius: '75%',\n\n startAngle: 90,\n\n name: {\n show: true\n // formatter: null\n // textStyle: {}\n },\n\n boundaryGap: [0, 0],\n\n splitNumber: 5,\n\n nameGap: 15,\n\n scale: false,\n\n // Polygon or circle\n shape: 'polygon',\n\n axisLine: zrUtil.merge(\n {\n lineStyle: {\n color: '#bbb'\n }\n },\n valueAxisDefault.axisLine\n ),\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\n // {text, min, max}\n indicator: []\n }\n});\n\nexport default RadarModel;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {__DEV__} from '../../config';\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport AxisBuilder from '../axis/AxisBuilder';\nimport * as graphic from '../../util/graphic';\n\nvar axisBuilderAttrs = [\n 'axisLine', 'axisTickLabel', 'axisName'\n];\n\nexport default echarts.extendComponentView({\n\n type: 'radar',\n\n render: function (radarModel, ecModel, api) {\n var group = this.group;\n group.removeAll();\n\n this._buildAxes(radarModel);\n this._buildSplitLineAndArea(radarModel);\n },\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\n zrUtil.each(axisBuilders, function (axisBuilder) {\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n this.group.add(axisBuilder.getGroup());\n }, this);\n },\n\n _buildSplitLineAndArea: function (radarModel) {\n var radar = radarModel.coordinateSystem;\n var indicatorAxes = radar.getIndicatorAxes();\n if (!indicatorAxes.length) {\n return;\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\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\n splitLineColors = zrUtil.isArray(splitLineColors) ? splitLineColors : [splitLineColors];\n splitAreaColors = zrUtil.isArray(splitAreaColors) ? splitAreaColors : [splitAreaColors];\n\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 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 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 }\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\n ? ticksCoords.length - 1\n : Math.min(ticksCoords.length - 1, realSplitNumber);\n return zrUtil.map(ticksCoords, function (tickCoord) {\n return radar.coordToPoint(tickCoord.coord, idx);\n });\n });\n\n var prevPoints = [];\n for (var i = 0; i <= realSplitNumber; i++) {\n var points = [];\n for (var j = 0; j < indicatorAxes.length; j++) {\n points.push(axesTicksPoints[j][i]);\n }\n // Close\n if (points[0]) {\n points.push(points[0].slice());\n }\n else {\n if (__DEV__) {\n console.error('Can\\'t draw value axis ' + i);\n }\n }\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 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 prevPoints = points.slice().reverse();\n }\n }\n\n var lineStyle = lineStyleModel.getLineStyle();\n var areaStyle = areaStyleModel.getAreaStyle();\n // Add splitArea before splitLine\n zrUtil.each(splitAreas, function (splitAreas, idx) {\n this.group.add(graphic.mergePath(\n splitAreas, {\n style: zrUtil.defaults({\n stroke: 'none',\n fill: splitAreaColors[idx % splitAreaColors.length]\n }, areaStyle),\n silent: true\n }\n ));\n }, this);\n\n zrUtil.each(splitLines, function (splitLines, idx) {\n this.group.add(graphic.mergePath(\n splitLines, {\n style: zrUtil.defaults({\n fill: 'none',\n stroke: splitLineColors[idx % splitLineColors.length]\n }, lineStyle),\n silent: true\n }\n ));\n }, this);\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\nimport '../coord/radar/Radar';\nimport '../coord/radar/RadarModel';\nimport './radar/RadarView';","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport SeriesModel from '../../model/Series';\nimport createListSimply from '../helper/createListSimply';\nimport * as zrUtil from 'zrender/src/core/util';\nimport {encodeHTML} from '../../util/format';\nimport LegendVisualProvider from '../../visual/LegendVisualProvider';\n\nvar RadarSeries = SeriesModel.extend({\n\n type: 'series.radar',\n\n dependencies: ['radar'],\n\n\n // Overwrite\n init: function (option) {\n RadarSeries.superApply(this, 'init', arguments);\n\n // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n this.legendVisualProvider = new LegendVisualProvider(\n zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this)\n );\n\n },\n\n getInitialData: function (option, ecModel) {\n return createListSimply(this, {\n generateCoord: 'indicator_',\n generateCoordCount: Infinity\n });\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' ? '<br/>' : '\\n';\n return encodeHTML(name === '' ? this.name : name) + newLine\n + 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(\n zrUtil.map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }), dataIndex, true\n );\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\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\n // symbolRotate: null\n }\n});\n\nexport default RadarSeries;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport * as graphic from '../../util/graphic';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as symbolUtil from '../../util/symbol';\n\nfunction normalizeSymbolSize(symbolSize) {\n if (!zrUtil.isArray(symbolSize)) {\n symbolSize = [+symbolSize, +symbolSize];\n }\n return symbolSize;\n}\n\nexport default echarts.extendChartView({\n\n type: 'radar',\n\n render: function (seriesModel, ecModel, api) {\n var polar = seriesModel.coordinateSystem;\n var group = this.group;\n\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 if (symbolType === 'none') {\n return;\n }\n var symbolSize = normalizeSymbolSize(\n data.getItemVisual(idx, 'symbolSize')\n );\n var symbolPath = symbolUtil.createSymbol(\n symbolType, -1, -1, 2, 2, color\n );\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 for (var i = 0; i < newPoints.length - 1; i++) {\n var symbolPath = createSymbol(data, idx);\n if (symbolPath) {\n symbolPath.__dimIdx = i;\n if (oldPoints[i]) {\n symbolPath.attr('position', oldPoints[i]);\n graphic[isInit ? 'initProps' : 'updateProps'](\n symbolPath, {\n position: newPoints[i]\n }, seriesModel, idx\n );\n }\n else {\n symbolPath.attr('position', newPoints[i]);\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 data.diff(oldData)\n .add(function (idx) {\n var points = data.getItemLayout(idx);\n if (!points) {\n return;\n }\n var polygon = new graphic.Polygon();\n var polyline = new graphic.Polyline();\n var target = {\n shape: {\n points: points\n }\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\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\n updateSymbols(\n polyline.shape.points, points, symbolGroup, data, idx, true\n );\n\n data.setItemGraphicEl(idx, itemGroup);\n })\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 updateSymbols(\n polyline.shape.points, target.shape.points, symbolGroup, data, newIdx, false\n );\n\n graphic.updateProps(polyline, target, seriesModel);\n graphic.updateProps(polygon, target, seriesModel);\n\n data.setItemGraphicEl(newIdx, itemGroup);\n })\n .remove(function (idx) {\n group.remove(oldData.getItemGraphicEl(idx));\n })\n .execute();\n\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\n group.add(itemGroup);\n\n polyline.useStyle(\n zrUtil.defaults(\n itemModel.getModel('lineStyle').getLineStyle(),\n {\n fill: 'none',\n stroke: color\n }\n )\n );\n polyline.hoverStyle = itemModel.getModel('emphasis.lineStyle').getLineStyle();\n\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\n hoverPolygonIgnore = hoverPolygonIgnore && polygonIgnore;\n polygon.ignore = polygonIgnore;\n\n polygon.useStyle(\n zrUtil.defaults(\n areaStyleModel.getAreaStyle(),\n {\n fill: color,\n opacity: 0.7\n }\n )\n );\n polygon.hoverStyle = hoverAreaStyleModel.getAreaStyle();\n\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\n graphic.setLabelStyle(\n symbolPath.style, symbolPath.hoverStyle, labelModel, labelHoverModel,\n {\n labelFetcher: data.hostModel,\n labelDataIndex: idx,\n labelDimIndex: symbolPath.__dimIdx,\n defaultText: defaultText,\n autoColor: color,\n isRectText: true\n }\n );\n });\n\n itemGroup.highDownOnUpdate = function (fromState, toState) {\n polygon.attr('ignore', toState === 'emphasis' ? hoverPolygonIgnore : polygonIgnore);\n };\n graphic.setHoverStyle(itemGroup);\n });\n\n this._data = data;\n },\n\n remove: function () {\n this.group.removeAll();\n this._data = null;\n },\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\nimport * as zrUtil from 'zrender/src/core/util';\n\nexport default function (ecModel) {\n ecModel.eachSeriesByType('radar', function (seriesModel) {\n var data = seriesModel.getData();\n var points = [];\n var coordSys = seriesModel.coordinateSystem;\n if (!coordSys) {\n return;\n }\n\n var axes = coordSys.getIndicatorAxes();\n\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)\n ? point : getValueMissingPoint(coordSys);\n });\n });\n\n // Close polygon\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);\n\n // Copy the first actual point to the end of the array\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* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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// Backward compat for radar chart in 2\nimport * as zrUtil from 'zrender/src/core/util';\n\nexport default function (option) {\n var polarOptArr = option.polar;\n if (polarOptArr) {\n if (!zrUtil.isArray(polarOptArr)) {\n polarOptArr = [polarOptArr];\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 option.radar = option.radar || [];\n if (!zrUtil.isArray(option.radar)) {\n option.radar = [option.radar];\n }\n option.radar.push(polarOpt);\n }\n else {\n polarNotRadar.push(polarOpt);\n }\n });\n option.polar = polarNotRadar;\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* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport * as echarts from '../echarts';\n\n// Must use radar component\nimport '../component/radar';\nimport './radar/RadarSeries';\nimport './radar/RadarView';\n\nimport dataColor from '../visual/dataColor';\nimport visualSymbol from '../visual/symbol';\nimport radarLayout from './radar/radarLayout';\nimport dataFilter from '../processor/dataFilter';\nimport backwardCompat from './radar/backwardCompat';\n\necharts.registerVisual(dataColor('radar'));\necharts.registerVisual(visualSymbol('radar', 'circle'));\necharts.registerLayout(radarLayout);\necharts.registerProcessor(dataFilter('radar'));\necharts.registerPreprocessor(backwardCompat);","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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// Fix for 南海诸岛\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport Region from '../Region';\n\nvar geoCoord = [126, 25];\n\nvar points = [\n [[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, 0.7], [52, 0.7],\n [56, 7.7], [59, 0.7], [64, 0.7], [64, 0], [5, 0], [0, 3.5]],\n [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]],\n [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]],\n [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]],\n [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]],\n [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]],\n [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]],\n [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]],\n [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]],\n [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]],\n [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]],\n [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4],\n [1, 92.4], [1, 3.5], [0, 3.5]]\n];\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\n points[i][k][0] += geoCoord[0];\n points[i][k][1] += geoCoord[1];\n }\n}\n\nexport default function (mapType, regions) {\n if (mapType === 'china') {\n regions.push(new Region(\n '南海诸岛',\n zrUtil.map(points, function (exterior) {\n return {\n type: 'polygon',\n exterior: exterior\n };\n }), geoCoord\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 coordsOffsetMap = {\n '南海诸岛': [32, 80],\n // 全国\n '广东': [0, -10],\n '香港': [10, 5],\n '澳门': [-10, 10],\n //'北京': [-10, 0],\n '天津': [5, 5]\n};\n\nexport default function (mapType, region) {\n if (mapType === 'china') {\n var coordFix = coordsOffsetMap[region.name];\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* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar geoCoordMap = {\n 'Russia': [100, 60],\n 'United States': [-99, 38],\n 'United States of America': [-99, 38]\n};\n\nexport default function (mapType, region) {\n if (mapType === 'world') {\n var geoCoord = geoCoordMap[region.name];\n if (geoCoord) {\n var cp = region.center;\n cp[0] = geoCoord[0];\n cp[1] = geoCoord[1];\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// Fix for 钓鱼岛\n\n// var Region = require('../Region');\n// var zrUtil = require('zrender/src/core/util');\n\n// var geoCoord = [126, 25];\n\nvar points = [\n [\n [123.45165252685547, 25.73527164402261],\n [123.49731445312499, 25.73527164402261],\n [123.49731445312499, 25.750734064600884],\n [123.45165252685547, 25.750734064600884],\n [123.45165252685547, 25.73527164402261]\n ]\n];\n\nexport default function (mapType, region) {\n if (mapType === 'china' && region.name === '台湾') {\n region.geometries.push({\n type: 'polygon',\n exterior: points[0]\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\nimport {each} from 'zrender/src/core/util';\nimport parseGeoJson from './parseGeoJson';\nimport {makeInner} from '../../util/model';\n\n// Built-in GEO fixer.\nimport fixNanhai from './fix/nanhai';\nimport fixTextCoord from './fix/textCoord';\nimport fixGeoCoord from './fix/geoCoord';\nimport fixDiaoyuIsland from './fix/diaoyuIsland';\n\nvar inner = makeInner();\n\nexport default {\n\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\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;\n\n // https://jsperf.com/try-catch-performance-overhead\n try {\n regions = geoJSON ? parseGeoJson(geoJSON, nameProperty) : [];\n }\n catch (e) {\n throw new Error('Invalid geoJson format\\n' + e.message);\n }\n\n fixNanhai(mapName, regions);\n\n each(regions, function (region) {\n var regionName = region.name;\n\n fixTextCoord(mapName, region);\n fixGeoCoord(mapName, region);\n fixDiaoyuIsland(mapName, region);\n\n // Some area like Alaska in USA map needs to be tansformed\n // to look better\n var specialArea = specialAreas[regionName];\n if (specialArea) {\n region.transformTo(\n specialArea.left, specialArea.top, specialArea.width, specialArea.height\n );\n }\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 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 return 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\nimport {parseSVG, makeViewBoxTransform} from 'zrender/src/tool/parseSVG';\nimport Group from 'zrender/src/container/Group';\nimport Rect from 'zrender/src/graphic/shape/Rect';\nimport {assert, createHashMap} from 'zrender/src/core/util';\nimport BoundingRect from 'zrender/src/core/BoundingRect';\nimport {makeInner} from '../../util/model';\n\nvar inner = makeInner();\n\nexport default {\n\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 if (originRoot) {\n return {\n root: originRoot,\n boundingRect: inner(mapRecord).boundingRect\n };\n }\n\n var graphic = buildGraphic(mapRecord);\n\n inner(mapRecord).originRoot = graphic.root;\n inner(mapRecord).boundingRect = graphic.boundingRect;\n\n return graphic;\n },\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\n var root = rootMap.get(hostKey);\n if (root) {\n return root;\n }\n\n var originRoot = field.originRoot;\n var boundingRect = field.boundingRect;\n\n // For performance, if originRoot is not used by a view,\n // assign it to a view, but not reproduce graphic elements.\n if (!field.originRootHostKey) {\n field.originRootHostKey = hostKey;\n root = originRoot;\n }\n else {\n root = buildGraphic(mapRecord, boundingRect).root;\n }\n\n return rootMap.set(hostKey, root);\n },\n\n removeGraphic: function (mapName, mapRecord, hostKey) {\n var field = inner(mapRecord);\n var rootMap = field.rootMap;\n rootMap && rootMap.removeKey(hostKey);\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 }\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)\n // If svg width / height not specified, calculate\n // bounding rect as the width / height\n ? root.getBoundingRect()\n : new BoundingRect(0, 0, 0, 0);\n\n if (svgWidth != null) {\n boundingRect.width = svgWidth;\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\n return {\n root: root,\n boundingRect: boundingRect\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\nimport {__DEV__} from '../../config';\nimport {each, createHashMap} from 'zrender/src/core/util';\nimport mapDataStorage from './mapDataStorage';\nimport geoJSONLoader from './geoJSONLoader';\nimport geoSVGLoader from './geoSVGLoader';\nimport BoundingRect from 'zrender/src/core/BoundingRect';\n\nvar loaders = {\n geoJSON: geoJSONLoader,\n svg: geoSVGLoader\n};\n\nexport default {\n\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\n each(mapRecords, function (record) {\n var singleSource = loaders[record.type].load(mapName, record, nameProperty);\n\n each(singleSource.regions, function (region) {\n var regionName = region.name;\n\n // Try use the alias in geoNameMap\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\n var rect = singleSource.boundingRect;\n if (rect) {\n boundingRect\n ? boundingRect.union(rect)\n : (boundingRect = rect.clone());\n }\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.<module:zrender/Element>} 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\n each(mapRecords, function (record) {\n var method = loaders[record.type][methodName];\n method && results.push(method(mapName, record, hostKey));\n });\n\n return results;\n };\n}\n\nfunction mapNotExistsError(mapName) {\n if (__DEV__) {\n console.error(\n 'Map ' + mapName + ' not exists. The GeoJSON of the map must be provided.'\n );\n }\n}\n\nfunction retrieveMap(mapName) {\n var mapRecords = mapDataStorage.retrieveMap(mapName) || [];\n\n if (__DEV__) {\n if (!mapRecords.length) {\n mapNotExistsError(mapName);\n }\n }\n\n return mapRecords;\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\nimport * as zrUtil from 'zrender/src/core/util';\nimport createListSimply from '../helper/createListSimply';\nimport SeriesModel from '../../model/Series';\nimport {encodeHTML, addCommas} from '../../util/format';\nimport dataSelectableMixin from '../../component/helper/selectableMixin';\nimport {retrieveRawAttr} from '../../data/helper/dataProvider';\nimport geoSourceManager from '../../coord/geo/geoSourceManager';\nimport {makeSeriesEncodeForNameBased} from '../../data/helper/sourceHelper';\n\nvar MapSeries = SeriesModel.extend({\n\n type: 'series.map',\n\n dependencies: ['geo'],\n\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\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 if (!dataNameMap.get(name)) {\n selectTargetList.push({name: name});\n toAppendNames.push(name);\n }\n });\n\n this.updateSelectedMap(selectTargetList);\n\n // 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 data.appendValues([], toAppendNames);\n\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\n ? this.dependentModels.geo[geoIndex]\n : null;\n },\n\n getMapType: function () {\n return (this.getHostGeoModel() || this).option.map;\n },\n\n // _fillOption: function (option, mapName) {\n // Shallow clone\n // option = zrUtil.extend({}, option);\n\n // option.data = geoCreator.getFilledRegions(option.data, mapName, option.nameMap);\n\n // return option;\n // },\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\n var seriesGroup = this.seriesGroup;\n var seriesNames = [];\n for (var i = 0; i < seriesGroup.length; i++) {\n var otherIndex = seriesGroup[i].originalData.indexOfName(name);\n var valueDim = data.mapDimension('value');\n if (!isNaN(seriesGroup[i].originalData.get(valueDim, otherIndex))) {\n seriesNames.push(\n encodeHTML(seriesGroup[i].name)\n );\n }\n }\n\n var newLine = renderMode === 'html' ? '<br/>' : '\\n';\n return seriesNames.join(', ') + newLine\n + 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\n return region && geo.dataToPoint(region.center);\n }\n },\n\n setZoom: function (zoom) {\n this.option.zoom = zoom;\n },\n\n setCenter: function (center) {\n this.option.center = center;\n },\n\n defaultOption: {\n // 一级层叠\n zlevel: 0,\n // 二级层叠\n z: 2,\n\n coordinateSystem: 'geo',\n\n // map should be explicitly specified since ec3.\n map: '',\n\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\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\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\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\n // 数值合并方式,默认加和,可选为:\n // 'sum' | 'average' | 'max' | 'min'\n // mapValueCalculation: 'sum',\n // 地图数值计算结果小数精度\n // mapValuePrecision: 0,\n\n\n // 显示图例颜色标识(系列标识的小圆点),图例开启时有效\n showLegendSymbol: true,\n // 选择模式默认关闭可选singlemultiple\n // selectedMode: false,\n dataRangeHoverLink: true,\n // 是否开启缩放及漫游模式\n // roam: false,\n\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\n // Default on center of map\n center: null,\n\n zoom: 1,\n\n scaleLimit: null,\n\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\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\n});\n\nzrUtil.mixin(MapSeries, dataSelectableMixin);\n\nexport default MapSeries;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\n\nvar ATTR = '\\0_ec_interaction_mutex';\n\nexport function take(zr, resourceKey, userKey) {\n var store = getStore(zr);\n store[resourceKey] = userKey;\n}\n\nexport function 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\nexport function isTaken(zr, resourceKey) {\n return !!getStore(zr)[resourceKey];\n}\n\nfunction getStore(zr) {\n return zr[ATTR] || (zr[ATTR] = {});\n}\n\n/**\n * payload: {\n * type: 'takeGlobalCursor',\n * key: 'dataZoomSelect', or 'brush', or ...,\n * If no userKey, release global cursor.\n * }\n */\necharts.registerAction(\n {type: 'takeGlobalCursor', event: 'globalCursorTaken', update: 'update'},\n 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\nimport * as zrUtil from 'zrender/src/core/util';\nimport Eventful from 'zrender/src/mixin/Eventful';\nimport * as eventTool from 'zrender/src/core/event';\nimport * as interactionMutex from './interactionMutex';\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 /**\n * @type {Function}\n */\n this.pointerChecker;\n\n /**\n * @type {module:zrender}\n */\n this._zr = zr;\n\n /**\n * @type {Object}\n */\n this._opt = {};\n\n // Avoid two roamController bind the same handler\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\n Eventful.call(this);\n\n /**\n * @param {Function} pointerChecker\n * input: x, y\n * output: boolean\n */\n this.setPointerChecker = function (pointerChecker) {\n this.pointerChecker = pointerChecker;\n };\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 this.enable = function (controlType, opt) {\n\n // Disable previous first\n this.disable();\n\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 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\n\nfunction mousedown(e) {\n if (eventTool.isMiddleOrRightButtonOnMouseUpDown(e)\n || (e.target && e.target.draggable)\n ) {\n return;\n }\n\n var x = e.offsetX;\n var y = e.offsetY;\n\n // Only check on mosedown, but not mousemove.\n // Mouse can be out of target when mouse moving.\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\n || !isAvailableBehavior('moveOnMouseMove', e, this._opt)\n || e.gestureEvent === 'pinch'\n || interactionMutex.isTaken(this._zr, 'globalPan')\n ) {\n return;\n }\n\n var x = e.offsetX;\n var y = e.offsetY;\n\n var oldX = this._x;\n var oldY = this._y;\n\n var dx = x - oldX;\n var dy = y - oldY;\n\n this._x = x;\n this._y = y;\n\n this._opt.preventDefaultMouseMove && eventTool.stop(e.event);\n\n trigger(this, 'pan', 'moveOnMouseMove', e, {\n dx: dx, dy: dy, oldX: oldX, oldY: oldY, newX: x, 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;\n\n // wheelDelta maybe -0 in chrome mac.\n if (wheelDelta === 0 || (!shouldZoom && !shouldMove)) {\n return;\n }\n\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 if (shouldZoom) {\n // Convenience:\n // Mac and VM Windows on Mac: scroll up: zoom out.\n // Windows: scroll up: zoom in.\n\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, originX: originX, originY: originY\n });\n }\n\n if (shouldMove) {\n // FIXME: Should do more test in different environment.\n var absDelta = Math.abs(wheelDelta);\n // wheelDelta of mouse wheel is bigger than touch pad.\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, originX: originX, originY: originY\n });\n }\n}\n\nfunction pinch(e) {\n if (interactionMutex.isTaken(this._zr, 'globalPan')) {\n return;\n }\n var scale = e.pinchScale > 1 ? 1.1 : 1 / 1.1;\n checkPointerAndTrigger(this, 'zoom', null, e, {\n scale: scale, originX: e.pinchX, originY: e.pinchY\n });\n}\n\nfunction checkPointerAndTrigger(controller, eventName, behaviorToCheck, e, contollerEvent) {\n if (controller.pointerChecker\n && controller.pointerChecker(e, contollerEvent.originX, contollerEvent.originY)\n ) {\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\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}\n\n// settings: {\n// zoomOnMouseWheel\n// moveOnMouseMove\n// moveOnMouseWheel\n// }\n// The value can be: true / false / 'shift' / 'ctrl' / 'alt'.\nfunction isAvailableBehavior(behaviorToCheck, e, settings) {\n var setting = settings[behaviorToCheck];\n return !behaviorToCheck || (\n setting && (!zrUtil.isString(setting) || e.event[setting + 'Key'])\n );\n}\n\nexport default RoamController;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * For geo and graph.\n *\n * @param {Object} controllerHost\n * @param {module:zrender/Element} controllerHost.target\n */\nexport function 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/**\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 */\nexport function 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\n var newZoom = controllerHost.zoom = controllerHost.zoom || 1;\n newZoom *= zoomDelta;\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n newZoom = Math.max(\n Math.min(zoomMax, newZoom),\n zoomMin\n );\n }\n var zoomScale = newZoom / controllerHost.zoom;\n controllerHost.zoom = newZoom;\n // Keep the mouse center when scaling\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\n target.dirty();\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nvar IRRELEVANT_EXCLUDES = {'axisPointer': 1, 'tooltip': 1, 'brush': 1};\n\n/**\n * Avoid that: mouse click on a elements that is over geo or graph,\n * but roam is triggered.\n */\nexport function onIrrelevantElement(e, api, targetCoordSysModel) {\n var model = api.getComponentByElement(e.topTarget);\n // If model is axisModel, it works only if it is injected with coordinateSystem.\n var coordSys = model && model.coordinateSystem;\n return model\n && model !== targetCoordSysModel\n && !IRRELEVANT_EXCLUDES[model.mainType]\n && (coordSys && coordSys.model !== targetCoordSysModel);\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport RoamController from './RoamController';\nimport * as roamHelper from '../../component/helper/roamHelper';\nimport {onIrrelevantElement} from '../../component/helper/cursorHelper';\nimport * as graphic from '../../util/graphic';\nimport geoSourceManager from '../../coord/geo/geoSourceManager';\nimport {getUID} from '../../util/component';\nimport Transformable from 'zrender/src/mixin/Transformable';\n\nfunction getFixedItemStyle(model) {\n var itemStyle = model.getItemStyle();\n var areaColor = model.get('areaColor');\n\n // If user want the color not to be changed when hover,\n // they should both set areaColor and color to be null.\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\n regionsGroup.on('mousedown', function () {\n mapDraw._mouseDownFlag = true;\n });\n\n regionsGroup.on('click', function (e) {\n if (!mapDraw._mouseDownFlag) {\n return;\n }\n mapDraw._mouseDownFlag = false;\n\n var el = e.target;\n while (!el.__regions) {\n el = el.parent;\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\n api.dispatchAction(action);\n\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/**\n * @alias module:echarts/component/helper/MapDraw\n * @param {module:echarts/ExtensionAPI} api\n * @param {boolean} updateGroup\n */\nfunction MapDraw(api, updateGroup) {\n\n var group = new graphic.Group();\n\n /**\n * @type {string}\n * @private\n */\n this.uid = getUID('ec_map_draw');\n\n /**\n * @type {module:echarts/component/helper/RoamController}\n * @private\n */\n this._controller = new RoamController(api.getZr());\n\n /**\n * @type {Object} {target, zoom, zoomLimit}\n * @private\n */\n this._controllerHost = {target: updateGroup ? group : null};\n\n /**\n * @type {module:zrender/container/Group}\n * @readOnly\n */\n this.group = group;\n\n /**\n * @type {boolean}\n * @private\n */\n this._updateGroup = updateGroup;\n\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 this._mouseDownFlag;\n\n /**\n * @type {string}\n */\n this._mapName;\n\n /**\n * @type {boolean}\n */\n this._initialized;\n\n /**\n * @type {module:zrender/container/Group}\n */\n group.add(this._regionsGroup = new graphic.Group());\n\n /**\n * @type {module:zrender/container/Group}\n */\n group.add(this._backgroundGroup = new graphic.Group());\n}\n\nMapDraw.prototype = {\n\n constructor: MapDraw,\n\n draw: function (mapOrGeoModel, ecModel, api, fromView, payload) {\n\n var isGeo = mapOrGeoModel.mainType === 'geo';\n\n // 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 var data = mapOrGeoModel.getData && mapOrGeoModel.getData();\n isGeo && ecModel.eachComponent({mainType: 'series', subType: 'map'}, function (mapSeries) {\n if (!data && mapSeries.getHostGeoModel() === mapOrGeoModel) {\n data = mapSeries.getData();\n }\n });\n\n var geo = mapOrGeoModel.coordinateSystem;\n\n this._updateBackground(geo);\n\n var regionsGroup = this._regionsGroup;\n var group = this.group;\n\n var transformInfo = geo.getTransformInfo();\n // No animation when first draw or in action\n var isFirstDraw = !regionsGroup.childAt(0) || payload;\n var targetScale;\n if (isFirstDraw) {\n group.transform = transformInfo.roamTransform;\n group.decomposeTransform();\n group.dirty();\n }\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\n regionsGroup.removeAll();\n\n var itemStyleAccessPath = ['itemStyle'];\n var hoverItemStyleAccessPath = ['emphasis', 'itemStyle'];\n var labelAccessPath = ['label'];\n var hoverLabelAccessPath = ['emphasis', 'label'];\n var nameMap = zrUtil.createHashMap();\n\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)\n || nameMap.set(region.name, new graphic.Group());\n\n var compoundPath = new graphic.CompoundPath({\n segmentIgnoreThreshold: 1,\n shape: {\n paths: []\n }\n });\n regionGroup.add(compoundPath);\n\n var regionModel = mapOrGeoModel.getRegionModel(region.name) || mapOrGeoModel;\n\n var itemStyleModel = regionModel.getModel(itemStyleAccessPath);\n var hoverItemStyleModel = regionModel.getModel(hoverItemStyleAccessPath);\n var itemStyle = getFixedItemStyle(itemStyleModel);\n var hoverItemStyle = getFixedItemStyle(hoverItemStyleModel);\n\n var labelModel = regionModel.getModel(labelAccessPath);\n var hoverLabelModel = regionModel.getModel(hoverLabelAccessPath);\n\n var dataIdx;\n // Use the itemStyle in data if has data\n if (data) {\n dataIdx = data.indexOfName(region.name);\n // 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 var visualColor = data.getItemVisual(dataIdx, 'color', true);\n if (visualColor) {\n itemStyle.fill = visualColor;\n }\n }\n\n var transformPoint = function (point) {\n return [\n point[0] * scale[0] + position[0],\n point[1] * scale[1] + position[1]\n ];\n };\n\n zrUtil.each(region.geometries, function (geometry) {\n if (geometry.type !== 'polygon') {\n return;\n }\n var points = [];\n for (var i = 0; i < geometry.exterior.length; ++i) {\n points.push(transformPoint(geometry.exterior[i]));\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 for (var j = 0; j < interior.length; ++j) {\n points.push(transformPoint(interior[j]));\n }\n compoundPath.shape.paths.push(new graphic.Polygon({\n segmentIgnoreThreshold: 1,\n shape: {\n points: points\n }\n }));\n }\n });\n\n compoundPath.setStyle(itemStyle);\n compoundPath.style.strokeNoScale = true;\n compoundPath.culling = true;\n\n // Label\n var showLabel = labelModel.get('show');\n var hoverShowLabel = hoverLabelModel.get('show');\n\n var isDataNaN = data && isNaN(data.get(data.mapDimension('value'), dataIdx));\n var itemLayout = data && data.getItemLayout(dataIdx);\n // 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 if (\n (isGeo || isDataNaN && (showLabel || hoverShowLabel))\n || (itemLayout && itemLayout.showLabel)\n ) {\n var query = !isGeo ? dataIdx : region.name;\n var labelFetcher;\n\n // Consider dataIdx not found.\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\n graphic.setLabelStyle(\n textEl.style, textEl.hoverStyle = {}, labelModel, hoverLabelModel,\n {\n labelFetcher: labelFetcher,\n labelDataIndex: query,\n defaultText: region.name,\n useInsideStyle: false\n },\n {\n textAlign: 'center',\n textVerticalAlign: 'middle'\n }\n );\n\n if (!isFirstDraw) {\n // Text animation\n var textScale = [1 / targetScale[0], 1 / targetScale[1]];\n graphic.updateProps(textEl, { scale: textScale }, mapOrGeoModel);\n }\n\n regionGroup.add(textEl);\n }\n\n // setItemGraphicEl, setHoverStyle after all polygons and labels\n // are added to the rigionGroup\n if (data) {\n data.setItemGraphicEl(dataIdx, regionGroup);\n }\n else {\n var regionModel = mapOrGeoModel.getRegionModel(region.name);\n // Package custom mouse event for geo component\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\n regionGroup.highDownSilentOnTouch = !!mapOrGeoModel.get('selectedMode');\n graphic.setHoverStyle(regionGroup, hoverItemStyle);\n\n regionsGroup.add(regionGroup);\n });\n\n this._updateController(mapOrGeoModel, ecModel, api);\n\n updateMapSelectHandler(this, mapOrGeoModel, regionsGroup, api, fromView);\n\n updateMapSelected(mapOrGeoModel, regionsGroup);\n },\n\n remove: function () {\n this._regionsGroup.removeAll();\n this._backgroundGroup.removeAll();\n this._controller.dispose();\n this._mapName && geoSourceManager.removeGraphic(this._mapName, this.uid);\n this._mapName = null;\n this._controllerHost = {};\n },\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\n _updateController: function (mapOrGeoModel, ecModel, api) {\n var geo = mapOrGeoModel.coordinateSystem;\n var controller = this._controller;\n var controllerHost = this._controllerHost;\n\n controllerHost.zoomLimit = mapOrGeoModel.get('scaleLimit');\n controllerHost.zoom = geo.getZoom();\n\n // roamType is will be set default true if it is null\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\n roamHelper.updateViewOnPan(controllerHost, e.dx, e.dy);\n\n api.dispatchAction(zrUtil.extend(makeActionBase(), {\n dx: e.dx,\n dy: e.dy\n }));\n }, this);\n\n controller.off('zoom').on('zoom', function (e) {\n this._mouseDownFlag = false;\n\n roamHelper.updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY);\n\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 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\n controller.setPointerChecker(function (e, x, y) {\n return geo.getViewRectAfterRoam().contain(x, y)\n && !onIrrelevantElement(e, api, mapOrGeoModel);\n });\n }\n};\n\nexport default MapDraw;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../../util/graphic';\nimport MapDraw from '../../component/helper/MapDraw';\n\nvar HIGH_DOWN_PROP = '__seriesMapHighDown';\nvar RECORD_VERSION_PROP = '__seriesMapCallKey';\n\nexport default echarts.extendChartView({\n\n type: 'map',\n\n render: function (mapModel, ecModel, api, payload) {\n // Not render if it is an toggleSelect action from self\n if (payload && payload.type === 'mapToggleSelect'\n && payload.from === this.uid\n ) {\n return;\n }\n\n var group = this.group;\n group.removeAll();\n\n if (mapModel.getHostGeoModel()) {\n return;\n }\n\n // Not update map if it is an roam action from self\n if (!(payload && payload.type === 'geoRoam'\n && payload.componentType === 'series'\n && payload.seriesId === mapModel.id\n )\n ) {\n if (mapModel.needsDrawMap) {\n var mapDraw = this._mapDraw || new MapDraw(api, true);\n group.add(mapDraw.group);\n\n mapDraw.draw(mapModel, ecModel, api, this, payload);\n\n this._mapDraw = mapDraw;\n }\n else {\n // Remove drawed map\n this._mapDraw && this._mapDraw.remove();\n this._mapDraw = null;\n }\n }\n else {\n var mapDraw = this._mapDraw;\n mapDraw && group.add(mapDraw.group);\n }\n\n mapModel.get('showLegendSymbol') && ecModel.getComponent('legend')\n && this._renderSymbols(mapModel, ecModel, api);\n },\n\n remove: function () {\n this._mapDraw && this._mapDraw.remove();\n this._mapDraw = null;\n this.group.removeAll();\n },\n\n dispose: function () {\n this._mapDraw && this._mapDraw.remove();\n this._mapDraw = null;\n },\n\n _renderSymbols: function (mapModel, ecModel, api) {\n var originalData = mapModel.originalData;\n var group = this.group;\n\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\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 });\n\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 if (!offset) {\n\n var fullData = mapModel.mainSeries.getData();\n var name = originalData.getName(originalDataIndex);\n\n var fullIndex = fullData.indexOfName(name);\n\n var itemModel = originalData.getItemModel(originalDataIndex);\n var labelModel = itemModel.getModel('label');\n var hoverLabelModel = itemModel.getModel('emphasis.label');\n\n var regionGroup = fullData.getItemGraphicEl(fullIndex);\n\n // `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 var normalText = zrUtil.retrieve2(\n mapModel.getFormattedLabel(fullIndex, 'normal'),\n name\n );\n var emphasisText = zrUtil.retrieve2(\n mapModel.getFormattedLabel(fullIndex, 'emphasis'),\n normalText\n );\n\n var highDownRecord = regionGroup[HIGH_DOWN_PROP];\n var recordVersion = Math.random();\n\n // Prevent from register listeners duplicatedly when roaming.\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)\n .on('mouseout', onNormal)\n .on('emphasis', onEmphasis)\n .on('normal', onNormal);\n }\n\n // Prevent removed regions effect current grapics.\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 });\n\n // FIXME\n // Consider set option when emphasis.\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 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(\n graphic.setTextStyle({}, hoverLabelModel, {\n text: hoverLabelModel.get('show') ? emphasisText : null\n }, {isRectText: true, useInsideStyle: false}, true)\n );\n // Make label upper than others if overlaps.\n circle.__mapOriginalZ2 = circle.z2;\n circle.z2 += graphic.Z2_EMPHASIS_LIFT;\n }\n else {\n graphic.setTextStyle(circle.style, labelModel, {\n text: labelModel.get('show') ? normalText : null,\n textPosition: labelModel.getShallow('position') || 'bottom'\n }, {isRectText: true, useInsideStyle: false});\n // Trigger normalize style like padding.\n circle.dirty(false);\n\n if (circle.__mapOriginalZ2 != null) {\n circle.z2 = circle.__mapOriginalZ2;\n circle.__mapOriginalZ2 = null;\n }\n }\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @param {module:echarts/coord/View} view\n * @param {Object} payload\n * @param {Object} [zoomLimit]\n */\nexport function updateCenterAndZoom(\n view, payload, zoomLimit\n) {\n var previousZoom = view.getZoom();\n var center = view.getCenter();\n var zoom = payload.zoom;\n\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\n var center = view.pointToData(point);\n view.setCenter(center);\n }\n if (zoom != null) {\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n zoom = Math.max(\n Math.min(previousZoom * zoom, zoomMax),\n zoomMin\n ) / previousZoom;\n }\n\n // Zoom on given point(originX, originY)\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\n position[0] -= fixX;\n position[1] -= fixY;\n\n view.updateTransform();\n // Get the new center\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport {updateCenterAndZoom} from './roamHelper';\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\n ecModel.eachComponent(\n { mainType: componentType, query: payload },\n function (componentModel) {\n var geo = componentModel.coordinateSystem;\n if (geo.type !== 'geo') {\n return;\n }\n\n var res = updateCenterAndZoom(\n geo, payload, componentModel.get('scaleLimit')\n );\n\n componentModel.setCenter\n && componentModel.setCenter(res.center);\n\n componentModel.setZoom\n && componentModel.setZoom(res.zoom);\n\n // 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 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\n/**\n * Simple view coordinate system\n * Mapping given x, y to transformd view x, y\n */\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as vector from 'zrender/src/core/vector';\nimport * as matrix from 'zrender/src/core/matrix';\nimport BoundingRect from 'zrender/src/core/BoundingRect';\nimport Transformable from 'zrender/src/mixin/Transformable';\n\nvar v2ApplyTransform = vector.applyTransform;\n\n// Dummy transform node\nfunction TransformDummy() {\n Transformable.call(this);\n}\nzrUtil.mixin(TransformDummy, Transformable);\n\nfunction View(name) {\n /**\n * @type {string}\n */\n this.name = name;\n\n /**\n * @type {Object}\n */\n this.zoomLimit;\n\n Transformable.call(this);\n\n this._roamTransformable = new TransformDummy();\n\n this._rawTransformable = new TransformDummy();\n\n this._center;\n this._zoom;\n}\n\nView.prototype = {\n\n constructor: View,\n\n type: 'view',\n\n /**\n * @param {Array.<string>}\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\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\n rawTransform.transform = rect.calculateTransform(\n new BoundingRect(x, y, width, height)\n );\n\n rawTransform.decomposeTransform();\n\n this._updateTransform();\n },\n\n /**\n * Set center of view\n * @param {Array.<number>} [centerCoord]\n */\n setCenter: function (centerCoord) {\n if (!centerCoord) {\n return;\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\n var zoomLimit = this.zoomLimit;\n if (zoomLimit) {\n if (zoomLimit.max != null) {\n zoom = Math.min(zoomLimit.max, zoom);\n }\n if (zoomLimit.min != null) {\n zoom = Math.max(zoomLimit.min, zoom);\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\n return [cx, cy];\n },\n\n getCenter: function () {\n return this._center || this.getDefaultCenter();\n },\n\n getZoom: function () {\n return this._zoom || 1;\n },\n\n /**\n * @return {Array.<number}\n */\n getRoamTransform: function () {\n return this._roamTransformable.getLocalTransform();\n },\n\n /**\n * Remove roam\n */\n _updateCenterAndZoom: function () {\n // Must update after view transform updated\n var rawTransformMatrix = this._rawTransformable.getLocalTransform();\n var roamTransform = this._roamTransformable;\n var defaultCenter = this.getDefaultCenter();\n var center = this.getCenter();\n var zoom = this.getZoom();\n\n center = vector.applyTransform([], center, rawTransformMatrix);\n defaultCenter = vector.applyTransform([], defaultCenter, rawTransformMatrix);\n\n roamTransform.origin = center;\n roamTransform.position = [\n defaultCenter[0] - center[0],\n defaultCenter[1] - center[1]\n ];\n roamTransform.scale = [zoom, zoom];\n\n this._updateTransform();\n },\n\n /**\n * Update transform from roam and mapLocation\n * @private\n */\n _updateTransform: function () {\n var roamTransformable = this._roamTransformable;\n var rawTransformable = this._rawTransformable;\n\n rawTransformable.parent = roamTransformable;\n roamTransformable.updateTransform();\n rawTransformable.updateTransform();\n\n matrix.copy(this.transform || (this.transform = []), rawTransformable.transform || matrix.create());\n\n this._rawTransform = rawTransformable.getLocalTransform();\n\n this.invTransform = this.invTransform || [];\n matrix.invert(this.invTransform, this.transform);\n\n this.decomposeTransform();\n },\n\n getTransformInfo: function () {\n var roamTransform = this._roamTransformable.transform;\n var rawTransformable = this._rawTransformable;\n return {\n roamTransform: roamTransform ? zrUtil.slice(roamTransform) : matrix.create(),\n rawScale: zrUtil.slice(rawTransformable.scale),\n rawPosition: zrUtil.slice(rawTransformable.position)\n };\n },\n\n /**\n * @return {module:zrender/core/BoundingRect}\n */\n getViewRect: function () {\n return this._viewRect;\n },\n\n /**\n * Get view rect after roam transform\n * @return {module:zrender/core/BoundingRect}\n */\n getViewRectAfterRoam: function () {\n var rect = this.getBoundingRect().clone();\n rect.applyTransform(this.transform);\n return rect;\n },\n\n /**\n * Convert a single (lon, lat) data item to (x, y) point.\n * @param {Array.<number>} data\n * @param {boolean} noRoam\n * @param {Array.<number>} [out]\n * @return {Array.<number>}\n */\n dataToPoint: function (data, noRoam, out) {\n var transform = noRoam ? this._rawTransform : this.transform;\n out = out || [];\n return transform\n ? v2ApplyTransform(out, data, transform)\n : vector.copy(out, data);\n },\n\n /**\n * Convert a (x, y) point to (lon, lat) data\n * @param {Array.<number>} point\n * @return {Array.<number>}\n */\n pointToData: function (point) {\n var invTransform = this.invTransform;\n return invTransform\n ? v2ApplyTransform([], point, invTransform)\n : [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 /**\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 return coordSys === this ? coordSys[methodName](value) : null;\n}\n\nexport default View;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport BoundingRect from 'zrender/src/core/BoundingRect';\nimport View from '../View';\nimport geoSourceManager from './geoSourceManager';\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.<string, string>} [nameMap]\n * Specify name alias\n * @param {boolean} [invertLongitute=true]\n */\nfunction Geo(name, map, nameMap, invertLongitute) {\n\n View.call(this, name);\n\n /**\n * Map type\n * @type {string}\n */\n this.map = map;\n\n var source = geoSourceManager.load(map, nameMap);\n\n this._nameCoordMap = source.nameCoordMap;\n this._regionsMap = source.regionsMap;\n this._invertLongitute = invertLongitute == null ? true : invertLongitute;\n\n /**\n * @readOnly\n */\n this.regions = source.regions;\n\n /**\n * @type {module:zrender/src/core/BoundingRect}\n */\n this._rect = source.boundingRect;\n}\n\nGeo.prototype = {\n\n constructor: Geo,\n\n type: 'geo',\n\n /**\n * @param {Array.<string>}\n * @readOnly\n */\n dimensions: ['lng', 'lat'],\n\n /**\n * If contain given lng,lat coord\n * @param {Array.<number>}\n * @readOnly\n */\n containCoord: function (coord) {\n var regions = this.regions;\n for (var i = 0; i < regions.length; i++) {\n if (regions[i].contain(coord)) {\n return true;\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\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\n rawTransformable.transform = rect.calculateTransform(\n new BoundingRect(x, y, width, height)\n );\n\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\n getRegionByCoord: function (coord) {\n var regions = this.regions;\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.<number>} 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.<number>}\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.<number>} data\n * @param {boolean} noRoam\n * @param {Array.<number>} [out]\n * @return {Array.<number>}\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 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\n};\n\nzrUtil.mixin(Geo, View);\n\nfunction doConvert(methodName, ecModel, finder, value) {\n var geoModel = finder.geoModel;\n var seriesModel = finder.seriesModel;\n\n var coordSys = geoModel\n ? geoModel.coordinateSystem\n : seriesModel\n ? (\n seriesModel.coordinateSystem // For map.\n || (seriesModel.getReferringComponents('geo')[0] || {}).coordinateSystem\n )\n : null;\n\n return coordSys === this ? coordSys[methodName](value) : null;\n}\n\nexport default Geo;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {__DEV__} from '../../config';\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport Geo from './Geo';\nimport * as layout from '../../util/layout';\nimport * as numberUtil from '../../util/number';\nimport geoSourceManager from './geoSourceManager';\nimport mapDataStorage from './mapDataStorage';\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\n var boundingCoords = geoModel.get('boundingCoords');\n if (boundingCoords != null) {\n var leftTop = boundingCoords[0];\n var rightBottom = boundingCoords[1];\n if (isNaN(leftTop[0]) || isNaN(leftTop[1]) || isNaN(rightBottom[0]) || isNaN(rightBottom[1])) {\n if (__DEV__) {\n console.error('Invalid boundingCoords');\n }\n }\n 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\n var boxLayoutOption;\n\n var center = geoModel.get('layoutCenter');\n var size = geoModel.get('layoutSize');\n\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n\n var aspect = rect.width / rect.height * this.aspectScale;\n\n var useCenterAndSize = false;\n\n if (center && size) {\n center = [\n numberUtil.parsePercent(center[0], viewWidth),\n numberUtil.parsePercent(center[1], viewHeight)\n ];\n size = numberUtil.parsePercent(size, Math.min(viewWidth, viewHeight));\n\n if (!isNaN(center[0]) && !isNaN(center[1]) && !isNaN(size)) {\n useCenterAndSize = true;\n }\n else {\n if (__DEV__) {\n console.warn('Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead.');\n }\n }\n }\n\n var viewRect;\n if (useCenterAndSize) {\n var viewRect = {};\n if (aspect > 1) {\n // Width is same with size\n viewRect.width = size;\n viewRect.height = size / aspect;\n }\n else {\n viewRect.height = size;\n viewRect.width = size * aspect;\n }\n viewRect.y = center[1] - viewRect.height / 2;\n viewRect.x = center[0] - viewRect.width / 2;\n }\n else {\n // Use left/top/width/height\n boxLayoutOption = geoModel.getBoxLayoutParams();\n\n // 0.75 rate\n boxLayoutOption.aspect = aspect;\n\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\n this.setCenter(geoModel.get('center'));\n this.setZoom(geoModel.get('zoom'));\n}\n\n/**\n * @param {module:echarts/coord/Geo} geo\n * @param {module:echarts/model/Model} model\n * @inner\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\n // For deciding which dimensions to use when creating list data\n dimensions: Geo.prototype.dimensions,\n\n create: function (ecModel, api) {\n var geoList = [];\n\n // FIXME Create each time may be slow\n ecModel.eachComponent('geo', function (geoModel, idx) {\n var name = geoModel.get('map');\n\n var aspectScale = geoModel.get('aspectScale');\n var invertLongitute = true;\n var mapRecords = mapDataStorage.retrieveMap(name);\n if (mapRecords && mapRecords[0] && mapRecords[0].type === 'svg') {\n aspectScale == null && (aspectScale = 1);\n invertLongitute = false;\n }\n else {\n aspectScale == null && (aspectScale = 0.75);\n }\n\n var geo = new Geo(name + idx, name, geoModel.get('nameMap'), invertLongitute);\n\n geo.aspectScale = aspectScale;\n geo.zoomLimit = geoModel.get('scaleLimit');\n geoList.push(geo);\n\n setGeoCoords(geo, geoModel);\n\n geoModel.coordinateSystem = geo;\n geo.model = geoModel;\n\n // Inject resize method\n geo.resize = resizeGeo;\n\n geo.resize(geoModel, api);\n });\n\n ecModel.eachSeries(function (seriesModel) {\n var coordSys = seriesModel.get('coordinateSystem');\n if (coordSys === 'geo') {\n var geoIndex = seriesModel.get('geoIndex') || 0;\n seriesModel.coordinateSystem = geoList[geoIndex];\n }\n });\n\n // If has map series\n var mapModelGroupBySeries = {};\n\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\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\n geo.zoomLimit = zrUtil.retrieve.apply(null, zrUtil.map(mapSeries, function (singleMapSeries) {\n return singleMapSeries.get('scaleLimit');\n }));\n geoList.push(geo);\n\n // Inject resize method\n geo.resize = resizeGeo;\n geo.aspectScale = mapSeries[0].get('aspectScale');\n\n geo.resize(mapSeries[0], api);\n\n zrUtil.each(mapSeries, function (singleMapSeries) {\n singleMapSeries.coordinateSystem = geo;\n\n setGeoCoords(geo, singleMapSeries);\n });\n });\n\n return geoList;\n },\n\n /**\n * Fill given regions array\n * @param {Array.<Object>} 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\n var dataNameMap = zrUtil.createHashMap();\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({name: name});\n });\n\n return regionsArr;\n }\n};\n\necharts.registerCoordinateSystem('geo', geoCreator);\n\nexport default geoCreator;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\n\nexport default function (ecModel) {\n\n var processedMapType = {};\n\n ecModel.eachSeriesByType('map', function (mapSeries) {\n var mapType = mapSeries.getMapType();\n if (mapSeries.getHostGeoModel() || processedMapType[mapType]) {\n return;\n }\n\n var mapSymbolOffsets = {};\n\n zrUtil.each(mapSeries.seriesGroup, function (subMapSeries) {\n var geo = subMapSeries.coordinateSystem;\n var data = subMapSeries.originalData;\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);\n\n // 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 if (!region || isNaN(value)) {\n return;\n }\n\n var offset = mapSymbolOffsets[name] || 0;\n\n var point = geo.dataToPoint(region.center);\n\n mapSymbolOffsets[name] = offset + 1;\n\n data.setItemLayout(idx, {\n point: point,\n offset: offset\n });\n });\n }\n });\n\n // Show label of those region not has legendSymbol(which is offset 0)\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\n processedMapType[mapType] = true;\n });\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nexport default function (ecModel) {\n ecModel.eachSeriesByType('map', function (seriesModel) {\n var colorList = seriesModel.get('color');\n var itemStyleModel = seriesModel.getModel('itemStyle');\n\n var areaColor = itemStyleModel.get('areaColor');\n var color = itemStyleModel.get('color')\n || colorList[seriesModel.seriesIndex % colorList.length];\n\n seriesModel.getData().setVisual({\n 'areaColor': areaColor,\n 'color': color\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\nimport * as zrUtil from 'zrender/src/core/util';\n\n// FIXME 公用?\n/**\n * @param {Array.<module:echarts/data/List>} datas\n * @param {string} statisticType 'average' 'sum'\n * @inner\n */\nfunction dataStatistics(datas, statisticType) {\n var dataNameMap = {};\n\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 if (!isNaN(value)) {\n dataNameMap[mapKey].push(value);\n }\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 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 var result;\n if (statisticType === 'min') {\n result = min;\n }\n else if (statisticType === 'max') {\n result = max;\n }\n else if (statisticType === 'average') {\n result = sum / len;\n }\n else {\n result = sum;\n }\n return len === 0 ? NaN : result;\n });\n}\n\nexport default function (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\n zrUtil.each(seriesGroups, function (seriesList, key) {\n var data = dataStatistics(\n zrUtil.map(seriesList, function (seriesModel) {\n return seriesModel.getData();\n }),\n seriesList[0].get('mapValueCalculation')\n );\n\n for (var i = 0; i < seriesList.length; i++) {\n seriesList[i].originalData = seriesList[i].getData();\n }\n\n // FIXME Put where?\n for (var i = 0; i < seriesList.length; i++) {\n seriesList[i].seriesGroup = seriesList;\n seriesList[i].needsDrawMap = i === 0 && !seriesList[i].getHostGeoModel();\n\n seriesList[i].setData(data.cloneShallow());\n seriesList[i].mainSeries = seriesList[0];\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\nimport * as zrUtil from 'zrender/src/core/util';\n\nexport default function (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;\n // Put x, y, width, height, x2, y2 in the top level\n zrUtil.defaults(seriesOpt, seriesOpt.mapLocation);\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\nimport * as echarts from '../echarts';\n\nimport './map/MapSeries';\nimport './map/MapView';\nimport '../action/geoRoam';\nimport '../coord/geo/geoCreator';\n\nimport mapSymbolLayout from './map/mapSymbolLayout';\nimport mapVisual from './map/mapVisual';\nimport mapDataStatistic from './map/mapDataStatistic';\nimport backwardCompat from './map/backwardCompat';\nimport createDataSelectAction from '../action/createDataSelectAction';\n\necharts.registerLayout(mapSymbolLayout);\necharts.registerVisual(mapVisual);\necharts.registerProcessor(echarts.PRIORITY.PROCESSOR.STATISTIC, mapDataStatistic);\necharts.registerPreprocessor(backwardCompat);\n\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* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport * as zrUtil from 'zrender/src/core/util';\n\nvar each = zrUtil.each;\n\nvar DATAS = '\\0__link_datas';\nvar MAIN_DATA = '\\0__link_mainData';\n\n// 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 */\nfunction linkList(opt) {\n var mainData = opt.mainData;\n var datas = opt.datas;\n\n if (!datas) {\n datas = {main: mainData};\n opt.datasAttr = {main: 'data'};\n }\n opt.datas = opt.mainData = null;\n\n linkAll(mainData, datas, opt);\n\n // Porxy data original methods.\n each(datas, function (data) {\n each(mainData.TRANSFERABLE_METHODS, function (methodName) {\n data.wrapMethod(methodName, zrUtil.curry(transferInjection, opt));\n });\n\n });\n\n // Beyond transfer, additional features should be added to `cloneShallow`.\n mainData.wrapMethod('cloneShallow', zrUtil.curry(cloneShallowInjection, opt));\n\n // Only mainData trigger change, because struct.update may trigger\n // another changable methods, which may bring about dead lock.\n each(mainData.CHANGABLE_METHODS, function (methodName) {\n mainData.wrapMethod(methodName, zrUtil.curry(changeInjection, opt));\n });\n\n // Make sure datas contains mainData.\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 }\n else {\n // Modify the reference in main data to point newData.\n linkSingle(res, this.dataType, this[MAIN_DATA], opt);\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/**\n * Supplement method to List.\n *\n * @public\n * @param {string} [dataType] If not specified, return mainData.\n * @return {module:echarts/data/List}\n */\nfunction getLinkedData(dataType) {\n var mainData = this[MAIN_DATA];\n return (dataType == null || mainData == null)\n ? mainData\n : 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 }\n\n // Supplement method.\n data.getLinkedData = getLinkedData;\n}\n\nexport default linkList;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport * as zrUtil from 'zrender/src/core/util';\nimport linkList from './helper/linkList';\nimport List from './List';\nimport createDimensions from './helper/createDimensions';\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 /**\n * Depth of node\n *\n * @type {number}\n * @readOnly\n */\n this.depth = 0;\n\n /**\n * Height of the subtree rooted at this node.\n * @type {number}\n * @readOnly\n */\n this.height = 0;\n\n /**\n * @type {module:echarts/data/Tree~TreeNode}\n * @readOnly\n */\n this.parentNode = null;\n\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 this.dataIndex = -1;\n\n /**\n * @type {Array.<module:echarts/data/Tree~TreeNode>}\n * @readOnly\n */\n this.children = [];\n\n /**\n * @type {Array.<module:echarts/data/Tree~TreeNode>}\n * @pubilc\n */\n this.viewChildren = [];\n\n /**\n * @type {moduel:echarts/data/Tree}\n * @readOnly\n */\n this.hostTree = hostTree;\n};\n\nTreeNode.prototype = {\n\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 if (zrUtil.isString(options)) {\n options = {order: options};\n }\n\n var order = options.order || 'preorder';\n var children = this[options.attr || 'children'];\n\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 for (var i = 0; i < this.children.length; i++) {\n var child = this.children[i];\n child.updateDepthAndHeight(depth + 1);\n if (child.height > height) {\n height = child.height;\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 for (var i = 0, children = this.children, len = children.length; i < len; i++) {\n var res = children[i].getNodeById(id);\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 for (var i = 0, children = this.children, len = children.length; i < len; i++) {\n var res = children[i].contains(node);\n if (res) {\n return res;\n }\n }\n },\n\n /**\n * @param {boolean} includeSelf Default false.\n * @return {Array.<module:echarts/data/Tree~TreeNode>} order: [root, child, grandchild, ...]\n */\n getAncestors: function (includeSelf) {\n var ancestors = [];\n var node = includeSelf ? this : this.parentNode;\n while (node) {\n ancestors.push(node);\n node = node.parentNode;\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\n && 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 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\n && 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 while (parent) {\n if (parent === this) {\n return true;\n }\n parent = parent.parentNode;\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/**\n * @constructor\n * @alias module:echarts/data/Tree\n * @param {module:echarts/model/Model} hostModel\n */\nfunction Tree(hostModel) {\n /**\n * @type {module:echarts/data/Tree~TreeNode}\n * @readOnly\n */\n this.root;\n\n /**\n * @type {module:echarts/data/List}\n * @readOnly\n */\n this.data;\n\n /**\n * Index of each item is the same as the raw index of coresponding list item.\n * @private\n * @type {Array.<module:echarts/data/Tree~TreeNode}\n */\n this._nodes = [];\n\n /**\n * @private\n * @readOnly\n * @type {module:echarts/model/Model}\n */\n this.hostModel = hostModel;\n\n}\n\nTree.prototype = {\n\n constructor: Tree,\n\n type: 'tree',\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\n * @param {Object} [context]\n */\n eachNode: function (options, cb, context) {\n this.root.eachNode(options, cb, context);\n },\n\n /**\n * @param {number} dataIndex\n * @return {module:echarts/data/Tree~TreeNode}\n */\n getNodeByDataIndex: function (dataIndex) {\n var rawIndex = this.data.getRawIndex(dataIndex);\n return this._nodes[rawIndex];\n },\n\n /**\n * @param {string} name\n * @return {module:echarts/data/Tree~TreeNode}\n */\n getNodeByName: function (name) {\n return this.root.getNodeByName(name);\n },\n\n /**\n * Update item available by list,\n * when list has been performed options like 'filterSelf' or 'map'.\n */\n update: function () {\n var data = this.data;\n var nodes = this._nodes;\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\n /**\n * Clear all layouts\n */\n clearLayouts: function () {\n this.data.clearItemLayouts();\n }\n};\n\n/**\n * data node format:\n * {\n * name: ...\n * value: ...\n * children: [\n * {\n * name: ...\n * value: ...\n * children: ...\n * },\n * ...\n * ]\n * }\n *\n * @static\n * @param {Object} dataRoot Root node.\n * @param {module:echarts/model/Model} hostModel\n * @return module:echarts/data/Tree\n */\nTree.createTree = function (dataRoot, hostModel, beforeLink) {\n\n var tree = new Tree(hostModel);\n var listData = [];\n var dimMax = 1;\n\n buildHierarchy(dataRoot);\n\n function buildHierarchy(dataNode, parentNode) {\n var value = dataNode.value;\n dimMax = Math.max(dimMax, zrUtil.isArray(value) ? value.length : 1);\n\n listData.push(dataNode);\n\n var node = new TreeNode(dataNode.name, tree);\n parentNode\n ? addChild(node, parentNode)\n : (tree.root = node);\n\n tree._nodes.push(node);\n\n var children = dataNode.children;\n if (children) {\n for (var i = 0; i < children.length; i++) {\n buildHierarchy(children[i], node);\n }\n }\n }\n\n tree.root.updateDepthAndHeight(0);\n\n var dimensionsInfo = createDimensions(listData, {\n coordDimensions: ['value'],\n dimensionsCount: dimMax\n });\n\n var list = new List(dimensionsInfo, hostModel);\n list.initData(listData);\n\n beforeLink && beforeLink(list);\n\n linkList({\n mainData: list,\n struct: tree,\n structAttr: 'tree'\n });\n\n tree.update();\n\n return tree;\n};\n\n/**\n * It is needed to consider the mess of 'list', 'hostModel' when creating a TreeNote,\n * so this function is not ready and not necessary to be public.\n *\n * @param {(module:echarts/data/Tree~TreeNode|Object)} child\n */\nfunction addChild(child, node) {\n var children = node.children;\n if (child.parentNode === node) {\n return;\n }\n\n children.push(child);\n child.parentNode = node;\n}\n\nexport default Tree;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport SeriesModel from '../../model/Series';\nimport Tree from '../../data/Tree';\nimport {encodeHTML} from '../../util/format';\nimport Model from '../../model/Model';\n\nexport default SeriesModel.extend({\n\n type: 'series.tree',\n\n layoutInfo: null,\n\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\n //create an virtual root\n var root = {name: option.name, children: option.data};\n\n var leaves = option.leaves || {};\n var leavesModel = new Model(leaves, this, this.ecModel);\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 if (!node.children.length || !node.isExpand) {\n model.parentModel = leavesModel;\n }\n return model;\n });\n }\n\n var treeDepth = 0;\n\n tree.eachNode('preorder', function (node) {\n if (node.depth > treeDepth) {\n treeDepth = node.depth;\n }\n });\n\n var expandAndCollapse = option.expandAndCollapse;\n var expandTreeDepth = (expandAndCollapse && option.initialTreeDepth >= 0)\n ? option.initialTreeDepth : treeDepth;\n\n tree.root.eachNode('preorder', function (node) {\n var item = node.hostTree.data.getRawDataItem(node.dataIndex);\n // Add item.collapsed != null, because users can collapse node original in the series.data.\n node.isExpand = (item && item.collapsed != null)\n ? !item.collapsed\n : node.depth <= expandTreeDepth;\n });\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 if (orient === 'horizontal') {\n orient = 'LR';\n }\n else if (orient === 'vertical') {\n orient = 'TB';\n }\n return orient;\n },\n\n setZoom: function (zoom) {\n this.option.zoom = zoom;\n },\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 while (node && (node !== realRoot)) {\n name = node.parentNode.name + '.' + name;\n node = node.parentNode;\n }\n return encodeHTML(name + (\n (isNaN(value) || value == null) ? '' : ' : ' + value\n ));\n },\n\n defaultOption: {\n zlevel: 0,\n z: 2,\n coordinateSystem: 'view',\n\n // the position of the whole view\n left: '12%',\n top: '12%',\n right: '12%',\n bottom: '12%',\n\n // the layout of the tree, two value can be selected, 'orthogonal' or 'radial'\n layout: 'orthogonal',\n\n // value can be 'polyline'\n edgeShape: 'curve',\n\n edgeForkPosition: '50%',\n\n // true | false | 'move' | 'scale', see module:component/helper/RoamController.\n roam: false,\n\n // Symbol size scale ratio in roam\n nodeScaleRatio: 0.4,\n\n // Default on center of graph\n center: null,\n\n zoom: 1,\n\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\n symbol: 'emptyCircle',\n\n symbolSize: 7,\n\n expandAndCollapse: true,\n\n initialTreeDepth: 2,\n\n lineStyle: {\n color: '#ccc',\n width: 1.5,\n curveness: 0.5\n },\n\n itemStyle: {\n color: 'lightsteelblue',\n borderColor: '#c23531',\n borderWidth: 1.5\n },\n\n label: {\n show: true,\n color: '#555'\n },\n\n leaves: {\n label: {\n show: true\n }\n },\n\n animationEasing: 'linear',\n\n animationDuration: 700,\n\n animationDurationUpdate: 1000\n }\n});","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* A third-party license is embeded for some of the code in this file:\n* The tree layoutHelper implementation was originally copied from\n* \"d3.js\"(https://github.com/d3/d3-hierarchy) with\n* some modifications made for this project.\n* (see more details in the comment of the specific method below.)\n* The use of the source code of this file is also subject to the terms\n* and consitions of the licence of \"d3.js\" (BSD-3Clause, see\n* </licenses/LICENSE-d3>).\n*/\n\n/**\n * @file The layout algorithm of node-link tree diagrams. Here we using Reingold-Tilford algorithm to drawing\n * the tree.\n */\n\nimport * as layout from '../../util/layout';\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 */\nexport function 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\n var nodes = [root];\n var node;\n var children;\n\n while (node = nodes.pop()) { // jshint ignore:line\n children = node.children;\n if (node.isExpand && children.length) {\n var n = children.length;\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/**\n * The implementation of this function was originally copied from \"d3.js\"\n * <https://github.com/d3/d3-hierarchy/blob/4c1f038f2725d6eae2e49b61d01456400694bac4/src/tree.js>\n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * Computes a preliminary x coordinate for node. Before that, this function is\n * applied recursively to the children of node, as well as the function\n * apportion(). After spacing out the children by calling executeShifts(), the\n * node is placed to the midpoint of its outermost children.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n * @param {Function} separation\n */\nexport function 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 if (children.length) {\n executeShifts(node);\n var midPoint = (children[0].hierNode.prelim + children[children.length - 1].hierNode.prelim) / 2;\n if (subtreeW) {\n node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW);\n node.hierNode.modifier = node.hierNode.prelim - midPoint;\n }\n else {\n node.hierNode.prelim = midPoint;\n }\n }\n else if (subtreeW) {\n node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW);\n }\n node.parentNode.hierNode.defaultAncestor = apportion(\n node,\n subtreeW,\n node.parentNode.hierNode.defaultAncestor || siblings[0],\n separation\n );\n}\n\n\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * <https://github.com/d3/d3-hierarchy/blob/4c1f038f2725d6eae2e49b61d01456400694bac4/src/tree.js>\n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * Computes all real x-coordinates by summing up the modifiers recursively.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n */\nexport function secondWalk(node) {\n var nodeX = node.hierNode.prelim + node.parentNode.hierNode.modifier;\n node.setLayout({x: nodeX}, true);\n node.hierNode.modifier += node.parentNode.hierNode.modifier;\n}\n\n\nexport function separation(cb) {\n return arguments.length ? cb : defaultSeparation;\n}\n\n/**\n * Transform the common coordinate to radial coordinate.\n *\n * @param {number} x\n * @param {number} y\n * @return {Object}\n */\nexport function 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/**\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 */\nexport function getViewRect(seriesModel, api) {\n return layout.getLayoutRect(\n seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n }\n );\n}\n\n/**\n * All other shifts, applied to the smaller subtrees between w- and w+, are\n * performed by this function.\n *\n * The implementation of this function was originally copied from \"d3.js\"\n * <https://github.com/d3/d3-hierarchy/blob/4c1f038f2725d6eae2e49b61d01456400694bac4/src/tree.js>\n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n */\nfunction executeShifts(node) {\n var children = node.children;\n var n = children.length;\n var shift = 0;\n var change = 0;\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/**\n * The implementation of this function was originally copied from \"d3.js\"\n * <https://github.com/d3/d3-hierarchy/blob/4c1f038f2725d6eae2e49b61d01456400694bac4/src/tree.js>\n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * The core of the algorithm. Here, a new subtree is combined with the\n * previous subtrees. Threads are used to traverse the inside and outside\n * contours of the left and right subtree up to the highest common level.\n * Whenever two nodes of the inside contours conflict, we compute the left\n * one of the greatest uncommon ancestors using the function nextAncestor()\n * and call moveSubtree() to shift the subtree and prepare the shifts of\n * smaller subtrees. Finally, we add a new thread (if necessary).\n *\n * @param {module:echarts/data/Tree~TreeNode} subtreeV\n * @param {module:echarts/data/Tree~TreeNode} subtreeW\n * @param {module:echarts/data/Tree~TreeNode} ancestor\n * @param {Function} separation\n * @return {module:echarts/data/Tree~TreeNode}\n */\nfunction apportion(subtreeV, subtreeW, ancestor, separation) {\n\n if (subtreeW) {\n var nodeOutRight = subtreeV;\n var nodeInRight = subtreeV;\n var nodeOutLeft = nodeInRight.parentNode.children[0];\n var nodeInLeft = subtreeW;\n\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\n - sumInRight + separation(nodeInLeft, nodeInRight);\n if (shift > 0) {\n moveSubtree(nextAncestor(nodeInLeft, subtreeV, ancestor), subtreeV, shift);\n sumInRight += shift;\n sumOutRight += shift;\n }\n sumInLeft += nodeInLeft.hierNode.modifier;\n sumInRight += nodeInRight.hierNode.modifier;\n sumOutRight += nodeOutRight.hierNode.modifier;\n sumOutLeft += nodeOutLeft.hierNode.modifier;\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 return ancestor;\n}\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 */\nfunction nextRight(node) {\n var children = node.children;\n return children.length && node.isExpand ? children[children.length - 1] : node.hierNode.thread;\n}\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 */\nfunction nextLeft(node) {\n var children = node.children;\n return children.length && node.isExpand ? children[0] : node.hierNode.thread;\n}\n\n/**\n * If nodeInLefts ancestor is a sibling of node, returns nodeInLefts 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 */\nfunction nextAncestor(nodeInLeft, node, ancestor) {\n return nodeInLeft.hierNode.ancestor.parentNode === node.parentNode\n ? nodeInLeft.hierNode.ancestor : ancestor;\n}\n\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * <https://github.com/d3/d3-hierarchy/blob/4c1f038f2725d6eae2e49b61d01456400694bac4/src/tree.js>\n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * 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 */\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/**\n * The implementation of this function was originally copied from \"d3.js\"\n * <https://github.com/d3/d3-hierarchy/blob/4c1f038f2725d6eae2e49b61d01456400694bac4/src/tree.js>\n * with some modifications made for this program.\n * See the license statement at the head of this file.\n */\nfunction defaultSeparation(node1, node2) {\n return node1.parentNode === node2.parentNode ? 1 : 2;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../../util/graphic';\nimport SymbolClz from '../helper/Symbol';\nimport {radialCoordinate} from './layoutHelper';\nimport * as echarts from '../../echarts';\nimport * as bbox from 'zrender/src/core/bbox';\nimport View from '../../coord/View';\nimport * as roamHelper from '../../component/helper/roamHelper';\nimport RoamController from '../../component/helper/RoamController';\nimport {onIrrelevantElement} from '../../component/helper/cursorHelper';\nimport { __DEV__ } from '../../config';\nimport {parsePercent} from '../../util/number';\n\nvar TreeShape = graphic.extendShape({\n shape: {\n parentPoint: [],\n childPoints: [],\n orient: '',\n forkPosition: ''\n },\n\n style: {\n stroke: '#000',\n fill: null\n },\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\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\nexport default echarts.extendChartView({\n\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 /**\n * @private\n * @type {module:echarts/data/Tree}\n */\n this._oldTree;\n\n /**\n * @private\n * @type {module:zrender/container/Group}\n */\n this._mainGroup = new graphic.Group();\n\n /**\n * @private\n * @type {module:echarts/componet/helper/RoamController}\n */\n this._controller = new RoamController(api.getZr());\n\n this._controllerHost = {target: this.group};\n\n this.group.add(this._mainGroup);\n },\n\n render: function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n\n var layoutInfo = seriesModel.layoutInfo;\n\n var group = this._mainGroup;\n\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 }\n else {\n group.attr('position', [layoutInfo.x, layoutInfo.y]);\n }\n\n this._updateViewCoordSys(seriesModel, layoutInfo, layout);\n this._updateController(seriesModel, ecModel, api);\n\n var oldData = this._data;\n\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\n data.diff(oldData)\n .add(function (newIdx) {\n if (symbolNeedsDraw(data, newIdx)) {\n // Create node and edge\n updateNode(data, newIdx, null, group, seriesModel, seriesScope);\n }\n })\n .update(function (newIdx, oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n if (!symbolNeedsDraw(data, newIdx)) {\n symbolEl && removeNode(oldData, oldIdx, symbolEl, group, seriesModel, seriesScope);\n return;\n }\n // Update node and edge\n updateNode(data, newIdx, symbolEl, group, seriesModel, seriesScope);\n })\n .remove(function (oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n // 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 if (symbolEl) {\n removeNode(oldData, oldIdx, symbolEl, group, seriesModel, seriesScope);\n }\n })\n .execute();\n\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 this._data = data;\n },\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 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);\n\n // If don't Store min max when collapse the root node after roam,\n // the root node will disappear.\n var oldMin = this._min;\n var oldMax = this._max;\n\n // If width or height is 0\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 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\n viewCoordSys.setBoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]);\n\n viewCoordSys.setCenter(seriesModel.get('center'));\n viewCoordSys.setZoom(seriesModel.get('zoom'));\n\n // Here we use viewCoordSys just for computing the 'position' and 'scale' of the group\n this.group.attr({\n position: viewCoordSys.position,\n scale: viewCoordSys.scale\n });\n\n this._viewCoordSys = viewCoordSys;\n this._min = min;\n this._max = max;\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)\n && !onIrrelevantElement(e, api, seriesModel);\n });\n\n controller.enable(seriesModel.get('roam'));\n controllerHost.zoomLimit = seriesModel.get('scaleLimit');\n controllerHost.zoom = seriesModel.coordinateSystem.getZoom();\n\n controller\n .off('pan')\n .off('zoom')\n .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)\n .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 this._updateNodeAndLinkScale(seriesModel);\n }, this);\n },\n\n _updateNodeAndLinkScale: function (seriesModel) {\n var data = seriesModel.getData();\n\n var nodeScale = this._getNodeGlobalScale(seriesModel);\n var invScale = [nodeScale, nodeScale];\n\n data.eachItemGraphicEl(function (el, idx) {\n el.attr('scale', invScale);\n });\n },\n\n _getNodeGlobalScale: function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys.type !== 'view') {\n return 1;\n }\n\n var nodeScaleRatio = this._nodeScaleRatio;\n\n var groupScale = coordSys.scale;\n var groupZoom = (groupScale && groupScale[0]) || 1;\n // Scale node when zoom changes\n var roamZoom = coordSys.getZoom();\n var nodeScale = (roamZoom - 1) * nodeScaleRatio + 1;\n\n return nodeScale / groupZoom;\n },\n\n dispose: function () {\n this._controller && this._controller.dispose();\n this._controllerHost = {};\n },\n\n remove: function () {\n this._mainGroup.removeAll();\n this._data = null;\n }\n\n});\n\nfunction symbolNeedsDraw(data, dataIndex) {\n var layout = data.getItemLayout(dataIndex);\n\n return layout\n && !isNaN(layout.x) && !isNaN(layout.y)\n && 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 }\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\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 ? {\n x: sourceSymbolEl.position[0],\n y: sourceSymbolEl.position[1],\n rawX: sourceSymbolEl.__radialOldRawX,\n rawY: sourceSymbolEl.__radialOldRawY\n }\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 }\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\n group.add(symbolEl);\n data.setItemGraphicEl(dataIndex, symbolEl);\n graphic.updateProps(symbolEl, {\n position: [targetLayout.x, targetLayout.y]\n }, seriesModel);\n\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 if (rad < 0) {\n rad = Math.PI * 2 + rad;\n }\n isLeft = center.x < rootLayout.x;\n if (isLeft) {\n rad = rad - Math.PI;\n }\n }\n else {\n rad = Math.atan2(targetLayout.y - rootLayout.y, targetLayout.x - rootLayout.x);\n if (rad < 0) {\n rad = Math.PI * 2 + rad;\n }\n if (node.children.length === 0 || (node.children.length !== 0 && node.isExpand === false)) {\n isLeft = targetLayout.x < rootLayout.x;\n if (isLeft) {\n rad = rad - Math.PI;\n }\n }\n else {\n isLeft = targetLayout.x > rootLayout.x;\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\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(\n seriesModel, node, virtualRoot, symbolEl, sourceOldLayout,\n sourceLayout, targetLayout, group, seriesScope\n );\n\n}\n\nfunction drawEdge(\n seriesModel, node, virtualRoot, symbolEl, sourceOldLayout,\n sourceLayout, targetLayout, group, seriesScope\n) {\n\n var edgeShape = seriesScope.edgeShape;\n var edge = symbolEl.__edge;\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({opacity: 0, strokeNoScale: true}, seriesScope.lineStyle)\n });\n }\n\n graphic.updateProps(edge, {\n shape: getEdgeShape(seriesScope, sourceLayout, targetLayout),\n style: zrUtil.defaults({opacity: 1}, seriesScope.lineStyle)\n }, seriesModel);\n }\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 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({opacity: 0, strokeNoScale: true}, seriesScope.lineStyle)\n });\n }\n graphic.updateProps(edge, {\n shape: {\n parentPoint: [targetLayout.x, targetLayout.y],\n childPoints: childPoints\n },\n style: zrUtil.defaults({opacity: 1}, seriesScope.lineStyle)\n }, seriesModel);\n }\n }\n else {\n if (__DEV__) {\n throw new Error('The polyline edgeShape can only be used in orthogonal layout');\n }\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\n var source = node.parentNode === virtualRoot ? node : node.parentNode || node;\n var edgeShape = seriesScope.edgeShape;\n var sourceLayout;\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\n symbolEl.fadeOut(null, {keepLabel: true});\n\n var sourceSymbolEl = data.getItemGraphicEl(source.dataIndex);\n var sourceEdge = sourceSymbolEl.__edge;\n\n // 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 var edge = symbolEl.__edge\n || ((source.isExpand === false || source.children.length === 1) ? sourceEdge : undefined);\n\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 }\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\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\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 }\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 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}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport {updateCenterAndZoom} from '../../action/roamHelper';\n\necharts.registerAction({\n type: 'treeExpandAndCollapse',\n event: 'treeExpandAndCollapse',\n update: 'update'\n}, function (payload, ecModel) {\n ecModel.eachComponent({mainType: 'series', subType: 'tree', query: payload}, 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});\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({mainType: 'series', subType: 'tree', query: payload}, function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n var res = updateCenterAndZoom(coordSys, payload);\n\n seriesModel.setCenter\n && seriesModel.setCenter(res.center);\n\n seriesModel.setZoom\n && 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/**\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()) { // jshint ignore:line\n next.push(node);\n if (node.isExpand) {\n var children = node.children;\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()) { // jshint ignore:line\n callback(node, separation);\n }\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 */\nfunction eachBefore(root, callback) {\n var nodes = [root];\n var node;\n while (node = nodes.pop()) { // jshint ignore:line\n callback(node);\n if (node.isExpand) {\n var children = node.children;\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\nexport { eachAfter, eachBefore };","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {\n eachAfter,\n eachBefore\n} from './traversalHelper';\nimport {\n init,\n firstWalk,\n secondWalk,\n separation as sep,\n radialCoordinate,\n getViewRect\n} from './layoutHelper';\n\nexport default function (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 }\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\n var left = realRoot;\n var right = realRoot;\n var bottom = realRoot;\n eachBefore(realRoot, function (node) {\n var x = node.getLayout().x;\n if (x < left.getLayout().x) {\n left = node;\n }\n if (x > right.getLayout().x) {\n right = node;\n }\n if (node.depth > bottom.depth) {\n bottom = node;\n }\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 if (layout === 'radial') {\n kx = width / (right.getLayout().x + delta + tx);\n // here we use (node.depth - 1), bucause the real root's depth is 1\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({x: finalCoor.x, y: finalCoor.y, rawX: coorX, rawY: coorY}, true);\n });\n }\n else {\n var orient = seriesModel.getOrient();\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'\n ? (node.depth - 1) * kx\n : width - (node.depth - 1) * kx;\n node.setLayout({x: coorX, y: coorY}, true);\n });\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'\n ? (node.depth - 1) * ky\n : height - (node.depth - 1) * ky;\n node.setLayout({x: coorX, y: coorY}, true);\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\nimport * as echarts from '../echarts';\n\nimport './tree/TreeSeries';\nimport './tree/TreeView';\nimport './tree/treeAction';\n\nimport visualSymbol from '../visual/symbol';\nimport treeLayout from './tree/treeLayout';\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\nimport * as zrUtil from 'zrender/src/core/util';\n\nexport function 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 {node: targetNode};\n }\n\n var targetNodeId = payload.targetNodeId;\n if (targetNodeId != null && (targetNode = root.getNodeById(targetNodeId))) {\n return {node: targetNode};\n }\n }\n}\n\n// Not includes the given node at the last item.\nexport function getPathToRoot(node) {\n var path = [];\n while (node) {\n node = node.parentNode;\n node && path.push(node);\n }\n return path.reverse();\n}\n\nexport function aboveViewRoot(viewRoot, node) {\n var viewPath = getPathToRoot(viewRoot);\n return zrUtil.indexOf(viewPath, node) >= 0;\n}\n\n// From root to the input node (the input node will be included).\nexport function 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\n return treePathInfo;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport SeriesModel from '../../model/Series';\nimport Tree from '../../data/Tree';\nimport Model from '../../model/Model';\nimport {encodeHTML, addCommas} from '../../util/format';\nimport {wrapTreePathInfo} from '../helper/treeHelper';\n\nexport default SeriesModel.extend({\n\n type: 'series.treemap',\n\n layoutMode: 'box',\n\n dependencies: ['grid', 'polar'],\n\n preventUsingHoverLayer: true,\n\n /**\n * @type {module:echarts/data/Tree~Node}\n */\n _viewRoot: null,\n\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, // Can be null or false or true\n // (order by desc default, asc not supported yet (strange effect))\n clipWindow: 'origin', // Size of clipped window when zooming. 'origin' or 'fullscreen'\n squareRatio: 0.5 * (1 + Math.sqrt(5)), // golden ratio\n leafDepth: null, // Nodes on depth from root are regarded as leaves.\n // Count from zero (zero represents only view root).\n drillDownIcon: '▶', // Use html character temporarily because it is complicated\n // to align specialized icon. ▷▶❒❐▼✚\n\n zoomToNodeRatio: 0.32 * 0.32, // Be effective when using zoomToNode. Specify the proportion of the\n // target node area in the view area.\n roam: true, // true, false, 'scale' or 'zoom', 'move'.\n nodeClick: 'zoomToNode', // 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, // Width of empty node.\n itemStyle: {\n color: 'rgba(0,0,0,0.7)', //'#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', // Can be [5, '5%'] or position stirng like 'insideTopLeft', ...\n // formatter: null,\n color: '#fff',\n ellipsis: true\n // align\n // verticalAlign\n },\n upperLabel: { // 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, // Can be 'none' if not necessary.\n colorAlpha: null, // Can be 'none' if not necessary.\n colorSaturation: null, // 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 emphasis: {\n upperLabel: {\n show: true,\n position: [0, '50%'],\n color: '#fff',\n ellipsis: true,\n verticalAlign: 'middle'\n }\n },\n\n visualDimension: 0, // Can be 0, 1, 2, 3.\n visualMin: null,\n visualMax: null,\n\n color: [], // + 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, // Array. Specify color alpha range of each level, like [0.2, 0.8]\n colorSaturation: null, // Array. Specify color saturation of each level, like [0.2, 0.5]\n colorMappingBy: 'index', // 'value' or 'index' or 'id'.\n visibleMin: 10, // 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, // 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 * @override\n */\n getInitialData: function (option, ecModel) {\n // Create a virtual root.\n var root = {name: option.name, children: option.data};\n\n completeTreeValue(root);\n\n var levels = option.levels || [];\n\n // 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 var designatedVisualItemStyle = this.designatedVisualItemStyle = {};\n var designatedVisualModel = new Model({itemStyle: designatedVisualItemStyle}, this, ecModel);\n\n levels = option.levels = setDefault(levels, ecModel);\n var levelModels = zrUtil.map(levels || [], function (levelDefine) {\n return new Model(levelDefine, designatedVisualModel, ecModel);\n }, this);\n\n // 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 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 // If no levelModel, we also need `designatedVisualModel`.\n model.parentModel = levelModel || designatedVisualModel;\n return model;\n });\n }\n\n return tree.data;\n },\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)\n ? addCommas(value[0]) : addCommas(value);\n var name = data.getName(dataIndex);\n\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\n var node = this.getData().tree.getNodeByDataIndex(dataIndex);\n params.treePathInfo = wrapTreePathInfo(node, this);\n\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 this._idIndexMapCount = 0;\n }\n\n var index = idIndexMap.get(id);\n if (index == null) {\n idIndexMap.set(id, index = this._idIndexMapCount++);\n }\n\n return index;\n },\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\n ? (this._viewRoot = viewRoot)\n : (viewRoot = this._viewRoot);\n\n var root = this.getRawData().tree.root;\n\n if (!viewRoot\n || (viewRoot !== root && !root.contains(viewRoot))\n ) {\n this._viewRoot = root;\n }\n }\n});\n\n/**\n * @param {Object} dataNode\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\n zrUtil.each(dataNode.children, function (child) {\n\n completeTreeValue(child);\n\n var childValue = child.value;\n zrUtil.isArray(childValue) && (childValue = childValue[0]);\n\n sum += childValue;\n });\n\n var thisValue = dataNode.value;\n if (zrUtil.isArray(thisValue)) {\n thisValue = thisValue[0];\n }\n\n if (thisValue == null || isNaN(thisValue)) {\n thisValue = sum;\n }\n // Value should not less than 0.\n if (thisValue < 0) {\n thisValue = 0;\n }\n\n zrUtil.isArray(dataNode.value)\n ? (dataNode.value[0] = thisValue)\n : (dataNode.value = thisValue);\n}\n\n/**\n * set default to level configuration\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')\n || (modelColor && modelColor !== 'none')\n ) {\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as graphic from '../../util/graphic';\nimport * as layout from '../../util/layout';\nimport * as zrUtil from 'zrender/src/core/util';\nimport {wrapTreePathInfo} from '../helper/treeHelper';\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\n containerGroup.add(this.group);\n}\n\nBreadcrumb.prototype = {\n\n constructor: Breadcrumb,\n\n render: function (seriesModel, api, targetNode, onSelect) {\n var model = seriesModel.getModel('breadcrumb');\n var thisGroup = this.group;\n\n thisGroup.removeAll();\n\n if (!model.get('show') || !targetNode) {\n return;\n }\n\n var normalStyleModel = model.getModel('itemStyle');\n // var emphasisStyleModel = model.getModel('emphasis.itemStyle');\n var textStyleModel = normalStyleModel.getModel('textStyle');\n\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 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(\n textRect.width + TEXT_PADDING * 2,\n layoutParam.emptyItemWidth\n );\n layoutParam.totalWidth += itemWidth + ITEM_GAP;\n layoutParam.renderList.push({node: node, text: text, width: itemWidth});\n }\n },\n\n /**\n * @private\n */\n _renderContent: function (\n seriesModel, layoutParam, normalStyleModel, textStyleModel, onSelect\n ) {\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;\n\n // Hdie text and shorten width if necessary.\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(\n lastX, 0, itemWidth, height,\n i === renderList.length - 1, i === 0\n )\n },\n style: zrUtil.defaults(\n normalStyleModel.getItemStyle(),\n {\n lineJoin: 'bevel',\n text: text,\n textFill: textStyleModel.getTextColor(),\n textFont: textStyleModel.getFont()\n }\n ),\n z: 10,\n onclick: zrUtil.curry(onSelect, itemNode)\n });\n this.group.add(el);\n\n packEventData(el, seriesModel, itemNode);\n\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 = [\n [head ? x : x - ARRAY_LENGTH, y],\n [x + itemWidth, y],\n [x + itemWidth, y + itemHeight],\n [head ? x : x - ARRAY_LENGTH, y + itemHeight]\n ];\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}\n\n// Package custom mouse event.\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', // 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\nexport default Breadcrumb;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\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 */\nexport function createWrap() {\n\n var storage = [];\n var elExistsMap = {};\n var doneCallback;\n\n return {\n\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 elExistsMap[el.id] = 1;\n\n storage.push(\n {el: el, target: target, time: time, delay: delay, easing: easing}\n );\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 if (!count) {\n storage.length = 0;\n elExistsMap = {};\n doneCallback && doneCallback();\n }\n }\n }\n };\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../../util/graphic';\nimport DataDiffer from '../../data/DataDiffer';\nimport * as helper from '../helper/treeHelper';\nimport Breadcrumb from './Breadcrumb';\nimport RoamController from '../../component/helper/RoamController';\nimport BoundingRect from 'zrender/src/core/BoundingRect';\nimport * as matrix from 'zrender/src/core/matrix';\nimport * as animationUtil from '../../util/animation';\nimport makeStyleMapper from '../../model/mixin/makeStyleMapper';\nimport {windowOpen} from '../../util/format';\n\nvar bind = zrUtil.bind;\nvar Group = graphic.Group;\nvar Rect = graphic.Rect;\nvar each = zrUtil.each;\n\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.\nvar Z_BG = 1;\nvar Z_CONTENT = 2;\n\nvar getItemStyleEmphasis = makeStyleMapper([\n ['fill', 'color'],\n // `borderColor` and `borderWidth` has been occupied,\n // so use `stroke` to indicate the stroke of the rect.\n ['stroke', 'strokeColor'],\n ['lineWidth', 'strokeWidth'],\n ['shadowBlur'],\n ['shadowOffsetX'],\n ['shadowOffsetY'],\n ['shadowColor']\n]);\nvar getItemStyleNormal = function (model) {\n // Normal style props should include emphasis style props.\n var itemStyle = getItemStyleEmphasis(model);\n // Clear styles set by emphasis.\n itemStyle.stroke = itemStyle.fill = itemStyle.lineWidth = null;\n return itemStyle;\n};\n\nexport default echarts.extendChartView({\n\n type: 'treemap',\n\n /**\n * @override\n */\n init: function (o, api) {\n\n /**\n * @private\n * @type {module:zrender/container/Group}\n */\n this._containerGroup;\n\n /**\n * @private\n * @type {Object.<string, Array.<module:zrender/container/Group>>}\n */\n this._storage = createStorage();\n\n /**\n * @private\n * @type {module:echarts/data/Tree}\n */\n this._oldTree;\n\n /**\n * @private\n * @type {module:echarts/chart/treemap/Breadcrumb}\n */\n this._breadcrumb;\n\n /**\n * @private\n * @type {module:echarts/component/helper/RoamController}\n */\n this._controller;\n\n /**\n * 'ready', 'animating'\n * @private\n */\n this._state = 'ready';\n },\n\n /**\n * @override\n */\n render: function (seriesModel, ecModel, api, payload) {\n\n var models = ecModel.findComponents({\n mainType: 'series', subType: 'treemap', query: payload\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\n var types = ['treemapZoomToNode', 'treemapRootToNode'];\n var targetInfo = helper\n .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;\n\n // Mark new root when action is treemapRootToNode.\n var reRoot = (payloadType === 'treemapRootToNode' && targetInfo && thisStorage)\n ? {\n rootNodeGroup: thisStorage.nodeGroup[targetInfo.node.getRawIndex()],\n direction: payload.direction\n }\n : null;\n\n var containerGroup = this._giveContainerGroup(layoutInfo);\n\n var renderResult = this._doRender(containerGroup, seriesModel, reRoot);\n (\n !isInit && (\n !payloadType\n || payloadType === 'treemapZoomToNode'\n || payloadType === 'treemapRootToNode'\n )\n )\n ? this._doAnimation(containerGroup, renderResult, seriesModel, reRoot)\n : 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 if (!containerGroup) {\n // FIXME\n // 加一层containerGroup是为了clip但是现在clip功能并没有实现。\n containerGroup = this._containerGroup = new Group();\n this._initEvents(containerGroup);\n this.group.add(containerGroup);\n }\n containerGroup.attr('position', [layoutInfo.x, layoutInfo.y]);\n\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;\n\n // Clear last shape records.\n var lastsForAnimation = createStorage();\n var thisStorage = createStorage();\n var oldStorage = this._storage;\n var willInvisibleEls = [];\n\n var doRenderNode = zrUtil.curry(\n renderNode, seriesModel,\n thisStorage, oldStorage, reRoot,\n lastsForAnimation, willInvisibleEls\n );\n\n // 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(\n thisTree.root ? [thisTree.root] : [],\n (oldTree && oldTree.root) ? [oldTree.root] : [],\n containerGroup,\n thisTree === oldTree || !oldTree,\n 0\n );\n\n // Process all removing.\n var willDeleteEls = clearStorage(oldStorage);\n\n this._oldTree = thisTree;\n this._storage = thisStorage;\n\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 }\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))\n .add(processNode)\n .update(processNode)\n .remove(zrUtil.curry(processNode, null))\n .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\n var group = doRenderNode(thisNode, oldNode, parentGroup, depth);\n\n group && dualTravel(\n thisNode && thisNode.viewChildren || [],\n oldNode && oldNode.viewChildren || [],\n group,\n sameTree,\n depth + 1\n );\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;\n // Setting invisible is for optimizing, so no need to set dirty,\n // just mark as invisible.\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();\n\n // Make delete animations.\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 var target;\n\n if (reRoot && reRoot.direction === 'drillDown') {\n target = parent === reRoot.rootNodeGroup\n // 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 }\n }\n // Others.\n : {style: {opacity: 0}};\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], style: {opacity: 0}}\n : {\n shape: {x: targetX, y: targetY, width: 0, height: 0},\n style: {opacity: 0}\n };\n }\n\n target && animationWrap.add(el, target, duration, easing);\n });\n });\n\n // Make other animations\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 }\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 = {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 = {opacity: 1};\n }\n }\n\n animationWrap.add(el, target, duration, easing);\n });\n }, this);\n\n this._state = 'animating';\n\n animationWrap\n .done(bind(function () {\n this._state = 'ready';\n renderResult.renderFinally();\n }, this))\n .start();\n },\n\n /**\n * @private\n */\n _resetController: function (api) {\n var controller = this._controller;\n\n // Init controller.\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 if (controller) {\n controller.dispose();\n controller = null;\n }\n },\n\n /**\n * @private\n */\n _onPan: function (e) {\n if (this._state !== 'animating'\n && (Math.abs(e.dx) > DRAG_THRESHOLD || Math.abs(e.dy) > DRAG_THRESHOLD)\n ) {\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, y: rootLayout.y + e.dy,\n width: rootLayout.width, 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(\n rootLayout.x, rootLayout.y, rootLayout.width, rootLayout.height\n );\n var layoutInfo = this.seriesModel.layoutInfo;\n\n // Transform mouse coord from global to containerGroup.\n mouseX -= layoutInfo.x;\n mouseY -= layoutInfo.y;\n\n // Scale root bounding rect.\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\n rect.applyTransform(m);\n\n this.api.dispatchAction({\n type: 'treemapRender',\n from: this.uid,\n seriesId: this.seriesModel.id,\n rootRect: {\n x: rect.x, y: rect.y,\n width: rect.width, 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 if (node.getLayout().isLeafRoot) {\n this._rootToNode(targetInfo);\n }\n else {\n if (nodeClick === 'zoomToNode') {\n this._zoomToNode(targetInfo);\n }\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\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()}\n // FIXME\n // better way?\n // Find breadcrumb tail on center of containerGroup.\n : this.findTarget(api.getWidth() / 2, api.getHeight() / 2);\n\n if (!targetInfo) {\n targetInfo = {node: seriesModel.getData().tree.root};\n }\n }\n\n (this._breadcrumb || (this._breadcrumb = new Breadcrumb(this.group)))\n .render(seriesModel, api, targetInfo.node, bind(onSelect, this));\n\n function onSelect(node) {\n if (this._state !== 'animating') {\n helper.aboveViewRoot(seriesModel.getViewRoot(), node)\n ? this._rootToNode({node: node})\n : this._zoomToNode({node: node});\n }\n }\n },\n\n /**\n * @override\n */\n remove: function () {\n this._clearController();\n this._containerGroup && this._containerGroup.removeAll();\n this._storage = createStorage();\n this._state = 'ready';\n this._breadcrumb && this._breadcrumb.remove();\n },\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\n viewRoot.eachNode({attr: 'viewChildren', order: 'preorder'}, function (node) {\n var bgEl = this._storage.background[node.getRawIndex()];\n // If invisible, there might be no element.\n if (bgEl) {\n var point = bgEl.transformCoordToLocal(x, y);\n var shape = bgEl.shape;\n\n // For performance consideration, dont use 'getBoundingRect'.\n if (shape.x <= point[0]\n && point[0] <= shape.x + shape.width\n && shape.y <= point[1]\n && point[1] <= shape.y + shape.height\n ) {\n targetInfo = {node: node, offsetX: point[0], offsetY: point[1]};\n }\n else {\n return false; // Suppress visit subtree.\n }\n }\n }, this);\n\n return targetInfo;\n }\n\n});\n\n/**\n * @inner\n */\nfunction createStorage() {\n return {nodeGroup: [], background: [], content: []};\n}\n\n/**\n * @inner\n * @return Return undefined means do not travel further.\n */\nfunction renderNode(\n seriesModel, thisStorage, oldStorage, reRoot,\n lastsForAnimation, willInvisibleEls,\n thisNode, oldNode, parentGroup, depth\n) {\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\n // -------------------------------------------------------------------\n // Start of closure variables available in \"Procedures in renderNode\".\n\n var thisLayout = thisNode.getLayout();\n var data = seriesModel.getData();\n\n // Only for enabling highlight/downplay. Clear firstly.\n // Because some node will not be rendered.\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\n var thisRawIndex = thisNode.getRawIndex();\n var oldRawIndex = oldNode && oldNode.getRawIndex();\n\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');\n\n // End of closure ariables available in \"Procedures in renderNode\".\n // -----------------------------------------------------------------\n\n // Node group\n var group = giveGraphic('nodeGroup', Group);\n\n if (!group) {\n return;\n }\n\n parentGroup.add(group);\n // x,y are not set when el is above view root.\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();\n\n // Background\n var bg = giveGraphic('background', Rect, depth, Z_BG);\n bg && renderBackground(group, bg, isParent && thisLayout.upperLabelHeight);\n\n // No children, render content.\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 if (bg) {\n graphic.setAsHighDownDispatcher(bg, true);\n // Only for enabling highlight/downplay.\n data.setItemGraphicEl(thisNode.dataIndex, bg);\n }\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 graphic.setAsHighDownDispatcher(group, true);\n // Only for enabling highlight/downplay.\n data.setItemGraphicEl(thisNode.dataIndex, group);\n }\n\n return group;\n\n // ----------------------------\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\n bg.setShape({x: 0, y: 0, width: thisWidth, height: thisHeight});\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 }\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\n prepareText(\n normalStyle, emphasisStyle, visualBorderColor, upperLabelWidth, upperHeight,\n {x: borderWidth, y: 0, width: upperLabelWidth, height: upperHeight}\n );\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\n var contentWidth = Math.max(thisWidth - 2 * borderWidth, 0);\n var contentHeight = Math.max(thisHeight - 2 * borderWidth, 0);\n\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 }\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\n prepareText(normalStyle, emphasisStyle, visualColor, contentWidth, contentHeight);\n\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\n var normalLabelModel = nodeModel.getModel(\n upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL\n );\n var emphasisLabelModel = nodeModel.getModel(\n upperLabelRect ? PATH_UPPERLABEL_EMPHASIS : PATH_LABEL_EMPHASIS\n );\n\n var isShow = normalLabelModel.getShallow('show');\n\n graphic.setLabelStyle(\n normalStyle, emphasisStyle, normalLabelModel, emphasisLabelModel,\n {\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 );\n\n addDrillDownIcon(normalStyle, upperLabelRect, thisLayout);\n addDrillDownIcon(emphasisStyle, upperLabelRect, thisLayout);\n\n upperLabelRect && (normalStyle.textRect = zrUtil.clone(upperLabelRect));\n\n normalStyle.truncate = (isShow && normalLabelModel.get('ellipsis'))\n ? {\n outerWidth: width,\n outerHeight: height,\n minChar: 2\n }\n : null;\n }\n\n function addDrillDownIcon(style, upperLabelRect, thisLayout) {\n var text = style.text;\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 }\n // If invisible and no old element, do not create new element (for optimizing).\n else if (!thisInvisible) {\n element = new Ctor({z: calculateZ(depth, z)});\n element.__tmDepth = depth;\n element.__tmStorageName = storageName;\n prepareAnimationWhenNoOld(lasts, element, storageName);\n }\n\n // Set to thisStorage\n return (thisStorage[storageName][thisRawIndex] = element);\n }\n\n function prepareAnimationWhenHasOld(lasts, element, storageName) {\n var lastCfg = lasts[thisRawIndex] = {};\n lastCfg.old = storageName === 'nodeGroup'\n ? element.position.slice()\n : zrUtil.extend({}, element.shape);\n }\n\n // If a element is new, we need to find the animation start point carefully,\n // otherwise it will looks strange when 'zoomToNode'.\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;\n\n // New nodes appear from right-bottom corner in 'zoomToNode' animation.\n // For convenience, get old bounding rect from background.\n var parentOldBg = lastsForAnimation.background[parentNode.getRawIndex()];\n if (!reRoot && parentOldBg && parentOldBg.old) {\n parentOldX = parentOldBg.old.width;\n parentOldY = parentOldBg.old.height;\n }\n\n // When no parent old shape found, its parent is new too,\n // so we can just use {x:0, y:0}.\n lastCfg.old = storageName === 'nodeGroup'\n ? [0, parentOldY]\n : {x: parentOldX, y: parentOldY, width: 0, height: 0};\n }\n\n // Fade in, user can be aware that these nodes are new.\n lastCfg.fadein = storageName !== 'nodeGroup';\n }\n\n}\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.\nfunction calculateZ(depth, zInLevel) {\n var zb = depth * Z_BASE + zInLevel;\n return (zb - 1) / zb;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport * as echarts from '../../echarts';\nimport * as helper from '../helper/treeHelper';\n\nvar noop = function () {};\n\nvar actionTypes = [\n 'treemapZoomToNode',\n 'treemapRender',\n 'treemapMove'\n];\n\nfor (var i = 0; i < actionTypes.length; i++) {\n echarts.registerAction({type: actionTypes[i], update: 'updateView'}, noop);\n}\n\necharts.registerAction(\n {type: 'treemapRootToNode', update: 'updateView'},\n function (payload, ecModel) {\n\n ecModel.eachComponent(\n {mainType: 'series', subType: 'treemap', query: payload},\n handleRootToNode\n );\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 if (originViewRoot) {\n payload.direction = helper.aboveViewRoot(originViewRoot, targetInfo.node)\n ? 'rollUp' : 'drillDown';\n }\n model.resetViewRoot(targetInfo.node);\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\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as zrColor from 'zrender/src/tool/color';\nimport {linearMap} from '../util/number';\n\nvar each = zrUtil.each;\nvar isObject = zrUtil.isObject;\n\nvar CATEGORY_DEFAULT_VISUAL_INDEX = -1;\n\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.<number>=} [option.dataExtent] [minExtent, maxExtent],\n * required when mappingMethod is 'linear'\n * @param {Array.<Object>=} [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.<string|Object>=} [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 */\nvar VisualMapping = function (option) {\n var mappingMethod = option.mappingMethod;\n var visualType = option.type;\n\n /**\n * @readOnly\n * @type {Object}\n */\n var thisOption = this.option = zrUtil.clone(option);\n\n /**\n * @readOnly\n * @type {string}\n */\n this.type = visualType;\n\n /**\n * @readOnly\n * @type {string}\n */\n this.mappingMethod = mappingMethod;\n\n /**\n * @private\n * @type {Function}\n */\n this._normalizeData = normalizers[mappingMethod];\n\n var visualHandler = visualHandlers[visualType];\n\n /**\n * @public\n * @type {Function}\n */\n this.applyVisual = visualHandler.applyVisual;\n\n /**\n * @public\n * @type {Function}\n */\n this.getColorMapper = visualHandler.getColorMapper;\n\n /**\n * @private\n * @type {Function}\n */\n this._doMap = visualHandler._doMap[mappingMethod];\n\n if (mappingMethod === 'piecewise') {\n normalizeVisualRange(thisOption);\n preprocessForPiecewise(thisOption);\n }\n else if (mappingMethod === 'category') {\n thisOption.categories\n ? preprocessForSpecifiedCategory(thisOption)\n // categories is ordinal when thisOption.categories not specified,\n // which need no more preprocess except normalize visual.\n : normalizeVisualRange(thisOption, true);\n }\n else { // mappingMethod === 'linear' or 'fixed'\n zrUtil.assert(mappingMethod !== 'linear' || thisOption.dataExtent);\n normalizeVisualRange(thisOption);\n }\n};\n\nVisualMapping.prototype = {\n\n constructor: VisualMapping,\n\n mapValueToVisual: function (value) {\n var normalized = this._normalizeData(value);\n return this._doMap(normalized, value);\n },\n\n getNormalizer: function () {\n return zrUtil.bind(this._normalizeData, this);\n }\n};\n\nvar visualHandlers = VisualMapping.visualHandlers = {\n\n color: {\n\n applyVisual: makeApplyVisual('color'),\n\n /**\n * Create a mapper function\n * @return {Function}\n */\n getColorMapper: function () {\n var thisOption = this.option;\n\n return zrUtil.bind(\n thisOption.mappingMethod === 'category'\n ? function (value, isNormalized) {\n !isNormalized && (value = this._normalizeData(value));\n return doMapCategory.call(this, value);\n }\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 },\n this\n );\n },\n\n _doMap: {\n linear: function (normalized) {\n return zrColor.stringify(\n zrColor.fastLerp(normalized, this.option.parsedVisual),\n 'rgba'\n );\n },\n category: doMapCategory,\n piecewise: function (normalized, value) {\n var result = getSpecifiedVisual.call(this, value);\n if (result == null) {\n result = zrColor.stringify(\n zrColor.fastLerp(normalized, this.option.parsedVisual),\n 'rgba'\n );\n }\n return result;\n },\n fixed: doMapFixed\n }\n },\n\n colorHue: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, value);\n }),\n\n colorSaturation: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, null, value);\n }),\n\n colorLightness: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, null, null, value);\n }),\n\n colorAlpha: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyAlpha(color, value);\n }),\n\n opacity: {\n applyVisual: makeApplyVisual('opacity'),\n _doMap: makeDoMap([0, 1])\n },\n\n liftZ: {\n applyVisual: makeApplyVisual('liftZ'),\n _doMap: {\n linear: doMapFixed,\n category: doMapFixed,\n piecewise: doMapFixed,\n fixed: doMapFixed\n }\n },\n\n symbol: {\n applyVisual: function (value, getter, setter) {\n var symbolCfg = this.mapValueToVisual(value);\n if (zrUtil.isString(symbolCfg)) {\n setter('symbol', symbolCfg);\n }\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 if (result == null) {\n result = doMapToArray.call(this, normalized);\n }\n return result;\n },\n fixed: doMapFixed\n }\n },\n\n symbolSize: {\n applyVisual: makeApplyVisual('symbolSize'),\n _doMap: makeDoMap([0, 1])\n }\n};\n\n\nfunction preprocessForPiecewise(thisOption) {\n var pieceList = thisOption.pieceList;\n thisOption.hasSpecialVisual = false;\n\n zrUtil.each(pieceList, function (piece, index) {\n piece.originIndex = index;\n // piece.visual is \"result visual value\" but not\n // a visual range, so it does not need to be normalized.\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\n var categoryMap = thisOption.categoryMap = {};\n each(categories, function (cate, index) {\n categoryMap[cate] = index;\n });\n\n // Process visual map input.\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 }\n else { // Is primary type, represents default visual.\n visualArr[CATEGORY_DEFAULT_VISUAL_INDEX] = visual;\n }\n\n visual = setVisualToOption(thisOption, visualArr);\n }\n\n // Remove categories that has no visual,\n // then we can mapping them to CATEGORY_DEFAULT_VISUAL_INDEX.\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 }\n else if (visual != null) {\n visualArr.push(visual);\n }\n\n var doNotNeedPair = {color: 1, symbol: 1};\n\n if (!isCategory\n && visualArr.length === 1\n && !doNotNeedPair.hasOwnProperty(thisOption.type)\n ) {\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);\n // Must not be array value\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[\n Math.round(linearMap(normalized, [0, 1], [0, visual.length - 1], true))\n ] || {};\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[\n (this.option.loop && normalized !== CATEGORY_DEFAULT_VISUAL_INDEX)\n ? normalized % visual.length\n : normalized\n ];\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 if (result == null) {\n result = linearMap(normalized, sourceExtent, this.option.visual, true);\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 if (thisOption.hasSpecialVisual) {\n var pieceIndex = VisualMapping.findPieceIndex(value, pieceList);\n var piece = pieceList[pieceIndex];\n if (piece && piece.visual) {\n return piece.visual[this.type];\n }\n }\n}\n\nfunction setVisualToOption(thisOption, visualArr) {\n thisOption.visual = visualArr;\n if (thisOption.type === 'color') {\n thisOption.parsedVisual = zrUtil.map(visualArr, function (item) {\n return zrColor.parse(item);\n });\n }\n return visualArr;\n}\n\n\n/**\n * Normalizers by mapping methods.\n */\nvar normalizers = {\n\n linear: function (value) {\n return linearMap(value, this.option.dataExtent, [0, 1], true);\n },\n\n piecewise: function (value) {\n var pieceList = this.option.pieceList;\n var pieceIndex = VisualMapping.findPieceIndex(value, pieceList, true);\n if (pieceIndex != null) {\n return linearMap(pieceIndex, [0, pieceList.length - 1], [0, 1], true);\n }\n },\n\n category: function (value) {\n var index = this.option.categories\n ? this.option.categoryMap[value]\n : value; // ordinal\n return index == null ? CATEGORY_DEFAULT_VISUAL_INDEX : index;\n },\n\n fixed: zrUtil.noop\n};\n\n\n\n/**\n * List available visual types.\n *\n * @public\n * @return {Array.<string>}\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/**\n * @public\n */\nVisualMapping.addVisualHandler = function (name, handler) {\n visualHandlers[name] = handler;\n};\n\n/**\n * @public\n */\nVisualMapping.isValidType = function (visualType) {\n return visualHandlers.hasOwnProperty(visualType);\n};\n\n/**\n * Convinent method.\n * Visual can be Object or Array or primary type.\n *\n * @public\n */\nVisualMapping.eachVisual = function (visual, callback, context) {\n if (zrUtil.isObject(visual)) {\n zrUtil.each(visual, callback, context);\n }\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)\n ? []\n : zrUtil.isObject(visual)\n ? {}\n : (isPrimary = true, null);\n\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/**\n * @public\n * @param {Object} obj\n * @return {Object} new object containers visual values.\n * If no visuals, return null.\n */\nVisualMapping.retrieveVisuals = function (obj) {\n var ret = {};\n var hasVisual;\n\n obj && each(visualHandlers, function (h, visualType) {\n if (obj.hasOwnProperty(visualType)) {\n ret[visualType] = obj[visualType];\n hasVisual = true;\n }\n });\n\n return hasVisual ? ret : null;\n};\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.<string>} Sorted visual types.\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 }\n else if (zrUtil.isArray(visualTypes)) {\n visualTypes = visualTypes.slice();\n }\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)\n ? 1 : -1;\n });\n\n return visualTypes;\n};\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 */\nVisualMapping.dependsOn = function (visualType1, visualType2) {\n return visualType2 === 'color'\n ? !!(visualType1 && visualType1.indexOf(visualType2) === 0)\n : visualType1 === visualType2;\n};\n\n/**\n * @param {number} value\n * @param {Array.<Object>} pieceList [{value: ..., interval: [min, max]}, ...]\n * Always from small to big.\n * @param {boolean} [findClosestWhenOutside=false]\n * @return {number} index\n */\nVisualMapping.findPieceIndex = function (value, pieceList, findClosestWhenOutside) {\n var possibleI;\n var abs = Infinity;\n\n // value has the higher priority.\n for (var i = 0, len = pieceList.length; i < len; i++) {\n var pieceValue = pieceList[i].value;\n if (pieceValue != null) {\n if (pieceValue === value\n // 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 ) {\n return i;\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 }\n else if (interval[1] === Infinity) {\n if (littleThan(close[0], interval[0], value)) {\n return i;\n }\n }\n else if (\n littleThan(close[0], interval[0], value)\n && littleThan(close[1], value, interval[1])\n ) {\n return i;\n }\n findClosestWhenOutside && updatePossible(interval[0], i);\n findClosestWhenOutside && updatePossible(interval[1], i);\n }\n }\n\n if (findClosestWhenOutside) {\n return value === Infinity\n ? pieceList.length - 1\n : value === -Infinity\n ? 0\n : possibleI;\n }\n\n function updatePossible(val, index) {\n var newAbs = Math.abs(val - value);\n if (newAbs < abs) {\n abs = newAbs;\n possibleI = index;\n }\n }\n\n};\n\nfunction littleThan(close, a, b) {\n return close ? a <= b : a < b;\n}\n\nexport default VisualMapping;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport VisualMapping from '../../visual/VisualMapping';\nimport * as zrColor from 'zrender/src/tool/color';\nimport * as zrUtil from 'zrender/src/core/util';\n\nvar isArray = zrUtil.isArray;\n\nvar ITEM_STYLE_NORMAL = 'itemStyle';\n\nexport 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(\n root, // Visual should calculate from tree root but not view root.\n {},\n seriesModel.getViewRoot().getAncestors(),\n seriesModel\n );\n }\n};\n\nfunction travelTree(\n node, designatedVisual, viewRootAncestors, seriesModel\n) {\n var nodeModel = node.getModel();\n var nodeLayout = node.getLayout();\n\n // Optimize\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);\n\n // calculate border color\n var borderColor = nodeItemStyleModel.get('borderColor');\n var borderColorSaturation = nodeItemStyleModel.get('borderColorSaturation');\n var thisNodeColor;\n if (borderColorSaturation != null) {\n // For performance, do not always execute 'calculateColor'.\n thisNodeColor = calculateColor(visuals, node);\n borderColor = calculateBorderColor(borderColorSaturation, thisNodeColor);\n }\n node.setVisual('borderColor', borderColor);\n\n var viewChildren = node.viewChildren;\n if (!viewChildren || !viewChildren.length) {\n thisNodeColor = calculateColor(visuals, node);\n // Apply visual to this node.\n node.setVisual('color', thisNodeColor);\n }\n else {\n var mapping = buildVisualMapping(\n node, nodeModel, nodeLayout, nodeItemStyleModel, visuals, viewChildren\n );\n\n // Designate visual to children.\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\n || child === viewRootAncestors[child.depth]\n ) {\n var childVisual = mapVisual(\n nodeModel, visuals, child, index, mapping, seriesModel\n );\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\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\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 if (colorSaturation) {\n color = zrColor.modifyHSL(color, null, null, colorSaturation);\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\n ? zrColor.modifyHSL(thisNodeColor, null, null, borderColorSaturation)\n : null;\n}\n\nfunction getValueVisualDefine(visuals, name) {\n var value = visuals[name];\n if (value != null && value !== 'none') {\n return value;\n }\n}\n\nfunction buildVisualMapping(\n node, nodeModel, nodeLayout, nodeItemStyleModel, visuals, viewChildren\n) {\n if (!viewChildren || !viewChildren.length) {\n return;\n }\n\n var rangeVisual = getRangeVisual(nodeModel, 'color')\n || (\n visuals.color != null\n && visuals.color !== 'none'\n && (\n getRangeVisual(nodeModel, 'colorAlpha')\n || getRangeVisual(nodeModel, 'colorSaturation')\n )\n );\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\n var colorMappingBy = nodeModel.get('colorMappingBy');\n var opt = {\n type: rangeVisual.name,\n dataExtent: dataExtent,\n visual: rangeVisual.range\n };\n if (opt.type === 'color'\n && (colorMappingBy === 'index' || colorMappingBy === 'id')\n ) {\n opt.mappingMethod = 'category';\n opt.loop = true;\n // categories is ordinal, so do not set opt.categories.\n }\n else {\n opt.mappingMethod = 'linear';\n }\n\n var mapping = new VisualMapping(opt);\n mapping.__drColorMappingBy = colorMappingBy;\n\n return mapping;\n}\n\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.\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) ? {name: name, range: range} : 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'\n ? index\n : colorMappingBy === 'id'\n ? seriesModel.mapIdToIndex(child.getId())\n : child.getValue(nodeModel.get('visualDimension'));\n\n childVisuals[mappingType] = mapping.mapValueToVisual(value);\n }\n\n return childVisuals;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* A third-party license is embeded for some of the code in this file:\n* The treemap layout implementation was originally copied from\n* \"d3.js\" with some modifications made for this project.\n* (See more details in the comment of the method \"squarify\" below.)\n* The use of the source code of this file is also subject to the terms\n* and consitions of the license of \"d3.js\" (BSD-3Clause, see\n* </licenses/LICENSE-d3>).\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport BoundingRect from 'zrender/src/core/BoundingRect';\nimport {parsePercent, MAX_SAFE_INTEGER} from '../../util/number';\nimport * as layout from '../../util/layout';\nimport * as helper from '../helper/treeHelper';\n\nvar mathMax = Math.max;\nvar mathMin = Math.min;\nvar retrieveValue = zrUtil.retrieve;\nvar each = zrUtil.each;\n\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/**\n * @public\n */\nexport 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\n var layoutInfo = layout.getLayoutRect(\n seriesModel.getBoxLayoutParams(),\n {\n width: api.getWidth(),\n height: api.getHeight()\n }\n );\n\n var size = seriesOption.size || []; // Compatible with ec2.\n var containerWidth = parsePercent(\n retrieveValue(layoutInfo.width, size[0]),\n ecWidth\n );\n var containerHeight = parsePercent(\n retrieveValue(layoutInfo.height, size[1]),\n ecHeight\n );\n\n // Fetch payload info.\n var payloadType = payload && payload.type;\n var types = ['treemapZoomToNode', 'treemapRootToNode'];\n var targetInfo = helper\n .retrieveTargetInfo(payload, types, seriesModel);\n var rootRect = (payloadType === 'treemapRender' || payloadType === 'treemapMove')\n ? payload.rootRect : null;\n var viewRoot = seriesModel.getViewRoot();\n var viewAbovePath = helper.getPathToRoot(viewRoot);\n\n if (payloadType !== 'treemapMove') {\n var rootSize = payloadType === 'treemapZoomToNode'\n ? estimateRootSize(\n seriesModel, targetInfo, viewRoot, containerWidth, containerHeight\n )\n : rootRect\n ? [rootRect.width, rootRect.height]\n : [containerWidth, containerHeight];\n\n var sort = seriesOption.sort;\n if (sort && sort !== 'asc' && sort !== 'desc') {\n sort = 'desc';\n }\n var options = {\n squareRatio: seriesOption.squareRatio,\n sort: sort,\n leafDepth: seriesOption.leafDepth\n };\n\n // layout should be cleared because using updateView but not update.\n viewRoot.hostTree.clearLayouts();\n\n // 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, y: 0,\n width: rootSize[0], height: rootSize[1],\n area: rootSize[0] * rootSize[1]\n };\n viewRoot.setLayout(viewRootLayout);\n\n squarify(viewRoot, options, false, 0);\n // Supplement layout.\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], borderWidth: 0, upperHeight: 0},\n viewRootLayout\n ));\n });\n }\n\n var treeRoot = seriesModel.getData().tree.root;\n\n treeRoot.setLayout(\n calculateRootPosition(layoutInfo, rootRect, targetInfo),\n true\n );\n\n seriesModel.setLayoutInfo(layoutInfo);\n\n // FIXME\n // 现在没有clip功能暂时取ec高宽。\n prunning(\n treeRoot,\n // Transform to base element coordinate system.\n new BoundingRect(-layoutInfo.x, -layoutInfo.y, ecWidth, ecHeight),\n viewAbovePath,\n viewRoot,\n 0\n );\n }\n};\n\n/**\n * Layout treemap with squarify algorithm.\n * The original presentation of this algorithm\n * was made by Mark Bruls, Kees Huizing, and Jarke J. van Wijk\n * <https://graphics.ethz.ch/teaching/scivis_common/Literature/squarifiedTreeMaps.pdf>.\n * The implementation of this algorithm was originally copied from \"d3.js\"\n * <https://github.com/d3/d3/blob/9cc9a875e636a1dcf36cc1e07bdf77e1ad6e2c74/src/layout/treemap.js>\n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * @protected\n * @param {module:echarts/data/Tree~TreeNode} node\n * @param {Object} options\n * @param {string} options.sort 'asc' or 'desc'\n * @param {number} options.squareRatio\n * @param {boolean} hideChildren\n * @param {number} depth\n */\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;\n\n // Considering border and gap\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\n node.setLayout({\n borderWidth: borderWidth,\n upperHeight: upperHeight,\n upperLabelHeight: upperLabelHeight\n }, true);\n\n width = mathMax(width - 2 * layoutOffset, 0);\n height = mathMax(height - layoutOffset - layoutOffsetUpper, 0);\n\n var totalArea = width * height;\n var viewChildren = initChildren(\n node, nodeModel, totalArea, options, hideChildren, depth\n );\n\n if (!viewChildren.length) {\n return;\n }\n\n var rect = {x: layoutOffset, y: layoutOffsetUpper, width: width, height: height};\n var rowFixedLength = mathMin(width, height);\n var best = Infinity; // the best row score so far\n var row = [];\n row.area = 0;\n\n for (var i = 0, len = viewChildren.length; i < len;) {\n var child = viewChildren[i];\n\n row.push(child);\n row.area += child.getLayout().area;\n var score = worst(row, rowFixedLength, options.squareRatio);\n\n // continue with this orientation\n if (score <= best) {\n i++;\n best = score;\n }\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 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/**\n * Set area to each child, and calculate data extent for visual coding.\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\n var overLeafDepth = options.leafDepth != null && options.leafDepth <= depth;\n\n // leafDepth has higher priority.\n if (hideChildren && !overLeafDepth) {\n return (node.viewChildren = []);\n }\n\n // Sort children, order by desc.\n viewChildren = zrUtil.filter(viewChildren, function (child) {\n return !child.isRemoved();\n });\n\n sort(viewChildren, orderBy);\n\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 }\n\n // Set area to each child.\n for (var i = 0, len = viewChildren.length; i < len; i++) {\n var area = viewChildren[i].getValue() / info.sum * totalArea;\n // Do not use setLayout({...}, true), because it is needed to clear last layout.\n viewChildren[i].setLayout({area: area});\n }\n\n if (overLeafDepth) {\n viewChildren.length && node.setLayout({isLeafRoot: true}, true);\n viewChildren.length = 0;\n }\n\n node.viewChildren = viewChildren;\n node.setLayout({dataExtent: info.dataExtent}, true);\n\n return viewChildren;\n}\n\n/**\n * Consider 'visibleMin'. Modify viewChildren and get new sum.\n */\nfunction filterByThreshold(nodeModel, totalArea, sum, orderBy, orderedChildren) {\n\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;\n\n // Always travel from little value to big value.\n for (var i = len - 1; i >= 0; i--) {\n var value = orderedChildren[\n orderBy === 'asc' ? len - i - 1 : i\n ].getValue();\n\n if (value / sum * totalArea < visibleMin) {\n deletePoint = i;\n sum -= value;\n }\n }\n\n orderBy === 'asc'\n ? orderedChildren.splice(0, len - deletePoint)\n : orderedChildren.splice(deletePoint, len - deletePoint);\n\n return sum;\n}\n\n/**\n * Sort\n */\nfunction sort(viewChildren, orderBy) {\n if (orderBy) {\n viewChildren.sort(function (a, b) {\n var diff = orderBy === 'asc'\n ? a.getValue() - b.getValue() : b.getValue() - a.getValue();\n return diff === 0\n ? (orderBy === 'asc'\n ? a.dataIndex - b.dataIndex : b.dataIndex - a.dataIndex\n )\n : diff;\n });\n }\n return viewChildren;\n}\n\n/**\n * Statistic\n */\nfunction statistic(nodeModel, children, orderBy) {\n // Calculate sum.\n var sum = 0;\n for (var i = 0, len = children.length; i < len; i++) {\n sum += children[i].getValue();\n }\n\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 var dimension = nodeModel.get('visualDimension');\n var dataExtent;\n\n // The same as area dimension.\n if (!children || !children.length) {\n dataExtent = [NaN, NaN];\n }\n else if (dimension === 'value' && orderBy) {\n dataExtent = [\n children[children.length - 1].getValue(),\n children[0].getValue()\n ];\n orderBy === 'asc' && dataExtent.reverse();\n }\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 {sum: sum, dataExtent: dataExtent};\n}\n\n/**\n * Computes the score for the specified row,\n * as the worst aspect ratio.\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 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\n return squareArea\n ? mathMax(\n (f * areaMax) / squareArea,\n squareArea / (f * areaMin)\n )\n : Infinity;\n}\n\n/**\n * Positions the specified row of nodes. Modifies `rect`.\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\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\n var last = rect[xy[idx0WhenH]];\n var rowOtherLength = rowFixedLength\n ? row.area / rowFixedLength : 0;\n\n if (flush || rowOtherLength > rect[wh[idx1WhenH]]) {\n rowOtherLength = rect[wh[idx1WhenH]]; // over+underflow\n }\n for (var i = 0, rowLen = row.length; i < rowLen; i++) {\n var node = row[i];\n var nodeLayout = {};\n var step = rowOtherLength\n ? node.getLayout().area / rowOtherLength : 0;\n\n var wh1 = nodeLayout[wh[idx1WhenH]] = mathMax(rowOtherLength - 2 * halfGapWidth, 0);\n\n // We use Math.max/min to avoid negative width/height when considering gap width.\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\n nodeLayout[xy[idx1WhenH]] = rect[xy[idx1WhenH]] + mathMin(halfGapWidth, wh1 / 2);\n nodeLayout[xy[idx0WhenH]] = last + mathMin(halfGapWidth, wh0 / 2);\n\n last += modWH;\n node.setLayout(nodeLayout, true);\n }\n\n rect[xy[idx1WhenH]] += rowOtherLength;\n rect[wh[idx1WhenH]] -= rowOtherLength;\n}\n\n// Return [containerWidth, containerHeight] as default.\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) { // 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 var currNodeValue = currNode.getValue();\n if (currNodeValue === 0) {\n return defaultSize;\n }\n area *= sum / currNodeValue;\n\n // Considering border, suppose aspect ratio is 1.\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\n + (3 * borderWidth + upperHeight) * Math.pow(area, 0.5);\n\n area > MAX_SAFE_INTEGER && (area = MAX_SAFE_INTEGER);\n\n currNode = parent;\n }\n\n area < viewArea && (area = viewArea);\n var scale = Math.pow(area / viewArea, 0.5);\n\n return [containerWidth * scale, containerHeight * scale];\n}\n\n// Root postion base on coord of containerGroup\nfunction calculateRootPosition(layoutInfo, rootRect, targetInfo) {\n if (rootRect) {\n return {x: rootRect.x, y: rootRect.y};\n }\n\n var defaultPosition = {x: 0, y: 0};\n if (!targetInfo) {\n return defaultPosition;\n }\n\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 var targetNode = targetInfo.node;\n var layout = targetNode.getLayout();\n\n if (!layout) {\n return defaultPosition;\n }\n\n // Transform coord from local to container.\n var targetCenter = [layout.width / 2, layout.height / 2];\n var node = targetNode;\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}\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.\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 (\n (nodeInViewAbovePath && !isAboveViewRoot)\n || (depth === viewAbovePath.length && node !== viewRoot)\n ) {\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);\n\n // Transform to child coordinate.\n var childClipRect = new BoundingRect(\n clipRect.x - nodeLayout.x,\n clipRect.y - nodeLayout.y,\n clipRect.width,\n clipRect.height\n );\n\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../echarts';\n\nimport './treemap/TreemapSeries';\nimport './treemap/TreemapView';\nimport './treemap/treemapAction';\n\nimport treemapVisual from './treemap/treemapVisual';\nimport treemapLayout from './treemap/treemapLayout';\n\necharts.registerVisual(treemapVisual);\necharts.registerLayout(treemapLayout);","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {__DEV__} from '../config';\nimport * as zrUtil from 'zrender/src/core/util';\nimport {enableClassCheck} from '../util/clazz';\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 */\nvar Graph = function (directed) {\n /**\n * 是否是有向图\n * @type {boolean}\n * @private\n */\n this._directed = directed || false;\n\n /**\n * @type {Array.<module:echarts/data/Graph.Node>}\n * @readOnly\n */\n this.nodes = [];\n\n /**\n * @type {Array.<module:echarts/data/Graph.Edge>}\n * @readOnly\n */\n this.edges = [];\n\n /**\n * @type {Object.<string, module:echarts/data/Graph.Node>}\n * @private\n */\n this._nodesMap = {};\n /**\n * @type {Object.<string, module:echarts/data/Graph.Edge>}\n * @private\n */\n this._edgesMap = {};\n\n /**\n * @type {module:echarts/data/List}\n * @readOnly\n */\n this.data;\n\n /**\n * @type {module:echarts/data/List}\n * @readOnly\n */\n this.edgeData;\n};\n\nvar graphProto = Graph.prototype;\n/**\n * @type {string}\n */\ngraphProto.type = 'graph';\n\n/**\n * If is directed graph\n * @return {boolean}\n */\ngraphProto.isDirected = function () {\n return this._directed;\n};\n\n/**\n * Add a new node\n * @param {string} id\n * @param {number} [dataIndex]\n */\ngraphProto.addNode = function (id, dataIndex) {\n id = id == null ? ('' + dataIndex) : ('' + id);\n\n var nodesMap = this._nodesMap;\n\n if (nodesMap[generateNodeKey(id)]) {\n if (__DEV__) {\n console.error('Graph nodes have duplicate name or id');\n }\n return;\n }\n\n var node = new Node(id, dataIndex);\n node.hostGraph = this;\n\n this.nodes.push(node);\n\n nodesMap[generateNodeKey(id)] = node;\n return node;\n};\n\n/**\n * Get node by data index\n * @param {number} dataIndex\n * @return {module:echarts/data/Graph~Node}\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 */\ngraphProto.getNodeById = function (id) {\n return this._nodesMap[generateNodeKey(id)];\n};\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 */\ngraphProto.addEdge = function (n1, n2, dataIndex) {\n var nodesMap = this._nodesMap;\n var edgesMap = this._edgesMap;\n\n // PNEDING\n if (typeof n1 === 'number') {\n n1 = this.nodes[n1];\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 if (!Node.isInstance(n2)) {\n n2 = nodesMap[generateNodeKey(n2)];\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 n1.edges.push(edge);\n if (n1 !== n2) {\n n2.edges.push(edge);\n }\n\n this.edges.push(edge);\n edgesMap[key] = edge;\n\n return edge;\n};\n\n/**\n * Get edge by data index\n * @param {number} dataIndex\n * @return {module:echarts/data/Graph~Node}\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 */\ngraphProto.getEdge = function (n1, n2) {\n if (Node.isInstance(n1)) {\n n1 = n1.id;\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 }\n else {\n return edgesMap[n1 + '-' + n2]\n || edgesMap[n2 + '-' + n1];\n }\n};\n\n/**\n * Iterate all nodes\n * @param {Function} cb\n * @param {*} [context]\n */\ngraphProto.eachNode = function (cb, context) {\n var nodes = this.nodes;\n var len = nodes.length;\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/**\n * Iterate all edges\n * @param {Function} cb\n * @param {*} [context]\n */\ngraphProto.eachEdge = function (cb, context) {\n var edges = this.edges;\n var len = edges.length;\n for (var i = 0; i < len; i++) {\n if (edges[i].dataIndex >= 0\n && edges[i].node1.dataIndex >= 0\n && edges[i].node2.dataIndex >= 0\n ) {\n cb.call(context, edges[i], i);\n }\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 */\ngraphProto.breadthFirstTraverse = function (\n cb, startNode, direction, context\n) {\n if (!Node.isInstance(startNode)) {\n startNode = this._nodesMap[generateNodeKey(startNode)];\n }\n if (!startNode) {\n return;\n }\n\n var edgeType = direction === 'out'\n ? '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 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\n ? e.node2 : e.node1;\n if (!otherNode.__visited) {\n if (cb.call(context, otherNode, currentNode)) {\n // Stop traversing\n return;\n }\n queue.push(otherNode);\n otherNode.__visited = true;\n }\n }\n }\n};\n\n// TODO\n// graphProto.depthFirstTraverse = function (\n// cb, startNode, direction, context\n// ) {\n\n// };\n\n// Filter update\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 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 });\n\n // Update edge\n for (var i = 0, len = edges.length; i < len; i++) {\n edges[i].dataIndex = -1;\n }\n for (var i = 0, len = edgeData.count(); i < len; i++) {\n edges[edgeData.getRawIndex(i)].dataIndex = i;\n }\n};\n\n/**\n * @return {module:echarts/data/Graph}\n */\ngraphProto.clone = function () {\n var graph = new Graph(this._directed);\n var nodes = this.nodes;\n var edges = this.edges;\n for (var i = 0; i < nodes.length; i++) {\n graph.addNode(nodes[i].id, nodes[i].dataIndex);\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 return graph;\n};\n\n\n/**\n * @alias module:echarts/data/Graph.Node\n */\nfunction Node(id, dataIndex) {\n /**\n * @type {string}\n */\n this.id = id == null ? '' : id;\n\n /**\n * @type {Array.<module:echarts/data/Graph.Edge>}\n */\n this.inEdges = [];\n /**\n * @type {Array.<module:echarts/data/Graph.Edge>}\n */\n this.outEdges = [];\n /**\n * @type {Array.<module:echarts/data/Graph.Edge>}\n */\n this.edges = [];\n /**\n * @type {module:echarts/data/Graph}\n */\n this.hostGraph;\n\n /**\n * @type {number}\n */\n this.dataIndex = dataIndex == null ? -1 : dataIndex;\n}\n\nNode.prototype = {\n\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 var graph = this.hostGraph;\n var itemModel = graph.data.getItemModel(this.dataIndex);\n\n return itemModel.getModel(path);\n }\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 */\nfunction Edge(n1, n2, dataIndex) {\n\n /**\n * 节点1如果是有向图则为源节点\n * @type {module:echarts/data/Graph.Node}\n */\n this.node1 = n1;\n\n /**\n * 节点2如果是有向图则为目标节点\n * @type {module:echarts/data/Graph.Node}\n */\n this.node2 = n2;\n\n this.dataIndex = dataIndex == null ? -1 : dataIndex;\n}\n\n/**\n * @param {string} [path]\n * @return {module:echarts/model/Model}\n */\nEdge.prototype.getModel = function (path) {\n if (this.dataIndex < 0) {\n return;\n }\n var graph = this.hostGraph;\n var itemModel = graph.edgeData.getItemModel(this.dataIndex);\n\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\n && 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\n && 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'));\n\nGraph.Node = Node;\nGraph.Edge = Edge;\n\nenableClassCheck(Node);\nenableClassCheck(Edge);\n\nexport default Graph;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport List from '../../data/List';\nimport Graph from '../../data/Graph';\nimport linkList from '../../data/helper/linkList';\nimport createDimensions from '../../data/helper/createDimensions';\nimport CoordinateSystem from '../../CoordinateSystem';\nimport createListFromArray from './createListFromArray';\n\nexport default function (nodes, edges, seriesModel, directed, beforeLink) {\n // ??? TODO\n // support dataset?\n var graph = new Graph(directed);\n for (var i = 0; i < nodes.length; i++) {\n graph.addNode(zrUtil.retrieve(\n // Id, name, dataIndex\n nodes[i].id, nodes[i].name, i\n ), 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;\n\n // addEdge may fail when source or target not exists\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 if (coordSys === 'cartesian2d' || coordSys === 'polar') {\n nodeData = createListFromArray(nodes, seriesModel);\n }\n else {\n var coordSysCtor = CoordinateSystem.get(coordSys);\n var coordDimensions = (coordSysCtor && coordSysCtor.type !== 'view')\n ? (coordSysCtor.dimensions || []) : [];\n // 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 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\n beforeLink && beforeLink(nodeData, edgeData);\n\n linkList({\n mainData: nodeData,\n struct: graph,\n structAttr: 'graph',\n datas: {node: nodeData, edge: edgeData},\n datasAttr: {node: 'data', edge: 'edgeData'}\n });\n\n // Update dataIndex of nodes and edges because invalid edge may be removed\n graph.update();\n return graph;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\n\nvar KEY_DELIMITER = '-->';\n/**\n * params handler\n * @param {module:echarts/model/SeriesModel} seriesModel\n * @returns {*}\n */\nvar getAutoCurvenessParams = function (seriesModel) {\n return seriesModel.get('autoCurveness') || null;\n};\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 */\nvar createCurveness = function (seriesModel, appendLength) {\n var autoCurvenessParmas = getAutoCurvenessParams(seriesModel);\n var length = 20;\n var curvenessList = [];\n\n // handler the function set\n if (typeof autoCurvenessParmas === 'number') {\n length = autoCurvenessParmas;\n }\n else if (zrUtil.isArray(autoCurvenessParmas)) {\n seriesModel.__curvenessList = autoCurvenessParmas;\n return;\n }\n\n // append length\n if (appendLength > length) {\n length = appendLength;\n }\n\n // make sure the length is even\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 seriesModel.__curvenessList = curvenessList;\n};\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 */\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/**\n * get opposite key\n * @param {string} key\n * @returns {string}\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/**\n * get edgeMap with key\n * @param edge\n * @param {module:echarts/model/SeriesModel} seriesModel\n */\nvar getEdgeFromMap = function (edge, seriesModel) {\n var key = getKeyOfEdges(edge.node1, edge.node2, seriesModel);\n return seriesModel.__edgeMap[key];\n};\n\n/**\n * calculate all cases total length\n * @param edge\n * @param seriesModel\n * @returns {number}\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\n return len + lenV;\n};\n\n/**\n *\n * @param key\n */\nvar getEdgeMapLengthWithKey = function (key, seriesModel) {\n var edgeMap = seriesModel.__edgeMap;\n return edgeMap[key] ? edgeMap[key].length : 0;\n};\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 */\nexport function initCurvenessList(seriesModel) {\n if (!getAutoCurvenessParams(seriesModel)) {\n return;\n }\n\n seriesModel.__curvenessList = [];\n seriesModel.__edgeMap = {};\n // calc the array of curveness List\n createCurveness(seriesModel);\n}\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 */\nexport function 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)];\n // set direction\n if (edgeMap[key] && !oppositeEdges) {\n edgeMap[key].isForward = true;\n }\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/**\n * get curvature for edge\n * @param edge\n * @param {module:echarts/model/SeriesModel} seriesModel\n * @param index\n */\nexport function getCurvenessForEdge(edge, seriesModel, index, needReverse) {\n var autoCurvenessParams = getAutoCurvenessParams(seriesModel);\n var isArrayParam = zrUtil.isArray(autoCurvenessParams);\n if (!autoCurvenessParams) {\n return null;\n }\n\n var edgeArray = getEdgeFromMap(edge, seriesModel);\n if (!edgeArray) {\n return null;\n }\n\n var edgeIndex = -1;\n for (var i = 0; i < edgeArray.length; i++) {\n if (edgeArray[i] === index) {\n edgeIndex = i;\n break;\n }\n }\n // if totalLen is Longer createCurveness\n var totalLen = getTotalLengthBetweenNodes(edge, seriesModel);\n createCurveness(seriesModel, totalLen);\n\n edge.lineStyle = edge.lineStyle || {};\n // if is opposite edge, must set curvenss to opposite number\n var curKey = getKeyOfEdges(edge.node1, edge.node2, seriesModel);\n var curvenessList = seriesModel.__curvenessList;\n // if pass array no need parity\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];\n // isNeedReverse, simple, force type need reverse the curveness in the junction of the forword and the opposite\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 }\n else {\n return ((len % 2 ? 0 : 1) + parityCorrection) % 2 ? resValue : -resValue;\n }\n }\n else {\n return (len + parityCorrection) % 2 ? resValue : -resValue;\n }\n }\n else {\n return curvenessList[edgeIndex + len + parityCorrection];\n }\n }\n else {\n return curvenessList[parityCorrection + edgeIndex];\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\nimport * as echarts from '../../echarts';\nimport List from '../../data/List';\nimport * as zrUtil from 'zrender/src/core/util';\nimport {defaultEmphasis} from '../../util/model';\nimport Model from '../../model/Model';\nimport {encodeHTML} from '../../util/format';\nimport createGraphFromNodeEdge from '../helper/createGraphFromNodeEdge';\nimport LegendVisualProvider from '../../visual/LegendVisualProvider';\nimport {initCurvenessList, createEdgeMapForCurveness} from '../helper/multipleGraphEdgeHelper';\n\nvar GraphSeries = echarts.extendSeriesModel({\n\n type: 'series.graph',\n\n init: function (option) {\n GraphSeries.superApply(this, 'init', arguments);\n\n var self = this;\n function getCategoriesData() {\n return self._categoriesData;\n }\n // Provide data for legend select\n this.legendVisualProvider = new LegendVisualProvider(\n getCategoriesData, getCategoriesData\n );\n\n this.fillDataTextStyle(option.edges || option.links);\n\n this._updateCategoriesData();\n },\n\n mergeOption: function (option) {\n GraphSeries.superApply(this, 'mergeOption', arguments);\n\n this.fillDataTextStyle(option.edges || option.links);\n\n this._updateCategoriesData();\n },\n\n mergeDefaultAndTheme: function (option) {\n GraphSeries.superApply(this, 'mergeDefaultAndTheme', arguments);\n defaultEmphasis(option, ['edgeLabel'], ['show']);\n },\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 if (categoryModel) {\n categoryModel.parentModel = model.parentModel;\n model.parentModel = categoryModel;\n }\n return model;\n });\n\n var edgeLabelModel = self.getModel('edgeLabel');\n // For option `edgeLabel` can be found by label.xxx.xxx on item mode.\n var fakeSeriesModel = new Model(\n {label: edgeLabelModel.option},\n edgeLabelModel.parentModel,\n ecModel\n );\n var emphasisEdgeLabelModel = self.getModel('emphasis.edgeLabel');\n var emphasisFakeSeriesModel = new Model(\n {emphasis: {label: emphasisEdgeLabelModel.option}},\n emphasisEdgeLabelModel.parentModel,\n ecModel\n );\n\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')\n ? fakeSeriesModel\n : (path && path[0] === 'emphasis' && path[1] === 'label')\n ? emphasisFakeSeriesModel\n : 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\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 return html;\n }\n else { // dataType === 'node' or empty\n return GraphSeries.superApply(this, 'formatTooltip', arguments);\n }\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\n this._categoriesData = categoriesData;\n\n this._categoriesModels = categoriesData.mapArray(function (idx) {\n return categoriesData.getItemModel(idx, true);\n });\n },\n\n setZoom: function (zoom) {\n this.option.zoom = zoom;\n },\n\n setCenter: function (center) {\n this.option.center = center;\n },\n\n isAnimationEnabled: function () {\n return GraphSeries.superCall(this, 'isAnimationEnabled')\n // Not enable animation when do force layout\n && !(this.get('layout') === 'force' && this.get('force.layoutAnimation'));\n },\n\n defaultOption: {\n zlevel: 0,\n z: 2,\n\n coordinateSystem: 'view',\n\n // Default option for all coordinate systems\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // polarIndex: 0,\n // geoIndex: 0,\n\n legendHoverLink: true,\n\n hoverAnimation: true,\n\n layout: null,\n\n focusNodeAdjacency: false,\n\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\n // Edge length. Can be an array to represent range.\n edgeLength: 30,\n\n layoutAnimation: true\n },\n\n left: 'center',\n top: 'center',\n // right: null,\n // bottom: null,\n // width: '80%',\n // height: '80%',\n\n symbol: 'circle',\n symbolSize: 10,\n\n edgeSymbol: ['none', 'none'],\n edgeSymbolSize: 10,\n edgeLabel: {\n position: 'middle',\n distance: 5\n },\n\n draggable: false,\n\n roam: false,\n\n // Default on center of graph\n center: null,\n\n zoom: 1,\n // Symbol size scale ratio in roam\n nodeScaleRatio: 0.6,\n // cursor: null,\n\n // categories: [],\n\n // data: []\n // Or\n // nodes: []\n //\n // links: []\n // Or\n // edges: []\n\n label: {\n show: false,\n formatter: '{b}'\n },\n\n itemStyle: {},\n\n lineStyle: {\n color: '#aaa',\n width: 1,\n opacity: 0.5\n },\n emphasis: {\n label: {\n show: true\n }\n }\n }\n});\n\nexport default GraphSeries;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport * as graphic from '../../util/graphic';\nimport * as vec2 from 'zrender/src/core/vector';\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\nexport default graphic.extendShape({\n\n type: 'ec-line',\n\n style: {\n stroke: '#000',\n fill: null\n },\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\n buildPath: function (ctx, shape) {\n this[isLine(shape) ? '_buildPathLine' : '_buildPathCurve'](ctx, shape);\n },\n _buildPathLine: straightLineProto.buildPath,\n _buildPathCurve: bezierCurveProto.buildPath,\n\n pointAt: function (t) {\n return this[isLine(this.shape) ? '_pointAtLine' : '_pointAtCurve'](t);\n },\n _pointAtLine: straightLineProto.pointAt,\n _pointAtCurve: bezierCurveProto.pointAt,\n\n tangentAt: function (t) {\n var shape = this.shape;\n var p = isLine(shape)\n ? [shape.x2 - shape.x1, shape.y2 - shape.y1]\n : this._tangentAtCurve(t);\n return vec2.normalize(p, p);\n },\n _tangentAtCurve: bezierCurveProto.tangentAt\n\n});","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as vector from 'zrender/src/core/vector';\nimport * as symbolUtil from '../../util/symbol';\nimport LinePath from './LinePath';\nimport * as graphic from '../../util/graphic';\nimport {round} from '../../util/number';\n\nvar SYMBOL_CATEGORIES = ['fromSymbol', 'toSymbol'];\n\nfunction makeSymbolTypeKey(symbolCategory) {\n return '_' + symbolCategory + 'Type';\n}\n/**\n * @inner\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(\n symbolType, -symbolSize[0] / 2, -symbolSize[1] / 2,\n symbolSize[0], symbolSize[1], color\n );\n\n // rotate by default if symbolRotate is not specified or NaN\n symbolPath.__specifiedRotation = symbolRotate == null || isNaN(symbolRotate)\n ? void 0\n : +symbolRotate * Math.PI / 180 || 0;\n symbolPath.name = name;\n\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\n var cp1 = points[2];\n if (cp1) {\n targetShape.cpx1 = cp1[0];\n targetShape.cpy1 = cp1[1];\n }\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');\n // Quick reject\n if (!symbolFrom && !symbolTo && label.ignore) {\n return;\n }\n\n var invScale = 1;\n var parentNode = this.parent;\n while (parentNode) {\n if (parentNode.scale) {\n invScale /= parentNode.scale[0];\n }\n parentNode = parentNode.parent;\n }\n\n var line = lineGroup.childOfName('line');\n // If line not changed\n // FIXME Parent scale changed\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\n var d = vector.sub([], toPos, fromPos);\n vector.normalize(d, d);\n\n if (symbolFrom) {\n symbolFrom.attr('position', fromPos);\n // 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 var specifiedRotation = symbolFrom.__specifiedRotation;\n if (specifiedRotation == null) {\n var tangent = line.tangentAt(0);\n symbolFrom.attr('rotation', Math.PI / 2 - Math.atan2(\n tangent[1], tangent[0]\n ));\n }\n else {\n symbolFrom.attr('rotation', specifiedRotation);\n }\n symbolFrom.attr('scale', [invScale * percent, invScale * percent]);\n }\n if (symbolTo) {\n symbolTo.attr('position', toPos);\n // 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 var specifiedRotation = symbolTo.__specifiedRotation;\n if (specifiedRotation == null) {\n var tangent = line.tangentAt(1);\n symbolTo.attr('rotation', -Math.PI / 2 - Math.atan2(\n tangent[1], tangent[0]\n ));\n }\n else {\n symbolTo.attr('rotation', specifiedRotation);\n }\n symbolTo.attr('scale', [invScale * percent, invScale * percent]);\n }\n\n if (!label.ignore) {\n label.attr('position', toPos);\n\n var textPosition;\n var textAlign;\n var textVerticalAlign;\n var textOrigin;\n\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 if (n[1] > 0) {\n n[0] = -n[0];\n n[1] = -n[1];\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 if (toPos[0] < fromPos[0]) {\n rotation = Math.PI + rotation;\n }\n label.attr('rotation', rotation);\n }\n\n var dy;\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/**\n * @constructor\n * @extends {module:zrender/graphic/Group}\n * @alias {module:echarts/chart/helper/Line}\n */\nfunction Line(lineData, idx, seriesScope) {\n graphic.Group.call(this);\n\n this._createLine(lineData, idx, seriesScope);\n}\n\nvar lineProto = Line.prototype;\n\n// Update symbol position and rotation\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\n this.add(line);\n\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\n zrUtil.each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbol = createSymbol(symbolCategory, lineData, idx);\n // 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 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\n var line = this.childOfName('line');\n var linePoints = lineData.getItemLayout(idx);\n var target = {\n shape: {}\n };\n\n setLinePoints(target.shape, linePoints);\n graphic.updateProps(line, target, seriesModel, idx);\n\n zrUtil.each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbolType = lineData.getItemVisual(idx, symbolCategory);\n var key = makeSymbolTypeKey(symbolCategory);\n // Symbol changed\n if (this[key] !== symbolType) {\n this.remove(this.childOfName(symbolCategory));\n var symbol = createSymbol(symbolCategory, lineData, idx);\n this.add(symbol);\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\n var line = this.childOfName('line');\n\n var lineStyle = seriesScope && seriesScope.lineStyle;\n var hoverLineStyle = seriesScope && seriesScope.hoverLineStyle;\n var labelModel = seriesScope && seriesScope.labelModel;\n var hoverLabelModel = seriesScope && seriesScope.hoverLabelModel;\n\n // Optimization for large dataset\n if (!seriesScope || lineData.hasItemOption) {\n var itemModel = lineData.getItemModel(idx);\n\n lineStyle = itemModel.getModel('lineStyle').getLineStyle();\n hoverLineStyle = itemModel.getModel('emphasis.lineStyle').getLineStyle();\n\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(\n lineData.getItemVisual(idx, 'opacity'),\n lineStyle.opacity,\n 1\n );\n\n line.useStyle(zrUtil.defaults(\n {\n strokeNoScale: true,\n fill: 'none',\n stroke: visualColor,\n opacity: visualOpacity\n },\n lineStyle\n ));\n line.hoverStyle = hoverLineStyle;\n\n // Update symbol\n zrUtil.each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbol = this.childOfName(symbolCategory);\n if (symbol) {\n symbol.setColor(visualColor);\n symbol.setStyle({\n opacity: visualOpacity\n });\n }\n }, this);\n\n var showLabel = labelModel.getShallow('show');\n var hoverShowLabel = hoverLabelModel.getShallow('show');\n\n var label = this.childOfName('label');\n var defaultLabelColor;\n var baseText;\n\n // FIXME: the logic below probably should be merged to `graphic.setLabelStyle`.\n if (showLabel || hoverShowLabel) {\n defaultLabelColor = visualColor || '#000';\n\n baseText = seriesModel.getFormattedLabel(idx, 'normal', lineData.dataType);\n if (baseText == null) {\n var rawVal = seriesModel.getRawValue(idx);\n baseText = rawVal == null\n ? lineData.getName(idx)\n : isFinite(rawVal)\n ? round(rawVal)\n : rawVal;\n }\n }\n var normalText = showLabel ? baseText : null;\n var emphasisText = hoverShowLabel\n ? zrUtil.retrieve2(\n seriesModel.getFormattedLabel(idx, 'emphasis', lineData.dataType),\n baseText\n )\n : null;\n\n var labelStyle = label.style;\n\n // Always set `textStyle` even if `normalStyle.text` is null, because default\n // values have to be set on `normalStyle`.\n if (normalText != null || emphasisText != null) {\n graphic.setTextStyle(label.style, labelModel, {\n text: normalText\n }, {\n autoColor: defaultLabelColor\n });\n\n label.__textAlign = labelStyle.textAlign;\n label.__verticalAlign = labelStyle.textVerticalAlign;\n // 'start', 'middle', 'end'\n label.__position = labelModel.get('position') || 'middle';\n\n var distance = labelModel.get('distance');\n if (!zrUtil.isArray(distance)) {\n distance = [distance, distance];\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 }\n else {\n label.hoverStyle = {\n text: null\n };\n }\n\n label.ignore = !showLabel && !hoverShowLabel;\n\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);\n\nexport default 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\n/**\n * @module echarts/chart/helper/LineDraw\n */\n\nimport * as graphic from '../../util/graphic';\nimport LineGroup from './Line';\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\n this.group = new graphic.Group();\n}\n\nvar lineDrawProto = LineDraw.prototype;\n\nlineDrawProto.isPersistent = function () {\n return true;\n};\n\n/**\n * @param {module:echarts/data/List} lineData\n */\nlineDrawProto.updateData = function (lineData) {\n var lineDraw = this;\n var group = lineDraw.group;\n\n var oldLineData = lineDraw._lineData;\n lineDraw._lineData = lineData;\n\n // There is no oldLineData only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n if (!oldLineData) {\n group.removeAll();\n }\n\n var seriesScope = makeSeriesScope(lineData);\n\n lineData.diff(oldLineData)\n .add(function (idx) {\n doAdd(lineDraw, lineData, idx, seriesScope);\n })\n .update(function (newIdx, oldIdx) {\n doUpdate(lineDraw, oldLineData, lineData, oldIdx, newIdx, seriesScope);\n })\n .remove(function (idx) {\n group.remove(oldLineData.getItemGraphicEl(idx));\n })\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 }\n else {\n itemEl.updateData(newLineData, newIdx, seriesScope);\n }\n\n newLineData.setItemGraphicEl(newIdx, itemEl);\n\n lineDraw.group.add(itemEl);\n}\n\nlineDrawProto.updateLayout = function () {\n var lineData = this._lineData;\n\n // Do not support update layout in incremental mode.\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\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 this._incremental = null;\n this.group.removeAll();\n};\n\nlineDrawProto._clearIncremental = function () {\n var incremental = this._incremental;\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\nexport default LineDraw;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nexport function getNodeGlobalScale(seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys.type !== 'view') {\n return 1;\n }\n\n var nodeScaleRatio = seriesModel.option.nodeScaleRatio;\n\n var groupScale = coordSys.scale;\n var groupZoom = (groupScale && groupScale[0]) || 1;\n // Scale node when zoom changes\n var roamZoom = coordSys.getZoom();\n var nodeScale = (roamZoom - 1) * nodeScaleRatio + 1;\n\n return nodeScale / groupZoom;\n}\n\nexport function getSymbolSize(node) {\n var symbolSize = node.getVisual('symbolSize');\n if (symbolSize instanceof Array) {\n symbolSize = (symbolSize[0] + symbolSize[1]) / 2;\n }\n return +symbolSize;\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\nimport * as curveTool from 'zrender/src/core/curve';\nimport * as vec2 from 'zrender/src/core/vector';\nimport {getSymbolSize} from './graphHelper';\n\nvar v1 = [];\nvar v2 = [];\nvar v3 = [];\nvar quadraticAt = curveTool.quadraticAt;\nvar v2DistSquare = vec2.distSquare;\nvar mathAbs = Math.abs;\nfunction intersectCurveCircle(curvePoints, center, radius) {\n var p0 = curvePoints[0];\n var p1 = curvePoints[1];\n var p2 = curvePoints[2];\n\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 if (diff < d) {\n d = diff;\n t = _t;\n }\n }\n\n // Assume the segment is monotoneFind root through Bisection method\n // At most 32 iteration\n for (var i = 0; i < 32; i++) {\n // var prev = t - interval;\n var next = t + interval;\n // v1[0] = quadraticAt(p0[0], p1[0], p2[0], prev);\n // v1[1] = quadraticAt(p0[1], p1[1], p2[1], prev);\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\n var diff = v2DistSquare(v2, center) - radiusSquare;\n if (mathAbs(diff) < 1e-2) {\n break;\n }\n\n // var prevDiff = v2DistSquare(v1, center) - radiusSquare;\n var nextDiff = v2DistSquare(v3, center) - radiusSquare;\n\n interval /= 2;\n if (diff < 0) {\n if (nextDiff >= 0) {\n t = t + interval;\n }\n else {\n t = t - interval;\n }\n }\n else {\n if (nextDiff >= 0) {\n t = t - interval;\n }\n else {\n t = t + interval;\n }\n }\n }\n\n return t;\n}\n\n// Adjust edge to avoid\nexport default function (graph, scale) {\n var tmp0 = [];\n var quadraticSubdivide = curveTool.quadraticSubdivide;\n var pts = [[], [], []];\n var pts2 = [[], []];\n var v = [];\n scale /= 2;\n\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 = [\n vec2.clone(linePoints[0]),\n vec2.clone(linePoints[1])\n ];\n if (linePoints[2]) {\n linePoints.__original.push(vec2.clone(linePoints[2]));\n }\n }\n var originalPoints = linePoints.__original;\n // Quadratic curve\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 if (fromSymbol && fromSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node1);\n\n var t = intersectCurveCircle(pts, originalPoints[0], symbolSize * scale);\n // Subdivide and get the second\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 if (toSymbol && toSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node2);\n\n var t = intersectCurveCircle(pts, originalPoints[1], symbolSize * scale);\n // Subdivide and get the first\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 }\n // Copy back to layout\n vec2.copy(linePoints[0], pts[0]);\n vec2.copy(linePoints[1], pts[2]);\n vec2.copy(linePoints[2], pts[1]);\n }\n // Line\n else {\n vec2.copy(pts2[0], originalPoints[0]);\n vec2.copy(pts2[1], originalPoints[1]);\n\n vec2.sub(v, pts2[1], pts2[0]);\n vec2.normalize(v, v);\n if (fromSymbol && fromSymbol !== 'none') {\n\n var symbolSize = getSymbolSize(edge.node1);\n\n vec2.scaleAndAdd(pts2[0], pts2[0], v, symbolSize * scale);\n }\n if (toSymbol && toSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node2);\n\n vec2.scaleAndAdd(pts2[1], pts2[1], v, -symbolSize * scale);\n }\n vec2.copy(linePoints[0], pts2[0]);\n vec2.copy(linePoints[1], pts2[1]);\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\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport SymbolDraw from '../helper/SymbolDraw';\nimport LineDraw from '../helper/LineDraw';\nimport RoamController from '../../component/helper/RoamController';\nimport * as roamHelper from '../../component/helper/roamHelper';\nimport {onIrrelevantElement} from '../../component/helper/cursorHelper';\nimport * as graphic from '../../util/graphic';\nimport adjustEdge from './adjustEdge';\nimport {getNodeGlobalScale} from './graphHelper';\n\nvar FOCUS_ADJACENCY = '__focusNodeAdjacency';\nvar UNFOCUS_ADJACENCY = '__unfocusNodeAdjacency';\n\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 if (opct == null || opacityRatio != null) {\n opct = opacity;\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();\n // Should go back to normal opacity first, consider hoverLayer,\n // where current state is copied to elMirror, and support\n // emphasis opacity here.\n el.traverse(function (child) {\n !child.isGroup && child.setStyle('opacity', opacity);\n });\n el.highlight && el.highlight();\n}\n\nexport default echarts.extendChartView({\n\n type: 'graph',\n\n init: function (ecModel, api) {\n var symbolDraw = new SymbolDraw();\n var lineDraw = new LineDraw();\n var group = this.group;\n\n this._controller = new RoamController(api.getZr());\n this._controllerHost = {target: group};\n\n group.add(symbolDraw.group);\n group.add(lineDraw.group);\n\n this._symbolDraw = symbolDraw;\n this._lineDraw = lineDraw;\n\n this._firstRender = true;\n },\n\n render: function (seriesModel, ecModel, api) {\n var graphView = this;\n var coordSys = seriesModel.coordinateSystem;\n\n this._model = seriesModel;\n\n var symbolDraw = this._symbolDraw;\n var lineDraw = this._lineDraw;\n\n var group = this.group;\n\n if (coordSys.type === 'view') {\n var groupNewProp = {\n position: coordSys.position,\n scale: coordSys.scale\n };\n if (this._firstRender) {\n group.attr(groupNewProp);\n }\n else {\n graphic.updateProps(group, groupNewProp, seriesModel);\n }\n }\n // Fix edge contact point with node\n adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel));\n\n var data = seriesModel.getData();\n symbolDraw.updateData(data);\n\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 if (forceLayout) {\n this._startForceLayoutIteration(forceLayout, layoutAnimation);\n }\n\n data.eachItemGraphicEl(function (el, idx) {\n var itemModel = data.getItemModel(idx);\n // Update draggable\n el.off('drag').off('dragend');\n var draggable = itemModel.get('draggable');\n if (draggable) {\n el.on('drag', function () {\n if (forceLayout) {\n forceLayout.warmUp();\n !this._layouting\n && this._startForceLayoutIteration(forceLayout, layoutAnimation);\n forceLayout.setFixed(idx);\n // Write position back to layout\n data.setItemLayout(idx, el.position);\n }\n }, this).on('dragend', function () {\n if (forceLayout) {\n forceLayout.setUnfixed(idx);\n }\n }, this);\n }\n el.setDraggable(draggable && forceLayout);\n\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 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\n }, this);\n\n data.graph.eachEdge(function (edge) {\n var el = edge.getGraphicEl();\n\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 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\n var circularRotateLabel = seriesModel.get('layout') === 'circular'\n && 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 if (circularRotateLabel) {\n var pos = data.getItemLayout(idx);\n var rad = Math.atan2(pos[1] - cy, pos[0] - cx);\n if (rad < 0) {\n rad = Math.PI * 2 + rad;\n }\n var isLeft = pos[0] < cx;\n if (isLeft) {\n rad = rad - Math.PI;\n }\n var textPosition = isLeft ? 'left' : 'right';\n graphic.modifyLabelStyle(\n symbolPath,\n {\n textRotation: -rad,\n textPosition: textPosition,\n textOrigin: 'center'\n },\n {\n textPosition: textPosition\n }\n );\n }\n else {\n graphic.modifyLabelStyle(\n symbolPath,\n {\n textRotation: labelRotate *= Math.PI / 180\n }\n );\n }\n });\n\n this._firstRender = false;\n },\n\n dispose: function () {\n this._controller && this._controller.dispose();\n this._controllerHost = {};\n this._clearTimer();\n },\n\n _dispatchUnfocus: function (api, opt) {\n var self = this;\n this._clearTimer();\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 },\n\n _clearTimer: function () {\n if (this._unfocusDelayTimer) {\n clearTimeout(this._unfocusDelayTimer);\n this._unfocusDelayTimer = null;\n }\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\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 fadeInItem(adjacentEdge, lineOpacityPath);\n fadeInItem(adjacentEdge.node1, nodeOpacityPath);\n fadeInItem(adjacentEdge.node2, nodeOpacityPath);\n });\n }\n if (edge) {\n fadeInItem(edge, lineOpacityPath);\n fadeInItem(edge.node1, nodeOpacityPath);\n fadeInItem(edge.node2, nodeOpacityPath);\n }\n },\n\n unfocusNodeAdjacency: function (seriesModel, ecModel, api, payload) {\n var graph = seriesModel.getData().graph;\n\n graph.eachNode(function (node) {\n fadeOutItem(node, nodeOpacityPath);\n });\n graph.eachEdge(function (edge) {\n fadeOutItem(edge, lineOpacityPath);\n });\n },\n\n _startForceLayoutIteration: function (forceLayout, layoutAnimation) {\n var self = this;\n (function step() {\n forceLayout.step(function (stopped) {\n self.updateLayout(self._model);\n (self._layouting = !stopped) && (\n layoutAnimation\n ? (self._layoutTimeout = setTimeout(step, 16))\n : step()\n );\n });\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\n controller.setPointerChecker(function (e, x, y) {\n var rect = group.getBoundingRect();\n rect.applyTransform(group.transform);\n return rect.contain(x, y)\n && !onIrrelevantElement(e, api, seriesModel);\n });\n\n if (seriesModel.coordinateSystem.type !== 'view') {\n controller.disable();\n return;\n }\n controller.enable(seriesModel.get('roam'));\n controllerHost.zoomLimit = seriesModel.get('scaleLimit');\n controllerHost.zoom = seriesModel.coordinateSystem.getZoom();\n\n controller\n .off('pan')\n .off('zoom')\n .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 })\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 this._updateNodeAndLinkScale();\n adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel));\n this._lineDraw.updateLayout();\n }, this);\n },\n\n _updateNodeAndLinkScale: function () {\n var seriesModel = this._model;\n var data = seriesModel.getData();\n\n var nodeScale = getNodeGlobalScale(seriesModel);\n var invScale = [nodeScale, nodeScale];\n\n data.eachItemGraphicEl(function (el, idx) {\n el.attr('scale', invScale);\n });\n },\n\n updateLayout: function (seriesModel) {\n adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel));\n\n this._symbolDraw.updateLayout();\n this._lineDraw.updateLayout();\n },\n\n remove: function (ecModel, api) {\n this._symbolDraw && this._symbolDraw.remove();\n this._lineDraw && this._lineDraw.remove();\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\nimport * as echarts from '../../echarts';\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/**\n * @payload\n * @property {number} [seriesIndex]\n * @property {string} [seriesId]\n * @property {string} [seriesName]\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\nimport * as echarts from '../../echarts';\nimport {updateCenterAndZoom} from '../../action/roamHelper';\nimport '../helper/focusNodeAdjacencyAction';\n\nvar actionInfo = {\n type: 'graphRoam',\n event: 'graphRoam',\n update: 'none'\n};\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 */\necharts.registerAction(actionInfo, function (payload, ecModel) {\n ecModel.eachComponent({mainType: 'series', query: payload}, function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n\n var res = updateCenterAndZoom(coordSys, payload);\n\n seriesModel.setCenter\n && seriesModel.setCenter(res.center);\n\n seriesModel.setZoom\n && seriesModel.setZoom(res.zoom);\n });\n});\n\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\nexport default function (ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n if (!legendModels || !legendModels.length) {\n return;\n }\n ecModel.eachSeriesByType('graph', function (graphSeries) {\n var categoriesData = graphSeries.getCategoriesData();\n var graph = graphSeries.getGraph();\n var data = graph.data;\n\n var categoryNames = categoriesData.mapArray(categoriesData.getName);\n\n data.filterSelf(function (idx) {\n var model = data.getItemModel(idx);\n var category = model.getShallow('category');\n if (category != null) {\n if (typeof category === 'number') {\n category = categoryNames[category];\n }\n // If in any legend component the status is not selected.\n for (var i = 0; i < legendModels.length; i++) {\n if (!legendModels[i].isSelected(category)) {\n return false;\n }\n }\n }\n return true;\n });\n }, this);\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nexport default function (ecModel) {\n\n var paletteScope = {};\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var categoriesData = seriesModel.getCategoriesData();\n var data = seriesModel.getData();\n\n var categoryNameIdxMap = {};\n\n categoriesData.each(function (idx) {\n var name = categoriesData.getName(idx);\n // Add prefix to avoid conflict with Object.prototype.\n categoryNameIdxMap['ec-' + name] = idx;\n var itemModel = categoriesData.getItemModel(idx);\n\n var color = itemModel.get('itemStyle.color')\n || seriesModel.getColorFromPalette(name, paletteScope);\n categoriesData.setItemVisual(idx, 'color', color);\n\n var itemStyleList = ['opacity', 'symbol', 'symbolSize', 'symbolKeepAspect'];\n for (var i = 0; i < itemStyleList.length; i++) {\n var itemStyle = itemModel.getShallow(itemStyleList[i], true);\n if (itemStyle != null) {\n categoriesData.setItemVisual(idx, itemStyleList[i], itemStyle);\n }\n }\n });\n\n // Assign category color to visual\n if (categoriesData.count()) {\n data.each(function (idx) {\n var model = data.getItemModel(idx);\n var category = model.getShallow('category');\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(\n idx, itemStyleList[i],\n categoriesData.getItemVisual(category, itemStyleList[i])\n );\n }\n }\n }\n });\n }\n });\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\nfunction normalize(a) {\n if (!(a instanceof Array)) {\n a = [a, a];\n }\n return a;\n}\n\nexport default function (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\n var colorQuery = 'lineStyle.color'.split('.');\n var opacityQuery = 'lineStyle.opacity'.split('.');\n\n edgeData.setVisual('fromSymbol', symbolType && symbolType[0]);\n edgeData.setVisual('toSymbol', symbolType && symbolType[1]);\n edgeData.setVisual('fromSymbolSize', symbolSize && symbolSize[0]);\n edgeData.setVisual('toSymbolSize', symbolSize && symbolSize[1]);\n edgeData.setVisual('color', seriesModel.get(colorQuery));\n edgeData.setVisual('opacity', seriesModel.get(opacityQuery));\n\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));\n // Edge visual must after node visual\n var color = itemModel.get(colorQuery);\n var opacity = itemModel.get(opacityQuery);\n switch (color) {\n case 'source':\n color = edge.node1.getVisual('color');\n break;\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\n edge.setVisual('color', color);\n edge.setVisual('opacity', opacity);\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\nimport * as vec2 from 'zrender/src/core/vector';\nimport * as zrUtil from 'zrender/src/core/util';\nimport {getCurvenessForEdge} from '../helper/multipleGraphEdgeHelper';\n\n\nexport function simpleLayout(seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && coordSys.type !== 'view') {\n return;\n }\n var graph = seriesModel.getGraph();\n\n graph.eachNode(function (node) {\n var model = node.getModel();\n node.setLayout([+model.get('x'), +model.get('y')]);\n });\n\n simpleLayoutEdge(graph, seriesModel);\n}\n\nexport function simpleLayoutEdge(graph, seriesModel) {\n graph.eachEdge(function (edge, index) {\n var curveness = zrUtil.retrieve3(\n edge.getModel().get('lineStyle.curveness'),\n -getCurvenessForEdge(edge, seriesModel, index, true),\n 0\n );\n var p1 = vec2.clone(edge.node1.getLayout());\n var p2 = vec2.clone(edge.node2.getLayout());\n var points = [p1, p2];\n if (+curveness) {\n points.push([\n (p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * curveness,\n (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * curveness\n ]);\n }\n edge.setLayout(points);\n });\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {each} from 'zrender/src/core/util';\nimport {simpleLayout, simpleLayoutEdge} from './simpleLayoutHelper';\n\nexport default function (ecModel, api) {\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var layout = seriesModel.get('layout');\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && coordSys.type !== 'view') {\n var data = seriesModel.getData();\n\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 for (var i = 0; i < dimensions.length; i++) {\n var val = data.get(dimensions[i], dataIndex);\n if (!isNaN(val)) {\n hasValue = true;\n }\n value.push(val);\n }\n if (hasValue) {\n data.setItemLayout(dataIndex, coordSys.dataToPoint(value));\n }\n else {\n // Also {Array.<number>}, not undefined to avoid if...else... statement\n data.setItemLayout(dataIndex, [NaN, NaN]);\n }\n }\n\n simpleLayoutEdge(data.graph, seriesModel);\n }\n else if (!layout || layout === 'none') {\n simpleLayout(seriesModel);\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\nimport * as vec2 from 'zrender/src/core/vector';\nimport {getSymbolSize, getNodeGlobalScale} from './graphHelper';\nimport * as zrUtil from 'zrender/src/core/util';\nimport {getCurvenessForEdge} from '../helper/multipleGraphEdgeHelper';\n\nvar PI = Math.PI;\n\nvar _symbolRadiansHalf = [];\n\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 */\nexport function circularLayout(seriesModel, basedOn) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && coordSys.type !== 'view') {\n return;\n }\n\n var rect = coordSys.getBoundingRect();\n\n var nodeData = seriesModel.getData();\n var graph = nodeData.graph;\n\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\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(\n edge.getModel().get('lineStyle.curveness'),\n getCurvenessForEdge(edge, seriesModel, index),\n 0\n );\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 if (+curveness) {\n curveness *= 3;\n cp1 = [\n cx * curveness + x12 * (1 - curveness),\n cy * curveness + y12 * (1 - curveness)\n ];\n }\n edge.setLayout([p1, p2, cp1]);\n });\n}\n\nvar _layoutNodesBasedOn = {\n\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\n graph.eachNode(function (node) {\n var value = node.getValue('value');\n var radianHalf = unitAngle * (sum ? value : 1) / 2;\n\n angle += radianHalf;\n node.setLayout([\n r * Math.cos(angle) + cx,\n r * Math.sin(angle) + cy\n ]);\n angle += radianHalf;\n });\n },\n\n symbolSize: function (seriesModel, coordSys, graph, nodeData, r, cx, cy, count) {\n var sumRadian = 0;\n _symbolRadiansHalf.length = count;\n\n var nodeScale = getNodeGlobalScale(seriesModel);\n\n graph.eachNode(function (node) {\n var symbolSize = getSymbolSize(node);\n\n // Normally this case will not happen, but we still add\n // some the defensive code (2px is an arbitrary value).\n isNaN(symbolSize) && (symbolSize = 2);\n symbolSize < 0 && (symbolSize = 0);\n\n symbolSize *= nodeScale;\n\n var symbolRadianHalf = Math.asin(symbolSize / 2 / r);\n // when `symbolSize / 2` is bigger than `r`.\n isNaN(symbolRadianHalf) && (symbolRadianHalf = PI / 2);\n _symbolRadiansHalf[node.dataIndex] = symbolRadianHalf;\n sumRadian += symbolRadianHalf * 2;\n });\n\n var halfRemainRadian = (2 * PI - sumRadian) / count / 2;\n\n var angle = 0;\n graph.eachNode(function (node) {\n var radianHalf = halfRemainRadian + _symbolRadiansHalf[node.dataIndex];\n\n angle += radianHalf;\n node.setLayout([\n r * Math.cos(angle) + cx,\n r * Math.sin(angle) + cy\n ]);\n angle += radianHalf;\n });\n }\n};\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {circularLayout} from './circularLayoutHelper';\n\nexport default function (ecModel) {\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n if (seriesModel.get('layout') === 'circular') {\n circularLayout(seriesModel, 'symbolSize');\n }\n });\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* 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* </licenses/LICENSE-d3>).\n*/\n\nimport * as vec2 from 'zrender/src/core/vector';\n\nvar scaleAndAdd = vec2.scaleAndAdd;\n\n// function adjacentNode(n, e) {\n// return e.n1 === n ? e.n2 : e.n1;\n// }\n\nexport function 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];\n // var scale = opts.scale || 1;\n var gravity = opts.gravity == null ? 0.1 : opts.gravity;\n\n // 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 for (var i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n if (!n.p) {\n n.p = vec2.create(\n width * (Math.random() - 0.5) + center[0],\n height * (Math.random() - 0.5) + center[1]\n );\n }\n n.pp = vec2.clone(n.p);\n n.edges = null;\n }\n\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 var initialFriction = opts.friction == null ? 0.6 : opts.friction;\n var friction = initialFriction;\n\n return {\n warmUp: function () {\n friction = initialFriction * 0.8;\n },\n\n setFixed: function (idx) {\n nodes[idx].fixed = true;\n },\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 for (var i = 0; i < edges.length; i++) {\n var e = edges[i];\n if (e.ignoreForceLayout) {\n continue;\n }\n var n1 = e.n1;\n var n2 = e.n2;\n\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\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 }\n // Gravity\n for (var i = 0; i < nLen; i++) {\n var n = nodes[i];\n if (!n.fixed) {\n vec2.sub(v12, center, n.p);\n // var d = vec2.len(v12);\n // vec2.scale(v12, v12, 1 / d);\n // var gravityFactor = gravity;\n scaleAndAdd(n.p, n.p, v12, gravity * friction);\n }\n }\n\n // Repulsive\n // PENDING\n for (var i = 0; i < nLen; i++) {\n var n1 = nodes[i];\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 if (d === 0) {\n // Random repulse\n vec2.set(v12, Math.random() - 0.5, Math.random() - 0.5);\n d = 1;\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 var v = [];\n for (var i = 0; i < nLen; i++) {\n var n = nodes[i];\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\n cb && cb(nodes, edges, friction < 0.01);\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\nimport {forceLayout} from './forceHelper';\nimport {simpleLayout} from './simpleLayoutHelper';\nimport {circularLayout} from './circularLayoutHelper';\nimport {linearMap} from '../../util/number';\nimport * as vec2 from 'zrender/src/core/vector';\nimport * as zrUtil from 'zrender/src/core/util';\nimport {getCurvenessForEdge} from '../helper/multipleGraphEdgeHelper';\n\nexport default function (ecModel) {\n ecModel.eachSeriesByType('graph', function (graphSeries) {\n var coordSys = graphSeries.coordinateSystem;\n if (coordSys && coordSys.type !== 'view') {\n return;\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 if (graphSeries.preservedPoints) {\n nodeData.each(function (idx) {\n var id = nodeData.getId(idx);\n nodeData.setItemLayout(idx, preservedPoints[id] || [NaN, NaN]);\n });\n }\n else if (!initLayout || initLayout === 'none') {\n simpleLayout(graphSeries);\n }\n else if (initLayout === 'circular') {\n circularLayout(graphSeries, 'value');\n }\n\n var nodeDataExtent = nodeData.getDataExtent('value');\n var edgeDataExtent = edgeData.getDataExtent('value');\n // var edgeDataExtent = edgeData.getDataExtent('value');\n var repulsion = forceModel.get('repulsion');\n var edgeLength = forceModel.get('edgeLength');\n if (!zrUtil.isArray(repulsion)) {\n repulsion = [repulsion, repulsion];\n }\n if (!zrUtil.isArray(edgeLength)) {\n edgeLength = [edgeLength, edgeLength];\n }\n // Larger value has smaller length\n edgeLength = [edgeLength[1], edgeLength[0]];\n\n var nodes = nodeData.mapArray('value', function (value, idx) {\n var point = nodeData.getItemLayout(idx);\n var rep = linearMap(value, nodeDataExtent, repulsion);\n if (isNaN(rep)) {\n rep = (repulsion[0] + repulsion[1]) / 2;\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 if (isNaN(d)) {\n d = (edgeLength[0] + edgeLength[1]) / 2;\n }\n var edgeModel = edge.getModel();\n var curveness = zrUtil.retrieve3(\n edgeModel.get('lineStyle.curveness'),\n -getCurvenessForEdge(edge, graphSeries, idx, true),\n 0\n );\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\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 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 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 preservedPoints[nodeData.getId(i)] = nodes[i].p;\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 if (+e.curveness) {\n points[2] = [\n (p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * e.curveness,\n (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * e.curveness\n ];\n }\n edge.setLayout(points);\n }\n // Update layout\n\n cb && cb(stopped);\n });\n };\n graphSeries.forceLayout = forceInstance;\n graphSeries.preservedPoints = preservedPoints;\n\n // Step to get the layout\n forceInstance.step();\n }\n else {\n // Remove prev injected forceLayout instance\n graphSeries.forceLayout = null;\n }\n });\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n// FIXME Where to create the simple view coordinate system\nimport View from '../../coord/View';\nimport {getLayoutRect} from '../../util/layout';\nimport * as bbox from 'zrender/src/core/bbox';\n\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\nexport default function (ecModel, api) {\n var viewList = [];\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var coordSysType = seriesModel.get('coordinateSystem');\n if (!coordSysType || coordSysType === 'view') {\n\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\n var min = [];\n var max = [];\n\n bbox.fromPoints(positions, min, max);\n\n // If width or height is 0\n if (max[0] - min[0] === 0) {\n max[0] += 1;\n min[0] -= 1;\n }\n if (max[1] - min[1] === 0) {\n max[1] += 1;\n min[1] -= 1;\n }\n var aspect = (max[0] - min[0]) / (max[1] - min[1]);\n // FIXME If get view rect after data processed?\n var viewRect = getViewRect(seriesModel, api, aspect);\n // Position may be NaN, use view rect instead\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\n var viewWidth = viewRect.width;\n var viewHeight = viewRect.height;\n\n var viewCoordSys = seriesModel.coordinateSystem = new View();\n viewCoordSys.zoomLimit = seriesModel.get('scaleLimit');\n\n viewCoordSys.setBoundingRect(\n min[0], min[1], bbWidth, bbHeight\n );\n viewCoordSys.setViewRect(\n viewRect.x, viewRect.y, viewWidth, viewHeight\n );\n\n // Update roam info\n viewCoordSys.setCenter(seriesModel.get('center'));\n viewCoordSys.setZoom(seriesModel.get('zoom'));\n\n viewList.push(viewCoordSys);\n }\n });\n\n return viewList;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../echarts';\n\nimport './graph/GraphSeries';\nimport './graph/GraphView';\nimport './graph/graphAction';\n\nimport categoryFilter from './graph/categoryFilter';\nimport visualSymbol from '../visual/symbol';\nimport categoryVisual from './graph/categoryVisual';\nimport edgeVisual from './graph/edgeVisual';\nimport simpleLayout from './graph/simpleLayout';\nimport circularLayout from './graph/circularLayout';\nimport forceLayout from './graph/forceLayout';\nimport createView from './graph/createView';\n\necharts.registerProcessor(categoryFilter);\n\necharts.registerVisual(visualSymbol('graph', 'circle', null));\necharts.registerVisual(categoryVisual);\necharts.registerVisual(edgeVisual);\n\necharts.registerLayout(simpleLayout);\necharts.registerLayout(echarts.PRIORITY.VISUAL.POST_CHART_LAYOUT, circularLayout);\necharts.registerLayout(forceLayout);\n\n// Graph view coordinate system\necharts.registerCoordinateSystem('graphView', {\n create: createView\n});","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport createListSimply from '../helper/createListSimply';\nimport SeriesModel from '../../model/Series';\n\nvar GaugeSeries = SeriesModel.extend({\n\n type: 'series.gauge',\n\n getInitialData: function (option, ecModel) {\n return createListSimply(this, ['value']);\n },\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: { // 属性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, // 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});\n\nexport default GaugeSeries;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport Path from 'zrender/src/graphic/Path';\n\nexport default Path.extend({\n\n type: 'echartsGaugePointer',\n\n shape: {\n angle: 0,\n\n width: 10,\n\n r: 10,\n\n x: 0,\n\n y: 0\n },\n\n buildPath: function (ctx, shape) {\n var mathCos = Math.cos;\n var mathSin = Math.sin;\n\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\n angle = shape.angle - Math.PI / 2;\n ctx.moveTo(x, y);\n ctx.lineTo(\n shape.x + mathCos(angle) * width,\n shape.y + mathSin(angle) * width\n );\n ctx.lineTo(\n shape.x + mathCos(shape.angle) * r,\n shape.y + mathSin(shape.angle) * r\n );\n ctx.lineTo(\n shape.x - mathCos(angle) * width,\n shape.y - mathSin(angle) * width\n );\n ctx.lineTo(x, y);\n return;\n }\n});","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport PointerPath from './PointerPath';\nimport * as graphic from '../../util/graphic';\nimport ChartView from '../../view/Chart';\nimport {parsePercent, round, linearMap} from '../../util/number';\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\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 }\n else if (typeof labelFormatter === 'function') {\n label = labelFormatter(label);\n }\n }\n\n return label;\n}\n\nvar PI2 = Math.PI * 2;\n\nvar GaugeView = ChartView.extend({\n\n type: 'gauge',\n\n render: function (seriesModel, ecModel, api) {\n\n this.group.removeAll();\n\n var colorList = seriesModel.get('axisLine.lineStyle.color');\n var posInfo = parsePosition(seriesModel, api);\n\n this._renderMain(\n seriesModel, ecModel, api, colorList, posInfo\n );\n },\n\n dispose: function () {},\n\n _renderMain: function (seriesModel, ecModel, api, colorList, posInfo) {\n var group = this.group;\n\n var axisLineModel = seriesModel.getModel('axisLine');\n var lineStyleModel = axisLineModel.getModel('lineStyle');\n\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\n var angleRangeSpan = (endAngle - startAngle) % PI2;\n\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\n sector.setStyle({\n fill: colorList[i][1]\n });\n\n sector.setStyle(lineStyleModel.getLineStyle(\n // Because we use sector to simulate arc\n // so the properties for stroking are useless\n ['color', 'borderWidth', 'borderColor']\n ));\n\n group.add(sector);\n\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 for (var i = 0; i < colorList.length; i++) {\n if (colorList[i][0] >= percent\n && (i === 0 ? 0 : colorList[i - 1][0]) < percent\n ) {\n return colorList[i][1];\n }\n }\n // More than 1\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(\n seriesModel, ecModel, api, getColor, posInfo,\n startAngle, endAngle, clockwise\n );\n\n this._renderPointer(\n seriesModel, ecModel, api, getColor, posInfo,\n startAngle, endAngle, clockwise\n );\n\n this._renderTitle(\n seriesModel, ecModel, api, getColor, posInfo\n );\n this._renderDetail(\n seriesModel, ecModel, api, getColor, posInfo\n );\n },\n\n _renderTicks: function (\n seriesModel, ecModel, api, getColor, posInfo,\n startAngle, endAngle, clockwise\n ) {\n var group = this.group;\n var cx = posInfo.cx;\n var cy = posInfo.cy;\n var r = posInfo.r;\n\n var minVal = +seriesModel.get('min');\n var maxVal = +seriesModel.get('max');\n\n var splitLineModel = seriesModel.getModel('splitLine');\n var tickModel = seriesModel.getModel('axisTick');\n var labelModel = seriesModel.getModel('axisLabel');\n\n var splitNumber = seriesModel.get('splitNumber');\n var subSplitNumber = tickModel.get('splitNumber');\n\n var splitLineLen = parsePercent(\n splitLineModel.get('length'), r\n );\n var tickLen = parsePercent(\n tickModel.get('length'), r\n );\n\n var angle = startAngle;\n var step = (endAngle - startAngle) / splitNumber;\n var subStep = step / subSplitNumber;\n\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);\n // Split line\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 if (splitLineStyle.stroke === 'auto') {\n splitLine.setStyle({\n stroke: getColor(i / splitNumber)\n });\n }\n\n group.add(splitLine);\n }\n\n // Label\n if (labelModel.get('show')) {\n var label = formatLabel(\n round(i / splitNumber * (maxVal - minVal) + minVal),\n labelModel.get('formatter')\n );\n var distance = labelModel.get('distance');\n var autoColor = getColor(i / splitNumber);\n\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 }, {autoColor: autoColor}),\n silent: true\n }));\n }\n\n // Axis tick\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 angle -= subStep;\n }\n else {\n angle += step;\n }\n }\n },\n\n _renderPointer: function (\n seriesModel, ecModel, api, getColor, posInfo,\n startAngle, endAngle, clockwise\n ) {\n\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\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n\n data.diff(oldData)\n .add(function (idx) {\n var pointer = new PointerPath({\n shape: {\n angle: startAngle\n }\n });\n\n graphic.initProps(pointer, {\n shape: {\n angle: linearMap(data.get(valueDim, idx), valueExtent, angleExtent, true)\n }\n }, seriesModel);\n\n group.add(pointer);\n data.setItemGraphicEl(idx, pointer);\n })\n .update(function (newIdx, oldIdx) {\n var pointer = oldData.getItemGraphicEl(oldIdx);\n\n graphic.updateProps(pointer, {\n shape: {\n angle: linearMap(data.get(valueDim, newIdx), valueExtent, angleExtent, true)\n }\n }, seriesModel);\n\n group.add(pointer);\n data.setItemGraphicEl(newIdx, pointer);\n })\n .remove(function (idx) {\n var pointer = oldData.getItemGraphicEl(idx);\n group.remove(pointer);\n })\n .execute();\n\n data.eachItemGraphicEl(function (pointer, idx) {\n var itemModel = data.getItemModel(idx);\n var pointerModel = itemModel.getModel('pointer');\n\n pointer.setShape({\n x: posInfo.cx,\n y: posInfo.cy,\n width: parsePercent(\n pointerModel.get('width'), posInfo.r\n ),\n r: parsePercent(pointerModel.get('length'), posInfo.r)\n });\n\n pointer.useStyle(itemModel.getModel('itemStyle').getItemStyle());\n\n if (pointer.style.fill === 'auto') {\n pointer.setStyle('fill', getColor(\n linearMap(data.get(valueDim, idx), valueExtent, [0, 1], true)\n ));\n }\n\n graphic.setHoverStyle(\n pointer, itemModel.getModel('emphasis.itemStyle').getItemStyle()\n );\n });\n\n this._data = data;\n },\n\n _renderTitle: function (\n seriesModel, ecModel, api, getColor, posInfo\n ) {\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n var titleModel = seriesModel.getModel('title');\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\n var minVal = +seriesModel.get('min');\n var maxVal = +seriesModel.get('max');\n var value = seriesModel.getData().get(valueDim, 0);\n var autoColor = getColor(\n linearMap(value, [minVal, maxVal], [0, 1], true)\n );\n\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 }, {autoColor: autoColor, forceRich: true})\n }));\n }\n },\n\n _renderDetail: function (\n seriesModel, ecModel, api, getColor, posInfo\n ) {\n var detailModel = seriesModel.getModel('detail');\n var minVal = +seriesModel.get('min');\n var maxVal = +seriesModel.get('max');\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(\n linearMap(value, [minVal, maxVal], [0, 1], true)\n );\n\n this.group.add(new graphic.Text({\n silent: true,\n style: graphic.setTextStyle({}, detailModel, {\n x: x,\n y: y,\n text: formatLabel(\n // FIXME First data name ?\n value, detailModel.get('formatter')\n ),\n textWidth: isNaN(width) ? null : width,\n textHeight: isNaN(height) ? null : height,\n textAlign: 'center',\n textVerticalAlign: 'middle'\n }, {autoColor: autoColor, forceRich: true})\n }));\n }\n }\n});\n\nexport default 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\nimport './gauge/GaugeSeries';\nimport './gauge/GaugeView';","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport createListSimply from '../helper/createListSimply';\nimport {defaultEmphasis} from '../../util/model';\nimport {makeSeriesEncodeForNameBased} from '../../data/helper/sourceHelper';\nimport LegendVisualProvider from '../../visual/LegendVisualProvider';\n\nvar FunnelSeries = echarts.extendSeriesModel({\n\n type: 'series.funnel',\n\n init: function (option) {\n FunnelSeries.superApply(this, 'init', arguments);\n\n // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n this.legendVisualProvider = new LegendVisualProvider(\n zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this)\n );\n // Extend labelLine emphasis\n this._defaultLabelLine(option);\n },\n\n getInitialData: function (option, ecModel) {\n return createListSimply(this, {\n coordDimensions: ['value'],\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this)\n });\n },\n\n _defaultLabelLine: function (option) {\n // Extend labelLine emphasis\n defaultEmphasis(option, 'labelLine', ['show']);\n\n var labelLineNormalOpt = option.labelLine;\n var labelLineEmphasisOpt = option.emphasis.labelLine;\n // Not show label line if `label.normal.show = false`\n labelLineNormalOpt.show = labelLineNormalOpt.show\n && option.label.show;\n labelLineEmphasisOpt.show = labelLineEmphasisOpt.show\n && option.emphasis.label.show;\n },\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);\n // Percent is 0 if sum is 0\n params.percent = !sum ? 0 : +(data.get(valueDim, dataIndex) / sum * 100).toFixed(2);\n\n params.$vars.push('percent');\n return params;\n },\n\n defaultOption: {\n zlevel: 0, // 一级层叠\n z: 2, // 二级层叠\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 // 默认取数据最小最大值\n // min: 0,\n // max: 100,\n minSize: '0%',\n maxSize: '100%',\n sort: 'descending', // 'ascending', 'descending'\n orient: 'vertical',\n gap: 0,\n funnelAlign: 'center',\n label: {\n show: true,\n position: 'outer'\n // formatter: 标签文本格式器同Tooltip.formatter不支持异步回调\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});\n\nexport default FunnelSeries;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as graphic from '../../util/graphic';\nimport * as zrUtil from 'zrender/src/core/util';\nimport ChartView from '../../view/Chart';\n\n/**\n * Piece of pie including Sector, Label, LabelLine\n * @constructor\n * @extends {module:zrender/graphic/Group}\n */\nfunction FunnelPiece(data, idx) {\n\n graphic.Group.call(this);\n\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 }\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;\n\nvar opacityAccessPath = ['itemStyle', 'opacity'];\nfunnelPieceProto.updateData = function (data, idx, firstCreate) {\n\n var polygon = this.childAt(0);\n\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;\n\n // Reset style\n polygon.useStyle({});\n\n if (firstCreate) {\n polygon.setShape({\n points: layout.points\n });\n polygon.setStyle({opacity: 0});\n graphic.initProps(polygon, {\n style: {\n opacity: opacity\n }\n }, seriesModel, idx);\n }\n else {\n graphic.updateProps(polygon, {\n style: {\n opacity: opacity\n },\n shape: {\n points: layout.points\n }\n }, seriesModel, idx);\n }\n\n // Update common style\n var itemStyleModel = itemModel.getModel('itemStyle');\n var visualColor = data.getItemVisual(idx, 'color');\n\n polygon.setStyle(\n zrUtil.defaults(\n {\n lineJoin: 'round',\n fill: visualColor\n },\n itemStyleModel.getItemStyle(['opacity'])\n )\n );\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\n var labelLine = this.childAt(1);\n var labelText = this.childAt(2);\n\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 graphic.updateProps(labelLine, {\n shape: {\n points: labelLayout.linePoints || labelLayout.linePoints\n }\n }, seriesModel, idx);\n\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\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\n graphic.setLabelStyle(\n labelText.style, labelText.hoverStyle = {}, labelModel, labelHoverModel,\n {\n labelFetcher: data.hostModel,\n labelDataIndex: idx,\n defaultText: data.getName(idx),\n autoColor: visualColor,\n useInsideStyle: !!labelLayout.inside\n },\n {\n textAlign: labelLayout.textAlign,\n textVerticalAlign: labelLayout.verticalAlign\n }\n );\n\n labelText.ignore = labelText.normalIgnore = !labelModel.get('show');\n labelText.hoverIgnore = !labelHoverModel.get('show');\n\n labelLine.ignore = labelLine.normalIgnore = !labelLineModel.get('show');\n labelLine.hoverIgnore = !labelLineHoverModel.get('show');\n\n // Default use item visual color\n labelLine.setStyle({\n stroke: visualColor\n });\n labelLine.setStyle(labelLineModel.getModel('lineStyle').getLineStyle());\n\n labelLine.hoverStyle = labelLineHoverModel.getModel('lineStyle').getLineStyle();\n};\n\nzrUtil.inherits(FunnelPiece, graphic.Group);\n\n\nvar FunnelView = ChartView.extend({\n\n type: 'funnel',\n\n render: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var oldData = this._data;\n\n var group = this.group;\n\n data.diff(oldData)\n .add(function (idx) {\n var funnelPiece = new FunnelPiece(data, idx);\n\n data.setItemGraphicEl(idx, funnelPiece);\n\n group.add(funnelPiece);\n })\n .update(function (newIdx, oldIdx) {\n var piePiece = oldData.getItemGraphicEl(oldIdx);\n\n piePiece.updateData(data, newIdx);\n\n group.add(piePiece);\n data.setItemGraphicEl(newIdx, piePiece);\n })\n .remove(function (idx) {\n var piePiece = oldData.getItemGraphicEl(idx);\n group.remove(piePiece);\n })\n .execute();\n\n this._data = data;\n },\n\n remove: function () {\n this.group.removeAll();\n this._data = null;\n },\n\n dispose: function () {}\n});\n\nexport default FunnelView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {__DEV__} from '../../config';\nimport * as layout from '../../util/layout';\nimport {parsePercent, linearMap} from '../../util/number';\n\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(\n seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n }\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 for (var i = 0, len = data.count(); i < len; i++) {\n indices[i] = i;\n }\n\n // Add custom sortable function & none sortable opetion by \"options.sort\"\n if (typeof sort === 'function') {\n indices.sort(sort);\n }\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 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\n var labelLineModel = itemModel.getModel('labelLine');\n\n var layout = data.getItemLayout(idx);\n var points = layout.points;\n\n var isLabelInside = labelPosition === 'inner'\n || labelPosition === 'inside' || labelPosition === 'center'\n || labelPosition === 'insideLeft' || labelPosition === 'insideRight';\n\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 }\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 }\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 linePoints = [\n [textX, textY], [textX, textY]\n ];\n }\n else {\n var x1;\n var y1;\n var x2;\n var y2;\n var labelLineLen = labelLineModel.get('length');\n if (__DEV__) {\n if (orient === 'vertical' && ['top', 'bottom'].indexOf(labelPosition) > -1) {\n labelPosition = 'left';\n console.warn('Position error: Funnel chart on vertical orient dose not support top and bottom.');\n }\n if (orient === 'horizontal' && ['left', 'right'].indexOf(labelPosition) > -1) {\n labelPosition = 'bottom';\n console.warn('Position error: Funnel chart on horizontal orient dose not support left and right.');\n }\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 }\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 }\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 }\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 }\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 if (orient === 'horizontal') {\n y2 = y1 - labelLineLen;\n textY = y2 - 5;\n textAlign = 'center';\n }\n else {\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'top';\n }\n }\n else if (labelPosition === 'rightBottom') {\n // RightBottom side\n x1 = points[2][0];\n y1 = points[2][1];\n if (orient === 'horizontal') {\n y2 = y1 + labelLineLen;\n textY = y2 + 5;\n textAlign = 'center';\n }\n else {\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'bottom';\n }\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 if (orient === 'horizontal') {\n y2 = y1 - labelLineLen;\n textY = y2 - 5;\n textAlign = 'center';\n }\n else {\n x2 = x1 - labelLineLen;\n textX = x2 - 5;\n textAlign = 'right';\n }\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 if (orient === 'horizontal') {\n y2 = y1 + labelLineLen;\n textY = y2 + 5;\n textAlign = 'center';\n }\n else {\n x2 = x1 - labelLineLen;\n textX = x2 - 5;\n textAlign = 'right';\n }\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 if (orient === 'horizontal') {\n y2 = y1 + labelLineLen;\n textY = y2 + 5;\n textAlign = 'center';\n }\n else {\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'left';\n }\n }\n if (orient === 'horizontal') {\n x2 = x1;\n textX = x2;\n }\n else {\n y2 = y1;\n textY = y2;\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\nexport default function (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\n var sizeExtent = orient === 'horizontal' ? [\n parsePercent(seriesModel.get('minSize'), viewHeight),\n parsePercent(seriesModel.get('maxSize'), viewHeight)\n ] : [\n parsePercent(seriesModel.get('minSize'), viewWidth),\n parsePercent(seriesModel.get('maxSize'), viewWidth)\n ];\n var dataExtent = data.getDataExtent(valueDim);\n var min = seriesModel.get('min');\n var max = seriesModel.get('max');\n if (min == null) {\n min = Math.min(dataExtent[0], 0);\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 switch (funnelAlign) {\n case 'top':\n y0 = y;\n break;\n case 'center':\n y0 = y + (viewHeight - itemHeight) / 2;\n break;\n case 'bottom':\n y0 = y + (viewHeight - itemHeight);\n break;\n }\n\n return [\n [offset, y0],\n [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 switch (funnelAlign) {\n case 'left':\n x0 = x;\n break;\n case 'center':\n x0 = x + (viewWidth - itemWidth) / 2;\n break;\n case 'right':\n x0 = x + viewWidth - itemWidth;\n break;\n }\n return [\n [x0, offset],\n [x0 + itemWidth, offset]\n ];\n };\n\n if (sort === 'ascending') {\n // From bottom to top\n itemSize = -itemSize;\n gap = -gap;\n if (orient === 'horizontal') {\n x += viewWidth;\n }\n else {\n y += viewHeight;\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 if (width == null) {\n width = itemSize;\n }\n else {\n width = parsePercent(width, viewWidth);\n if (sort === 'ascending') {\n width = -width;\n }\n }\n\n var start = getLinePoints(idx, x);\n var end = getLinePoints(nextIdx, x + width);\n\n x += width + gap;\n\n data.setItemLayout(idx, {\n points: start.concat(end.slice().reverse())\n });\n }\n else {\n var height = itemModel.get('itemStyle.height');\n if (height == null) {\n height = itemSize;\n }\n else {\n height = parsePercent(height, viewHeight);\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'\n ? getLinePoints(nextIdx, x + width) : getLinePoints(nextIdx, y + height);\n\n y += height + gap;\n\n data.setItemLayout(idx, {\n points: start.concat(end.slice().reverse())\n });\n }\n }\n\n labelLayout(data);\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\nimport * as echarts from '../echarts';\n\nimport './funnel/FunnelSeries';\nimport './funnel/FunnelView';\n\nimport dataColor from '../visual/dataColor';\nimport funnelLayout from './funnel/funnelLayout';\nimport dataFilter from '../processor/dataFilter';\n\necharts.registerVisual(dataColor('funnel'));\necharts.registerLayout(funnelLayout);\necharts.registerProcessor(dataFilter('funnel'));","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as modelUtil from '../../util/model';\n\nexport default function (option) {\n createParallelIfNeeded(option);\n mergeAxisOptionFromParallel(option);\n}\n\n/**\n * Create a parallel coordinate if not exists.\n * @inner\n */\nfunction createParallelIfNeeded(option) {\n if (option.parallel) {\n return;\n }\n\n var hasParallelSeries = false;\n\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/**\n * Merge aixs definition from parallel option (if exists) to axis option.\n * @inner\n */\nfunction mergeAxisOptionFromParallel(option) {\n var axes = modelUtil.normalizeToArray(option.parallelAxis);\n\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport Axis from '../Axis';\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.<number>} coordExtent\n * @param {string} axisType\n */\nvar ParallelAxis = function (dim, scale, coordExtent, axisType, axisIndex) {\n\n Axis.call(this, dim, scale, coordExtent);\n\n /**\n * Axis type\n * - 'category'\n * - 'value'\n * - 'time'\n * - 'log'\n * @type {string}\n */\n this.type = axisType || 'value';\n\n /**\n * @type {number}\n * @readOnly\n */\n this.axisIndex = axisIndex;\n};\n\nParallelAxis.prototype = {\n\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\n};\n\nzrUtil.inherits(ParallelAxis, Axis);\n\nexport default ParallelAxis;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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.<number>} handleEnds handleEnds[0] can be bigger then handleEnds[1].\n * handleEnds will be modified in this method.\n * @param {Array.<number>} 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.<number>} The input handleEnds.\n */\nexport default function (delta, handleEnds, extent, handleIndex, minSpan, maxSpan) {\n\n delta = delta || 0;\n\n var extentSpan = extent[1] - extent[0];\n\n // Notice maxSpan and minSpan can be null/undefined.\n if (minSpan != null) {\n minSpan = restrict(minSpan, [0, extentSpan]);\n }\n if (maxSpan != null) {\n maxSpan = Math.max(maxSpan, minSpan != null ? minSpan : 0);\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\n var originalDistSign = getSpanSign(handleEnds, handleIndex);\n\n handleEnds[handleIndex] += delta;\n\n // Restrict in extent.\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);\n\n // Expand span.\n var currDistSign = getSpanSign(handleEnds, handleIndex);\n if (minSpan != null && (\n currDistSign.sign !== originalDistSign.sign || currDistSign.span < minSpan\n )) {\n // If minSpan exists, 'cross' is forbidden.\n handleEnds[1 - handleIndex] = handleEnds[handleIndex] + originalDistSign.sign * minSpan;\n }\n\n // Shrink span.\n var currDistSign = getSpanSign(handleEnds, handleIndex);\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];\n // If `handleEnds[0] === handleEnds[1]`, always believe that handleEnd[0]\n // is at left of handleEnds[1] for non-cross case.\n return {span: Math.abs(dist), sign: dist > 0 ? -1 : dist < 0 ? 1 : handleIndex ? -1 : 1};\n}\n\nfunction restrict(value, extend) {\n return Math.min(\n extend[1] != null ? extend[1] : Infinity,\n Math.max(extend[0] != null ? extend[0] : -Infinity, 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 * Parallel Coordinates\n * <https://en.wikipedia.org/wiki/Parallel_coordinates>\n */\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as matrix from 'zrender/src/core/matrix';\nimport * as layoutUtil from '../../util/layout';\nimport * as axisHelper from '../../coord/axisHelper';\nimport ParallelAxis from './ParallelAxis';\nimport * as graphic from '../../util/graphic';\nimport * as numberUtil from '../../util/number';\nimport sliderMove from '../../component/helper/sliderMove';\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;\n\nvar PI = Math.PI;\n\nfunction Parallel(parallelModel, ecModel, api) {\n\n /**\n * key: dimension\n * @type {Object.<string, module:echarts/coord/parallel/Axis>}\n * @private\n */\n this._axesMap = zrUtil.createHashMap();\n\n /**\n * key: dimension\n * value: {position: [], rotation, }\n * @type {Object.<string, Object>}\n * @private\n */\n this._axesLayout = {};\n\n /**\n * Always follow axis order.\n * @type {Array.<string>}\n * @readOnly\n */\n this.dimensions = parallelModel.dimensions;\n\n /**\n * @type {module:zrender/core/BoundingRect}\n */\n this._rect;\n\n /**\n * @type {module:echarts/coord/parallel/ParallelModel}\n */\n this._model = parallelModel;\n\n this._init(parallelModel, ecModel, api);\n}\n\nParallel.prototype = {\n\n type: 'parallel',\n\n constructor: Parallel,\n\n /**\n * Initialize cartesian coordinate systems\n * @private\n */\n _init: function (parallelModel, ecModel, api) {\n\n var dimensions = parallelModel.dimensions;\n var parallelAxisIndex = parallelModel.parallelAxisIndex;\n\n each(dimensions, function (dim, idx) {\n\n var axisIndex = parallelAxisIndex[idx];\n var axisModel = ecModel.getComponent('parallelAxis', axisIndex);\n\n var axis = this._axesMap.set(dim, new ParallelAxis(\n dim,\n axisHelper.createScaleByModel(axisModel),\n [0, 0],\n axisModel.get('type'),\n axisIndex\n ));\n\n var isCategory = axis.type === 'category';\n axis.onBand = isCategory && axisModel.get('boundaryGap');\n axis.inverse = axisModel.get('inverse');\n\n // Injection\n axisModel.axis = axis;\n axis.model = axisModel;\n axis.coordinateSystem = axisModel.coordinateSystem = this;\n\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 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\n return pAxis >= axisBase\n && pAxis <= axisBase + layoutInfo.axisLength\n && pLayout >= layoutBase\n && pLayout <= layoutBase + layoutInfo.layoutLength;\n },\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\n if (!parallelModel.contains(seriesModel, ecModel)) {\n return;\n }\n\n var data = seriesModel.getData();\n\n each(this.dimensions, function (dim) {\n var axis = this._axesMap.get(dim);\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(\n parallelModel.getBoxLayoutParams(),\n {\n width: api.getWidth(),\n height: api.getHeight()\n }\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\n var axisExpandWidth = restrict(parallelModel.get('axisExpandWidth'), layoutExtent);\n var axisExpandCount = restrict(parallelModel.get('axisExpandCount') || 0, [0, axisCount]);\n var axisExpandable = parallelModel.get('axisExpandable')\n && axisCount > 3\n && axisCount > axisExpandCount\n && axisExpandCount > 1\n && axisExpandWidth > 0\n && layoutLength > 0;\n\n // `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 var axisExpandWindow = parallelModel.get('axisExpandWindow');\n var winSize;\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 }\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);\n // Avoid axisCollapseWidth is too small.\n axisCollapseWidth < 3 && (axisCollapseWidth = 0);\n\n // Find the first and last indices > ewin[0] and < ewin[1].\n var winInnerIndices = [\n mathFloor(round(axisExpandWindow[0] / axisExpandWidth, 1)) + 1,\n mathCeil(round(axisExpandWindow[1] / axisExpandWidth, 1)) - 1\n ];\n\n // Pos in ec coordinates.\n var axisExpandWindow0Pos = axisCollapseWidth / axisExpandWidth * axisExpandWindow[0];\n\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 var layoutInfo = this._makeLayoutInfo();\n var layout = layoutInfo.layout;\n\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\n each(dimensions, function (dim, idx) {\n var posInfo = (layoutInfo.axisExpandable\n ? layoutAxisWithExpand : layoutAxisWithoutExpand\n )(idx, layoutInfo);\n\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\n var position = [\n positionTable[layout].x + rect.x,\n positionTable[layout].y + rect.y\n ];\n\n var rotation = rotationTable[layout];\n var transform = matrix.create();\n matrix.rotate(transform, transform, rotation);\n matrix.translate(transform, transform, position);\n\n // TODO\n // tick等排布信息。\n\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(\n this._axesMap.get(dim).dataToCoord(value),\n dim\n );\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\n var axesMap = this._axesMap;\n var dimensions = this.dimensions;\n var dataDimensions = [];\n var axisModels = [];\n\n zrUtil.each(dimensions, function (axisDim) {\n dataDimensions.push(data.mapDimension(axisDim));\n axisModels.push(axesMap.get(axisDim).model);\n });\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 }\n else {\n activeState = 'active';\n var values = data.getValues(dataDimensions, dataIndex);\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.<number>} coords\n * @param {string} dim\n * @return {Array.<number>}\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.<number>} point\n * @return {Object} {axisExpandWindow, delta, behavior: 'jump' | 'slide' | 'none'}.\n */\n getSlidedAxisExpandWindow: function (point) {\n var layoutInfo = this._makeLayoutInfo();\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)];\n\n // Out of the area of coordinate system.\n if (!this.containPoint(point)) {\n return {behavior: 'none', axisExpandWindow: axisExpandWindow};\n }\n\n // Conver the point from global to expand coordinates.\n var pointCoord = point[pixelDimIndex] - layoutInfo.layoutBase - layoutInfo.axisExpandWindow0Pos;\n\n // For dragging operation convenience, the window should not be\n // slided when mouse is the center area of the window.\n var delta;\n var behavior = 'slide';\n var axisCollapseWidth = layoutInfo.axisCollapseWidth;\n var triggerArea = this._model.get('axisExpandSlideTriggerArea');\n // But consider touch device, jump is necessary.\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 }\n else if (useJump && axisCollapseWidth && pointCoord > winSize * (1 - triggerArea[0])) {\n behavior = 'jump';\n delta = pointCoord - winSize * (1 - triggerArea[2]);\n }\n else {\n (delta = pointCoord - winSize * triggerArea[1]) >= 0\n && (delta = pointCoord - winSize * (1 - triggerArea[1])) <= 0\n && (delta = 0);\n }\n delta *= layoutInfo.axisExpandWidth / axisCollapseWidth;\n delta\n ? sliderMove(delta, axisExpandWindow, extent, 'all')\n // Avoid nonsense triger on mousemove.\n : (behavior = 'none');\n }\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\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 }\n else if (axisIndex <= winInnerIndices[1]) {\n position = layoutInfo.axisExpandWindow0Pos\n + axisIndex * axisExpandWidth - layoutInfo.axisExpandWindow[0];\n axisNameAvailableWidth = axisExpandWidth;\n axisLabelShow = true;\n }\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\nexport default Parallel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport Parallel from './Parallel';\nimport CoordinateSystem from '../../CoordinateSystem';\n\nfunction create(ecModel, api) {\n var coordSysList = [];\n\n ecModel.eachComponent('parallel', function (parallelModel, idx) {\n var coordSys = new Parallel(parallelModel, ecModel, api);\n\n coordSys.name = 'parallel_' + idx;\n coordSys.resize(parallelModel, api);\n\n parallelModel.coordinateSystem = coordSys;\n coordSys.model = parallelModel;\n\n coordSysList.push(coordSys);\n });\n\n // Inject the coordinateSystems into seriesModel\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\n return coordSysList;\n}\n\nCoordinateSystem.register('parallel', {create: create});\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport ComponentModel from '../../model/Component';\nimport makeStyleMapper from '../../model/mixin/makeStyleMapper';\nimport axisModelCreator from '../axisModelCreator';\nimport * as numberUtil from '../../util/number';\nimport axisModelCommonMixin from '../axisModelCommonMixin';\n\nvar AxisModel = ComponentModel.extend({\n\n type: 'baseParallelAxis',\n\n /**\n * @type {module:echarts/coord/parallel/Axis}\n */\n axis: null,\n\n /**\n * @type {Array.<Array.<number>}\n * @readOnly\n */\n activeIntervals: [],\n\n /**\n * @return {Object}\n */\n getAreaSelectStyle: function () {\n return makeStyleMapper(\n [\n ['fill', 'color'],\n ['lineWidth', 'borderWidth'],\n ['stroke', 'borderColor'],\n ['width', 'width'],\n ['opacity', 'opacity']\n ]\n )(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.<Array<number>>} intervals interval.length === 0\n * means set all active.\n * @public\n */\n setActiveIntervals: function (intervals) {\n var activeIntervals = this.activeIntervals = zrUtil.clone(intervals);\n\n // Normalize\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 }\n\n // Simple optimization\n if (activeIntervals.length === 1) {\n var interval = activeIntervals[0];\n if (interval[0] <= value && value <= interval[1]) {\n return 'active';\n }\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\n});\n\nvar defaultOption = {\n\n type: 'value',\n\n /**\n * @type {Array.<number>}\n */\n dim: null, // 0, 1, 2, ...\n\n // parallelIndex: null,\n\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\n realtime: true, // Whether realtime update view when select.\n\n z: 10\n};\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);\n\nexport default AxisModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport Component from '../../model/Component';\n\nimport './AxisModel';\n\nexport default Component.extend({\n\n type: 'parallel',\n\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.<string>}\n * @readOnly\n */\n dimensions: null,\n\n /**\n * Coresponding to dimensions.\n * @type {Array.<number>}\n * @readOnly\n */\n parallelAxisIndex: null,\n\n layoutMode: 'box',\n\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\n layout: 'horizontal', // 'horizontal' or 'vertical'\n\n // FIXME\n // naming?\n axisExpandable: false,\n axisExpandCenter: null,\n axisExpandCount: 0,\n axisExpandWidth: 50, // 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', // 'mousemove' or 'click'\n\n parallelAxisDefault: null\n },\n\n /**\n * @override\n */\n init: function () {\n Component.prototype.init.apply(this, arguments);\n\n this.mergeOption({});\n },\n\n /**\n * @override\n */\n mergeOption: function (newOption) {\n var thisOption = this.option;\n\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\n && ecModel.getComponent('parallel', parallelIndex) === this;\n },\n\n setAxisExpand: function (opt) {\n zrUtil.each(\n ['axisExpandable', 'axisExpandCenter', 'axisExpandCount', 'axisExpandWidth', 'axisExpandWindow'],\n function (name) {\n if (opt.hasOwnProperty(name)) {\n this.option[name] = opt[name];\n }\n },\n this\n );\n },\n\n /**\n * @private\n */\n _initDimensions: function () {\n var dimensions = this.dimensions = [];\n var parallelAxisIndex = this.parallelAxisIndex = [];\n\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\n zrUtil.each(axisModels, function (axisModel) {\n dimensions.push('dim' + axisModel.get('dim'));\n parallelAxisIndex.push(axisModel.componentIndex);\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\nimport * as echarts from '../../echarts';\n\n/**\n * @payload\n * @property {string} parallelAxisId\n * @property {Array.<Array.<number>>} intervals\n */\nvar actionInfo = {\n type: 'axisAreaSelect',\n event: 'axisAreaSelected'\n // update: 'updateVisual'\n};\n\necharts.registerAction(actionInfo, function (payload, ecModel) {\n ecModel.eachComponent(\n {mainType: 'parallelAxis', query: payload},\n function (parallelAxisModel) {\n parallelAxisModel.axis.model.setActiveIntervals(payload.intervals);\n }\n );\n});\n\n/**\n * @payload\n */\necharts.registerAction('parallelAxisExpand', function (payload, ecModel) {\n ecModel.eachComponent(\n {mainType: 'parallel', query: payload},\n function (parallelModel) {\n parallelModel.setAxisExpand(payload);\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\nimport {__DEV__} from '../../config';\nimport * as zrUtil from 'zrender/src/core/util';\nimport Eventful from 'zrender/src/mixin/Eventful';\nimport * as graphic from '../../util/graphic';\nimport * as interactionMutex from './interactionMutex';\nimport DataDiffer from '../../data/DataDiffer';\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;\n\nvar COVER_Z = 10000;\nvar UNSELECT_THRESHOLD = 6;\nvar MIN_RESIZE_LINE_WIDTH = 6;\nvar MUTEX_RESOURCE_KEY = 'globalPan';\n\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};\n\nvar baseUID = 0;\n\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.<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 */\nfunction BrushController(zr) {\n\n if (__DEV__) {\n zrUtil.assert(zr);\n }\n\n Eventful.call(this);\n\n /**\n * @type {module:zrender/zrender~ZRender}\n * @private\n */\n this._zr = zr;\n\n /**\n * @type {module:zrender/container/Group}\n * @readOnly\n */\n this.group = new graphic.Group();\n\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 this._brushType;\n\n /**\n * Only for drawing (after enabledBrush).\n *\n * @private\n * @type {Object}\n */\n this._brushOption;\n\n /**\n * @private\n * @type {Object}\n */\n this._panels;\n\n /**\n * @private\n * @type {Array.<nubmer>}\n */\n this._track = [];\n\n /**\n * @private\n * @type {boolean}\n */\n this._dragging;\n\n /**\n * @private\n * @type {Array}\n */\n this._covers = [];\n\n /**\n * @private\n * @type {moudule:zrender/container/Group}\n */\n this._creatingCover;\n\n /**\n * `true` means global panel\n * @private\n * @type {module:zrender/container/Group|boolean}\n */\n this._creatingPanel;\n\n /**\n * @private\n * @type {boolean}\n */\n this._enableGlobalPan;\n\n /**\n * @private\n * @type {boolean}\n */\n if (__DEV__) {\n this._mounted;\n }\n\n /**\n * @private\n * @type {string}\n */\n this._uid = 'brushController_' + baseUID++;\n\n /**\n * @private\n * @type {Object}\n */\n this._handlers = {};\n\n each(pointerHandlers, function (handler, eventName) {\n this._handlers[eventName] = zrUtil.bind(handler, this);\n }, this);\n}\n\nBrushController.prototype = {\n\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 if (__DEV__) {\n zrUtil.assert(this._mounted);\n }\n\n this._brushType && doDisableBrush(this);\n brushOption.brushType && doEnableBrush(this, brushOption);\n\n return this;\n },\n\n /**\n * @param {Array.<Object>} 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 }\n else {\n this._panels = null;\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\n if (__DEV__) {\n this._mounted = true; // should be at first.\n }\n\n this._enableGlobalPan = opt.enableGlobalPan;\n\n var thisGroup = this.group;\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\n return this;\n },\n\n eachCover: function (cb, context) {\n each(this._covers, cb, context);\n },\n\n /**\n * Update covers.\n * @param {Array.<Object>} 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 if (__DEV__) {\n zrUtil.assert(this._mounted);\n }\n\n brushOptionList = zrUtil.map(brushOptionList, function (brushOption) {\n return zrUtil.merge(zrUtil.clone(DEFAULT_BRUSH_OPT), brushOption, true);\n });\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\n (new DataDiffer(oldCovers, brushOptionList, oldGetKey, getKey))\n .add(addOrUpdate)\n .update(addOrUpdate)\n .remove(remove)\n .execute();\n\n return this;\n\n function getKey(brushOption, index) {\n return (brushOption.id != null ? brushOption.id : tmpIdPrefix + index)\n + '-' + 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];\n // Consider setOption in event listener of brushSelect,\n // where updating cover when creating should be forbiden.\n if (oldIndex != null && oldCovers[oldIndex] === creatingCover) {\n newCovers[newIndex] = oldCovers[oldIndex];\n }\n else {\n var cover = newCovers[newIndex] = oldIndex != null\n ? (\n oldCovers[oldIndex].__brushOption = newBrushOption,\n oldCovers[oldIndex]\n )\n : 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\n unmount: function () {\n if (__DEV__) {\n if (!this._mounted) {\n return;\n }\n }\n\n this.enableBrush(false);\n\n // container may 'removeAll' outside.\n clearCovers(this);\n this._zr.remove(this.group);\n\n if (__DEV__) {\n this._mounted = false; // should be at last.\n }\n\n return this;\n },\n\n dispose: function () {\n this.unmount();\n this.off();\n }\n};\n\nzrUtil.mixin(BrushController, Eventful);\n\nfunction doEnableBrush(controller, brushOption) {\n var zr = controller._zr;\n\n // Consider roam, which takes globalPan too.\n if (!controller._enableGlobalPan) {\n interactionMutex.take(zr, MUTEX_RESOURCE_KEY, controller._uid);\n }\n\n mountHandlers(zr, controller._handlers);\n\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\n interactionMutex.release(zr, MUTEX_RESOURCE_KEY, controller._uid);\n\n unmountHandlers(zr, controller._handlers);\n\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 if (coverRenderer.endCreating) {\n coverRenderer.endCreating(controller, creatingCover);\n updateZ(creatingCover, creatingCover.__brushOption);\n }\n return creatingCover;\n}\n\nfunction updateCoverShape(controller, cover) {\n var brushOption = cover.__brushOption;\n getCoverRenderer(cover).updateCoverShape(\n controller, cover, brushOption.range, brushOption\n );\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}\n\n// return target panel or `true` (means global panel)\nfunction getPanelByPoint(controller, e, localCursorPoint) {\n var panels = controller._panels;\n if (!panels) {\n return true; // Global panel\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}\n\n// Return a panel or true\nfunction getPanelByCover(controller, cover) {\n var panels = controller._panels;\n if (!panels) {\n return true; // Global panel\n }\n var panelId = cover.__brushOption.panelId;\n // User may give cover without coord sys info,\n // which is then treated as global panel.\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\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\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\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\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, {isEnd: true})\n }));\n\n each(\n edgeNames,\n function (name) {\n cover.add(new graphic.Rect({\n name: name,\n style: {opacity: 0},\n draggable: true,\n silent: true,\n invisible: true,\n drift: curry(doDrift, controller, cover, name),\n ondragend: curry(trigger, controller, {isEnd: true})\n }));\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\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\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\n var mainEl = cover.childAt(0);\n mainEl.useStyle(makeStyle(brushOption));\n mainEl.attr({\n silent: !transformable,\n cursor: transformable ? 'move' : 'default'\n });\n\n each(\n ['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw'],\n function (name) {\n var el = cover.childOfName(name);\n var globalDir = getGlobalDirection(controller, name);\n\n el && el.attr({\n silent: !transformable,\n invisible: !transformable,\n cursor: transformable ? CURSOR_MAP[globalDir] + '-resize' : null\n });\n }\n );\n}\n\nfunction updateRectShape(controller, cover, name, x, y, w, h) {\n var el = cover.childOfName(name);\n el && el.setShape(pointsToRect(\n clipByPanel(controller, cover, [[x, y], [x + w, y + h]])\n ));\n}\n\nfunction makeStyle(brushOption) {\n return zrUtil.defaults({strokeNoScale: true}, 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\n return [\n [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 = [\n getGlobalDirection(controller, localDirection[0]),\n getGlobalDirection(controller, localDirection[1])\n ];\n (globalDir[0] === 'e' || globalDir[0] === 'w') && globalDir.reverse();\n return globalDir.join('');\n }\n else {\n var map = {w: 'left', e: 'right', n: 'top', s: 'bottom'};\n var inverseMap = {left: 'w', right: 'e', top: 'n', bottom: 's'};\n var globalDir = graphic.transformDirection(\n map[localDirection], getTransform(controller)\n );\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\n each(name.split(''), function (namePart) {\n var ind = DIRECTION_MAP[namePart];\n rectRange[ind[0]][ind[1]] += localDelta[ind[0]];\n });\n\n brushOption.range = fromRectRange(formatRectRange(\n rectRange[0][0], rectRange[1][0], rectRange[0][1], rectRange[1][1]\n ));\n\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {isEnd: false});\n}\n\nfunction driftPolygon(controller, cover, dx, dy, e) {\n var range = cover.__brushOption.range;\n var localDelta = toLocalDelta(controller, dx, dy);\n\n each(range, function (point) {\n point[0] += localDelta[0];\n point[1] += localDelta[1];\n });\n\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {isEnd: false});\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\n return [localD[0] - localZero[0], localD[1] - localZero[1]];\n}\n\nfunction clipByPanel(controller, cover, data) {\n var panel = getPanelByCover(controller, cover);\n\n return (panel && panel !== true)\n ? panel.clipPath(data, controller._transform)\n : 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\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 (\n // Check active\n !controller._brushType\n // 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 ) {\n return;\n }\n\n var zr = controller._zr;\n var covers = controller._covers;\n var currPanel = getPanelByPoint(controller, e, localCursorPoint);\n\n // Check whether in covers.\n if (!controller._dragging) {\n for (var i = 0; i < covers.length; i++) {\n var brushOption = covers[i].__brushOption;\n if (currPanel\n && (currPanel === true || brushOption.panelId === currPanel.panelId)\n && coverRenderers[brushOption.brushType].contain(\n covers[i], localCursorPoint[0], localCursorPoint[1]\n )\n ) {\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\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 controller._covers.push(creatingCover);\n }\n\n if (creatingCover) {\n var coverRenderer = coverRenderers[determineBrushType(controller._brushType, panel)];\n var coverBrushOption = creatingCover.__brushOption;\n\n coverBrushOption.range = coverRenderer.getCreatingRange(\n clipByPanel(controller, creatingCover, controller._track)\n );\n\n if (isEnd) {\n endCreating(controller, creatingCover);\n coverRenderer.updateCommon(controller, creatingCover);\n }\n\n updateCoverShape(controller, creatingCover);\n\n eventParams = {isEnd: isEnd};\n }\n }\n else if (\n isEnd\n && thisBrushOption.brushMode === 'single'\n && thisBrushOption.removeOnClick\n ) {\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 = {isEnd: isEnd, removeOnClick: true};\n }\n }\n\n return eventParams;\n}\n\nfunction determineBrushType(brushType, panel) {\n if (brushType === 'auto') {\n if (__DEV__) {\n zrUtil.assert(\n panel && panel.defaultBrushType,\n 'MUST have defaultBrushType when brushType is \"atuo\"'\n );\n }\n return panel.defaultBrushType;\n }\n return brushType;\n}\n\nvar pointerHandlers = {\n\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 }\n else if (!e.target || !e.target.draggable) {\n\n preventDefault(e);\n\n var localCursorPoint = this.group.transformCoordToLocal(e.offsetX, e.offsetY);\n\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\n mousemove: function (e) {\n var x = e.offsetX;\n var y = e.offsetY;\n\n var localCursorPoint = this.group.transformCoordToLocal(x, y);\n\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\n mouseup: function (e) {\n handleDragEnd(this, e);\n }\n};\n\n\nfunction handleDragEnd(controller, e) {\n if (controller._dragging) {\n preventDefault(e);\n\n var x = e.offsetX;\n var y = e.offsetY;\n\n var localCursorPoint = controller.group.transformCoordToLocal(x, y);\n var eventParams = updateCoverByMouse(controller, e, localCursorPoint, true);\n\n controller._dragging = false;\n controller._track = [];\n controller._creatingCover = null;\n\n // trigger event shoule be at final, after procedure will be nested.\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\n/**\n * key: brushType\n * @type {Object}\n */\nvar coverRenderers = {\n\n lineX: getLineRenderer(0),\n\n lineY: getLineRenderer(1),\n\n rect: {\n createCover: function (controller, brushOption) {\n return createBaseRectCover(\n curry(\n driftRect,\n function (range) {\n return range;\n },\n function (range) {\n return range;\n }\n ),\n controller,\n brushOption,\n ['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw']\n );\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\n polygon: {\n createCover: function (controller, brushOption) {\n var cover = new graphic.Group();\n\n // 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 cover.add(new graphic.Polyline({\n name: 'main',\n style: makeStyle(brushOption),\n silent: true\n }));\n\n return cover;\n },\n getCreatingRange: function (localTrack) {\n return localTrack;\n },\n endCreating: function (controller, cover) {\n cover.remove(cover.childAt(0));\n // Use graphic.Polygon close the shape.\n cover.add(new graphic.Polygon({\n name: 'main',\n draggable: true,\n drift: curry(driftPolygon, controller, cover),\n ondragend: curry(trigger, controller, {isEnd: true})\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(\n curry(\n driftRect,\n function (range) {\n var rectRange = [range, [0, 100]];\n xyIndex && rectRange.reverse();\n return rectRange;\n },\n function (rectRange) {\n return rectRange[xyIndex];\n }\n ),\n controller,\n brushOption,\n [['w', 'e'], ['n', 's']][xyIndex]\n );\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\n return [min, max];\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n var otherExtent;\n // If brushWidth not specified, fit the panel.\n var panel = getPanelByCover(controller, cover);\n if (panel !== true && panel.getLinearBrushOtherExtent) {\n otherExtent = panel.getLinearBrushOtherExtent(\n xyIndex, controller._transform\n );\n }\n else {\n var zr = controller._zr;\n otherExtent = [0, [zr.getWidth(), zr.getHeight()][1 - xyIndex]];\n }\n var rectRange = [localRange, otherExtent];\n xyIndex && rectRange.reverse();\n\n updateBaseRect(controller, cover, rectRange, brushOption);\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n };\n}\n\nexport default BrushController;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport BoundingRect from 'zrender/src/core/BoundingRect';\nimport {onIrrelevantElement} from './cursorHelper';\nimport * as graphicUtil from '../../util/graphic';\n\nexport function makeRectPanelClipPath(rect) {\n rect = normalizeRect(rect);\n return function (localPoints, transform) {\n return graphicUtil.clipPointsByRect(localPoints, rect);\n };\n}\n\nexport function 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\nexport function makeRectIsTargetByCursor(rect, api, targetModel) {\n rect = normalizeRect(rect);\n return function (e, localCursorPoint, transform) {\n return rect.contain(localCursorPoint[0], localCursorPoint[1])\n && !onIrrelevantElement(e, api, targetModel);\n };\n}\n\n// Consider width/height is negative.\nfunction normalizeRect(rect) {\n return BoundingRect.create(rect);\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\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport AxisBuilder from './AxisBuilder';\nimport BrushController from '../helper/BrushController';\nimport * as brushHelper from '../helper/brushHelper';\nimport * as graphic from '../../util/graphic';\n\nvar elementList = ['axisLine', 'axisTickLabel', 'axisName'];\n\nvar AxisView = echarts.extendComponentView({\n\n type: 'parallelAxis',\n\n /**\n * @override\n */\n init: function (ecModel, api) {\n AxisView.superApply(this, 'init', arguments);\n\n /**\n * @type {module:echarts/component/helper/BrushController}\n */\n (this._brushController = new BrushController(api.getZr()))\n .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\n this.group.removeAll();\n\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\n var areaSelectStyle = axisModel.getAreaSelectStyle();\n var areaWidth = areaSelectStyle.width;\n\n var dim = axisModel.axis.dim;\n var axisLayout = coordSys.getAxisLayout(dim);\n\n var builderOpt = zrUtil.extend(\n {strokeContainThreshold: areaWidth},\n axisLayout\n );\n\n var axisBuilder = new AxisBuilder(axisModel, builderOpt);\n\n zrUtil.each(elementList, axisBuilder.add, axisBuilder);\n\n this._axisGroup.add(axisBuilder.getGroup());\n\n this._refreshBrushController(\n builderOpt, areaSelectStyle, axisModel, coordSysModel, areaWidth, api\n );\n\n var animationModel = (payload && payload.animation === false) ? null : axisModel;\n graphic.groupTransition(oldAxisGroup, this._axisGroup, animationModel);\n },\n\n // /**\n // * @override\n // */\n // updateVisual: function (axisModel, ecModel, api, payload) {\n // this._brushController && this._brushController\n // .updateCovers(getCoverInfoList(axisModel));\n // },\n\n _refreshBrushController: function (\n builderOpt, areaSelectStyle, axisModel, coordSysModel, areaWidth, api\n ) {\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\n // width/height might be negative, which will be\n // normalized in BoundingRect.\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\n .mount({\n enableGlobalPan: true,\n rotation: builderOpt.rotation,\n position: builderOpt.position\n })\n .setPanels([{\n panelId: 'pl',\n clipPath: brushHelper.makeRectPanelClipPath(rect),\n isTargetByCursor: brushHelper.makeRectIsTargetByCursor(rect, api, coordSysModel),\n getLinearBrushOtherExtent: brushHelper.makeLinearBrushOtherExtent(rect, 0)\n }])\n .enableBrush({\n brushType: 'lineX',\n brushStyle: areaSelectStyle,\n removeOnClick: true\n })\n .updateCovers(getCoverInfoList(axisModel));\n },\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 [\n axis.coordToData(coverInfo.range[0], true),\n axis.coordToData(coverInfo.range[1], true)\n ];\n });\n\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 if (!axisModel.option.realtime === opt.isEnd || opt.removeOnClick) { // 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\n && payload.type === 'axisAreaSelect'\n && ecModel.findComponents(\n {mainType: 'parallelAxis', 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: [\n axis.dataToCoord(interval[0], true),\n axis.dataToCoord(interval[1], true)\n ]\n };\n });\n}\n\nfunction getCoordSysModel(axisModel, ecModel) {\n return ecModel.getComponent(\n 'parallel', axisModel.get('parallelIndex')\n );\n}\n\nexport default AxisView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport '../coord/parallel/parallelCreator';\nimport './axis/parallelAxisAction';\nimport './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\nimport * as echarts from '../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as throttleUtil from '../util/throttle';\nimport parallelPreprocessor from '../coord/parallel/parallelPreprocessor';\n\nimport '../coord/parallel/parallelCreator';\nimport '../coord/parallel/ParallelModel';\nimport './parallelAxis';\n\nvar CLICK_THRESHOLD = 5; // > 4\n\n// Parallel view\necharts.extendComponentView({\n type: 'parallel',\n\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(\n this,\n '_throttledDispatchExpand',\n parallelModel.get('axisExpandRate'),\n 'fixRate'\n );\n },\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\n _dispatchExpand: function (opt) {\n opt && this._api.dispatchAction(\n zrUtil.extend({type: 'parallelAxisExpand'}, opt)\n );\n }\n\n});\n\nvar handlers = {\n\n mousedown: function (e) {\n if (checkTrigger(this, 'click')) {\n this._mouseDownPoint = [e.offsetX, e.offsetY];\n }\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)\n + Math.pow(mouseDownPoint[1] - point[1], 2);\n\n if (dist > CLICK_THRESHOLD) {\n return;\n }\n\n var result = this._model.coordinateSystem.getSlidedAxisExpandWindow(\n [e.offsetX, e.offsetY]\n );\n\n result.behavior !== 'none' && this._dispatchExpand({\n axisExpandWindow: result.axisExpandWindow\n });\n }\n\n this._mouseDownPoint = null;\n },\n\n mousemove: function (e) {\n // Should do nothing when brushing.\n if (this._mouseDownPoint || !checkTrigger(this, 'mousemove')) {\n return;\n }\n var model = this._model;\n var result = model.coordinateSystem.getSlidedAxisExpandWindow(\n [e.offsetX, e.offsetY]\n );\n\n var behavior = result.behavior;\n behavior === 'jump' && this._throttledDispatchExpand.debounceNextCall(model.get('axisExpandDebounce'));\n this._throttledDispatchExpand(\n behavior === 'none'\n ? 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};\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\nimport {each, createHashMap} from 'zrender/src/core/util';\nimport SeriesModel from '../../model/Series';\nimport createListFromArray from '../helper/createListFromArray';\n\nexport default SeriesModel.extend({\n\n type: 'series.parallel',\n\n dependencies: ['parallel'],\n\n visualColorAccessPath: 'lineStyle.color',\n\n getInitialData: function (option, ecModel) {\n var source = this.getSource();\n\n setEncodeAndDimensions(source, this);\n\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.<number>} Raw indices\n */\n getRawIndicesByActiveState: function (activeState) {\n var coordSys = this.coordinateSystem;\n var data = this.getData();\n var indices = [];\n\n coordSys.eachActiveState(data, function (theActiveState, dataIndex) {\n if (activeState === theActiveState) {\n indices.push(data.getRawIndex(dataIndex));\n }\n });\n\n return indices;\n },\n\n defaultOption: {\n zlevel: 0, // 一级层叠\n z: 2, // 二级层叠\n\n coordinateSystem: 'parallel',\n parallelIndex: 0,\n\n label: {\n show: false\n },\n\n inactiveOpacity: 0.05,\n activeOpacity: 1,\n\n lineStyle: {\n width: 1,\n opacity: 0.45,\n type: 'solid'\n },\n emphasis: {\n label: {\n show: false\n }\n },\n\n progressive: 500,\n smooth: false, // true | false | number\n\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\n if (source.encodeDefine) {\n return;\n }\n\n var parallelModel = seriesModel.ecModel.getComponent(\n '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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as graphic from '../../util/graphic';\nimport ChartView from '../../view/Chart';\n\nvar DEFAULT_SMOOTH = 0.3;\n\nvar ParallelView = ChartView.extend({\n\n type: 'parallel',\n\n init: function () {\n\n /**\n * @type {module:zrender/container/Group}\n * @private\n */\n this._dataGroup = new graphic.Group();\n\n this.group.add(this._dataGroup);\n\n /**\n * @type {module:echarts/data/List}\n */\n this._data;\n\n /**\n * @type {boolean}\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\n data.diff(oldData)\n .add(add)\n .update(update)\n .remove(remove)\n .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, {shape: {points: points}}, animationModel, newDataIndex);\n\n updateElCommon(line, data, newDataIndex, seriesScope);\n }\n\n function remove(oldDataIndex) {\n var line = oldData.getItemGraphicEl(oldDataIndex);\n dataGroup.remove(line);\n }\n\n // First create\n if (!this._initialized) {\n this._initialized = true;\n var clipPath = createGridClipShape(\n coordSys, seriesModel, function () {\n // Callback will be invoked immediately if there is no animation\n setTimeout(function () {\n dataGroup.removeClipPath();\n });\n }\n );\n dataGroup.setClipPath(clipPath);\n }\n\n this._data = data;\n },\n\n incrementalPrepareRender: function (seriesModel, ecModel, api) {\n this._initialized = true;\n this._data = null;\n this._dataGroup.removeAll();\n },\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\n dispose: function () {},\n\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\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\n // updateElCommon(data, progressive, smooth);\n\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\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 for (var i = 0; i < dimensions.length; i++) {\n var dimName = dimensions[i];\n var value = data.get(data.mapDimension(dimName), dataIndex);\n if (!isEmptyValue(value, coordSys.getAxis(dimName).type)) {\n points.push(coordSys.dataToPoint(value, dimName));\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: {points: points},\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\n var elStyle = el.style;\n elStyle.fill = null;\n // lineStyle.color have been set to itemVisual in module:echarts/visual/seriesColor.\n elStyle.stroke = data.getItemVisual(dataIndex, 'color');\n // lineStyle.opacity have been set to itemVisual in parallelVisual.\n elStyle.opacity = data.getItemVisual(dataIndex, 'opacity');\n\n seriesScope.smooth && (el.shape.smooth = seriesScope.smooth);\n}\n\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\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\n// return false;\n// }\n\n// FIXME\n// 公用方法?\nfunction isEmptyValue(val, axisType) {\n return axisType === 'category'\n ? val == null\n : (val == null || isNaN(val)); // axisType === 'value'\n}\n\nexport default ParallelView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nvar opacityAccessPath = ['lineStyle', 'normal', 'opacity'];\n\nexport default {\n\n seriesType: 'parallel',\n\n reset: function (seriesModel, ecModel, api) {\n\n var itemStyleModel = seriesModel.getModel('itemStyle');\n var lineStyleModel = seriesModel.getModel('lineStyle');\n var globalColors = ecModel.get('color');\n\n var color = lineStyleModel.get('color')\n || itemStyleModel.get('color')\n || 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\n var coordSys = seriesModel.coordinateSystem;\n var data = seriesModel.getData();\n\n var opacityMap = {\n normal: lineStyle.opacity,\n active: activeOpacity,\n inactive: inactiveOpacity\n };\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 if (activeState === 'normal' && data.hasItemOption) {\n var itemOpacity = data.getItemModel(dataIndex).get(opacityAccessPath, true);\n itemOpacity != null && (opacity = itemOpacity);\n }\n data.setItemVisual(dataIndex, 'opacity', opacity);\n }, params.start, params.end);\n }\n\n return {progress: progress};\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\nimport * as echarts from '../echarts';\nimport '../component/parallel';\nimport './parallel/ParallelSeries';\nimport './parallel/ParallelView';\nimport parallelVisual from './parallel/parallelVisual';\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\nimport SeriesModel from '../../model/Series';\nimport createGraphFromNodeEdge from '../helper/createGraphFromNodeEdge';\nimport {encodeHTML} from '../../util/format';\nimport Model from '../../model/Model';\nimport { __DEV__ } from '../../config';\n\nvar SankeySeries = SeriesModel.extend({\n\n type: 'series.sankey',\n\n layoutInfo: null,\n\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 }\n else {\n if (__DEV__) {\n throw new Error('levels[i].depth is mandatory and should be natural number');\n }\n }\n }\n if (nodes && links) {\n var graph = createGraphFromNodeEdge(nodes, links, this, true, beforeLink);\n return graph.data;\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\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\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 if (params.value) {\n html += ' : ' + params.value;\n }\n return encodeHTML(html);\n }\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 if (value) {\n var html = name + ' : ' + value;\n }\n return encodeHTML(html);\n }\n return SankeySeries.superCall(this, 'formatTooltip', dataIndex, multipleSeries);\n },\n\n optionUpdated: function () {\n var option = this.option;\n if (option.focusNodeAdjacency === true) {\n option.focusNodeAdjacency = 'allEdges';\n }\n },\n\n // Override Series.getDataParams()\n getDataParams: function (dataIndex, dataType) {\n var params = SankeySeries.superCall(this, 'getDataParams', dataIndex, dataType);\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 return params;\n },\n\n defaultOption: {\n zlevel: 0,\n z: 2,\n\n coordinateSystem: 'view',\n\n layout: null,\n\n // The position of the whole view\n left: '5%',\n top: '5%',\n right: '20%',\n bottom: '5%',\n\n // Value can be 'vertical'\n orient: 'horizontal',\n\n // The dx of the node\n nodeWidth: 20,\n\n // The vertical distance between two nodes\n nodeGap: 8,\n\n // Control if the node can move or not\n draggable: true,\n\n // Value can be 'inEdges', 'outEdges', 'allEdges', true (the same as 'allEdges').\n focusNodeAdjacency: false,\n\n // The number of iterations to change the position of the node\n layoutIterations: 32,\n\n label: {\n show: true,\n position: 'right',\n color: '#000',\n fontSize: 12\n },\n\n levels: [],\n\n // Value can be 'left' or 'right'\n nodeAlign: 'justify',\n\n itemStyle: {\n borderWidth: 1,\n borderColor: '#333'\n },\n\n lineStyle: {\n color: '#314656',\n opacity: 0.2,\n curveness: 0.5\n },\n\n emphasis: {\n label: {\n show: true\n },\n lineStyle: {\n opacity: 0.5\n }\n },\n\n animationEasing: 'linear',\n\n animationDuration: 1000\n }\n\n});\n\nexport default SankeySeries;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as graphic from '../../util/graphic';\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\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\n el.traverse(function (child) {\n if (child.type !== 'group') {\n child.setStyle('opacity', opacity);\n }\n });\n\n // Support emphasis here.\n el.highlight && el.highlight();\n}\n\nvar SankeyShape = graphic.extendShape({\n shape: {\n x1: 0, y1: 0,\n x2: 0, y2: 0,\n cpx1: 0, cpy1: 0,\n cpx2: 0, cpy2: 0,\n extent: 0,\n orient: ''\n },\n\n buildPath: function (ctx, shape) {\n var extent = shape.extent;\n ctx.moveTo(shape.x1, shape.y1);\n ctx.bezierCurveTo(\n shape.cpx1, shape.cpy1,\n shape.cpx2, shape.cpy2,\n shape.x2, shape.y2\n );\n if (shape.orient === 'vertical') {\n ctx.lineTo(shape.x2 + extent, shape.y2);\n ctx.bezierCurveTo(\n shape.cpx2 + extent, shape.cpy2,\n shape.cpx1 + extent, shape.cpy1,\n shape.x1 + extent, shape.y1\n );\n }\n else {\n ctx.lineTo(shape.x2, shape.y2 + extent);\n ctx.bezierCurveTo(\n shape.cpx2, shape.cpy2 + extent,\n shape.cpx1, shape.cpy1 + extent,\n shape.x1, shape.y1 + extent\n );\n }\n ctx.closePath();\n },\n\n highlight: function () {\n this.trigger('emphasis');\n },\n\n downplay: function () {\n this.trigger('normal');\n }\n});\n\nexport default echarts.extendChartView({\n\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\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;\n // view width\n var width = layoutInfo.width;\n // view height\n var height = layoutInfo.height;\n var nodeData = seriesModel.getData();\n var edgeData = seriesModel.getData('edge');\n var orient = seriesModel.get('orient');\n\n this._model = seriesModel;\n\n group.removeAll();\n\n group.attr('position', [layoutInfo.x, layoutInfo.y]);\n\n // generate a bezire Curve for each edge\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\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 }\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\n curve.setStyle(lineStyleModel.getItemStyle());\n // Special color, use source node color or target node color\n switch (curve.style.fill) {\n case 'source':\n curve.style.fill = edge.node1.getVisual('color');\n break;\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\n group.add(curve);\n\n edgeData.setItemGraphicEl(edge.dataIndex, curve);\n });\n\n // Generate a rect for each node\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\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\n var hoverStyle = node.getModel('emphasis.itemStyle').getItemStyle();\n\n graphic.setLabelStyle(\n rect.style, hoverStyle, labelModel, labelHoverModel,\n {\n labelFetcher: seriesModel,\n labelDataIndex: node.dataIndex,\n defaultText: node.id,\n isRectText: true\n }\n );\n\n rect.setStyle('fill', node.getVisual('color'));\n\n graphic.setHoverStyle(rect, hoverStyle);\n\n group.add(rect);\n\n nodeData.setItemGraphicEl(node.dataIndex, rect);\n\n rect.dataType = 'node';\n });\n\n nodeData.eachItemGraphicEl(function (el, dataIndex) {\n var itemModel = nodeData.getItemModel(dataIndex);\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 el.ondragend = function () {\n sankeyView._focusAdjacencyDisabled = false;\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 api.dispatchAction({\n type: 'focusNodeAdjacency',\n seriesId: seriesModel.id,\n dataIndex: el.dataIndex\n });\n }\n });\n\n el.on('mouseout', el.unfocusNodeAdjHandler = function () {\n if (!sankeyView._focusAdjacencyDisabled) {\n sankeyView._dispatchUnfocus(api);\n }\n });\n }\n });\n\n edgeData.eachItemGraphicEl(function (el, dataIndex) {\n var edgeModel = edgeData.getItemModel(dataIndex);\n\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 api.dispatchAction({\n type: 'focusNodeAdjacency',\n seriesId: seriesModel.id,\n edgeDataIndex: el.dataIndex\n });\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\n dispose: function () {\n this._clearTimer();\n },\n\n _dispatchUnfocus: function (api) {\n var self = this;\n this._clearTimer();\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\n _clearTimer: function () {\n if (this._unfocusDelayTimer) {\n clearTimeout(this._unfocusDelayTimer);\n this._unfocusDelayTimer = null;\n }\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 var node = graph.getNodeByIndex(dataIndex);\n var edge = graph.getEdgeByIndex(edgeDataIndex);\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, hoverNodeOpacityPath);\n var focusNodeAdj = itemModel.get('focusNodeAdjacency');\n if (focusNodeAdj === 'outEdges') {\n zrUtil.each(node.outEdges, function (edge) {\n if (edge.dataIndex < 0) {\n return;\n }\n fadeInItem(edge, hoverLineOpacityPath);\n fadeInItem(edge.node2, hoverNodeOpacityPath);\n });\n }\n else if (focusNodeAdj === 'inEdges') {\n zrUtil.each(node.inEdges, function (edge) {\n if (edge.dataIndex < 0) {\n return;\n }\n fadeInItem(edge, hoverLineOpacityPath);\n fadeInItem(edge.node1, hoverNodeOpacityPath);\n });\n }\n else if (focusNodeAdj === 'allEdges') {\n zrUtil.each(node.edges, function (edge) {\n if (edge.dataIndex < 0) {\n return;\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 if (edge) {\n fadeInItem(edge, hoverLineOpacityPath);\n fadeInItem(edge.node1, hoverNodeOpacityPath);\n fadeInItem(edge.node2, hoverNodeOpacityPath);\n }\n },\n\n unfocusNodeAdjacency: function (seriesModel, ecModel, api, payload) {\n var graph = seriesModel.getGraph();\n\n graph.eachNode(function (node) {\n fadeOutItem(node, nodeOpacityPath);\n });\n graph.eachEdge(function (edge) {\n fadeOutItem(edge, lineOpacityPath);\n });\n }\n});\n\n// Add animation to the view\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\n return rectEl;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport '../helper/focusNodeAdjacencyAction';\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({mainType: 'series', subType: 'sankey', query: payload}, 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\nimport * as layout from '../../util/layout';\nimport * as zrUtil from 'zrender/src/core/util';\nimport {groupData} from '../../util/model';\n\nexport default function (ecModel, api, payload) {\n\n ecModel.eachSeriesByType('sankey', function (seriesModel) {\n\n var nodeWidth = seriesModel.get('nodeWidth');\n var nodeGap = seriesModel.get('nodeGap');\n\n var layoutInfo = getViewRect(seriesModel, api);\n\n seriesModel.layoutInfo = layoutInfo;\n\n var width = layoutInfo.width;\n var height = layoutInfo.height;\n\n var graph = seriesModel.getGraph();\n\n var nodes = graph.nodes;\n var edges = graph.edges;\n\n computeNodeValues(nodes);\n\n var filteredNodes = zrUtil.filter(nodes, function (node) {\n return node.getLayout().value === 0;\n });\n\n var iterations = filteredNodes.length !== 0 ? 0 : seriesModel.get('layoutIterations');\n\n var orient = seriesModel.get('orient');\n\n var nodeAlign = seriesModel.get('nodeAlign');\n\n layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iterations, orient, nodeAlign);\n });\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 */\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(\n seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n }\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/**\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 */\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({value: value}, true);\n });\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 */\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 = [];\n // Storage each node's indegree.\n var indegreeArr = [];\n //Used to storage the node with indegree is equal to 0.\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 for (i = 0; i < nodes.length; i++) {\n indegreeArr[i] = nodes[i].inEdges.length;\n if (indegreeArr[i] === 0) {\n zeroIndegrees.push(nodes[i]);\n }\n }\n var maxNodeDepth = -1;\n // Traversing nodes using topological sorting to calculate the\n // horizontal(if orient === 'horizontal') or vertical(if orient === 'vertical')\n // position of the nodes.\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 if (isItemDepth && item.depth > maxNodeDepth) {\n maxNodeDepth = item.depth;\n }\n node.setLayout({depth: isItemDepth ? item.depth : x}, true);\n orient === 'vertical'\n ? node.setLayout({dy: nodeWidth}, true)\n : node.setLayout({dx: nodeWidth}, 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 if (--indegreeArr[nodeIndex] === 0 && nextTargetNode.indexOf(targetNode) < 0) {\n nextTargetNode.push(targetNode);\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 if (nodeAlign && nodeAlign !== 'left') {\n adjustNodeWithNodeAlign(nodes, nodeAlign, orient, maxDepth);\n }\n var kx = orient === 'vertical'\n ? (height - nodeWidth) / maxDepth\n : (width - nodeWidth) / maxDepth;\n\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 while (remainNodes.length) {\n for (var i = 0; i < remainNodes.length; i++) {\n var node = remainNodes[i];\n node.setLayout({skNodeHeight: nodeHeight}, true);\n for (var j = 0; j < node.inEdges.length; j++) {\n var edge = node.inEdges[j];\n if (nextSourceNode.indexOf(edge.node1) < 0) {\n nextSourceNode.push(edge.node1);\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({depth: Math.max(0, maxDepth - node.getLayout().skNodeHeight)}, true);\n }\n });\n }\n else if (nodeAlign === 'justify') {\n moveSinksRight(nodes, maxDepth);\n }\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 */\nfunction moveSinksRight(nodes, maxDepth) {\n zrUtil.each(nodes, function (node) {\n if (!isNodeDepth(node) && !node.outEdges.length) {\n node.setLayout({depth: maxDepth}, true);\n }\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 */\nfunction scaleNodeBreadths(nodes, kx, orient) {\n zrUtil.each(nodes, function (node) {\n var nodeDepth = node.getLayout().depth * kx;\n orient === 'vertical'\n ? node.setLayout({y: nodeDepth}, true)\n : node.setLayout({x: nodeDepth}, true);\n });\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 */\nfunction computeNodeDepths(nodes, edges, height, width, nodeGap, iterations, orient) {\n var nodesByBreadth = prepareNodesByBreadth(nodes, orient);\n\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\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\n return nodesByBreadth;\n}\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.<Array.<module:echarts/data/Graph~Node>>} 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 */\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'\n ? (width - (n - 1) * nodeGap) / sum\n : (height - (n - 1) * nodeGap) / sum;\n\n if (ky < minKy) {\n minKy = ky;\n }\n });\n\n zrUtil.each(nodesByBreadth, function (nodes) {\n zrUtil.each(nodes, function (node, i) {\n var nodeDy = node.getLayout().value * minKy;\n if (orient === 'vertical') {\n node.setLayout({x: i}, true);\n node.setLayout({dx: nodeDy}, true);\n }\n else {\n node.setLayout({y: i}, true);\n node.setLayout({dy: nodeDy}, true);\n }\n });\n });\n\n zrUtil.each(edges, function (edge) {\n var edgeDy = +edge.getValue() * minKy;\n edge.setLayout({dy: edgeDy}, true);\n });\n}\n\n/**\n * Resolve the collision of initialized depth (y-position)\n *\n * @param {Array.<Array.<module:echarts/data/Graph~Node>>} 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 */\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 for (var i = 0; i < n; i++) {\n node = nodes[i];\n dy = y0 - node.getLayout()[keyAttr];\n if (dy > 0) {\n nodeX = node.getLayout()[keyAttr] + dy;\n orient === 'vertical'\n ? node.setLayout({x: nodeX}, true)\n : node.setLayout({y: nodeX}, true);\n }\n y0 = node.getLayout()[keyAttr] + node.getLayout()[nodeDyAttr] + nodeGap;\n }\n var viewWidth = orient === 'vertical' ? width : height;\n // If the bottommost node goes outside the bounds, push it back up\n dy = y0 - nodeGap - viewWidth;\n if (dy > 0) {\n nodeX = node.getLayout()[keyAttr] - dy;\n orient === 'vertical'\n ? node.setLayout({x: nodeX}, true)\n : node.setLayout({y: nodeX}, true);\n\n y0 = nodeX;\n for (i = n - 2; i >= 0; --i) {\n node = nodes[i];\n dy = node.getLayout()[keyAttr] + node.getLayout()[nodeDyAttr] + nodeGap - y0;\n if (dy > 0) {\n nodeX = node.getLayout()[keyAttr] - dy;\n orient === 'vertical'\n ? node.setLayout({x: nodeX}, true)\n : node.setLayout({y: nodeX}, true);\n }\n y0 = node.getLayout()[keyAttr];\n }\n }\n });\n}\n\n/**\n * Change the y-position of the nodes, except most the right side nodes\n *\n * @param {Array.<Array.<module:echarts/data/Graph~Node>>} 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 */\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)\n / 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({x: nodeX}, true);\n }\n else {\n var nodeY = node.getLayout().y + (y - center(node, orient)) * alpha;\n node.setLayout({y: nodeY}, true);\n }\n }\n });\n });\n}\n\nfunction weightedTarget(edge, orient) {\n return center(edge.node2, orient) * edge.getValue();\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}\nfunction centerSource(edge, orient) {\n return center(edge.node1, orient);\n}\n\nfunction center(node, orient) {\n return orient === 'vertical'\n ? node.getLayout().x + node.getLayout().dx / 2\n : 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 while (++i < len) {\n var value = +cb.call(array, array[i], orient);\n if (!isNaN(value)) {\n sum += value;\n }\n }\n return sum;\n}\n\n/**\n * Change the y-position of the nodes, except most the left side nodes\n *\n * @param {Array.<Array.<module:echarts/data/Graph~Node>>} 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 */\nfunction relaxLeftToRight(nodesByBreadth, alpha, orient) {\n zrUtil.each(nodesByBreadth, function (nodes) {\n zrUtil.each(nodes, function (node) {\n if (node.inEdges.length) {\n\n var y = sum(node.inEdges, weightedSource, orient)\n / 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({x: nodeX}, true);\n }\n else {\n var nodeY = node.getLayout().y + (y - center(node, orient)) * alpha;\n node.setLayout({y: nodeY}, true);\n }\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 */\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({sy: sy}, true);\n sy += edge.getLayout().dy;\n });\n zrUtil.each(node.inEdges, function (edge) {\n edge.setLayout({ty: ty}, true);\n ty += edge.getLayout().dy;\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\nimport VisualMapping from '../../visual/VisualMapping';\nimport * as zrUtil from 'zrender/src/core/util';\n\nexport default function (ecModel, payload) {\n ecModel.eachSeriesByType('sankey', function (seriesModel) {\n var graph = seriesModel.getGraph();\n var nodes = graph.nodes;\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 if (nodeValue < minValue) {\n minValue = nodeValue;\n }\n if (nodeValue > maxValue) {\n maxValue = nodeValue;\n }\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\n var mapValueToColor = mapping.mapValueToVisual(node.getLayout().value);\n var customColor = node.getModel().get('itemStyle.color');\n customColor != null\n ? node.setVisual('color', customColor)\n : node.setVisual('color', mapValueToColor);\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\nimport * as echarts from '../echarts';\n\nimport './sankey/SankeySeries';\nimport './sankey/SankeyView';\nimport './sankey/sankeyAction';\n\nimport sankeyLayout from './sankey/sankeyLayout';\nimport sankeyVisual from './sankey/sankeyVisual';\n\necharts.registerLayout(sankeyLayout);\necharts.registerVisual(sankeyVisual);","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport createListSimply from '../helper/createListSimply';\nimport * as zrUtil from 'zrender/src/core/util';\nimport {getDimensionTypeByAxis} from '../../data/helper/dimensionHelper';\nimport {makeSeriesEncodeForAxisCoordSys} from '../../data/helper/sourceHelper';\n\nexport var seriesModelMixin = {\n\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\n var ordinalMeta;\n\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;\n\n // FIXME\n // Consider time axis.\n\n if (xAxisType === 'category') {\n option.layout = 'horizontal';\n ordinalMeta = xAxisModel.getOrdinalMeta();\n addOrdinal = true;\n }\n else if (yAxisType === 'category') {\n option.layout = 'vertical';\n ordinalMeta = yAxisModel.getOrdinalMeta();\n addOrdinal = true;\n }\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;\n\n // ??? FIXME make a stage to perform data transfrom.\n // MUST create a new data, consider setOption({}) again.\n if (data && addOrdinal) {\n var newOptionData = [];\n zrUtil.each(data, function (item, index) {\n var newItem;\n if (item.value && zrUtil.isArray(item.value)) {\n newItem = item.value.slice();\n item.value.unshift(index);\n }\n else if (zrUtil.isArray(item)) {\n newItem = item.slice();\n item.unshift(index);\n }\n else {\n newItem = item;\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\n return createListSimply(\n this,\n {\n coordDimensions: coordDimensions,\n dimensionsCount: defaultValueDimensions.length + 1,\n encodeDefaulter: zrUtil.curry(\n makeSeriesEncodeForAxisCoordSys, coordDimensions, this\n )\n }\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\n};\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport SeriesModel from '../../model/Series';\nimport {seriesModelMixin} from '../helper/whiskerBoxCommon';\n\nvar BoxplotSeries = SeriesModel.extend({\n\n type: 'series.boxplot',\n\n dependencies: ['xAxis', 'yAxis', 'grid'],\n\n // TODO\n // box width represents group size, so dimension should have 'size'.\n\n /**\n * @see <https://en.wikipedia.org/wiki/Box_plot>\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', defaultTooltip: true},\n {name: 'Q1', defaultTooltip: true},\n {name: 'median', defaultTooltip: true},\n {name: 'Q3', defaultTooltip: true},\n {name: 'max', defaultTooltip: true}\n ],\n\n /**\n * @type {Array.<string>}\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\n hoverAnimation: true,\n\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n\n layout: null, // 'horizontal' or 'vertical'\n boxWidth: [7, 50], // [min, max] can be percent of band width.\n\n itemStyle: {\n color: '#fff',\n borderWidth: 1\n },\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\n animationEasing: 'elasticOut',\n animationDuration: 800\n }\n});\n\nzrUtil.mixin(BoxplotSeries, seriesModelMixin, true);\n\nexport default BoxplotSeries;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport ChartView from '../../view/Chart';\nimport * as graphic from '../../util/graphic';\nimport Path from 'zrender/src/graphic/Path';\n\n// Update common properties\nvar NORMAL_ITEM_STYLE_PATH = ['itemStyle'];\nvar EMPHASIS_ITEM_STYLE_PATH = ['emphasis', 'itemStyle'];\n\nvar BoxplotView = ChartView.extend({\n\n type: 'boxplot',\n\n render: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var group = this.group;\n var oldData = this._data;\n\n // 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 if (!this._data) {\n group.removeAll();\n }\n\n var constDim = seriesModel.get('layout') === 'horizontal' ? 1 : 0;\n\n data.diff(oldData)\n .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 })\n .update(function (newIdx, oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n\n // Empty data\n if (!data.hasValue(newIdx)) {\n group.remove(symbolEl);\n return;\n }\n\n var itemLayout = data.getItemLayout(newIdx);\n if (!symbolEl) {\n symbolEl = createNormalBox(itemLayout, data, newIdx, constDim);\n }\n else {\n updateNormalBoxData(itemLayout, symbolEl, data, newIdx);\n }\n\n group.add(symbolEl);\n\n data.setItemGraphicEl(newIdx, symbolEl);\n })\n .remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && group.remove(el);\n })\n .execute();\n\n this._data = data;\n },\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\n dispose: zrUtil.noop\n\n});\n\n\nvar BoxPath = Path.extend({\n\n type: 'boxplotBoxPath',\n\n shape: {},\n\n buildPath: function (ctx, shape) {\n var ends = shape.points;\n\n var i = 0;\n ctx.moveTo(ends[i][0], ends[i][1]);\n i++;\n for (; i < 4; i++) {\n ctx.lineTo(ends[i][0], ends[i][1]);\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\n\nfunction createNormalBox(itemLayout, data, dataIndex, constDim, isInit) {\n var ends = itemLayout.ends;\n\n var el = new BoxPath({\n shape: {\n points: isInit\n ? transInit(ends, constDim, itemLayout)\n : ends\n }\n });\n\n updateNormalBoxData(itemLayout, el, data, dataIndex, isInit);\n\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\n updateMethod(\n el,\n {shape: {points: itemLayout.ends}},\n seriesModel,\n dataIndex\n );\n\n var itemModel = data.getItemModel(dataIndex);\n var normalItemStyleModel = itemModel.getModel(NORMAL_ITEM_STYLE_PATH);\n var borderColor = data.getItemVisual(dataIndex, 'color');\n\n // Exclude borderColor.\n var itemStyle = normalItemStyleModel.getItemStyle(['borderColor']);\n itemStyle.stroke = borderColor;\n itemStyle.strokeNoScale = true;\n el.useStyle(itemStyle);\n\n el.z2 = 100;\n\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\nexport default BoxplotView;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nvar borderColorQuery = ['itemStyle', 'borderColor'];\n\nexport default function (ecModel, api) {\n\n var globalColors = ecModel.get('color');\n\n ecModel.eachRawSeriesByType('boxplot', function (seriesModel) {\n\n var defaulColor = globalColors[seriesModel.seriesIndex % globalColors.length];\n var data = seriesModel.getData();\n\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 });\n\n // Only visible series has each data be visual encoded\n if (!ecModel.isSeriesFiltered(seriesModel)) {\n data.each(function (idx) {\n var itemModel = data.getItemModel(idx);\n data.setItemVisual(\n idx,\n {color: itemModel.get(borderColorQuery, true)}\n );\n });\n }\n });\n\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport {parsePercent} from '../../util/number';\n\nvar each = zrUtil.each;\n\nexport default function (ecModel) {\n\n var groupResult = groupSeriesByAxis(ecModel);\n\n each(groupResult, function (groupItem) {\n var seriesModels = groupItem.seriesModels;\n\n if (!seriesModels.length) {\n return;\n }\n\n calculateBase(groupItem);\n\n each(seriesModels, function (seriesModel, idx) {\n layoutSingleSeries(\n seriesModel,\n groupItem.boxOffsetList[idx],\n groupItem.boxWidthList[idx]\n );\n });\n });\n}\n\n/**\n * Group series by axis.\n */\nfunction groupSeriesByAxis(ecModel) {\n var result = [];\n var axisList = [];\n\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] = {axis: baseAxis, seriesModels: []};\n }\n\n result[idx].seriesModels.push(seriesModel);\n });\n\n return result;\n}\n\n/**\n * Calculate offset and box width for each series.\n */\nfunction calculateBase(groupItem) {\n var extent;\n var baseAxis = groupItem.axis;\n var seriesModels = groupItem.seriesModels;\n var seriesCount = seriesModels.length;\n\n var boxWidthList = groupItem.boxWidthList = [];\n var boxOffsetList = groupItem.boxOffsetList = [];\n var boundList = [];\n\n var bandWidth;\n if (baseAxis.type === 'category') {\n bandWidth = baseAxis.getBandWidth();\n }\n else {\n var maxDataCount = 0;\n each(seriesModels, function (seriesModel) {\n maxDataCount = Math.max(maxDataCount, seriesModel.getData().count());\n });\n extent = baseAxis.getExtent(),\n Math.abs(extent[1] - extent[0]) / maxDataCount;\n }\n\n each(seriesModels, function (seriesModel) {\n var boxWidthBound = seriesModel.get('boxWidth');\n if (!zrUtil.isArray(boxWidthBound)) {\n boxWidthBound = [boxWidthBound, boxWidthBound];\n }\n boundList.push([\n parsePercent(boxWidthBound[0], bandWidth) || 0,\n parsePercent(boxWidthBound[1], bandWidth) || 0\n ]);\n });\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\n each(seriesModels, function (seriesModel, idx) {\n boxOffsetList.push(base);\n base += boxGap + boxWidth;\n\n boxWidthList.push(\n Math.min(Math.max(boxWidth, boundList[idx][0]), boundList[idx][1])\n );\n });\n}\n\n/**\n * Calculate points location for each series.\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\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\n var ends = [];\n addBodyEnd(ends, end2, 0);\n addBodyEnd(ends, end4, 1);\n\n ends.push(end1, end2, end5, end4);\n layEndLine(ends, end1);\n layEndLine(ends, end5);\n layEndLine(ends, median);\n\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 if (isNaN(axisDimVal) || isNaN(val)) {\n point = [NaN, NaN];\n }\n else {\n point = coordSys.dataToPoint(p);\n point[cDimIdx] += offset;\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\n ? ends.push(point1, point2)\n : 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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../echarts';\nimport './boxplot/BoxplotSeries';\nimport './boxplot/BoxplotView';\nimport boxplotVisual from './boxplot/boxplotVisual';\nimport boxplotLayout from './boxplot/boxplotLayout';\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\nimport * as zrUtil from 'zrender/src/core/util';\nimport SeriesModel from '../../model/Series';\nimport {seriesModelMixin} from '../helper/whiskerBoxCommon';\n\nvar CandlestickSeries = SeriesModel.extend({\n\n type: 'series.candlestick',\n\n dependencies: ['xAxis', 'yAxis', 'grid'],\n\n /**\n * @readOnly\n */\n defaultValueDimensions: [\n {name: 'open', defaultTooltip: true},\n {name: 'close', defaultTooltip: true},\n {name: 'lowest', defaultTooltip: true},\n {name: 'highest', defaultTooltip: true}\n ],\n\n /**\n * @type {Array.<string>}\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\n hoverAnimation: true,\n\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n\n layout: null, // 'horizontal' or 'vertical'\n\n clip: true,\n\n itemStyle: {\n color: '#c23531', // 阳线 positive\n color0: '#314656', // 阴线 negative '#c23531', '#314656'\n borderWidth: 1,\n // FIXME\n // ec2中使用的是lineStyle.color 和 lineStyle.color0\n borderColor: '#c23531',\n borderColor0: '#314656'\n },\n\n emphasis: {\n itemStyle: {\n borderWidth: 2\n }\n },\n\n barMaxWidth: null,\n barMinWidth: null,\n barWidth: null,\n\n large: true,\n largeThreshold: 600,\n\n progressive: 3e3,\n progressiveThreshold: 1e4,\n progressiveChunkMode: 'mod',\n\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\n brushSelector: function (dataIndex, data, selectors) {\n var itemLayout = data.getItemLayout(dataIndex);\n return itemLayout && selectors.rect(itemLayout.brushRect);\n }\n\n});\n\nzrUtil.mixin(CandlestickSeries, seriesModelMixin, true);\n\nexport default CandlestickSeries;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport ChartView from '../../view/Chart';\nimport * as graphic from '../../util/graphic';\nimport Path from 'zrender/src/graphic/Path';\nimport {createClipPath} from '../helper/createClipPathFromCoordSys';\n\nvar NORMAL_ITEM_STYLE_PATH = ['itemStyle'];\nvar EMPHASIS_ITEM_STYLE_PATH = ['emphasis', 'itemStyle'];\nvar SKIP_PROPS = ['color', 'color0', 'borderColor', 'borderColor0'];\n\nvar CandlestickView = ChartView.extend({\n\n type: 'candlestick',\n\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\n ? this._renderLarge(seriesModel)\n : this._renderNormal(seriesModel);\n },\n\n incrementalPrepareRender: function (seriesModel, ecModel, api) {\n this._clear();\n this._updateDrawMode(seriesModel);\n },\n\n incrementalRender: function (params, seriesModel, ecModel, api) {\n this._isLargeDraw\n ? this._incrementalRenderLarge(params, seriesModel)\n : this._incrementalRenderNormal(params, seriesModel);\n },\n\n _updateDrawMode: function (seriesModel) {\n var isLargeDraw = seriesModel.pipelineContext.large;\n if (this._isLargeDraw == null || isLargeDraw ^ this._isLargeDraw) {\n this._isLargeDraw = isLargeDraw;\n this._clear();\n }\n },\n\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\n var needsClip = seriesModel.get('clip', true);\n var coord = seriesModel.coordinateSystem;\n var clipArea = coord.getArea && coord.getArea();\n\n // 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 if (!this._data) {\n group.removeAll();\n }\n\n data.diff(oldData)\n .add(function (newIdx) {\n if (data.hasValue(newIdx)) {\n var el;\n\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, {shape: {points: itemLayout.ends}}, seriesModel, newIdx);\n\n setBoxCommon(el, data, newIdx, isSimpleBox);\n\n group.add(el);\n\n data.setItemGraphicEl(newIdx, el);\n }\n })\n .update(function (newIdx, oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n\n // Empty data\n if (!data.hasValue(newIdx)) {\n group.remove(el);\n return;\n }\n\n var itemLayout = data.getItemLayout(newIdx);\n if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) {\n group.remove(el);\n return;\n }\n\n if (!el) {\n el = createNormalBox(itemLayout, newIdx);\n }\n else {\n graphic.updateProps(el, {shape: {points: itemLayout.ends}}, seriesModel, newIdx);\n }\n\n setBoxCommon(el, data, newIdx, isSimpleBox);\n\n group.add(el);\n data.setItemGraphicEl(newIdx, el);\n })\n .remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && group.remove(el);\n })\n .execute();\n\n this._data = data;\n },\n\n _renderLarge: function (seriesModel) {\n this._clear();\n\n createLarge(seriesModel, this.group);\n\n var clipPath = seriesModel.get('clip', true)\n ? createClipPath(seriesModel.coordinateSystem, false, seriesModel)\n : null;\n if (clipPath) {\n this.group.setClipPath(clipPath);\n }\n else {\n this.group.removeClipPath();\n }\n\n },\n\n _incrementalRenderNormal: function (params, seriesModel) {\n var data = seriesModel.getData();\n var isSimpleBox = data.getLayout('isSimpleBox');\n\n var dataIndex;\n while ((dataIndex = params.next()) != null) {\n var el;\n\n var itemLayout = data.getItemLayout(dataIndex);\n el = createNormalBox(itemLayout, dataIndex);\n setBoxCommon(el, data, dataIndex, isSimpleBox);\n\n el.incremental = true;\n this.group.add(el);\n }\n },\n\n _incrementalRenderLarge: function (params, seriesModel) {\n createLarge(seriesModel, this.group, true);\n },\n\n remove: function (ecModel) {\n this._clear();\n },\n\n _clear: function () {\n this.group.removeAll();\n this._data = null;\n },\n\n dispose: zrUtil.noop\n\n});\n\n\nvar NormalBoxPath = Path.extend({\n\n type: 'normalCandlestickBox',\n\n shape: {},\n\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 }\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\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\n\nfunction createNormalBox(itemLayout, dataIndex, isInit) {\n var ends = itemLayout.ends;\n return new NormalBoxPath({\n shape: {\n points: isInit\n ? transInit(ends, itemLayout)\n : ends\n },\n z2: 100\n });\n}\n\nfunction isNormalBoxClipped(clipArea, itemLayout) {\n var clipped = true;\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 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;\n\n // Color must be excluded.\n // Because symbol provide setColor individually to set fill and stroke\n var itemStyle = normalItemStyleModel.getItemStyle(SKIP_PROPS);\n\n el.useStyle(itemStyle);\n el.style.strokeNoScale = true;\n el.style.fill = color;\n el.style.stroke = borderColor;\n\n el.__simpleBox = isSimpleBox;\n\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\n\n\nvar LargeBoxPath = Path.extend({\n\n type: 'largeCandlestickBox',\n\n shape: {},\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 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 }\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\n var elP = new LargeBoxPath({\n shape: {points: largePoints},\n __sign: 1\n });\n group.add(elP);\n var elN = new LargeBoxPath({\n shape: {points: largePoints},\n __sign: -1\n });\n group.add(elN);\n\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)\n || data.getVisual('color' + suffix);\n\n // Color must be excluded.\n // Because symbol provide setColor individually to set fill and stroke\n var itemStyle = seriesModel.getModel(NORMAL_ITEM_STYLE_PATH).getItemStyle(SKIP_PROPS);\n\n el.useStyle(itemStyle);\n el.style.fill = null;\n el.style.stroke = borderColor;\n // No different\n // el.style.lineWidth = .5;\n}\n\n\n\nexport default CandlestickView;\n\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\n\nexport default function (option) {\n if (!option || !zrUtil.isArray(option.series)) {\n return;\n }\n\n // Translate 'k' to 'candlestick'.\n zrUtil.each(option.series, function (seriesItem) {\n if (zrUtil.isObject(seriesItem) && seriesItem.type === 'k') {\n seriesItem.type = 'candlestick';\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\nimport createRenderPlanner from '../helper/createRenderPlanner';\n\nvar positiveBorderColorQuery = ['itemStyle', 'borderColor'];\nvar negativeBorderColorQuery = ['itemStyle', 'borderColor0'];\nvar positiveColorQuery = ['itemStyle', 'color'];\nvar negativeColorQuery = ['itemStyle', 'color0'];\n\nexport default {\n\n seriesType: 'candlestick',\n\n plan: createRenderPlanner(),\n\n // For legend.\n performRawSeries: true,\n\n reset: function (seriesModel, ecModel) {\n\n var data = seriesModel.getData();\n\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 });\n\n // Only visible series has each data be visual encoded\n if (ecModel.isSeriesFiltered(seriesModel)) {\n return;\n }\n\n var isLargeRender = seriesModel.pipelineContext.large;\n return !isLargeRender && {progress: progress};\n\n\n function progress(params, data) {\n var dataIndex;\n while ((dataIndex = params.next()) != null) {\n var itemModel = data.getItemModel(dataIndex);\n var sign = data.getItemLayout(dataIndex).sign;\n\n data.setItemVisual(\n dataIndex,\n {\n color: getColor(sign, itemModel),\n borderColor: getBorderColor(sign, itemModel)\n }\n );\n }\n }\n\n function getColor(sign, model) {\n return model.get(\n sign > 0 ? positiveColorQuery : negativeColorQuery\n );\n }\n\n function getBorderColor(sign, model) {\n return model.get(\n sign > 0 ? positiveBorderColorQuery : negativeBorderColorQuery\n );\n }\n\n }\n\n};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/* global Float32Array */\n\nimport {subPixelOptimize} from '../../util/graphic';\nimport createRenderPlanner from '../helper/createRenderPlanner';\nimport {parsePercent} from '../../util/number';\nimport {retrieve2} from 'zrender/src/core/util';\n\nvar LargeArr = typeof Float32Array !== 'undefined' ? Float32Array : Array;\n\nexport default {\n\n seriesType: 'candlestick',\n\n plan: createRenderPlanner(),\n\n reset: function (seriesModel) {\n\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\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\n ? largeProgress : normalProgress\n };\n\n function normalProgress(params, data) {\n var dataIndex;\n while ((dataIndex = params.next()) != null) {\n\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 var ocLow = Math.min(openVal, closeVal);\n var ocHigh = Math.max(openVal, closeVal);\n\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\n var ends = [];\n addBodyEnd(ends, ocHighPoint, 0);\n addBodyEnd(ends, ocLowPoint, 1);\n\n ends.push(\n subPixelOptimizePoint(highestPoint),\n subPixelOptimizePoint(ocHighPoint),\n subPixelOptimizePoint(lowestPoint),\n subPixelOptimizePoint(ocLowPoint)\n );\n\n data.setItemLayout(dataIndex, {\n sign: getSign(data, dataIndex, openVal, closeVal, closeDim),\n initBaseline: openVal > closeVal\n ? ocHighPoint[vDimIdx] : ocLowPoint[vDimIdx], // 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))\n ? [NaN, NaN]\n : coordSys.dataToPoint(p);\n }\n\n function addBodyEnd(ends, point, start) {\n var point1 = point.slice();\n var point2 = point.slice();\n\n point1[cDimIdx] = subPixelOptimize(\n point1[cDimIdx] + candleWidth / 2, 1, false\n );\n point2[cDimIdx] = subPixelOptimize(\n point2[cDimIdx] - candleWidth / 2, 1, true\n );\n\n start\n ? ends.push(point1, point2)\n : 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\n pmin[cDimIdx] -= candleWidth / 2;\n pmax[cDimIdx] -= candleWidth / 2;\n\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\n tmpIn[cDimIdx] = axisDimVal;\n\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 if (openVal > closeVal) {\n sign = -1;\n }\n else if (openVal < closeVal) {\n sign = 1;\n }\n else {\n sign = dataIndex > 0\n // If close === open, compare with close of last record\n ? (data.get(closeDim, dataIndex - 1) <= closeVal ? 1 : -1)\n // 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\n var bandWidth = baseAxis.type === 'category'\n ? baseAxis.getBandWidth()\n : (\n extent = baseAxis.getExtent(),\n Math.abs(extent[1] - extent[0]) / data.count()\n );\n\n var barMaxWidth = parsePercent(\n retrieve2(seriesModel.get('barMaxWidth'), bandWidth),\n bandWidth\n );\n var barMinWidth = parsePercent(\n retrieve2(seriesModel.get('barMinWidth'), 1),\n bandWidth\n );\n var barWidth = seriesModel.get('barWidth');\n\n return barWidth != null\n ? parsePercent(barWidth, bandWidth)\n // Put max outer to ensure bar visible in spite of overlap.\n : Math.max(Math.min(bandWidth / 2, barMaxWidth), barMinWidth);\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../echarts';\n\nimport './candlestick/CandlestickSeries';\nimport './candlestick/CandlestickView';\nimport preprocessor from './candlestick/preprocessor';\n\nimport candlestickVisual from './candlestick/candlestickVisual';\nimport candlestickLayout from './candlestick/candlestickLayout';\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\nimport createListFromArray from '../helper/createListFromArray';\nimport SeriesModel from '../../model/Series';\n\nexport default SeriesModel.extend({\n\n type: 'series.effectScatter',\n\n dependencies: ['grid', 'polar'],\n\n getInitialData: function (option, ecModel) {\n return createListFromArray(this.getSource(), this, {useEncodeDefaulter: true});\n },\n\n brushSelector: 'point',\n\n defaultOption: {\n coordinateSystem: 'cartesian2d',\n zlevel: 0,\n z: 2,\n legendHoverLink: true,\n\n effectType: 'ripple',\n\n progressive: 0,\n\n // When to show the effect, option: 'render'|'emphasis'\n showEffectOn: 'render',\n\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\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n\n // Polar coordinate system\n // polarIndex: 0,\n\n // Geo coordinate system\n // geoIndex: 0,\n\n // symbol: null, // 图形类型\n symbolSize: 10 // 图形大小半宽半径参数当图形为方向或菱形则总宽度为symbolSize * 2\n // symbolRotate: null, // 图形旋转控制\n\n // large: false,\n // Available when large is true\n // largeThreshold: 2000,\n\n // itemStyle: {\n // opacity: 1\n // }\n }\n\n});","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * Symbol with ripple effect\n * @module echarts/chart/helper/EffectSymbol\n */\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport {createSymbol} from '../../util/symbol';\nimport {Group} from '../../util/graphic';\nimport {parsePercent} from '../../util/number';\nimport SymbolClz from './Symbol';\n\nvar EFFECT_RIPPLE_NUMBER = 3;\n\nfunction normalizeSymbolSize(symbolSize) {\n if (!zrUtil.isArray(symbolSize)) {\n symbolSize = [+symbolSize, +symbolSize];\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 */\nfunction EffectSymbol(data, idx) {\n Group.call(this);\n\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 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(\n symbolType, -1, -1, 2, 2, color\n );\n ripplePath.attr({\n style: {\n strokeNoScale: true\n },\n z2: 99,\n silent: true,\n scale: [0.5, 0.5]\n });\n\n var delay = -i / EFFECT_RIPPLE_NUMBER * effectCfg.period + effectCfg.effectOffset;\n // TODO Configurable effectCfg.period\n ripplePath.animate('', true)\n .when(effectCfg.period, {\n scale: [effectCfg.rippleScale / 2, effectCfg.rippleScale / 2]\n })\n .delay(delay)\n .start();\n ripplePath.animateStyle(true)\n .when(effectCfg.period, {\n opacity: 0\n })\n .delay(delay)\n .start();\n\n rippleGroup.add(ripplePath);\n }\n\n updateRipplePath(rippleGroup, effectCfg);\n};\n\n/**\n * Update effect symbol\n */\neffectSymbolProto.updateEffectAnimation = function (effectCfg) {\n var oldEffectCfg = this._effectCfg;\n var rippleGroup = this.childAt(1);\n\n // Must reinitialize effect if following configuration changed\n var DIFFICULT_PROPS = ['symbolType', 'period', 'rippleScale'];\n for (var i = 0; i < DIFFICULT_PROPS.length; i++) {\n var propName = DIFFICULT_PROPS[i];\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/**\n * Highlight symbol\n */\neffectSymbolProto.highlight = function () {\n this.trigger('emphasis');\n};\n\n/**\n * Downplay symbol\n */\neffectSymbolProto.downplay = function () {\n this.trigger('normal');\n};\n\n/**\n * Update symbol properties\n * @param {module:echarts/data/List} data\n * @param {number} idx\n */\neffectSymbolProto.updateData = function (data, idx) {\n var seriesModel = data.hostModel;\n\n this.childAt(0).updateData(data, idx);\n\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\n rippleGroup.attr('scale', symbolSize);\n\n rippleGroup.traverse(function (ripplePath) {\n ripplePath.attr({\n fill: color\n });\n });\n\n var symbolOffset = itemModel.getShallow('symbolOffset');\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 var symbolRotate = data.getItemVisual(idx, 'symbolRotate');\n rippleGroup.rotation = (symbolRotate || 0) * Math.PI / 180 || 0;\n\n var effectCfg = {};\n\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\n this.off('mouseover').off('mouseout').off('emphasis').off('normal');\n\n if (effectCfg.showEffectOn === 'render') {\n this._effectCfg\n ? this.updateEffectAnimation(effectCfg)\n : this.startEffectAnimation(effectCfg);\n\n this._effectCfg = effectCfg;\n }\n else {\n // Not keep old effect config\n this._effectCfg = null;\n\n this.stopEffectAnimation();\n var symbol = this.childAt(0);\n var onEmphasis = function () {\n symbol.highlight();\n if (effectCfg.showEffectOn !== 'render') {\n this.startEffectAnimation(effectCfg);\n }\n };\n var onNormal = function () {\n symbol.downplay();\n if (effectCfg.showEffectOn !== 'render') {\n this.stopEffectAnimation();\n }\n };\n this.on('mouseover', onEmphasis, this)\n .on('mouseout', onNormal, this)\n .on('emphasis', onEmphasis, this)\n .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);\n\nexport default EffectSymbol;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport SymbolDraw from '../helper/SymbolDraw';\nimport EffectSymbol from '../helper/EffectSymbol';\nimport * as matrix from 'zrender/src/core/matrix';\n\nimport pointsLayout from '../../layout/points';\n\nexport default echarts.extendChartView({\n\n type: 'effectScatter',\n\n init: function () {\n this._symbolDraw = new SymbolDraw(EffectSymbol);\n },\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\n updateTransform: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n\n this.group.dirty();\n\n var res = pointsLayout().reset(seriesModel);\n if (res.progress) {\n res.progress({ start: 0, end: data.count() }, data);\n }\n\n this._symbolDraw.updateLayout(data);\n },\n\n _updateGroupTransform: function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && coordSys.getRoamTransform) {\n this.group.transform = matrix.clone(coordSys.getRoamTransform());\n this.group.decomposeTransform();\n }\n },\n\n remove: function (ecModel, api) {\n this._symbolDraw && this._symbolDraw.remove(api);\n },\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\nimport * as echarts from '../echarts';\n\nimport './effectScatter/EffectScatterSeries';\nimport './effectScatter/EffectScatterView';\n\nimport visualSymbol from '../visual/symbol';\nimport layoutPoints from '../layout/points';\n\necharts.registerVisual(visualSymbol('effectScatter', 'circle'));\necharts.registerLayout(layoutPoints('effectScatter'));","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport {__DEV__} from '../../config';\nimport SeriesModel from '../../model/Series';\nimport List from '../../data/List';\nimport { concatArray, mergeAll, map } from 'zrender/src/core/util';\nimport {encodeHTML} from '../../util/format';\nimport CoordinateSystem from '../../CoordinateSystem';\n\nvar Uint32Arr = typeof Uint32Array === 'undefined' ? Array : Uint32Array;\nvar Float64Arr = typeof Float64Array === 'undefined' ? Array : Float64Array;\n\nfunction compatEc2(seriesOpt) {\n var data = seriesOpt.data;\n if (data && data[0] && data[0][0] && data[0][0].coord) {\n if (__DEV__) {\n console.warn('Lines data configuration has been changed to'\n + ' { coords:[[1,2],[2,3]] }');\n }\n seriesOpt.data = map(data, function (itemOpt) {\n var coords = [\n itemOpt[0].coord, itemOpt[1].coord\n ];\n var target = {\n coords: coords\n };\n if (itemOpt[0].name) {\n target.fromName = itemOpt[0].name;\n }\n if (itemOpt[1].name) {\n target.toName = itemOpt[1].name;\n }\n return mergeAll([target, itemOpt[0], itemOpt[1]]);\n });\n }\n}\n\nvar LinesSeries = SeriesModel.extend({\n\n type: 'series.lines',\n\n dependencies: ['grid', 'polar'],\n\n visualColorAccessPath: 'lineStyle.color',\n\n init: function (option) {\n // The input data may be null/undefined.\n option.data = option.data || [];\n\n // Not using preprocessor because mergeOption may not have series.type\n compatEc2(option);\n\n var result = this._processFlatCoordsArray(option.data);\n this._flatCoords = result.flatCoords;\n this._flatCoordsOffset = result.flatCoordsOffset;\n if (result.flatCoords) {\n option.data = new Float32Array(result.count);\n }\n\n LinesSeries.superApply(this, 'init', arguments);\n },\n\n mergeOption: function (option) {\n\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 this._flatCoords = result.flatCoords;\n this._flatCoordsOffset = result.flatCoordsOffset;\n if (result.flatCoords) {\n option.data = new Float32Array(result.count);\n }\n }\n\n LinesSeries.superApply(this, 'mergeOption', arguments);\n },\n\n appendData: function (params) {\n var result = this._processFlatCoordsArray(params.data);\n if (result.flatCoords) {\n if (!this._flatCoords) {\n this._flatCoords = result.flatCoords;\n this._flatCoordsOffset = result.flatCoordsOffset;\n }\n else {\n this._flatCoords = concatArray(this._flatCoords, result.flatCoords);\n this._flatCoordsOffset = concatArray(this._flatCoordsOffset, result.flatCoordsOffset);\n }\n params.data = new Float32Array(result.count);\n }\n\n this.getRawData().appendData(params.data);\n },\n\n _getCoordsFromItemModel: function (idx) {\n var itemModel = this.getData().getItemModel(idx);\n var coords = (itemModel.option instanceof Array)\n ? itemModel.option : itemModel.getShallow('coords');\n\n if (__DEV__) {\n if (!(coords instanceof Array && coords.length > 0 && coords[0] instanceof Array)) {\n throw new Error(\n 'Invalid coords ' + JSON.stringify(coords) + '. Lines must have 2d coords array in data item.'\n );\n }\n }\n return coords;\n },\n\n getLineCoordsCount: function (idx) {\n if (this._flatCoordsOffset) {\n return this._flatCoordsOffset[idx * 2 + 1];\n }\n else {\n return this._getCoordsFromItemModel(idx).length;\n }\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 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 return len;\n }\n else {\n var coords = this._getCoordsFromItemModel(idx);\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 return coords.length;\n }\n },\n\n _processFlatCoordsArray: function (data) {\n var startOffset = 0;\n if (this._flatCoords) {\n startOffset = this._flatCoords.length;\n }\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 if (typeof data[0] === 'number') {\n var len = data.length;\n // Store offset and len of each segment\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 for (var i = 0; i < len;) {\n dataCount++;\n var count = data[i++];\n // Offset\n coordsOffsetAndLenStorage[offsetCursor++] = coordsCursor + startOffset;\n // Len\n coordsOffsetAndLenStorage[offsetCursor++] = count;\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 if (__DEV__) {\n throw new Error('Invalid data format.');\n }\n }\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\n getInitialData: function (option, ecModel) {\n if (__DEV__) {\n var CoordSys = CoordinateSystem.get(option.coordinateSystem);\n if (!CoordSys) {\n throw new Error('Unkown coordinate system ' + option.coordinateSystem);\n }\n }\n\n var lineData = new List(['value'], this);\n lineData.hasItemOption = false;\n\n lineData.initData(option.data, [], function (dataItem, dimName, dataIndex, dimIndex) {\n // dataItem is simply coords\n if (dataItem instanceof Array) {\n return NaN;\n }\n else {\n lineData.hasItemOption = true;\n var value = dataItem.value;\n if (value != null) {\n return value instanceof Array ? value[dimIndex] : value;\n }\n }\n });\n\n return lineData;\n },\n\n formatTooltip: function (dataIndex) {\n var data = this.getData();\n var itemModel = data.getItemModel(dataIndex);\n var name = itemModel.get('name');\n if (name) {\n return name;\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\n return encodeHTML(html.join(' > '));\n },\n\n preventIncremental: function () {\n return !!this.get('effect.show');\n },\n\n getProgressive: function () {\n var progressive = this.option.progressive;\n if (progressive == null) {\n return this.option.large ? 1e4 : this.get('progressive');\n }\n return progressive;\n },\n\n getProgressiveThreshold: function () {\n var progressiveThreshold = this.option.progressiveThreshold;\n if (progressiveThreshold == null) {\n return this.option.large ? 2e4 : this.get('progressiveThreshold');\n }\n return progressiveThreshold;\n },\n\n defaultOption: {\n coordinateSystem: 'geo',\n zlevel: 0,\n z: 2,\n legendHoverLink: true,\n\n hoverAnimation: true,\n // Cartesian coordinate system\n xAxisIndex: 0,\n yAxisIndex: 0,\n\n symbol: ['none', 'none'],\n symbolSize: [10, 10],\n // Geo coordinate system\n geoIndex: 0,\n\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\n // Same with lineStyle.color\n // color\n },\n\n large: false,\n // Available when large is true\n largeThreshold: 2000,\n\n // If lines are polyline\n // polyline not support curveness, label, animation\n polyline: false,\n\n // If clip the overflow.\n // Available when coordinateSystem is cartesian or polar.\n clip: true,\n\n label: {\n show: false,\n position: 'end'\n // distance: 5,\n // formatter: 标签文本格式器同Tooltip.formatter不支持异步回调\n },\n\n lineStyle: {\n opacity: 0.5\n }\n }\n});\n\nexport default LinesSeries;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport * as graphic from '../../util/graphic';\nimport Line from './Line';\nimport * as zrUtil from 'zrender/src/core/util';\nimport {createSymbol} from '../../util/symbol';\nimport * as vec2 from 'zrender/src/core/vector';\nimport * as curveUtil from 'zrender/src/core/curve';\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\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 if (!zrUtil.isArray(size)) {\n size = [size, size];\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\n symbol = createSymbol(\n symbolType, -0.5, -0.5, 1, 1, color\n );\n symbol.z2 = 100;\n symbol.culling = true;\n\n this.add(symbol);\n }\n\n // Symbol may be removed if loop is false\n if (!symbol) {\n return;\n }\n\n // Shadow color is same with color in default\n symbol.setStyle('shadowColor', color);\n symbol.setStyle(effectModel.getItemStyle(['color']));\n\n symbol.attr('scale', size);\n\n symbol.setColor(color);\n symbol.attr('scale', size);\n\n this._symbolType = symbolType;\n this._symbolScale = size;\n\n this._updateEffectAnimation(lineData, effectModel, idx);\n};\n\neffectLineProto._updateEffectAnimation = function (lineData, effectModel, idx) {\n\n var symbol = this.childAt(1);\n if (!symbol) {\n return;\n }\n\n var self = this;\n\n var points = lineData.getItemLayout(idx);\n\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';\n\n // Ignore when updating\n symbol.ignore = true;\n\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\n symbol.stopAnimation();\n\n var delay = delayExpr;\n if (isDelayFunc) {\n delay = delayExpr(idx);\n }\n if (symbol.__t > 0) {\n delay = -period * symbol.__t;\n }\n symbol.__t = 0;\n var animator = symbol.animate('', loop)\n .when(period, {\n __t: 1\n })\n .delay(delay)\n .during(function () {\n self.updateSymbolPosition(symbol);\n });\n if (!loop) {\n animator.done(function () {\n self.remove(symbol);\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)\n + 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] || [\n (points[0][0] + points[1][0]) / 2,\n (points[0][1] + points[1][1]) / 2\n ];\n};\n\neffectLineProto.updateData = function (lineData, idx, seriesScope) {\n this.childAt(0).updateData(lineData, idx, seriesScope);\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);\n\n // Tangent\n var tx = quadraticDerivativeAt(p1[0], cp1[0], p2[0], t);\n var ty = quadraticDerivativeAt(p1[1], cp1[1], p2[1], t);\n\n symbol.rotation = -Math.atan2(ty, tx) - Math.PI / 2;\n // enable continuity trail for 'line', 'rect', 'roundRect' symbolType\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]);\n // make sure the last segment render within endPoint\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 }\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 }\n else {\n symbol.attr('scale', this._symbolScale);\n }\n }\n symbol.__lastT = symbol.__t;\n symbol.ignore = false;\n};\n\n\neffectLineProto.updateLayout = function (lineData, idx) {\n this.childAt(0).updateLayout(lineData, idx);\n\n var effectModel = lineData.getItemModel(idx).getModel('effect');\n this._updateEffectAnimation(lineData, effectModel, idx);\n};\n\nzrUtil.inherits(EffectLine, graphic.Group);\n\nexport default EffectLine;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport * as graphic from '../../util/graphic';\nimport * as zrUtil from 'zrender/src/core/util';\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\n var line = new graphic.Polyline({\n shape: {\n points: points\n }\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\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\n var visualColor = lineData.getItemVisual(idx, 'color');\n\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 line.useStyle(zrUtil.defaults(\n {\n strokeNoScale: true,\n fill: 'none',\n stroke: visualColor\n },\n lineStyle\n ));\n line.hoverStyle = hoverLineStyle;\n\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);\n\nexport default Polyline;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport Polyline from './Polyline';\nimport * as zrUtil from 'zrender/src/core/util';\nimport EffectLine from './EffectLine';\nimport * as vec2 from 'zrender/src/core/vector';\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;\n\n// Overwrite\neffectPolylineProto.createLine = function (lineData, idx, seriesScope) {\n return new Polyline(lineData, idx, seriesScope);\n};\n\n// Overwrite\neffectPolylineProto.updateAnimationPoints = function (symbol, points) {\n this._points = points;\n var accLenArr = [0];\n var len = 0;\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 if (len === 0) {\n return;\n }\n\n for (var i = 0; i < accLenArr.length; i++) {\n accLenArr[i] /= len;\n }\n this._offsets = accLenArr;\n this._length = len;\n};\n\n// Overwrite\neffectPolylineProto.getLineLength = function (symbol) {\n return this._length;\n};\n\n// Overwrite\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 for (frame = start; frame >= 0; frame--) {\n if (offsets[frame] <= t) {\n break;\n }\n }\n // PENDING really need to do this ?\n frame = Math.min(frame, len - 2);\n }\n else {\n for (var frame = lastFrame; frame < len; frame++) {\n if (offsets[frame] > t) {\n break;\n }\n }\n frame = Math.min(frame - 1, len - 2);\n }\n\n vec2.lerp(\n symbol.position, points[frame], points[frame + 1],\n (t - offsets[frame]) / (offsets[frame + 1] - offsets[frame])\n );\n\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\n this._lastFrame = frame;\n this._lastFramePercent = t;\n\n symbol.ignore = false;\n};\n\nzrUtil.inherits(EffectPolyline, EffectLine);\n\nexport default EffectPolyline;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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// TODO Batch by color\n\nimport * as graphic from '../../util/graphic';\nimport IncrementalDisplayable from 'zrender/src/graphic/IncrementalDisplayable';\nimport * as lineContain from 'zrender/src/contain/line';\nimport * as quadraticContain from 'zrender/src/contain/quadratic';\n\nvar LargeLineShape = graphic.extendShape({\n\n shape: {\n polyline: false,\n curveness: 0,\n segs: []\n },\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 if (count > 0) {\n path.moveTo(segs[i++], segs[i++]);\n for (var k = 1; k < count; k++) {\n path.lineTo(segs[i++], segs[i++]);\n }\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 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 }\n else {\n path.lineTo(x1, y1);\n }\n }\n }\n },\n\n findDataIndex: function (x, y) {\n\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 for (var i = 0; i < segs.length;) {\n var count = segs[i++];\n if (count > 0) {\n var x0 = segs[i++];\n var y0 = segs[i++];\n for (var k = 1; k < count; k++) {\n var x1 = segs[i++];\n var y1 = segs[i++];\n if (lineContain.containStroke(x0, y0, x1, y1)) {\n return dataIndex;\n }\n }\n }\n\n dataIndex++;\n }\n }\n else {\n var dataIndex = 0;\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 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 }\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/**\n * Update symbols draw by new data\n * @param {module:echarts/data/List} data\n */\nlargeLineProto.updateData = function (data) {\n this.group.removeAll();\n\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);\n\n // Add back\n this.group.add(lineEl);\n\n this._incremental = null;\n};\n\n/**\n * @override\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 this.group.add(this._incremental);\n }\n else {\n this._incremental = null;\n }\n};\n\n/**\n * @override\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 }\n else {\n this._incremental.addDisplayable(lineEl, true);\n }\n};\n\n/**\n * @override\n */\nlargeLineProto.remove = function () {\n this._clearIncremental();\n this._incremental = null;\n this.group.removeAll();\n};\n\nlargeLineProto._setCommon = function (lineEl, data, isIncremental) {\n var hostModel = data.hostModel;\n\n lineEl.setShape({\n polyline: hostModel.get('polyline'),\n curveness: hostModel.get('lineStyle.curveness')\n });\n\n lineEl.useStyle(\n hostModel.getModel('lineStyle').getLineStyle()\n );\n lineEl.style.strokeNoScale = true;\n\n var visualColor = data.getVisual('color');\n if (visualColor) {\n lineEl.setStyle('stroke', visualColor);\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 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 if (incremental) {\n incremental.clearDisplaybles();\n }\n};\n\nexport default LargeLineDraw;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport createRenderPlanner from '../helper/createRenderPlanner';\n\nexport default {\n seriesType: 'lines',\n\n plan: createRenderPlanner(),\n\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 if (isLarge) {\n var points;\n var segCount = params.end - params.start;\n if (isPolyline) {\n var totalCoordsCount = 0;\n for (var i = params.start; i < params.end; i++) {\n totalCoordsCount += seriesModel.getLineCoordsCount(i);\n }\n points = new Float32Array(segCount + totalCoordsCount * 2);\n }\n else {\n points = new Float32Array(segCount * 4);\n }\n\n var offset = 0;\n var pt = [];\n for (var i = params.start; i < params.end; i++) {\n var len = seriesModel.getLineCoords(i, lineCoords);\n if (isPolyline) {\n points[offset++] = len;\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 }\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\n var pts = [];\n if (isPolyline) {\n for (var j = 0; j < len; j++) {\n pts.push(coordSys.dataToPoint(lineCoords[j]));\n }\n }\n else {\n pts[0] = coordSys.dataToPoint(lineCoords[0]);\n pts[1] = coordSys.dataToPoint(lineCoords[1]);\n\n var curveness = itemModel.get('lineStyle.curveness');\n if (+curveness) {\n pts[2] = [\n (pts[0][0] + pts[1][0]) / 2 - (pts[0][1] - pts[1][1]) * curveness,\n (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 { progress: progress };\n }\n};","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {__DEV__} from '../../config';\nimport * as echarts from '../../echarts';\nimport LineDraw from '../helper/LineDraw';\nimport EffectLine from '../helper/EffectLine';\nimport Line from '../helper/Line';\nimport Polyline from '../helper/Polyline';\nimport EffectPolyline from '../helper/EffectPolyline';\nimport LargeLineDraw from '../helper/LargeLineDraw';\nimport linesLayout from './linesLayout';\nimport {createClipPath} from '../helper/createClipPathFromCoordSys';\n\nexport default echarts.extendChartView({\n\n type: 'lines',\n\n init: function () {},\n\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\n var zr = api.getZr();\n // Avoid the drag cause ghost shadow\n // FIXME Better way ?\n // SVG doesn't support\n var isSvg = zr.painter.getType() === 'svg';\n if (!isSvg) {\n zr.painter.getLayer(zlevel).clear(true);\n }\n // Config layer with motion blur\n if (this._lastZlevel != null && !isSvg) {\n zr.configLayer(this._lastZlevel, {\n motionBlur: false\n });\n }\n if (this._showEffect(seriesModel) && trailLength) {\n if (__DEV__) {\n var notInIndividual = false;\n ecModel.eachSeries(function (otherSeriesModel) {\n if (otherSeriesModel !== seriesModel && otherSeriesModel.get('zlevel') === zlevel) {\n notInIndividual = true;\n }\n });\n notInIndividual && console.warn('Lines with trail effect should have an individual zlevel');\n }\n\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\n var clipPath = seriesModel.get('clip', true) && createClipPath(\n seriesModel.coordinateSystem, false, seriesModel\n );\n if (clipPath) {\n this.group.setClipPath(clipPath);\n }\n else {\n this.group.removeClipPath();\n }\n\n this._lastZlevel = zlevel;\n\n this._finished = true;\n },\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\n incrementalRender: function (taskParams, seriesModel, ecModel) {\n this._lineDraw.incrementalUpdate(taskParams, seriesModel.getData());\n\n this._finished = taskParams.end === seriesModel.getData().count();\n },\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 }\n else {\n // TODO Use same logic with ScatterView.\n // Manually update layout\n var res = linesLayout.reset(seriesModel);\n if (res.progress) {\n res.progress({ start: 0, end: data.count() }, data);\n }\n this._lineDraw.updateLayout();\n this._clearLayer(api);\n }\n },\n\n _updateLineDraw: function (data, seriesModel) {\n var lineDraw = this._lineDraw;\n var hasEffect = this._showEffect(seriesModel);\n var isPolyline = !!seriesModel.get('polyline');\n var pipelineContext = seriesModel.pipelineContext;\n var isLargeDraw = pipelineContext.large;\n\n if (__DEV__) {\n if (hasEffect && isLargeDraw) {\n console.warn('Large lines not support effect');\n }\n }\n if (!lineDraw\n || hasEffect !== this._hasEffet\n || isPolyline !== this._isPolyline\n || isLargeDraw !== this._isLargeDraw\n ) {\n if (lineDraw) {\n lineDraw.remove();\n }\n lineDraw = this._lineDraw = isLargeDraw\n ? new LargeLineDraw()\n : new LineDraw(\n isPolyline\n ? (hasEffect ? EffectPolyline : Polyline)\n : (hasEffect ? EffectLine : Line)\n );\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\n return lineDraw;\n },\n\n _showEffect: function (seriesModel) {\n return !!seriesModel.get('effect.show');\n },\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 if (!isSvg && this._lastZlevel != null) {\n zr.painter.getLayer(this._lastZlevel).clear(true);\n }\n },\n\n remove: function (ecModel, api) {\n this._lineDraw && this._lineDraw.remove();\n this._lineDraw = null;\n // Clear motion when lineDraw is removed\n this._clearLayer(api);\n },\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\n\nfunction normalize(a) {\n if (!(a instanceof Array)) {\n a = [a, a];\n }\n return a;\n}\n\nvar opacityQuery = 'lineStyle.opacity'.split('.');\n\nexport 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\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\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\n data.setItemVisual(idx, 'opacity', opacity);\n }\n\n return {dataEach: data.hasItemOption ? dataEach : null};\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\nimport * as echarts from '../echarts';\n\nimport './lines/LinesSeries';\nimport './lines/LinesView';\n\nimport linesLayout from './lines/linesLayout';\nimport linesVisual from './lines/linesVisual';\n\necharts.registerLayout(linesLayout);\necharts.registerVisual(linesVisual);","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport SeriesModel from '../../model/Series';\nimport createListFromArray from '../helper/createListFromArray';\nimport CoordinateSystem from '../../CoordinateSystem';\n\nexport default SeriesModel.extend({\n type: 'series.heatmap',\n\n getInitialData: function (option, ecModel) {\n return createListFromArray(this.getSource(), this, {\n generateCoord: 'value'\n });\n },\n\n preventIncremental: function () {\n var coordSysCreator = CoordinateSystem.get(this.get('coordinateSystem'));\n if (coordSysCreator && coordSysCreator.dimensions) {\n return coordSysCreator.dimensions[0] === 'lng' && coordSysCreator.dimensions[1] === 'lat';\n }\n },\n\n defaultOption: {\n\n // Cartesian2D or geo\n coordinateSystem: 'cartesian2d',\n\n zlevel: 0,\n\n z: 2,\n\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n\n // Geo coordinate system\n geoIndex: 0,\n\n blurSize: 30,\n\n pointSize: 20,\n\n maxOpacity: 1,\n\n minOpacity: 0\n }\n});","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport * as zrUtil from 'zrender/src/core/util';\n\nvar GRADIENT_LEVELS = 256;\n\n/**\n * Heatmap Chart\n *\n * @class\n */\nfunction Heatmap() {\n var canvas = zrUtil.createCanvas();\n this.canvas = canvas;\n\n this.blurSize = 30;\n this.pointSize = 20;\n\n this.maxOpacity = 1;\n this.minOpacity = 0;\n\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 var gradientInRange = this._getGradient(data, colorFunc, 'inRange');\n var gradientOutOfRange = this._getGradient(data, colorFunc, 'outOfRange');\n var r = this.pointSize + this.blurSize;\n\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 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];\n\n // calculate alpha using value\n var alpha = normalize(value);\n\n // draw with the circle brush with alpha\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 }\n\n // colorize the canvas using alpha value and set with gradient\n var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n\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;\n // Simple optimize to ignore the empty data\n if (alpha > 0) {\n var gradient = isInRange(alpha) ? gradientInRange : gradientOutOfRange;\n // Any alpha > 0 will be mapped to [minOpacity, maxOpacity]\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 }\n else {\n offset += 4;\n }\n }\n ctx.putImageData(imageData, 0, 0);\n\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());\n // set brush size\n var r = this.pointSize + this.blurSize;\n var d = r * 2;\n brushCanvas.width = d;\n brushCanvas.height = d;\n\n var ctx = brushCanvas.getContext('2d');\n ctx.clearRect(0, 0, d, d);\n\n // 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 ctx.shadowOffsetX = d;\n ctx.shadowBlur = this.blurSize;\n // draw the shadow in black, and use alpha and shadow blur to generate\n // color in color map\n ctx.shadowColor = '#000';\n\n // draw circle in the left to the canvas\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 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 return pixelsSingleState;\n }\n};\n\nexport default Heatmap;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {__DEV__} from '../../config';\nimport * as echarts from '../../echarts';\nimport * as graphic from '../../util/graphic';\nimport HeatmapLayer from './HeatmapLayer';\nimport * as zrUtil from 'zrender/src/core/util';\n\nfunction getIsInPiecewiseRange(dataExtent, pieceList, selected) {\n var dataSpan = dataExtent[1] - dataExtent[0];\n pieceList = zrUtil.map(pieceList, function (piece) {\n return {\n interval: [\n (piece.interval[0] - dataExtent[0]) / dataSpan,\n (piece.interval[1] - dataExtent[0]) / dataSpan\n ]\n };\n });\n var len = pieceList.length;\n var lastIndex = 0;\n\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 if (interval[0] <= val && val <= interval[1]) {\n lastIndex = i;\n break;\n }\n }\n if (i === len) { // Not found, back interation\n for (var i = lastIndex - 1; i >= 0; i--) {\n var interval = pieceList[i].interval;\n if (interval[0] <= val && val <= interval[1]) {\n lastIndex = i;\n break;\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 = [\n (range[0] - dataExtent[0]) / dataSpan,\n (range[1] - dataExtent[0]) / dataSpan\n ];\n return function (val) {\n return val >= range[0] && val <= range[1];\n };\n}\n\nfunction isGeoCoordSys(coordSys) {\n var dimensions = coordSys.dimensions;\n // Not use coorSys.type === 'geo' because coordSys maybe extended\n return dimensions[0] === 'lng' && dimensions[1] === 'lat';\n}\n\nexport default echarts.extendChartView({\n\n type: 'heatmap',\n\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\n if (__DEV__) {\n if (!visualMapOfThisSeries) {\n throw new Error('Heatmap must use with visualMap');\n }\n }\n\n this.group.removeAll();\n\n this._incrementalDisplayable = null;\n\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys.type === 'cartesian2d' || coordSys.type === 'calendar') {\n this._renderOnCartesianAndCalendar(seriesModel, api, 0, seriesModel.getData().count());\n }\n else if (isGeoCoordSys(coordSys)) {\n this._renderOnGeo(\n coordSys, seriesModel, visualMapOfThisSeries, api\n );\n }\n },\n\n incrementalPrepareRender: function (seriesModel, ecModel, api) {\n this.group.removeAll();\n },\n\n incrementalRender: function (params, seriesModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys) {\n this._renderOnCartesianAndCalendar(seriesModel, api, params.start, params.end, true);\n }\n },\n\n _renderOnCartesianAndCalendar: function (seriesModel, api, start, end, incremental) {\n\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\n if (__DEV__) {\n if (!(xAxis.type === 'category' && yAxis.type === 'category')) {\n throw new Error('Heatmap on cartesian must have two category axes');\n }\n if (!(xAxis.onBand && yAxis.onBand)) {\n throw new Error('Heatmap on cartesian must have two axes with boundaryGap true');\n }\n }\n\n width = xAxis.getBandWidth();\n height = yAxis.getBandWidth();\n }\n\n var group = this.group;\n var data = seriesModel.getData();\n\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\n\n var dataDims = coordSysType === 'cartesian2d'\n ? [\n data.mapDimension('x'),\n data.mapDimension('y'),\n data.mapDimension('value')\n ]\n : [\n data.mapDimension('time'),\n data.mapDimension('value')\n ];\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([\n data.get(dataDims[0], idx),\n data.get(dataDims[1], idx)\n ]);\n\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 }\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);\n\n // Optimization for large datset\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 if (rawValue && rawValue[2] != null) {\n defaultText = rawValue[2];\n }\n\n graphic.setLabelStyle(\n style, hoverStl, labelModel, hoverLabelModel,\n {\n labelFetcher: seriesModel,\n labelDataIndex: idx,\n defaultText: defaultText,\n isRectText: true\n }\n );\n\n rect.setStyle(style);\n graphic.setHoverStyle(rect, data.hasItemOption ? hoverStl : zrUtil.extend({}, hoverStl));\n\n rect.incremental = incremental;\n // PENDING\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\n _renderOnGeo: function (geo, seriesModel, visualMapModel, api) {\n var inRangeVisuals = visualMapModel.targetVisuals.inRange;\n var outOfRangeVisuals = visualMapModel.targetVisuals.outOfRange;\n // 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\n var rect = geo.getViewRect().clone();\n var roamTransform = geo.getRoamTransform();\n rect.applyTransform(roamTransform);\n\n // Clamp on viewport\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\n var dims = [\n data.mapDimension('lng'),\n data.mapDimension('lat'),\n data.mapDimension('value')\n ];\n\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\n var dataExtent = visualMapModel.getExtent();\n var isInRange = visualMapModel.type === 'visualMap.continuous'\n ? getIsInContinuousRange(dataExtent, visualMapModel.option.range)\n : getIsInPiecewiseRange(\n dataExtent, visualMapModel.getPieceList(), visualMapModel.option.selected\n );\n\n hmLayer.update(\n points, width, height,\n inRangeVisuals.color.getNormalizer(),\n {\n inRange: inRangeVisuals.color.getColorMapper(),\n outOfRange: outOfRangeVisuals.color.getColorMapper()\n },\n isInRange\n );\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\n dispose: 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\nimport './heatmap/HeatmapSeries';\nimport './heatmap/HeatmapView';","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport BaseBarSeries from './BaseBarSeries';\n\nvar PictorialBarSeries = BaseBarSeries.extend({\n\n type: 'series.pictorialBar',\n\n dependencies: ['grid'],\n\n defaultOption: {\n symbol: 'circle', // Customized bar shape\n symbolSize: null, // Can be ['100%', '100%'], null means auto.\n symbolRotate: null,\n\n symbolPosition: null, // 'start' or 'end' or 'center', null means auto.\n symbolOffset: null,\n symbolMargin: null, // start margin and end margin. Can be a number or a percent string.\n // Auto margin by default.\n symbolRepeat: false, // 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', // 'end' means from 'start' to 'end'.\n\n symbolClip: false,\n symbolBoundingData: null, // Can be 60 or -40 or [-40, 60]\n symbolPatternSize: 400, // 400 * 400 px\n\n barGap: '-100%', // In most case, overlap is needed.\n\n // z can be set in data item, which is z2 actually.\n\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});\n\nexport default PictorialBarSeries;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../../util/graphic';\nimport {createSymbol} from '../../util/symbol';\nimport {parsePercent, isNumeric} from '../../util/number';\nimport {setLabel} from './helper';\n\n\nvar BAR_BORDER_WIDTH_QUERY = ['itemStyle', 'borderWidth'];\n\n// index: +isHorizontal\nvar LAYOUT_ATTRS = [\n {xy: 'x', wh: 'width', index: 0, posDesc: ['left', 'right']},\n {xy: 'y', wh: 'height', index: 1, posDesc: ['top', 'bottom']}\n];\n\nvar pathForLineWidth = new graphic.Circle();\n\nvar BarView = echarts.extendChartView({\n\n type: 'pictorialBar',\n\n render: function (seriesModel, ecModel, api) {\n var group = this.group;\n var data = seriesModel.getData();\n var oldData = this._data;\n\n var cartesian = seriesModel.coordinateSystem;\n var baseAxis = cartesian.getBaseAxis();\n var isHorizontal = !!baseAxis.isHorizontal();\n var coordSysRect = cartesian.grid.getRect();\n\n var opt = {\n ecSize: {width: api.getWidth(), height: api.getHeight()},\n seriesModel: seriesModel,\n coordSys: cartesian,\n coordSysExtent: [\n [coordSysRect.x, coordSysRect.x + coordSysRect.width],\n [coordSysRect.y, coordSysRect.y + coordSysRect.height]\n ],\n isHorizontal: isHorizontal,\n valueDim: LAYOUT_ATTRS[+isHorizontal],\n categoryDim: LAYOUT_ATTRS[1 - isHorizontal]\n };\n\n data.diff(oldData)\n .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\n var bar = createBar(data, opt, symbolMeta);\n\n data.setItemGraphicEl(dataIndex, bar);\n group.add(bar);\n\n updateCommon(bar, opt, symbolMeta);\n })\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\n var pictorialShapeStr = getShapeStr(data, symbolMeta);\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 }\n else {\n bar = createBar(data, opt, symbolMeta, true);\n }\n\n data.setItemGraphicEl(newIndex, bar);\n bar.__pictorialSymbolMeta = symbolMeta;\n // Add back\n group.add(bar);\n\n updateCommon(bar, opt, symbolMeta);\n })\n .remove(function (dataIndex) {\n var bar = oldData.getItemGraphicEl(dataIndex);\n bar && removeBar(oldData, dataIndex, bar.__pictorialSymbolMeta.animationModel, bar);\n })\n .execute();\n\n this._data = data;\n\n return this.group;\n },\n\n dispose: zrUtil.noop,\n\n remove: function (ecModel, api) {\n var group = this.group;\n var data = this._data;\n if (ecModel.get('animation')) {\n if (data) {\n data.eachItemGraphicEl(function (bar) {\n removeBar(data, bar.dataIndex, ecModel, bar);\n });\n }\n }\n else {\n group.removeAll();\n }\n }\n});\n\n\n// Set or calculate default value about symbol, and calculate layout info.\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\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\n prepareBarLength(itemModel, symbolRepeat, layout, opt, symbolMeta);\n\n prepareSymbolSize(\n data, dataIndex, layout, symbolRepeat, symbolClip, symbolMeta.boundingLength,\n symbolMeta.pxSign, symbolPatternSize, opt, symbolMeta\n );\n\n prepareLineWidth(itemModel, symbolMeta.symbolScale, rotation, opt, symbolMeta);\n\n var symbolSize = symbolMeta.symbolSize;\n var symbolOffset = itemModel.get('symbolOffset');\n if (zrUtil.isArray(symbolOffset)) {\n symbolOffset = [\n parsePercent(symbolOffset[0], symbolSize[0]),\n parsePercent(symbolOffset[1], symbolSize[1])\n ];\n }\n\n prepareLayoutInfo(\n itemModel, symbolSize, layout, symbolRepeat, symbolClip, symbolOffset,\n symbolPosition, symbolMeta.valueLineWidth, symbolMeta.boundingLength, symbolMeta.repeatCutLength,\n opt, symbolMeta\n );\n\n return symbolMeta;\n}\n\n// bar length can be negative.\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 = [\n convertToCoordOnAxis(valueAxis, symbolBoundingData[0]) - zeroPx,\n convertToCoordOnAxis(valueAxis, symbolBoundingData[1]) - zeroPx\n ];\n symbolBoundingExtent[1] < symbolBoundingExtent[0] && (symbolBoundingExtent.reverse());\n boundingLength = symbolBoundingExtent[pxSignIdx];\n }\n else if (symbolBoundingData != null) {\n boundingLength = convertToCoordOnAxis(valueAxis, symbolBoundingData) - zeroPx;\n }\n else if (symbolRepeat) {\n boundingLength = opt.coordSysExtent[valueDim.index][pxSignIdx] - zeroPx;\n }\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}\n\n// Support ['100%', '100%']\nfunction prepareSymbolSize(\n data, dataIndex, layout, symbolRepeat, symbolClip, boundingLength,\n pxSign, symbolPatternSize, opt, output\n) {\n var valueDim = opt.valueDim;\n var categoryDim = opt.categoryDim;\n var categorySize = Math.abs(layout[categoryDim.wh]);\n\n var symbolSize = data.getItemVisual(dataIndex, 'symbolSize');\n if (zrUtil.isArray(symbolSize)) {\n symbolSize = symbolSize.slice();\n }\n else {\n if (symbolSize == null) {\n symbolSize = '100%';\n }\n symbolSize = [symbolSize, symbolSize];\n }\n\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 symbolSize[categoryDim.index] = parsePercent(\n symbolSize[categoryDim.index],\n categorySize\n );\n symbolSize[valueDim.index] = parsePercent(\n symbolSize[valueDim.index],\n symbolRepeat ? categorySize : Math.abs(boundingLength)\n );\n\n output.symbolSize = symbolSize;\n\n // If x or y is less than zero, show reversed shape.\n var symbolScale = output.symbolScale = [\n symbolSize[0] / symbolPatternSize,\n symbolSize[1] / symbolPatternSize\n ];\n // Follow convention, 'right' and 'top' is the normal scale.\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(\n itemModel, symbolSize, layout, symbolRepeat, symbolClip, symbolOffset,\n symbolPosition, valueLineWidth, boundingLength, repeatCutLength, opt, output\n) {\n var categoryDim = opt.categoryDim;\n var valueDim = opt.valueDim;\n var pxSign = output.pxSign;\n\n var unitLength = Math.max(symbolSize[valueDim.index] + valueLineWidth, 0);\n var pathLen = unitLength;\n\n // 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\n var symbolMargin = zrUtil.retrieve(itemModel.get('symbolMargin'), '15%') + '';\n var hasEndGap = false;\n if (symbolMargin.lastIndexOf('!') === symbolMargin.length - 1) {\n hasEndGap = true;\n symbolMargin = symbolMargin.slice(0, symbolMargin.length - 1);\n }\n symbolMargin = parsePercent(symbolMargin, symbolSize[valueDim.index]);\n\n var uLenWithMargin = Math.max(unitLength + symbolMargin * 2, 0);\n\n // 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 var endFix = hasEndGap ? 0 : symbolMargin * 2;\n\n // Both final repeatTimes and final symbolMargin area calculated based on\n // boundingLength.\n var repeatSpecified = isNumeric(symbolRepeat);\n var repeatTimes = repeatSpecified\n ? symbolRepeat\n : toIntTimes((absBoundingLength + endFix) / uLenWithMargin);\n\n // Adjust calculate margin, to ensure each symbol is displayed\n // entirely in the given layout area.\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;\n\n // Update repeatTimes when not all symbol will be shown.\n if (!repeatSpecified && symbolRepeat !== 'fixed') {\n repeatTimes = repeatCutLength\n ? toIntTimes((Math.abs(repeatCutLength) + endFix) / uLenWithMargin)\n : 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'\n ? sizeFix\n : symbolPosition === 'end'\n ? boundingLength - sizeFix\n : boundingLength / 2; // 'center'\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\n var barRectShape = output.barRectShape = zrUtil.extend({}, layout);\n barRectShape[valueDim.wh] = pxSign * Math.max(\n Math.abs(layout[valueDim.wh]), Math.abs(pathPosition[valueDim.index] + sizeFix)\n );\n barRectShape[categoryDim.wh] = layout[categoryDim.wh];\n\n var clipShape = output.clipShape = {};\n // Consider that symbol may be overflow layout rect.\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(\n // Consider texture img, make a big size.\n symbolMeta.symbolType,\n -symbolPatternSize / 2,\n -symbolPatternSize / 2,\n symbolPatternSize,\n symbolPatternSize,\n symbolMeta.color\n );\n path.attr({\n culling: true\n });\n path.type !== 'image' && path.setStyle({\n strokeNoScale: true\n });\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\n var index = 0;\n var unit = symbolSize[opt.valueDim.index] + valueLineWidth + symbolMeta.symbolMargin * 2;\n\n eachPath(bar, function (path) {\n path.__pictorialAnimationIndex = index;\n path.__pictorialRepeatTimes = repeatTimes;\n if (index < repeatTimes) {\n updateAttr(path, null, makeTarget(index), symbolMeta, isUpdate);\n }\n else {\n updateAttr(path, null, {scale: [0, 0]}, symbolMeta, isUpdate, function () {\n bundle.remove(path);\n });\n }\n\n updateHoverAnimation(path, symbolMeta);\n\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\n var target = makeTarget(index);\n\n updateAttr(\n path,\n {\n position: target.position,\n scale: [0, 0]\n },\n {\n scale: target.scale,\n rotation: target.rotation\n },\n symbolMeta,\n isUpdate\n );\n\n // FIXME\n // If all emphasis/normal through action.\n path\n .on('mouseover', onMouseOver)\n .on('mouseout', onMouseOut);\n\n updateHoverAnimation(path, symbolMeta);\n }\n\n function makeTarget(index) {\n var position = pathPosition.slice();\n // (start && pxSign > 0) || (end && pxSign < 0): i = repeatTimes - index\n // Otherwise: i = index;\n var pxSign = symbolMeta.pxSign;\n var i = index;\n if (symbolMeta.symbolRepeatDirection === 'start' ? pxSign > 0 : pxSign < 0) {\n i = repeatTimes - 1 - index;\n }\n position[valueDim.index] = unit * (i - repeatTimes / 2 + 0.5) + pathPosition[valueDim.index];\n\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\n updateAttr(\n mainPath,\n {\n position: symbolMeta.pathPosition.slice(),\n scale: [0, 0],\n rotation: symbolMeta.rotation\n },\n {\n scale: symbolMeta.symbolScale.slice()\n },\n symbolMeta,\n isUpdate\n );\n\n mainPath\n .on('mouseover', onMouseOver)\n .on('mouseout', onMouseOut);\n }\n else {\n updateAttr(\n mainPath,\n null,\n {\n position: symbolMeta.pathPosition.slice(),\n scale: symbolMeta.symbolScale.slice(),\n rotation: symbolMeta.rotation\n },\n symbolMeta,\n isUpdate\n );\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}\n\n// bar rect is used for label.\nfunction createOrUpdateBarRect(bar, symbolMeta, isUpdate) {\n var rectShape = zrUtil.extend({}, symbolMeta.barRectShape);\n\n var barRect = bar.__pictorialBarRect;\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\n bar.add(barRect);\n }\n else {\n updateAttr(barRect, null, {shape: rectShape}, 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(\n clipPath, {shape: clipShape}, animationModel, dataIndex\n );\n }\n else {\n clipShape[valueDim.wh] = 0;\n clipPath = new graphic.Rect({shape: clipShape});\n bar.__pictorialBundle.setClipPath(clipPath);\n bar.__pictorialClipPath = clipPath;\n\n var target = {};\n target[valueDim.wh] = symbolMeta.clipShape[valueDim.wh];\n\n graphic[isUpdate ? 'updateProps' : 'initProps'](\n clipPath, {shape: target}, animationModel, dataIndex\n );\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\n var scale = symbolMeta.symbolScale.slice();\n\n symbolMeta.hoverAnimation && path\n .on('emphasis', function () {\n this.animateTo({\n scale: [scale[0] * 1.1, scale[1] * 1.1]\n }, 400, 'elasticOut');\n })\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();\n // bundle is used for location and clip.\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 }\n else {\n createOrUpdateSingleSymbol(bar, opt, symbolMeta);\n }\n\n createOrUpdateBarRect(bar, symbolMeta, isUpdate);\n\n createOrUpdateClip(bar, opt, symbolMeta, isUpdate);\n\n bar.__pictorialShapeStr = getShapeStr(data, symbolMeta);\n bar.__pictorialSymbolMeta = symbolMeta;\n\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\n graphic.updateProps(\n bundle, {position: symbolMeta.bundlePosition.slice()}, animationModel, dataIndex\n );\n\n if (symbolMeta.symbolRepeat) {\n createOrUpdateRepeatSymbols(bar, opt, symbolMeta, true);\n }\n else {\n createOrUpdateSingleSymbol(bar, opt, symbolMeta, true);\n }\n\n createOrUpdateBarRect(bar, symbolMeta, true);\n\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\n var pathes = [];\n eachPath(bar, function (path) {\n pathes.push(path);\n });\n bar.__pictorialMainPath && pathes.push(bar.__pictorialMainPath);\n\n // I do not find proper remove animation for clip yet.\n bar.__pictorialClipPath && (animationModel = null);\n\n zrUtil.each(pathes, function (path) {\n graphic.updateProps(\n path, {scale: [0, 0]}, animationModel, dataIndex,\n function () {\n bar.parent && bar.parent.remove(bar);\n }\n );\n });\n\n data.setItemGraphicEl(dataIndex, null);\n}\n\nfunction getShapeStr(data, symbolMeta) {\n return [\n data.getItemVisual(symbolMeta.dataIndex, 'symbol') || 'none',\n !!symbolMeta.symbolRepeat,\n !!symbolMeta.symbolClip\n ].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);\n // when symbolCip used, only clip path has init animation, otherwise it would be weird effect.\n if (symbolMeta.symbolClip && !isUpdate) {\n animationAttrs && el.attr(animationAttrs);\n }\n else {\n animationAttrs && graphic[isUpdate ? 'updateProps' : 'initProps'](\n el, animationAttrs, symbolMeta.animationModel, symbolMeta.dataIndex, cb\n );\n }\n}\n\nfunction updateCommon(bar, opt, symbolMeta) {\n var color = symbolMeta.color;\n var dataIndex = symbolMeta.dataIndex;\n var itemModel = symbolMeta.itemModel;\n // Color must be excluded.\n // Because symbol provide setColor individually to set fill and stroke\n var normalStyle = itemModel.getModel('itemStyle').getItemStyle(['color']);\n var hoverStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle();\n var cursorStyle = itemModel.getShallow('cursor');\n\n eachPath(bar, function (path) {\n // PENDING setColor should be before setStyle!!!\n path.setColor(color);\n path.setStyle(zrUtil.defaults(\n {\n fill: color,\n opacity: symbolMeta.opacity\n },\n normalStyle\n ));\n graphic.setHoverStyle(path, hoverStyle);\n\n cursorStyle && (path.cursor = cursorStyle);\n path.z2 = symbolMeta.z2;\n });\n\n var barRectHoverStyle = {};\n var barPositionOutside = opt.valueDim.posDesc[+(symbolMeta.boundingLength > 0)];\n var barRect = bar.__pictorialBarRect;\n\n setLabel(\n barRect.style, barRectHoverStyle, itemModel,\n color, opt.seriesModel, dataIndex, barPositionOutside\n );\n\n graphic.setHoverStyle(barRect, barRectHoverStyle);\n}\n\nfunction toIntTimes(times) {\n var roundedTimes = Math.round(times);\n // Escapse accurate error\n return Math.abs(times - roundedTimes) < 1e-4\n ? roundedTimes\n : Math.ceil(times);\n}\n\nexport default BarView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\n\nimport '../coord/cartesian/Grid';\nimport './bar/PictorialBarSeries';\nimport './bar/PictorialBarView';\n\nimport { layout } from '../layout/barGrid';\nimport visualSymbol from '../visual/symbol';\n\n// In case developer forget to include grid component\nimport '../component/gridSimple';\n\necharts.registerLayout(zrUtil.curry(\n layout, 'pictorialBar'\n));\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\nimport * as zrUtil from 'zrender/src/core/util';\nimport Axis from '../Axis';\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.<number>} coordExtent\n * @param {string} axisType\n * @param {string} position\n */\nvar SingleAxis = function (dim, scale, coordExtent, axisType, position) {\n\n Axis.call(this, dim, scale, coordExtent);\n\n /**\n * Axis type\n * - 'category'\n * - 'value'\n * - 'time'\n * - 'log'\n * @type {string}\n */\n this.type = axisType || 'value';\n\n /**\n * Axis position\n * - 'top'\n * - 'bottom'\n * - 'left'\n * - 'right'\n * @type {string}\n */\n this.position = position || 'bottom';\n\n /**\n * Axis orient\n * - 'horizontal'\n * - 'vertical'\n * @type {[type]}\n */\n this.orient = null;\n\n};\n\nSingleAxis.prototype = {\n\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 /**\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\n};\n\nzrUtil.inherits(SingleAxis, Axis);\n\nexport default SingleAxis;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport SingleAxis from './SingleAxis';\nimport * as axisHelper from '../axisHelper';\nimport {getLayoutRect} from '../../util/layout';\nimport {each} from 'zrender/src/core/util';\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 /**\n * @type {string}\n * @readOnly\n */\n this.dimension = 'single';\n\n /**\n * Add it just for draw tooltip.\n *\n * @type {Array.<string>}\n * @readOnly\n */\n this.dimensions = ['single'];\n\n /**\n * @private\n * @type {module:echarts/coord/single/SingleAxis}.\n */\n this._axis = null;\n\n /**\n * @private\n * @type {module:zrender/core/BoundingRect}\n */\n this._rect;\n\n this._init(axisModel, ecModel, api);\n\n /**\n * @type {module:echarts/coord/single/AxisModel}\n */\n this.model = axisModel;\n}\n\nSingle.prototype = {\n\n type: 'singleAxis',\n\n axisPointerEnabled: true,\n\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\n var dim = this.dimension;\n\n var axis = new SingleAxis(\n dim,\n axisHelper.createScaleByModel(axisModel),\n [0, 0],\n axisModel.get('type'),\n axisModel.get('position')\n );\n\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\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 {\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 {\n width: api.getWidth(),\n height: api.getHeight()\n }\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\n var rect = this._rect;\n var axis = this._axis;\n\n var isHorizontal = axis.isHorizontal();\n var extent = isHorizontal ? [0, rect.width] : [0, rect.height];\n var idx = axis.reverse ? 1 : 0;\n\n axis.setExtent(extent[idx], extent[1 - idx]);\n\n this._updateAxisTransform(axis, isHorizontal ? rect.x : rect.y);\n\n },\n\n /**\n * @param {module:echarts/coord/single/SingleAxis} axis\n * @param {number} coordBase\n */\n _updateAxisTransform: function (axis, coordBase) {\n\n var axisExtent = axis.getExtent();\n var extentSum = axisExtent[0] + axisExtent[1];\n var isHorizontal = axis.isHorizontal();\n\n axis.toGlobalCoord = isHorizontal\n ? function (coord) {\n return coord + coordBase;\n }\n : function (coord) {\n return extentSum - coord + coordBase;\n };\n\n axis.toLocalCoord = isHorizontal\n ? function (coord) {\n return coord - coordBase;\n }\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.<module:echarts/coord/Axis>}\n */\n getAxes: function () {\n return [this._axis];\n },\n\n /**\n * @return {Object} {baseAxes: [], otherAxes: []}\n */\n getTooltipAxes: function () {\n return {baseAxes: [this.getAxis()]};\n },\n\n /**\n * If contain point.\n *\n * @param {Array.<number>} 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 if (orient === 'horizontal') {\n return axis.contain(axis.toLocalCoord(point[0]))\n && (point[1] >= rect.y && point[1] <= (rect.y + rect.height));\n }\n else {\n return axis.contain(axis.toLocalCoord(point[1]))\n && (point[0] >= rect.y && point[0] <= (rect.y + rect.height));\n }\n },\n\n /**\n * @param {Array.<number>} point\n * @return {Array.<number>}\n */\n pointToData: function (point) {\n var axis = this.getAxis();\n return [axis.coordToData(axis.toLocalCoord(\n point[axis.orient === 'horizontal' ? 0 : 1]\n ))];\n },\n\n /**\n * Convert the series data to concrete point.\n *\n * @param {number|Array.<number>} val\n * @return {Array.<number>}\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\n};\n\nexport default Single;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport Single from './Single';\nimport CoordinateSystem from '../../CoordinateSystem';\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.<module:echarts/coord/single/Single>}\n */\nfunction create(ecModel, api) {\n var singles = [];\n\n ecModel.eachComponent('singleAxis', function (axisModel, idx) {\n\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 });\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\n return singles;\n}\n\nCoordinateSystem.register('single', {\n create: create,\n dimensions: Single.prototype.dimensions\n});","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\n\n/**\n * @param {Object} opt {labelInside}\n * @return {Object} {\n * position, rotation, labelDirection, labelOffset,\n * tickDirection, labelRotate, z2\n * }\n */\nexport function layout(axisModel, opt) {\n opt = opt || {};\n var single = axisModel.coordinateSystem;\n var axis = axisModel.axis;\n var layout = {};\n\n var axisPosition = axis.position;\n var orient = axis.orient;\n\n var rect = single.getRect();\n var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height];\n\n var positionMap = {\n horizontal: {top: rectBound[2], bottom: rectBound[3]},\n vertical: {left: rectBound[0], right: rectBound[1]}\n };\n\n layout.position = [\n orient === 'vertical'\n ? positionMap.vertical[axisPosition]\n : rectBound[0],\n orient === 'horizontal'\n ? positionMap.horizontal[axisPosition]\n : rectBound[3]\n ];\n\n var r = {horizontal: 0, vertical: 1};\n layout.rotation = Math.PI / 2 * r[orient];\n\n var directionMap = {top: -1, bottom: 1, right: 1, left: -1};\n\n layout.labelDirection = layout.tickDirection =\n 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\n layout.z2 = 1;\n\n return 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\nimport * as zrUtil from 'zrender/src/core/util';\nimport AxisBuilder from './AxisBuilder';\nimport * as graphic from '../../util/graphic';\nimport * as singleAxisHelper from '../../coord/single/singleAxisHelper';\nimport AxisView from './AxisView';\nimport {rectCoordAxisBuildSplitArea, rectCoordAxisHandleRemove} from './axisSplitHelper';\n\nvar axisBuilderAttrs = [\n 'axisLine', 'axisTickLabel', 'axisName'\n];\n\nvar selfBuilderAttrs = ['splitArea', 'splitLine'];\n\nvar SingleAxisView = AxisView.extend({\n\n type: 'singleAxis',\n\n axisPointerClass: 'SingleAxisPointer',\n\n render: function (axisModel, ecModel, api, payload) {\n\n var group = this.group;\n\n group.removeAll();\n\n var oldAxisGroup = this._axisGroup;\n this._axisGroup = new graphic.Group();\n\n var layout = singleAxisHelper.layout(axisModel);\n\n var axisBuilder = new AxisBuilder(axisModel, layout);\n\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n\n group.add(this._axisGroup);\n group.add(axisBuilder.getGroup());\n\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (axisModel.get(name + '.show')) {\n this['_' + name](axisModel);\n }\n }, this);\n\n graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);\n\n SingleAxisView.superCall(this, 'render', axisModel, ecModel, api, payload);\n },\n\n remove: function () {\n rectCoordAxisHandleRemove(this);\n },\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\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n\n var gridRect = axisModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n\n var splitLines = [];\n var lineCount = 0;\n\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitLineModel\n });\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 if (isHorizontal) {\n p1[0] = tickCoord;\n p1[1] = gridRect.y;\n p2[0] = tickCoord;\n p2[1] = gridRect.y + gridRect.height;\n }\n else {\n p1[0] = gridRect.x;\n p1[1] = tickCoord;\n p2[0] = gridRect.x + gridRect.width;\n p2[1] = tickCoord;\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\n _splitArea: function (axisModel) {\n rectCoordAxisBuildSplitArea(this, this._axisGroup, axisModel, axisModel);\n }\n});\n\nexport default SingleAxisView;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport ComponentModel from '../../model/Component';\nimport axisModelCreator from '../axisModelCreator';\nimport axisModelCommonMixin from '../axisModelCommonMixin';\n\nvar AxisModel = ComponentModel.extend({\n\n type: 'singleAxis',\n\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\n});\n\nvar defaultOption = {\n\n left: '5%',\n top: '5%',\n right: '5%',\n bottom: '5%',\n\n type: 'value',\n\n position: 'bottom',\n\n orient: 'horizontal',\n\n axisLine: {\n show: true,\n lineStyle: {\n width: 1,\n type: 'solid'\n }\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\n axisTick: {\n show: true,\n length: 6,\n lineStyle: {\n width: 1\n }\n },\n\n axisLabel: {\n show: true,\n interval: 'auto'\n },\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);\n\naxisModelCreator('single', AxisModel, getAxisType, defaultOption);\n\nexport default AxisModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as modelUtil from '../../util/model';\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 */\nexport default function (finder, ecModel) {\n var point = [];\n var seriesIndex = finder.seriesIndex;\n var seriesModel;\n if (seriesIndex == null || !(\n seriesModel = ecModel.getSeriesByIndex(seriesIndex)\n )) {\n return {point: []};\n }\n\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, finder);\n if (dataIndex == null || dataIndex < 0 || zrUtil.isArray(dataIndex)) {\n return {point: []};\n }\n\n var el = data.getItemGraphicEl(dataIndex);\n var coordSys = seriesModel.coordinateSystem;\n\n if (seriesModel.getTooltipPosition) {\n point = seriesModel.getTooltipPosition(dataIndex) || [];\n }\n else if (coordSys && coordSys.dataToPoint) {\n point = coordSys.dataToPoint(\n data.getValues(\n zrUtil.map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }), dataIndex, true\n )\n ) || [];\n }\n else if (el) {\n // Use graphic bounding rect\n var rect = el.getBoundingRect().clone();\n rect.applyTransform(el.transform);\n point = [\n rect.x + rect.width / 2,\n rect.y + rect.height / 2\n ];\n }\n\n return {point: point, el: el};\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport {makeInner} from '../../util/model';\nimport * as modelHelper from './modelHelper';\nimport findPointFromSeries from './findPointFromSeries';\n\nvar each = zrUtil.each;\nvar curry = zrUtil.curry;\nvar inner = makeInner();\n\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.<number>} [payload.x] x and y, which are mandatory, specify a point to\n * trigger axisPointer and tooltip.\n * @param {Array.<number>} [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.<number>|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 */\nexport default function (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;\n\n // Pending\n // See #6121. But we are not able to reproduce it yet.\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 var isIllegalPoint = illegalPoint(point);\n\n // 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 var inputAxesInfo = finder.axesInfo;\n\n var axesInfo = coordSysAxesInfo.axesInfo;\n var shouldHide = currTrigger === 'leave' || illegalPoint(point);\n var outputFinder = {};\n\n var showValueMap = {};\n var dataByCoordSys = {list: [], map: {}};\n var updaters = {\n showPointer: curry(showPointer, showValueMap),\n showTooltip: curry(showTooltip, dataByCoordSys)\n };\n\n // Process for triggered axes.\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\n each(coordSysAxesInfo.coordSysAxesInfo[coordSysKey], function (axisInfo, key) {\n var axis = axisInfo.axis;\n var inputAxisInfo = findInputAxisInfo(inputAxesInfo, axisInfo);\n // If no inputAxesInfo, no axis is restricted.\n if (!shouldHide && coordSysContainsPoint && (!inputAxesInfo || inputAxisInfo)) {\n var val = inputAxisInfo && inputAxisInfo.value;\n if (val == null && !isIllegalPoint) {\n val = axis.pointToData(point);\n }\n val != null && processOnAxis(axisInfo, val, updaters, false, outputFinder);\n }\n });\n });\n\n // Process for linked axes.\n var linkTriggers = {};\n each(axesInfo, function (tarAxisInfo, tarKey) {\n var linkGroup = tarAxisInfo.linkGroup;\n\n // If axis has been triggered in the previous stage, it should not be triggered by link.\n if (linkGroup && !showValueMap[tarKey]) {\n each(linkGroup.axesInfo, function (srcAxisInfo, srcKey) {\n var srcValItem = showValueMap[srcKey];\n // If srcValItem exist, source axis is triggered, so link to target axis.\n if (srcAxisInfo !== tarAxisInfo && srcValItem) {\n var val = srcValItem.value;\n linkGroup.mapper && (val = tarAxisInfo.axis.scale.parse(linkGroup.mapper(\n val, makeMapperParam(srcAxisInfo), makeMapperParam(tarAxisInfo)\n )));\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\n updateModelActually(showValueMap, axesInfo, outputFinder);\n dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction);\n dispatchHighDownActually(axesInfo, dispatchAction, api);\n\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 }\n\n // Heavy calculation. So put it after axis.containData checking.\n var payloadInfo = buildPayloadsBySeries(newValue, axisInfo);\n var payloadBatch = payloadInfo.payloadBatch;\n var snapToValue = payloadInfo.snapToValue;\n\n // Fill content of event obj for echarts.connect.\n // By default use the first involved series data as a sample to connect.\n if (payloadBatch[0] && outputFinder.seriesIndex == null) {\n zrUtil.extend(outputFinder, payloadBatch[0]);\n }\n\n // If no linkSource input, this process is for collecting link\n // target, where snap should not be accepted.\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);\n // Tooltip should always be snapToValue, otherwise there will be\n // incorrect \"axis value ~ series value\" mapping displayed in tooltip.\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\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 }\n else {\n dataIndices = series.getData().indicesOfNearest(\n dataDim[0],\n value,\n // 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 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);\n // Consider category case\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 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\n return {\n payloadBatch: payloadBatch,\n snapToValue: snapToValue\n };\n}\n\nfunction showPointer(showValueMap, axisInfo, value, payloadBatch) {\n showValueMap[axisInfo.key] = {value: value, payloadBatch: payloadBatch};\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;\n\n // If no data, do not create anything in dataByCoordSys,\n // whose length will be used to judge whether dispatch action.\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 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 = [];\n // Basic logic: If no 'show' required, 'hide' this axisPointer.\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;\n // For label formatter param and highlight.\n option.seriesDataIndices = (valItem.payloadBatch || []).slice();\n }\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 }\n\n // If status is 'hide', should be no info in payload.\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({type: 'hideTip'});\n return;\n }\n\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 var sampleItem = ((dataByCoordSys.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};\n\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\n var zr = api.getZr();\n var highDownKey = 'axisPointerLastHighlights';\n var lastHighlights = inner(zr)[highDownKey] || {};\n var newHighlights = inner(zr)[highDownKey] = {};\n\n // Update highlight/downplay status according to axisPointer model.\n // Build hash map and remove duplicate incidentally.\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 });\n\n // Diff.\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\n toDownplay.length && api.dispatchAction({\n type: 'downplay', escapeConnect: true, batch: toDownplay\n });\n toHighlight.length && api.dispatchAction({\n type: 'highlight', escapeConnect: true, batch: toHighlight\n });\n}\n\nfunction findInputAxisInfo(inputAxesInfo, axisInfo) {\n for (var i = 0; i < (inputAxesInfo || []).length; i++) {\n var inputAxisInfo = inputAxesInfo[i];\n if (axisInfo.axis.dim === inputAxisInfo.axisDim\n && axisInfo.axis.model.componentIndex === inputAxisInfo.axisIndex\n ) {\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\n\nvar AxisPointerModel = echarts.extendComponentModel({\n\n type: 'axisPointer',\n\n coordSysAxesInfo: null,\n\n defaultOption: {\n // 'auto' means that show when triggered by tooltip or handle.\n show: 'auto',\n // 'click' | 'mousemove' | 'none'\n triggerOn: null, // set default in AxisPonterView.js\n\n zlevel: 0,\n z: 50,\n\n type: 'line', // 'line' 'shadow' 'cross' 'none'.\n // axispointer triggered by tootip determine snap automatically,\n // see `modelHelper`.\n snap: false,\n triggerTooltip: true,\n\n value: null,\n status: null, // Init value depends on whether handle is used.\n\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\n // Do not set 'auto' here, otherwise global animation: false\n // will not effect at this axispointer.\n animation: null,\n animationDurationUpdate: 200,\n\n lineStyle: {\n color: '#aaa',\n width: 1,\n type: 'solid'\n },\n\n shadowStyle: {\n color: 'rgba(150,150,150,0.3)'\n },\n\n label: {\n show: true,\n formatter: null, // string | Function\n precision: 'auto', // Or a number like 0, 1, 2 ...\n margin: 3,\n color: '#fff',\n padding: [5, 7, 5, 7],\n backgroundColor: 'auto', // default: axis line color\n borderColor: null,\n borderWidth: 0,\n shadowBlur: 3,\n shadowColor: '#aaa'\n // Considering applicability, common style should\n // better not have shadowOffset.\n // shadowOffsetX: 0,\n // shadowOffsetY: 2\n },\n\n handle: {\n show: false,\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', // jshint ignore:line\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\n // For mobile performance\n throttle: 40\n }\n }\n\n});\n\nexport default AxisPointerModel;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport env from 'zrender/src/core/env';\nimport {makeInner} from '../../util/model';\n\nvar inner = makeInner();\nvar each = zrUtil.each;\n\n/**\n * @param {string} key\n * @param {module:echarts/ExtensionAPI} api\n * @param {Function} handler\n * param: {string} currTrigger\n * param: {Array.<number>} point\n */\nexport function 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\n initGlobalListeners(zr, api);\n\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\n useHandler('click', zrUtil.curry(doEnter, 'click'));\n useHandler('mousemove', zrUtil.curry(doEnter, 'mousemove'));\n // useHandler('mouseout', onLeave);\n useHandler('globalout', onLeave);\n\n function useHandler(eventType, cb) {\n zr.on(eventType, function (e) {\n var dis = makeDispatchAction(api);\n\n each(inner(zr).records, function (record) {\n record && cb(record, e, dis.dispatchAction);\n });\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\n var actuallyPayload;\n if (showLen) {\n actuallyPayload = pendings.showTip[showLen - 1];\n }\n else if (hideLen) {\n actuallyPayload = pendings.hideTip[hideLen - 1];\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 };\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 var dispatchAction = function (payload) {\n var pendingList = pendings[payload.type];\n if (pendingList) {\n pendingList.push(payload);\n }\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/**\n * @param {string} key\n * @param {module:echarts/ExtensionAPI} api\n */\nexport function unregister(key, api) {\n if (env.node) {\n return;\n }\n var zr = api.getZr();\n var record = (inner(zr).records || {})[key];\n if (record) {\n inner(zr).records[key] = null;\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\nimport * as echarts from '../../echarts';\nimport * as globalListener from './globalListener';\n\nvar AxisPointerView = echarts.extendComponentView({\n\n type: 'axisPointer',\n\n render: function (globalAxisPointerModel, ecModel, api) {\n var globalTooltipModel = ecModel.getComponent('tooltip');\n var triggerOn = globalAxisPointerModel.get('triggerOn')\n || (globalTooltipModel && globalTooltipModel.get('triggerOn') || 'mousemove|click');\n\n // Register global listener in AxisPointerView to enable\n // AxisPointerView to be independent to Tooltip.\n globalListener.register(\n 'axisPointer',\n api,\n function (currTrigger, e, dispatchAction) {\n // If 'none', it is not controlled by mouse totally.\n if (triggerOn !== 'none'\n && (currTrigger === 'leave' || triggerOn.indexOf(currTrigger) >= 0)\n ) {\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 /**\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\n});\n\nexport default AxisPointerView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as clazzUtil from '../../util/clazz';\nimport * as graphic from '../../util/graphic';\nimport * as axisPointerModelHelper from './modelHelper';\nimport * as eventTool from 'zrender/src/core/event';\nimport * as throttleUtil from '../../util/throttle';\nimport {makeInner} from '../../util/model';\n\nvar inner = makeInner();\nvar clone = zrUtil.clone;\nvar bind = zrUtil.bind;\n\n/**\n * Base axis pointer class in 2D.\n * Implemenents {module:echarts/component/axis/IAxisPointer}.\n */\nfunction BaseAxisPointer() {\n}\n\nBaseAxisPointer.prototype = {\n\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');\n\n // Bind them to `this`, not in closure, otherwise they will not\n // be replaced when user calling setOption in not merge mode.\n this._axisModel = axisModel;\n this._axisPointerModel = axisPointerModel;\n this._api = api;\n\n // 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 if (!forceRender\n && this._lastValue === value\n && this._lastStatus === status\n ) {\n return;\n }\n this._lastValue = value;\n this._lastStatus = status;\n\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 group && group.show();\n handle && handle.show();\n\n // Otherwise status is 'show'\n var elOption = {};\n this.makeElOption(elOption, value, axisModel, axisPointerModel, api);\n\n // Enable change axis pointer type.\n var graphicKey = elOption.graphicKey;\n if (graphicKey !== this._lastGraphicKey) {\n this.clear(api);\n }\n this._lastGraphicKey = graphicKey;\n\n var moveAnimation = this._moveAnimation =\n 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 }\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');\n\n // Value axis without snap always do not snap.\n if (!useSnap && !isCategoryAxis) {\n return false;\n }\n\n if (animation === 'auto' || animation == null) {\n var animationThreshold = this.animationThreshold;\n if (isCategoryAxis && axis.getBandWidth() > animationThreshold) {\n return true;\n }\n\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 if (useSnap) {\n var seriesDataCount = axisPointerModelHelper.getAxisInfo(axisModel).seriesDataCount;\n var axisExtent = axis.getExtent();\n // Approximate band width\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) {\n // 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 if (pointerOption) {\n var pointerEl = inner(group).pointerEl = new graphic[pointerOption.type](\n clone(elOption.pointer)\n );\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(\n clone(elOption.label)\n );\n\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 if (pointerEl && elOption.pointer) {\n pointerEl.setStyle(elOption.pointer.style);\n updateProps(pointerEl, {shape: elOption.pointer.shape});\n }\n },\n\n /**\n * @protected\n */\n updateLabelEl: function (group, elOption, updateProps, axisPointerModel) {\n var labelEl = inner(group).labelEl;\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\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 var zr = this._api.getZr();\n var handle = this._handle;\n var handleModel = axisPointerModel.getModel('handle');\n\n var status = axisPointerModel.get('status');\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 if (!this._handle) {\n isInit = true;\n handle = this._handle = graphic.createIcon(\n handleModel.get('icon'),\n {\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 );\n zr.add(handle);\n }\n\n updateMandatoryProps(handle, axisPointerModel, false);\n\n // update style\n var includeStyles = [\n 'color', 'borderColor', 'borderWidth', 'opacity',\n 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY'\n ];\n handle.setStyle(handleModel.getItemStyle(null, includeStyles));\n\n // update position\n var handleSize = handleModel.get('size');\n if (!zrUtil.isArray(handleSize)) {\n handleSize = [handleSize, handleSize];\n }\n handle.attr('scale', [handleSize[0] / 2, handleSize[1] / 2]);\n\n throttleUtil.createOrUpdate(\n this,\n '_doDispatchAxisPointer',\n handleModel.get('throttle') || 0,\n 'fixRate'\n );\n\n this._moveHandleToValue(value, isInit);\n },\n\n /**\n * @private\n */\n _moveHandleToValue: function (value, isInit) {\n updateProps(\n this._axisPointerModel,\n !isInit && this._moveAnimation,\n this._handle,\n getHandleTransProps(this.getHandleTransform(\n value, this._axisModel, this._axisPointerModel\n ))\n );\n },\n\n /**\n * @private\n */\n _onHandleDragMove: function (dx, dy) {\n var handle = this._handle;\n if (!handle) {\n return;\n }\n\n this._dragging = true;\n\n // Persistent for throttle.\n var trans = this.updateHandleTransform(\n getHandleTransProps(handle),\n [dx, dy],\n this._axisModel,\n this._axisPointerModel\n );\n this._payloadInfo = trans;\n\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 if (!handle) {\n return;\n }\n\n var payloadInfo = this._payloadInfo;\n var axisModel = this._axisModel;\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 if (!handle) {\n return;\n }\n\n var value = this._axisPointerModel.get('value');\n // 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 this._moveHandleToValue(value);\n\n // For the effect: tooltip will be shown when finger holding on handle\n // button, and will be hidden after finger left handle button.\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.<number>} 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\n var zr = api.getZr();\n var group = this._group;\n var handle = this._handle;\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 () {\n // Implemented by sub-class if necessary.\n },\n\n /**\n * @protected\n * @param {Array.<number>} xy\n * @param {Array.<number>} 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};\n\nBaseAxisPointer.prototype.constructor = BaseAxisPointer;\n\n\nfunction updateProps(animationModel, moveAnimation, el, props) {\n // Animation optimize.\n if (!propsEqual(inner(el).lastProp, props)) {\n inner(el).lastProp = props;\n moveAnimation\n ? graphic.updateProps(el, props, animationModel)\n : (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 }\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\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);\n\nexport default BaseAxisPointer;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../../util/graphic';\nimport * as textContain from 'zrender/src/contain/text';\nimport * as formatUtil from '../../util/format';\nimport * as matrix from 'zrender/src/core/matrix';\nimport * as axisHelper from '../../coord/axisHelper';\nimport AxisBuilder from '../axis/AxisBuilder';\n\n/**\n * @param {module:echarts/model/Model} axisPointerModel\n */\nexport function buildElStyle(axisPointerModel) {\n var axisPointerType = axisPointerModel.get('type');\n var styleModel = axisPointerModel.getModel(axisPointerType + 'Style');\n var style;\n if (axisPointerType === 'line') {\n style = styleModel.getLineStyle();\n style.fill = null;\n }\n else if (axisPointerType === 'shadow') {\n style = styleModel.getAreaStyle();\n style.stroke = null;\n }\n return style;\n}\n\n/**\n * @param {Function} labelPos {align, verticalAlign, position}\n */\nexport function buildLabelElOption(\n elOption, axisModel, axisPointerModel, api, labelPos\n) {\n var value = axisPointerModel.get('value');\n var text = getValueLabel(\n value, axisModel.axis, axisModel.ecModel,\n axisPointerModel.get('seriesDataIndices'),\n {\n precision: axisPointerModel.get('label.precision'),\n formatter: axisPointerModel.get('label.formatter')\n }\n );\n var labelModel = axisPointerModel.getModel('label');\n var paddings = formatUtil.normalizeCssArray(labelModel.get('padding') || 0);\n\n var font = labelModel.getFont();\n var textRect = textContain.getBoundingRect(text, font);\n\n var position = labelPos.position;\n var width = textRect.width + paddings[1] + paddings[3];\n var height = textRect.height + paddings[0] + paddings[2];\n\n // Adjust by align.\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);\n\n // Not overflow ec container\n confineInContainer(position, width, height, api);\n\n var bgColor = labelModel.get('backgroundColor');\n if (!bgColor || bgColor === 'auto') {\n bgColor = axisModel.get('axisLine.lineStyle.color');\n }\n\n elOption.label = {\n shape: {x: 0, y: 0, width: width, height: height, r: labelModel.get('borderRadius')},\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}\n\n// Do not overflow ec container\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/**\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.<Object>} seriesDataIndices\n * @param {number|string} opt.precision 'auto' or a number\n * @param {string|Function} opt.formatter label formatter\n */\nexport function getValueLabel(value, axis, ecModel, seriesDataIndices, opt) {\n value = axis.scale.parse(value);\n var text = axis.scale.getLabel(\n // If `precision` is set, width can be fixed (like '12.00500'), which\n // helps to debounce when when moving label.\n value, {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 }\n else if (zrUtil.isFunction(formatter)) {\n text = formatter(params);\n }\n }\n\n return text;\n}\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 */\nexport function getTransformedPosition(axis, value, layoutInfo) {\n var transform = matrix.create();\n matrix.rotate(transform, transform, layoutInfo.rotation);\n matrix.translate(transform, transform, layoutInfo.position);\n\n return graphic.applyTransform([\n axis.dataToCoord(value),\n (layoutInfo.labelOffset || 0)\n + (layoutInfo.labelDirection || 1) * (layoutInfo.labelMargin || 0)\n ], transform);\n}\n\nexport function buildCartesianSingleLabelElOption(\n value, elOption, layoutInfo, axisModel, axisPointerModel, api\n) {\n var textLayout = AxisBuilder.innerTextLayout(\n layoutInfo.rotation, 0, layoutInfo.labelDirection\n );\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/**\n * @param {Array.<number>} p1\n * @param {Array.<number>} p2\n * @param {number} [xDimIndex=0] or 1\n */\nexport function 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/**\n * @param {Array.<number>} xy\n * @param {Array.<number>} wh\n * @param {number} [xDimIndex=0] or 1\n */\nexport function 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\nexport function 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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport BaseAxisPointer from './BaseAxisPointer';\nimport * as viewHelper from './viewHelper';\nimport * as cartesianAxisHelper from '../../coord/cartesian/cartesianAxisHelper';\nimport AxisView from '../axis/AxisView';\n\nvar CartesianAxisPointer = BaseAxisPointer.extend({\n\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](\n axis, pixelValue, otherExtent\n );\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(\n value, elOption, layoutInfo, axisModel, axisPointerModel, api\n );\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\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\n var cursorOtherValue = (otherExtent[1] + otherExtent[0]) / 2;\n var cursorPoint = [cursorOtherValue, cursorOtherValue];\n cursorPoint[dimIndex] = currPosition[dimIndex];\n\n // Make tooltip do not overlap axisPointer and in the middle of the grid.\n var tooltipOptions = [{verticalAlign: 'middle'}, {align: 'center'}];\n\n return {\n position: currPosition,\n rotation: transform.rotation,\n cursorPoint: cursorPoint,\n tooltipOption: tooltipOptions[dimIndex]\n };\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\n line: function (axis, pixelValue, otherExtent) {\n var targetShape = viewHelper.makeLineShape(\n [pixelValue, otherExtent[0]],\n [pixelValue, otherExtent[1]],\n getAxisDimIndex(axis)\n );\n return {\n type: 'Line',\n subPixelOptimize: true,\n shape: targetShape\n };\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(\n [pixelValue - bandWidth / 2, otherExtent[0]],\n [bandWidth, span],\n getAxisDimIndex(axis)\n )\n };\n }\n};\n\nfunction getAxisDimIndex(axis) {\n return axis.dim === 'x' ? 0 : 1;\n}\n\nAxisView.registerAxisPointerClass('CartesianAxisPointer', CartesianAxisPointer);\n\nexport default CartesianAxisPointer;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as axisPointerModelHelper from './axisPointer/modelHelper';\nimport axisTrigger from './axisPointer/axisTrigger';\n\nimport './axisPointer/AxisPointerModel';\nimport './axisPointer/AxisPointerView';\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.\nimport './axisPointer/CartesianAxisPointer';\n\necharts.registerPreprocessor(function (option) {\n // Always has a global axisPointerModel for default setting.\n if (option) {\n (!option.axisPointer || option.axisPointer.length === 0)\n && (option.axisPointer = {});\n\n var link = option.axisPointer.link;\n // 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 if (link && !zrUtil.isArray(link)) {\n option.axisPointer.link = [link];\n }\n }\n});\n\n// This process should proformed after coordinate systems created\n// and series data processed. So put it on statistic processing stage.\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 =\n axisPointerModelHelper.collect(ecModel, api);\n});\n\n// Broadcast to all views.\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\nimport BaseAxisPointer from './BaseAxisPointer';\nimport * as viewHelper from './viewHelper';\nimport * as singleAxisHelper from '../../coord/single/singleAxisHelper';\nimport AxisView from '../axis/AxisView';\n\nvar XY = ['x', 'y'];\nvar WH = ['width', 'height'];\n\nvar SingleAxisPointer = BaseAxisPointer.extend({\n\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\n var axisPointerType = axisPointerModel.get('type');\n if (axisPointerType && axisPointerType !== 'none') {\n var elStyle = viewHelper.buildElStyle(axisPointerModel);\n var pointerOption = pointerShapeBuilder[axisPointerType](\n axis, pixelValue, otherExtent\n );\n pointerOption.style = elStyle;\n\n elOption.graphicKey = pointerOption.type;\n elOption.pointer = pointerOption;\n }\n\n var layoutInfo = singleAxisHelper.layout(axisModel);\n viewHelper.buildCartesianSingleLabelElOption(\n value, elOption, layoutInfo, axisModel, axisPointerModel, api\n );\n },\n\n /**\n * @override\n */\n getHandleTransform: function (value, axisModel, axisPointerModel) {\n var layoutInfo = singleAxisHelper.layout(axisModel, {labelInside: false});\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\n return {\n position: currPosition,\n rotation: transform.rotation,\n cursorPoint: cursorPoint,\n tooltipOption: {\n verticalAlign: 'middle'\n }\n };\n }\n});\n\nvar pointerShapeBuilder = {\n\n line: function (axis, pixelValue, otherExtent) {\n var targetShape = viewHelper.makeLineShape(\n [pixelValue, otherExtent[0]],\n [pixelValue, otherExtent[1]],\n getPointDimIndex(axis)\n );\n return {\n type: 'Line',\n subPixelOptimize: true,\n shape: targetShape\n };\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(\n [pixelValue - bandWidth / 2, otherExtent[0]],\n [bandWidth, span],\n getPointDimIndex(axis)\n )\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);\n\nexport default SingleAxisPointer;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../echarts';\n\nimport '../coord/single/singleCreator';\nimport './axis/SingleAxisView';\nimport '../coord/single/AxisModel';\nimport './axisPointer';\nimport './axisPointer/SingleAxisPointer';\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\nimport SeriesModel from '../../model/Series';\nimport createDimensions from '../../data/helper/createDimensions';\nimport {getDimensionTypeByAxis} from '../../data/helper/dimensionHelper';\nimport List from '../../data/List';\nimport * as zrUtil from 'zrender/src/core/util';\nimport {groupData} from '../../util/model';\nimport {encodeHTML} from '../../util/format';\nimport LegendVisualProvider from '../../visual/LegendVisualProvider';\n\nvar DATA_NAME_INDEX = 2;\n\nvar ThemeRiverSeries = SeriesModel.extend({\n\n type: 'series.themeRiver',\n\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);\n\n // 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 this.legendVisualProvider = new LegendVisualProvider(\n zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this)\n );\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 var timeValueKeys = {};\n\n // grouped data by name\n var groupResult = groupData(data, function (item) {\n if (!timeValueKeys.hasOwnProperty(item[0])) {\n timeValueKeys[item[0]] = -1;\n }\n return item[2];\n });\n var layData = [];\n groupResult.buckets.each(function (items, key) {\n layData.push({name: key, dataList: items});\n });\n var layerNum = layData.length;\n\n for (var k = 0; k < layerNum; ++k) {\n var name = layData[k].name;\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\n var singleAxisModel = ecModel.queryComponents({\n mainType: 'singleAxis',\n index: this.get('singleAxisIndex'),\n id: this.get('singleAxisId')\n })[0];\n\n var axisType = singleAxisModel.get('type');\n\n // filter the data item with the value of label is undefined\n var filterData = zrUtil.filter(option.data, function (dataItem) {\n return dataItem[2] !== undefined;\n });\n\n // ??? TODO design a stage to transfer data for themeRiver and lines?\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 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 {\n name: 'time',\n type: getDimensionTypeByAxis(axisType)\n },\n {\n name: 'value',\n type: 'float'\n },\n {\n name: 'name',\n type: 'ordinal'\n }\n ],\n encodeDefine: {\n single: 0,\n value: 1,\n itemName: 2\n }\n });\n\n var list = new List(dimensionsInfo, this);\n list.initData(data);\n\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.<Array.<number>>}\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');\n\n // data group by name\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({name: key, indices: items});\n });\n\n return layerSeries;\n },\n\n /**\n * Get data indices for show tooltip content\n\n * @param {Array.<string>|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 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 if (dist <= minDist) {\n nestestValue = theValue;\n minDist = dist;\n nearestIdx = layerSeries[i].indices[j];\n }\n }\n indices.push(nearestIdx);\n }\n\n return {dataIndices: indices, nestestValue: nestestValue};\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 if (isNaN(htmlValue) || htmlValue == null) {\n htmlValue = '-';\n }\n return encodeHTML(htmlName + ' : ' + htmlValue);\n },\n\n defaultOption: {\n zlevel: 0,\n z: 2,\n\n coordinateSystem: 'singleAxis',\n\n // gap in axis's orthogonal orientation\n boundaryGap: ['10%', '10%'],\n\n // legendHoverLink: true,\n\n singleAxisIndex: 0,\n\n animationEasing: 'linear',\n\n label: {\n margin: 4,\n show: true,\n position: 'left',\n color: '#000',\n fontSize: 11\n },\n\n emphasis: {\n label: {\n show: true\n }\n }\n }\n});\n\nexport default ThemeRiverSeries;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport {Polygon} from '../line/poly';\nimport * as graphic from '../../util/graphic';\nimport {bind, extend} from 'zrender/src/core/util';\nimport DataDiffer from '../../data/DataDiffer';\n\nexport default echarts.extendChartView({\n\n type: 'themeRiver',\n\n init: function () {\n this._layers = [];\n },\n\n render: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n\n var group = this.group;\n\n var layerSeries = seriesModel.getLayerSeries();\n\n var layoutInfo = data.getLayout('layoutInfo');\n var rect = layoutInfo.rect;\n var boundaryGap = layoutInfo.boundaryGap;\n\n group.attr('position', [0, rect.y + boundaryGap[0]]);\n\n function keyGetter(item) {\n return item.name;\n }\n var dataDiffer = new DataDiffer(\n this._layersSeries || [], layerSeries,\n keyGetter, keyGetter\n );\n\n var newLayersGroups = {};\n\n dataDiffer\n .add(bind(process, this, 'add'))\n .update(bind(process, this, 'update'))\n .remove(bind(process, this, 'remove'))\n .execute();\n\n function process(status, idx, oldIdx) {\n var oldLayersGroups = this._layers;\n if (status === 'remove') {\n group.remove(oldLayersGroups[idx]);\n return;\n }\n var points0 = [];\n var points1 = [];\n var color;\n var indices = layerSeries[idx].indices;\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\n points0.push([x, y0]);\n points1.push([x, y0 + y]);\n\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 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\n polygon.setClipPath(createGridClipShape(polygon.getBoundingRect(), seriesModel, function () {\n polygon.removeClipPath();\n }));\n }\n else {\n var layerGroup = oldLayersGroups[oldIdx];\n polygon = layerGroup.childAt(0);\n text = layerGroup.childAt(1);\n group.add(layerGroup);\n\n newLayersGroups[idx] = layerGroup;\n\n graphic.updateProps(polygon, {\n shape: {\n points: points0,\n stackedOnPoints: points1\n }\n }, seriesModel);\n\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\n graphic.setTextStyle(text.style, labelModel, {\n text: labelModel.get('show')\n ? seriesModel.getFormattedLabel(indices[j - 1], 'normal')\n || data.getName(indices[j - 1])\n : null,\n textVerticalAlign: 'middle'\n });\n\n polygon.setStyle(extend({\n fill: color\n }, itemStyleModel.getItemStyle(['color'])));\n\n graphic.setHoverStyle(polygon, hoverItemStyleModel.getItemStyle());\n }\n\n this._layersSeries = layerSeries;\n this._layers = newLayersGroups;\n },\n\n dispose: function () {}\n});\n\n// add animation to the view\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\n return rectEl;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as numberUtil from '../../util/number';\n\nexport default function (ecModel, api) {\n\n ecModel.eachSeriesByType('themeRiver', function (seriesModel) {\n\n var data = seriesModel.getData();\n\n var single = seriesModel.coordinateSystem;\n\n var layoutInfo = {};\n\n // use the axis boundingRect for view\n var rect = single.getRect();\n\n layoutInfo.rect = rect;\n\n var boundaryGap = seriesModel.get('boundaryGap');\n\n var axis = single.getAxis();\n\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 }\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/**\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 */\nfunction themeRiverLayout(data, seriesModel, height) {\n if (!data.count()) {\n return;\n }\n var coordSys = seriesModel.coordinateSystem;\n // the data in each layer are organized into a series.\n var layerSeries = seriesModel.getLayerSeries();\n\n // the points in each layer.\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\n var base = computeBaseline(layerPoints);\n var baseLine = base.y0;\n var ky = height / base.max;\n\n // set layout information for each item.\n var n = layerSeries.length;\n var m = layerSeries[0].indices.length;\n var baseY0;\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 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/**\n * Compute the baseLine of the rawdata\n * Inspired by Lee Byron's paper Stacked Graphs - Geometry & Aesthetics\n *\n * @param {Array.<Array>} data the points in each layer\n * @return {Object}\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 if (temp > max) {\n max = temp;\n }\n sums.push(temp);\n }\n\n for (var k = 0; k < pointNum; ++k) {\n y0[k] = (max - sums[k]) / 2;\n }\n max = 0;\n\n for (var l = 0; l < pointNum; ++l) {\n var sum = sums[l] + y0[l];\n if (sum > max) {\n max = sum;\n }\n }\n base.y0 = y0;\n base.max = max;\n\n return base;\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {createHashMap} from 'zrender/src/core/util';\n\nexport default function (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\n data.each(function (idx) {\n idxMap.set(data.getRawIndex(idx), idx);\n });\n\n rawData.each(function (rawIndex) {\n var name = rawData.getName(rawIndex);\n var color = colorList[(seriesModel.nameMap.get(name) - 1) % colorList.length];\n\n rawData.setItemVisual(rawIndex, 'color', color);\n\n var idx = idxMap.get(rawIndex);\n\n if (idx != null) {\n data.setItemVisual(idx, 'color', color);\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\nimport * as echarts from '../echarts';\n\nimport '../component/singleAxis';\nimport './themeRiver/ThemeRiverSeries';\nimport './themeRiver/ThemeRiverView';\n\nimport themeRiverLayout from './themeRiver/themeRiverLayout';\nimport themeRiverVisual from './themeRiver/themeRiverVisual';\nimport dataFilter from '../processor/dataFilter';\n\necharts.registerLayout(themeRiverLayout);\necharts.registerVisual(themeRiverVisual);\necharts.registerProcessor(dataFilter('themeRiver'));","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport SeriesModel from '../../model/Series';\nimport Tree from '../../data/Tree';\nimport Model from '../../model/Model';\nimport {wrapTreePathInfo} from '../helper/treeHelper';\n\nexport default SeriesModel.extend({\n\n type: 'series.sunburst',\n\n /**\n * @type {module:echarts/data/Tree~Node}\n */\n _viewRoot: null,\n\n getInitialData: function (option, ecModel) {\n // Create a virtual root.\n var root = { name: option.name, children: option.data };\n\n completeTreeValue(root);\n\n var levelModels = zrUtil.map(option.levels || [], function (levelDefine) {\n return new Model(levelDefine, this, ecModel);\n }, this);\n\n // 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 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\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\n var node = this.getData().tree.getNodeByDataIndex(dataIndex);\n params.treePathInfo = wrapTreePathInfo(node, this);\n\n return params;\n },\n\n defaultOption: {\n zlevel: 0,\n z: 2,\n\n // 默认全局居中\n center: ['50%', '50%'],\n radius: [0, '75%'],\n // 默认顺时针\n clockwise: true,\n startAngle: 90,\n // 最小角度改为0\n minAngle: 0,\n\n percentPrecision: 2,\n\n // If still show when all data zero.\n stillShowZeroSum: true,\n\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\n // 'rootToNode', 'link', or false\n nodeClick: 'rootToNode',\n\n renderLabelForZeroData: false,\n\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\n // Animation type canbe expansion, scale\n animationType: 'expansion',\n animationDuration: 1000,\n animationDurationUpdate: 500,\n animationEasing: 'cubicOut',\n\n data: [],\n\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\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\n ? (this._viewRoot = viewRoot)\n : (viewRoot = this._viewRoot);\n\n var root = this.getRawData().tree.root;\n\n if (!viewRoot\n || (viewRoot !== root && !root.contains(viewRoot))\n ) {\n this._viewRoot = root;\n }\n }\n});\n\n\n\n/**\n * @param {Object} dataNode\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\n zrUtil.each(dataNode.children, function (child) {\n\n completeTreeValue(child);\n\n var childValue = child.value;\n zrUtil.isArray(childValue) && (childValue = childValue[0]);\n\n sum += childValue;\n });\n\n var thisValue = dataNode.value;\n if (zrUtil.isArray(thisValue)) {\n thisValue = thisValue[0];\n }\n\n if (thisValue == null || isNaN(thisValue)) {\n thisValue = sum;\n }\n // Value should not less than 0.\n if (thisValue < 0) {\n thisValue = 0;\n }\n\n zrUtil.isArray(dataNode.value)\n ? (dataNode.value[0] = thisValue)\n : (dataNode.value = thisValue);\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../../util/graphic';\n\nvar NodeHighlightPolicy = {\n NONE: 'none', // not downplay others\n DESCENDANT: 'descendant',\n ANCESTOR: 'ancestor',\n SELF: 'self'\n};\n\nvar DEFAULT_SECTOR_Z = 2;\nvar DEFAULT_TEXT_Z = 4;\n\n/**\n * Sunburstce of Sunburst including Sector, Label, LabelLine\n * @constructor\n * @extends {module:zrender/graphic/Group}\n */\nfunction SunburstPiece(node, seriesModel, ecModel) {\n\n graphic.Group.call(this);\n\n var sector = new graphic.Sector({\n z2: DEFAULT_SECTOR_Z\n });\n sector.seriesIndex = seriesModel.seriesIndex;\n\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\n this.updateData(true, node, 'normal', seriesModel, ecModel);\n\n // Hover to change label and labelLine\n function onEmphasis() {\n text.ignore = text.hoverIgnore;\n }\n function onNormal() {\n text.ignore = text.normalIgnore;\n }\n this.on('emphasis', onEmphasis)\n .on('normal', onNormal)\n .on('mouseover', onEmphasis)\n .on('mouseout', onNormal);\n}\n\nvar SunburstPieceProto = SunburstPiece.prototype;\n\nSunburstPieceProto.updateData = function (\n firstCreate,\n node,\n state,\n seriesModel,\n ecModel\n) {\n this.node = node;\n node.piece = this;\n\n seriesModel = seriesModel || this._seriesModel;\n ecModel = ecModel || this._ecModel;\n\n var sector = this.childAt(0);\n sector.dataIndex = node.dataIndex;\n\n var itemModel = node.getModel();\n var layout = node.getLayout();\n // if (!layout) {\n // console.log(node.getLayout());\n // }\n var sectorShape = zrUtil.extend({}, layout);\n sectorShape.label = null;\n\n var visualColor = getNodeColor(node, seriesModel, ecModel);\n\n fillDefaultColor(node, seriesModel, visualColor);\n\n var normalStyle = itemModel.getModel('itemStyle').getItemStyle();\n var style;\n if (state === 'normal') {\n style = normalStyle;\n }\n else {\n var stateStyle = itemModel.getModel(state + '.itemStyle')\n .getItemStyle();\n style = zrUtil.merge(stateStyle, normalStyle);\n }\n style = zrUtil.defaults(\n {\n lineJoin: 'bevel',\n fill: style.fill || visualColor\n },\n style\n );\n\n if (firstCreate) {\n sector.setShape(sectorShape);\n sector.shape.r = layout.r0;\n graphic.updateProps(\n sector,\n {\n shape: {\n r: layout.r\n }\n },\n seriesModel,\n node.dataIndex\n );\n sector.useStyle(style);\n }\n else if (typeof style.fill === 'object' && style.fill.type\n || typeof sector.style.fill === 'object' && sector.style.fill.type\n ) {\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 }\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 this._initEvents(sector, node, seriesModel, highlightPolicy);\n }\n\n this._seriesModel = seriesModel || this._seriesModel;\n this._ecModel = ecModel || this._ecModel;\n\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 }\n else if (isNodeHighlighted(n, that.node, highlightPolicy)) {\n n.piece.childAt(0).trigger('highlight');\n }\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'\n ? normalModel\n : itemModel.getModel(state + '.label');\n var labelHoverModel = itemModel.getModel('emphasis.label');\n\n var labelFormatter = labelModel.get('formatter');\n // Use normal formatter if no state formatter is defined\n var labelState = labelFormatter ? state : 'normal';\n\n var text = zrUtil.retrieve(\n seriesModel.getFormattedLabel(\n this.node.dataIndex, labelState, null, null, 'label'\n ),\n 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 if (labelMinAngle == null) {\n labelMinAngle = normalModel.get('minAngle');\n }\n labelMinAngle = labelMinAngle / 180 * Math.PI;\n var angle = layout.endAngle - layout.startAngle;\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\n graphic.setLabelStyle(\n label.style, label.hoverStyle || {}, normalModel, labelHoverModel,\n {\n defaultText: labelModel.getShallow('show') ? text : null,\n autoColor: visualColor,\n useInsideStyle: true\n }\n );\n\n var midAngle = (layout.startAngle + layout.endAngle) / 2;\n var dx = Math.cos(midAngle);\n var dy = Math.sin(midAngle);\n\n var r;\n var labelPosition = getLabelAttr('position');\n var labelPadding = getLabelAttr('distance') || 0;\n var textAlign = getLabelAttr('align');\n if (labelPosition === 'outside') {\n r = layout.r + labelPadding;\n textAlign = midAngle > Math.PI / 2 ? 'right' : 'left';\n }\n else {\n if (!textAlign || textAlign === 'center') {\n r = (layout.r + layout.r0) / 2;\n textAlign = 'center';\n }\n else if (textAlign === 'left') {\n r = layout.r0 + labelPadding;\n if (midAngle > Math.PI / 2) {\n textAlign = 'right';\n }\n }\n else if (textAlign === 'right') {\n r = layout.r - labelPadding;\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\n var textX = r * dx + layout.cx;\n var textY = r * dy + layout.cy;\n label.attr('position', [textX, textY]);\n\n var rotateType = getLabelAttr('rotate');\n var rotate = 0;\n if (rotateType === 'radial') {\n rotate = -midAngle;\n if (rotate < -Math.PI / 2) {\n rotate += Math.PI;\n }\n }\n else if (rotateType === 'tangential') {\n rotate = Math.PI / 2 - midAngle;\n if (rotate > Math.PI / 2) {\n rotate -= Math.PI;\n }\n else if (rotate < -Math.PI / 2) {\n rotate += Math.PI;\n }\n }\n else if (typeof rotateType === 'number') {\n rotate = rotateType * Math.PI / 180;\n }\n label.attr('rotation', rotate);\n\n function getLabelAttr(name) {\n var stateAttr = labelModel.get(name);\n if (stateAttr == null) {\n return normalModel.get(name);\n }\n else {\n return stateAttr;\n }\n }\n};\n\nSunburstPieceProto._initEvents = function (\n sector,\n node,\n seriesModel,\n highlightPolicy\n) {\n sector.off('mouseover').off('mouseout').off('emphasis').off('normal');\n\n var that = this;\n var onEmphasis = function () {\n that.onEmphasis(highlightPolicy);\n };\n var onNormal = function () {\n that.onNormal();\n };\n var onDownplay = function () {\n that.onDownplay();\n };\n var onHighlight = function () {\n that.onHighlight();\n };\n\n if (seriesModel.isAnimationEnabled()) {\n sector\n .on('mouseover', onEmphasis)\n .on('mouseout', onNormal)\n .on('emphasis', onEmphasis)\n .on('normal', onNormal)\n .on('downplay', onDownplay)\n .on('highlight', onHighlight);\n }\n};\n\nzrUtil.inherits(SunburstPiece, graphic.Group);\n\nexport default SunburstPiece;\n\n\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 */\nfunction getNodeColor(node, seriesModel, ecModel) {\n // Color from visualMap\n var visualColor = node.getVisual('color');\n var visualMetaList = node.getVisual('visualMeta');\n if (!visualMetaList || visualMetaList.length === 0) {\n // Use first-generation color if has no visualMap\n visualColor = null;\n }\n\n // Self color or level color\n var color = node.getModel('itemStyle').get('color');\n if (color) {\n return color;\n }\n else if (visualColor) {\n // Color mapping\n return visualColor;\n }\n else if (node.depth === 0) {\n // Virtual root node\n return ecModel.option.color[0];\n }\n else {\n // First-generation color\n var length = ecModel.option.color.length;\n color = ecModel.option.color[getRootId(node) % length];\n }\n return color;\n}\n\n/**\n * Get index of root in sorted order\n *\n * @param {TreeNode} node current node\n * @return {number} index in root\n */\nfunction getRootId(node) {\n var ancestor = node;\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 }\n else if (policy === NodeHighlightPolicy.SELF) {\n return node === activeNode;\n }\n else if (policy === NodeHighlightPolicy.ANCESTOR) {\n return node === activeNode || node.isAncestorOf(activeNode);\n }\n else {\n return node === activeNode || node.isDescendantOf(activeNode);\n }\n}\n\n// Fix tooltip callback function params.color incorrect when pick a default color\nfunction fillDefaultColor(node, seriesModel, color) {\n var data = seriesModel.getData();\n data.setItemVisual(node.dataIndex, 'color', color);\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport ChartView from '../../view/Chart';\nimport SunburstPiece from './SunburstPiece';\nimport DataDiffer from '../../data/DataDiffer';\nimport {windowOpen} from '../../util/format';\n\nvar ROOT_TO_NODE_ACTION = 'sunburstRootToNode';\n\nvar SunburstView = ChartView.extend({\n\n type: 'sunburst',\n\n init: function () {\n },\n\n render: function (seriesModel, ecModel, api, payload) {\n var that = this;\n\n this.seriesModel = seriesModel;\n this.api = api;\n this.ecModel = ecModel;\n\n var data = seriesModel.getData();\n var virtualRoot = data.tree.root;\n\n var newRoot = seriesModel.getViewRoot();\n\n var group = this.group;\n\n var renderLabelForZeroData = seriesModel.get('renderLabelForZeroData');\n\n var newChildren = [];\n newRoot.eachNode(function (node) {\n newChildren.push(node);\n });\n var oldChildren = this._oldChildren || [];\n\n dualTravel(newChildren, oldChildren);\n\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 }\n else if (payload && payload.unhighlight) {\n var piece = this.virtualPiece;\n if (!piece && virtualRoot.children.length) {\n piece = virtualRoot.children[0].piece;\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)\n .add(processNode)\n .update(processNode)\n .remove(zrUtil.curry(processNode, null))\n .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\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(\n false, newNode, 'normal', seriesModel, ecModel);\n\n // For tooltip\n data.setItemGraphicEl(newNode.dataIndex, oldNode.piece);\n }\n else {\n // Remove\n removeNode(oldNode);\n }\n }\n else if (newNode) {\n // Add\n var piece = new SunburstPiece(\n newNode,\n seriesModel,\n ecModel\n );\n group.add(piece);\n\n // For tooltip\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(\n false, virtualRoot, 'normal', seriesModel, ecModel);\n }\n else {\n // Add\n that.virtualPiece = new SunburstPiece(\n virtualRoot,\n seriesModel,\n ecModel\n );\n group.add(that.virtualPiece);\n }\n\n if (viewRoot.piece._onclickEvent) {\n viewRoot.piece.off('click', viewRoot.piece._onclickEvent);\n }\n var event = function (e) {\n that._rootToNode(viewRoot.parentNode);\n };\n viewRoot.piece._onclickEvent = event;\n that.virtualPiece.on('click', event);\n }\n else if (that.virtualPiece) {\n // Remove\n group.remove(that.virtualPiece);\n that.virtualPiece = null;\n }\n }\n },\n\n dispose: function () {\n },\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\n && node.piece && node.piece.childAt(0) === e.target\n ) {\n var nodeClick = node.getModel().get('nodeClick');\n if (nodeClick === 'rootToNode') {\n that._rootToNode(node);\n }\n else if (nodeClick === 'link') {\n var itemModel = node.getModel();\n var link = itemModel.get('link');\n if (link) {\n var linkTarget = itemModel.get('target', true)\n || '_blank';\n windowOpen(link, linkTarget);\n }\n }\n targetFound = true;\n }\n });\n };\n\n if (this.group._onclickEvent) {\n this.group.off('click', this.group._onclickEvent);\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 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\n});\n\nexport default SunburstView;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport * as echarts from '../../echarts';\nimport * as helper from '../helper/treeHelper';\n\nvar ROOT_TO_NODE_ACTION = 'sunburstRootToNode';\n\necharts.registerAction(\n {type: ROOT_TO_NODE_ACTION, update: 'updateView'},\n function (payload, ecModel) {\n\n ecModel.eachComponent(\n {mainType: 'series', subType: 'sunburst', query: payload},\n handleRootToNode\n );\n\n function handleRootToNode(model, index) {\n var targetInfo = helper\n .retrieveTargetInfo(payload, [ROOT_TO_NODE_ACTION], model);\n\n if (targetInfo) {\n var originViewRoot = model.getViewRoot();\n if (originViewRoot) {\n payload.direction = helper.aboveViewRoot(originViewRoot, targetInfo.node)\n ? 'rollUp' : 'drillDown';\n }\n model.resetViewRoot(targetInfo.node);\n }\n }\n }\n);\n\n\nvar HIGHLIGHT_ACTION = 'sunburstHighlight';\n\necharts.registerAction(\n {type: HIGHLIGHT_ACTION, update: 'updateView'},\n function (payload, ecModel) {\n\n ecModel.eachComponent(\n {mainType: 'series', subType: 'sunburst', query: payload},\n handleHighlight\n );\n\n function handleHighlight(model, index) {\n var targetInfo = helper\n .retrieveTargetInfo(payload, [HIGHLIGHT_ACTION], model);\n\n if (targetInfo) {\n payload.highlight = targetInfo.node;\n }\n }\n }\n);\n\n\nvar UNHIGHLIGHT_ACTION = 'sunburstUnhighlight';\n\necharts.registerAction(\n {type: UNHIGHLIGHT_ACTION, update: 'updateView'},\n function (payload, ecModel) {\n\n ecModel.eachComponent(\n {mainType: 'series', subType: 'sunburst', query: payload},\n handleUnhighlight\n );\n\n function handleUnhighlight(model, index) {\n payload.unhighlight = true;\n }\n }\n);\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\nimport { parsePercent } from '../../util/number';\nimport * as zrUtil from 'zrender/src/core/util';\n\n// var PI2 = Math.PI * 2;\nvar RADIAN = Math.PI / 180;\n\nexport default function (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 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\n var startAngle = -seriesModel.get('startAngle') * RADIAN;\n var minAngle = seriesModel.get('minAngle') * RADIAN;\n\n var virtualRoot = seriesModel.getData().tree.root;\n var treeRoot = seriesModel.getViewRoot();\n var rootDepth = treeRoot.depth;\n\n var sort = seriesModel.get('sort');\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\n var sum = treeRoot.getValue();\n // Sum may be 0\n var unitRadian = Math.PI / (sum || validDataCount) * 2;\n\n var renderRollupNode = treeRoot.depth > 0;\n var levels = treeRoot.height - (renderRollupNode ? -1 : 1);\n var rPerLevel = (r - r0) / (levels || 1);\n\n var clockwise = seriesModel.get('clockwise');\n\n var stillShowZeroSum = seriesModel.get('stillShowZeroSum');\n\n // 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 /**\n * Render a tree\n * @return increased angle\n */\n var renderNode = function (node, startAngle) {\n if (!node) {\n return;\n }\n\n var endAngle = startAngle;\n\n // Render self\n if (node !== virtualRoot) {\n // Tree node is virtual, so it doesn't need to be drawn\n var value = node.getValue();\n\n var angle = (sum === 0 && stillShowZeroSum)\n ? unitRadian : (value * unitRadian);\n if (angle < minAngle) {\n angle = minAngle;\n // restAngle -= minAngle;\n }\n // else {\n // valueSumLargerThanMinAngle += value;\n // }\n\n endAngle = startAngle + dir * angle;\n\n var depth = node.depth - rootDepth\n - (renderRollupNode ? -1 : 1);\n var rStart = r0 + rPerLevel * depth;\n var rEnd = r0 + rPerLevel * (depth + 1);\n\n var itemModel = node.getModel();\n if (itemModel.get('r0') != null) {\n rStart = parsePercent(itemModel.get('r0'), size / 2);\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 }\n\n // Render children\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 };\n\n // Virtual root node for roll up\n if (renderRollupNode) {\n var rStart = r0;\n var rEnd = r0 + rPerLevel;\n\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/**\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 */\nfunction initChildren(node, isAsc) {\n var children = node.children || [];\n\n node.children = sort(children, isAsc);\n\n // Init children recursively\n if (children.length) {\n zrUtil.each(node.children, function (child) {\n initChildren(child, isAsc);\n });\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 */\nfunction sort(children, sortOrder) {\n if (typeof sortOrder === 'function') {\n return children.sort(sortOrder);\n }\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\n ? (a.dataIndex - b.dataIndex) * (isAsc ? -1 : 1)\n : diff;\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\nimport * as echarts from '../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\n\nimport './sunburst/SunburstSeries';\nimport './sunburst/SunburstView';\nimport './sunburst/sunburstAction';\n\nimport dataColor from '../visual/dataColor';\nimport sunburstLayout from './sunburst/sunburstLayout';\nimport dataFilter from '../processor/dataFilter';\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\nimport * as zrUtil from 'zrender/src/core/util';\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'\n ? axis.getBandWidth()\n : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize));\n }, this);\n}\n\nexport default function (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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\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\nexport default function (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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\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'\n ? axis.getBandWidth()\n : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize));\n}\n\nexport default function (coordSys) {\n var rect = coordSys.getRect();\n\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\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\n var result = axis.type === 'category'\n ? axis.getBandWidth()\n : 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\n }, this);\n}\n\nexport default function (coordSys) {\n var radiusAxis = coordSys.getRadiusAxis();\n var angleAxis = coordSys.getAngleAxis();\n var radius = radiusAxis.getExtent();\n radius[0] > radius[1] && radius.reverse();\n\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nexport default function (coordSys) {\n var rect = coordSys.getRect();\n var rangeInfo = coordSys.getRangeInfo();\n\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {__DEV__} from '../config';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphicUtil from '../util/graphic';\nimport {getDefaultLabel} from './helper/labelHelper';\nimport createListFromArray from './helper/createListFromArray';\nimport {getLayoutOnAxis} from '../layout/barGrid';\nimport DataDiffer from '../data/DataDiffer';\nimport SeriesModel from '../model/Series';\nimport Model from '../model/Model';\nimport ChartView from '../view/Chart';\nimport {createClipPath} from './helper/createClipPathFromCoordSys';\n\nimport prepareCartesian2d from '../coord/cartesian/prepareCustom';\nimport prepareGeo from '../coord/geo/prepareCustom';\nimport prepareSingleAxis from '../coord/single/prepareCustom';\nimport preparePolar from '../coord/polar/prepareCustom';\nimport prepareCalendar from '../coord/calendar/prepareCustom';\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'];\n// Use prefix to avoid index to be the same as el.name,\n// which will cause weird udpate animation.\nvar GROUP_DIFF_PREFIX = 'e\\0\\0';\n\n\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 */\nvar prepareCustoms = {\n cartesian2d: prepareCartesian2d,\n geo: prepareGeo,\n singleAxis: prepareSingleAxis,\n polar: preparePolar,\n calendar: prepareCalendar\n};\n\n\n// ------\n// Model\n// ------\n\nSeriesModel.extend({\n\n type: 'series.custom',\n\n dependencies: ['grid', 'polar', 'geo', 'singleAxis', 'calendar'],\n\n defaultOption: {\n coordinateSystem: 'cartesian2d', // Can be set as 'none'\n zlevel: 0,\n z: 2,\n legendHoverLink: true,\n\n useTransform: true,\n\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\n\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n\n // Polar coordinate system\n // polarIndex: 0,\n\n // Geo coordinate system\n // geoIndex: 0,\n\n // label: {}\n // itemStyle: {}\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\n// -----\n// View\n// -----\n\nChartView.extend({\n\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);\n\n // 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 data.diff(oldData)\n .add(function (newIdx) {\n createOrUpdate(\n null, newIdx, renderItem(newIdx, payload), customSeries, group, data\n );\n })\n .update(function (newIdx, oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n createOrUpdate(\n el, newIdx, renderItem(newIdx, payload), customSeries, group, data\n );\n })\n .remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && group.remove(el);\n })\n .execute();\n\n // Do clipping\n var clipPath = customSeries.get('clip', true)\n ? createClipPath(customSeries.coordinateSystem, false, customSeries)\n : null;\n if (clipPath) {\n group.setClipPath(clipPath);\n }\n else {\n group.removeClipPath();\n }\n\n this._data = data;\n },\n\n incrementalPrepareRender: function (customSeries, ecModel, api) {\n this.group.removeAll();\n this._data = null;\n },\n\n incrementalRender: function (params, customSeries, ecModel, api, payload) {\n var data = customSeries.getData();\n var renderItem = makeRenderItem(customSeries, data, ecModel, api);\n function setIncrementalAndHoverLayer(el) {\n if (!el.isGroup) {\n el.incremental = true;\n el.useHoverLayer = true;\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 if (elementName == null || targetEl.name === elementName) {\n return true;\n }\n\n // Enable to give a name on a group made by `renderItem`, and listen\n // events that triggerd by its descendents.\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\n\nfunction createEl(elOption) {\n var graphicType = elOption.type;\n var el;\n\n // Those graphic elements are not shapes. They should not be\n // overwritten by users, so do them first.\n if (graphicType === 'path') {\n var shape = elOption.shape;\n // Using pathRect brings convenience to users sacle svg path.\n var pathRect = (shape.width != null && shape.height != null)\n ? {\n x: shape.x || 0,\n y: shape.y || 0,\n width: shape.width,\n height: shape.height\n }\n : null;\n var pathData = getPathData(shape);\n // Path is also used for icon, so layout 'center' by default.\n el = graphicUtil.makePath(pathData, null, pathRect, shape.layout || 'center');\n el.__customPathData = pathData;\n }\n else if (graphicType === 'image') {\n el = new graphicUtil.Image({});\n el.__customImagePath = elOption.style.image;\n }\n else if (graphicType === 'text') {\n el = new graphicUtil.Text({});\n el.__customText = elOption.style.text;\n }\n else if (graphicType === 'group') {\n el = new graphicUtil.Group();\n }\n else if (graphicType === 'compoundPath') {\n throw new Error('\"compoundPath\" is not supported yet.');\n }\n else {\n var Clz = graphicUtil.getShapeClass(graphicType);\n\n if (__DEV__) {\n zrUtil.assert(Clz, 'graphic type \"' + graphicType + '\" can not be found.');\n }\n\n el = new Clz();\n }\n\n el.__customGraphicType = graphicType;\n el.name = elOption.name;\n\n return el;\n}\n\nfunction updateEl(el, dataIndex, elOption, animatableModel, data, isInit, isRoot) {\n var transitionProps = {};\n var elOptionStyle = elOption.style || {};\n\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 });\n // Compatible with previous: both support\n // textFill and fill, textStroke and stroke in 'text' element.\n !elOptionStyle.hasOwnProperty('textFill') && elOptionStyle.fill && (\n elOptionStyle.textFill = elOptionStyle.fill\n );\n !elOptionStyle.hasOwnProperty('textStroke') && elOptionStyle.stroke && (\n elOptionStyle.textStroke = elOptionStyle.stroke\n );\n }\n\n if (el.type !== 'group') {\n el.useStyle(elOptionStyle);\n\n // Init animation.\n if (isInit) {\n el.style.opacity = 0;\n var targetOpacity = elOptionStyle.opacity;\n targetOpacity == null && (targetOpacity = 1);\n graphicUtil.initProps(el, {style: {opacity: targetOpacity}}, animatableModel, dataIndex);\n }\n }\n\n if (isInit) {\n el.attr(transitionProps);\n }\n else {\n graphicUtil.updateProps(el, transitionProps, animatableModel, dataIndex);\n }\n\n // Merge by default.\n // z2 must not be null/undefined, otherwise sort error may occur.\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);\n // `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 elOption.hasOwnProperty('info') && el.attr('info', elOption.info);\n\n // If `elOption.styleEmphasis` is `false`, remove hover style. The\n // logic is ensured by `graphicUtil.setElementHoverStyle`.\n var styleEmphasis = elOption.styleEmphasis;\n // hoverStyle should always be set here, because if the hover style\n // may already be changed, where the inner cache should be reset.\n graphicUtil.setElementHoverStyle(el, styleEmphasis);\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 if (__DEV__) {\n zrUtil.assert(renderItem, 'series.render is required.');\n zrUtil.assert(\n coordSys.prepareCustoms || prepareCustoms[coordSys.type],\n 'This coordSys does not support custom series.'\n );\n }\n\n prepareResult = coordSys.prepareCustoms\n ? coordSys.prepareCustoms()\n : 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\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 };\n\n // Do not support call `api` asynchronously without dataIndexInside input.\n var currDataIndexInside;\n var currDirty = true;\n var currItemModel;\n var currLabelNormalModel;\n var currLabelEmphasisModel;\n var currVisualColor;\n\n return function (dataIndexInside, payload) {\n currDataIndexInside = dataIndexInside;\n currDirty = true;\n\n return renderItem && renderItem(\n 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),\n userAPI\n );\n };\n\n // Do not update cache until api called.\n function updateCache(dataIndexInside) {\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\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\n currDirty = false;\n }\n }\n\n /**\n * @public\n * @param {number|string} dim\n * @param {number} [dataIndexInside=currDataIndexInside]\n * @return {number|string} value\n */\n function value(dim, dataIndexInside) {\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n return data.get(data.getDimension(dim || 0), dataIndexInside);\n }\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 function style(extra, dataIndexInside) {\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n updateCache(dataIndexInside);\n\n var itemStyle = currItemModel.getModel(ITEM_STYLE_NORMAL_PATH).getItemStyle();\n\n currVisualColor != null && (itemStyle.fill = currVisualColor);\n var opacity = data.getItemVisual(dataIndexInside, 'opacity');\n opacity != null && (itemStyle.opacity = opacity);\n\n var labelModel = extra\n ? applyExtraBefore(extra, currLabelNormalModel)\n : currLabelNormalModel;\n\n graphicUtil.setTextStyle(itemStyle, labelModel, null, {\n autoColor: currVisualColor,\n isRectText: true\n });\n\n itemStyle.text = labelModel.getShallow('show')\n ? zrUtil.retrieve2(\n customSeries.getFormattedLabel(dataIndexInside, 'normal'),\n getDefaultLabel(data, dataIndexInside)\n )\n : null;\n\n extra && applyExtraAfter(itemStyle, extra);\n\n return itemStyle;\n }\n\n /**\n * @public\n * @param {Object} [extra]\n * @param {number} [dataIndexInside=currDataIndexInside]\n */\n function styleEmphasis(extra, dataIndexInside) {\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n updateCache(dataIndexInside);\n\n var itemStyle = currItemModel.getModel(ITEM_STYLE_EMPHASIS_PATH).getItemStyle();\n\n var labelModel = extra\n ? applyExtraBefore(extra, currLabelEmphasisModel)\n : currLabelEmphasisModel;\n\n graphicUtil.setTextStyle(itemStyle, labelModel, null, {\n isRectText: true\n }, true);\n\n itemStyle.text = labelModel.getShallow('show')\n ? zrUtil.retrieve3(\n customSeries.getFormattedLabel(dataIndexInside, 'emphasis'),\n customSeries.getFormattedLabel(dataIndexInside, 'normal'),\n getDefaultLabel(data, dataIndexInside)\n )\n : null;\n\n extra && applyExtraAfter(itemStyle, extra);\n\n return itemStyle;\n }\n\n /**\n * @public\n * @param {string} visualType\n * @param {number} [dataIndexInside=currDataIndexInside]\n */\n function visual(visualType, dataIndexInside) {\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n return data.getItemVisual(dataIndexInside, visualType);\n }\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 function barLayout(opt) {\n if (coordSys.getBaseAxis) {\n var baseAxis = coordSys.getBaseAxis();\n return getLayoutOnAxis(zrUtil.defaults({axis: baseAxis}, opt), api);\n }\n }\n\n /**\n * @public\n * @return {Array.<number>}\n */\n function currentSeriesIndices() {\n return ecModel.getCurrentSeriesIndices();\n }\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 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 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\n return el;\n}\n\nfunction doCreateOrUpdate(el, dataIndex, elOption, animatableModel, group, data, isRoot) {\n\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\n var simplyRemove = !elOption; // `null`/`undefined`/`false`\n elOption = elOption || {};\n var elOptionType = elOption.type;\n var elOptionShape = elOption.shape;\n var elOptionStyle = elOption.style;\n\n if (el && (\n simplyRemove\n // || elOption.$merge === false\n // If `elOptionType` is `null`, follow the merge principle.\n || (elOptionType != null\n && elOptionType !== el.__customGraphicType\n )\n || (elOptionType === 'path'\n && hasOwnPathData(elOptionShape) && getPathData(elOptionShape) !== el.__customPathData\n )\n || (elOptionType === 'image'\n && hasOwn(elOptionStyle, 'image') && elOptionStyle.image !== el.__customImagePath\n )\n // FIXME test and remove this restriction?\n || (elOptionType === 'text'\n && hasOwn(elOptionShape, 'text') && elOptionStyle.text !== el.__customText\n )\n )) {\n group.remove(el);\n el = null;\n }\n\n // `elOption.type` is undefined when `renderItem` returns nothing.\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 }\n\n // Always add whatever already added to ensure sequence.\n group.add(el);\n\n return el;\n}\n\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.\nfunction mergeChildren(el, dataIndex, elOption, animatableModel, data) {\n var newChildren = elOption.children;\n var newLen = newChildren ? newChildren.length : 0;\n var mergeChildren = elOption.$mergeChildren;\n // `diffChildrenByName` has been deprecated.\n var byName = mergeChildren === 'byName' || elOption.diffChildrenByName;\n var notMerge = mergeChildren === false;\n\n // For better performance on roam update, only enter if necessary.\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();\n\n // Mapping children of a group simply by index, which\n // might be better performance.\n var index = 0;\n for (; index < newLen; index++) {\n newChildren[index] && doCreateOrUpdate(\n el.childAt(index),\n dataIndex,\n newChildren[index],\n animatableModel,\n el,\n data\n );\n }\n if (__DEV__) {\n zrUtil.assert(\n !notMerge || el.childCount() === index,\n 'MUST NOT contain empty item in children array when `group.$mergeChildren` is `false`.'\n );\n }\n}\n\nfunction diffGroupChildren(context) {\n (new DataDiffer(\n context.oldChildren,\n context.newChildren,\n getKey,\n getKey,\n context\n ))\n .add(processAddUpdate)\n .update(processAddUpdate)\n .remove(processRemove)\n .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\n doCreateOrUpdate(\n child,\n context.dataIndex,\n childOption,\n context.animatableModel,\n context.group,\n context.data\n );\n}\n\n// `graphic#applyDefaultTextStyle` will cache\n// textFill, textStroke, textStrokeWidth.\n// We have to do this trick.\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)\n || !CACHED_LABEL_STYLE_PROPERTIES.hasOwnProperty(key)\n ) {\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\nimport './gridSimple';\nimport './axisPointer/CartesianAxisPointer';\nimport './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\nimport * as zrUtil from 'zrender/src/core/util';\nimport {parsePercent} from '../util/number';\nimport {isDimensionStacked} from '../data/helper/dataStackHelper';\n\nfunction getSeriesStackId(seriesModel) {\n return seriesModel.get('stack')\n || '__ec_stack_' + seriesModel.seriesIndex;\n}\n\nfunction getAxisKey(polar, axis) {\n return axis.dim + polar.model.componentIndex;\n}\n\n/**\n * @param {string} seriesType\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n */\nfunction barLayoutPolar(seriesType, ecModel, api) {\n\n var lastStackCoords = {};\n\n var barWidthAndOffset = calRadialBar(\n zrUtil.filter(\n ecModel.getSeriesByType(seriesType),\n function (seriesModel) {\n return !ecModel.isSeriesFiltered(seriesModel)\n && seriesModel.coordinateSystem\n && seriesModel.coordinateSystem.type === 'polar';\n }\n )\n );\n\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n\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\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\n var cx = seriesModel.coordinateSystem.cx;\n var cy = seriesModel.coordinateSystem.cy;\n\n var barMinHeight = seriesModel.get('barMinHeight') || 0;\n var barMinAngle = seriesModel.get('barMinAngle') || 0;\n\n lastStackCoords[stackId] = lastStackCoords[stackId] || [];\n\n var valueDim = data.mapDimension(valueAxis.dim);\n var baseDim = data.mapDimension(baseAxis.dim);\n var stacked = isDimensionStacked(data, valueDim /*, baseDim*/);\n var clampLayout = baseAxis.dim !== 'radius'\n || !seriesModel.get('roundCap', true);\n\n var valueAxisStart = valueAxis.dim === 'radius'\n ? valueAxis.dataToRadius(0)\n : valueAxis.dataToAngle(0);\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\n var sign = value >= 0 ? 'p' : 'n';\n var baseCoord = valueAxisStart;\n\n // Because of the barMinHeight, we can not use the value in\n // stackResultDimension directly.\n // Only ordinal axis can be stacked.\n if (stacked) {\n\n if (!lastStackCoords[stackId][baseValue]) {\n lastStackCoords[stackId][baseValue] = {\n p: valueAxisStart, // Positive stack\n n: valueAxisStart // Negative stack\n };\n }\n // Should also consider #4243\n baseCoord = lastStackCoords[stackId][baseValue][sign];\n }\n\n var r0;\n var r;\n var startAngle;\n var endAngle;\n\n // radial sector\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\n stacked && (lastStackCoords[stackId][baseValue][sign] = r);\n }\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;\n\n // 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 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 }\n\n }, this);\n\n}\n\n/**\n * Calculate bar width and offset for radial bar charts\n */\nfunction calRadialBar(barSeries, api) {\n // Columns info on each category axis. Key is polar name\n var columnsMap = {};\n\n zrUtil.each(barSeries, function (seriesModel, idx) {\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n\n var baseAxis = polar.getBaseAxis();\n var axisKey = getAxisKey(polar, baseAxis);\n\n var axisExtent = baseAxis.getExtent();\n var bandWidth = baseAxis.type === 'category'\n ? baseAxis.getBandWidth()\n : (Math.abs(axisExtent[1] - axisExtent[0]) / data.count());\n\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\n var stackId = getSeriesStackId(seriesModel);\n\n if (!stacks[stackId]) {\n columnsOnAxis.autoWidthCount++;\n }\n stacks[stackId] = stacks[stackId] || {\n width: 0,\n maxWidth: 0\n };\n\n var barWidth = parsePercent(\n seriesModel.get('barWidth'),\n bandWidth\n );\n var barMaxWidth = parsePercent(\n seriesModel.get('barMaxWidth'),\n bandWidth\n );\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\n\n var result = {};\n\n zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {\n\n result[coordSysName] = {};\n\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\n var remainedWidth = columnsOnAxis.remainedWidth;\n var autoWidthCount = columnsOnAxis.autoWidthCount;\n var autoWidth = (remainedWidth - categoryGap)\n / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n\n // Find if any auto calculated bar exceeded maxBarWidth\n zrUtil.each(stacks, function (column, stack) {\n var maxWidth = column.maxWidth;\n if (maxWidth && maxWidth < autoWidth) {\n maxWidth = Math.min(maxWidth, remainedWidth);\n if (column.width) {\n maxWidth = Math.min(maxWidth, column.width);\n }\n remainedWidth -= maxWidth;\n column.width = maxWidth;\n autoWidthCount--;\n }\n });\n\n // Recalculate width again\n autoWidth = (remainedWidth - categoryGap)\n / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n\n var widthSum = 0;\n var lastColumn;\n zrUtil.each(stacks, function (column, idx) {\n if (!column.width) {\n column.width = autoWidth;\n }\n lastColumn = column;\n widthSum += column.width * (1 + barGapPercent);\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\n offset += column.width * (1 + barGapPercent);\n });\n });\n\n return result;\n}\n\nexport default barLayoutPolar;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport Axis from '../Axis';\n\nfunction RadiusAxis(scale, radiusExtent) {\n\n Axis.call(this, 'radius', scale, radiusExtent);\n\n /**\n * Axis type\n * - 'category'\n * - 'value'\n * - 'time'\n * - 'log'\n * @type {string}\n */\n this.type = 'category';\n}\n\nRadiusAxis.prototype = {\n\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\n dataToRadius: Axis.prototype.dataToCoord,\n\n radiusToData: Axis.prototype.coordToData\n};\n\nzrUtil.inherits(RadiusAxis, Axis);\n\nexport default RadiusAxis;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as textContain from 'zrender/src/contain/text';\nimport Axis from '../Axis';\nimport {makeInner} from '../../util/model';\n\nvar inner = makeInner();\n\nfunction AngleAxis(scale, angleExtent) {\n\n angleExtent = angleExtent || [0, 360];\n\n Axis.call(this, 'angle', scale, angleExtent);\n\n /**\n * Axis type\n * - 'category'\n * - 'value'\n * - 'time'\n * - 'log'\n * @type {string}\n */\n this.type = 'category';\n}\n\nAngleAxis.prototype = {\n\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\n dataToAngle: Axis.prototype.dataToCoord,\n\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\n var ordinalScale = axis.scale;\n var ordinalExtent = ordinalScale.getExtent();\n // Providing this method is for optimization:\n // avoid generating a long array by `getTicks`\n // in large category data case.\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);\n\n // Not precise, just use height as text width\n // and each distance from axis line yet.\n var rect = textContain.getBoundingRect(\n tickValue, labelModel.getFont(), 'center', 'top'\n );\n var maxH = Math.max(rect.height, 7);\n\n var dh = maxH / unitH;\n // 0/0 is NaN, 1/0 is Infinity.\n isNaN(dh) && (dh = Infinity);\n var interval = Math.max(0, Math.floor(dh));\n\n var cache = inner(axis.model);\n var lastAutoInterval = cache.lastAutoInterval;\n var lastTickCount = cache.lastTickCount;\n\n // 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 if (lastAutoInterval != null\n && lastTickCount != null\n && Math.abs(lastAutoInterval - interval) <= 1\n && Math.abs(lastTickCount - tickCount) <= 1\n // Always choose the bigger one, otherwise the critical\n // point is not the same when zooming in or zooming out.\n && lastAutoInterval > interval\n ) {\n interval = lastAutoInterval;\n }\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};\n\nzrUtil.inherits(AngleAxis, Axis);\n\nexport default AngleAxis;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\nimport RadiusAxis from './RadiusAxis';\nimport AngleAxis from './AngleAxis';\n\n/**\n * @alias {module:echarts/coord/polar/Polar}\n * @constructor\n * @param {string} name\n */\nvar Polar = function (name) {\n\n /**\n * @type {string}\n */\n this.name = name || '';\n\n /**\n * x of polar center\n * @type {number}\n */\n this.cx = 0;\n\n /**\n * y of polar center\n * @type {number}\n */\n this.cy = 0;\n\n /**\n * @type {module:echarts/coord/polar/RadiusAxis}\n * @private\n */\n this._radiusAxis = new RadiusAxis();\n\n /**\n * @type {module:echarts/coord/polar/AngleAxis}\n * @private\n */\n this._angleAxis = new AngleAxis();\n\n this._radiusAxis.polar = this._angleAxis.polar = this;\n};\n\nPolar.prototype = {\n\n type: 'polar',\n\n axisPointerEnabled: true,\n\n constructor: Polar,\n\n /**\n * @param {Array.<string>}\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.<number>} point\n * @return {boolean}\n */\n containPoint: function (point) {\n var coord = this.pointToCoord(point);\n return this._radiusAxis.contain(coord[0])\n && this._angleAxis.contain(coord[1]);\n },\n\n /**\n * If contain data\n * @param {Array.<number>} data\n * @return {boolean}\n */\n containData: function (data) {\n return this._radiusAxis.containData(data[0])\n && 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.<module:echarts/coord/Axis>}\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\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]\n || this.getAxesByScale('time')[0]\n || 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')\n ? 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.<number>} data\n * @param {boolean} [clamp=false]\n * @return {Array.<number>}\n */\n dataToPoint: function (data, clamp) {\n return this.coordToPoint([\n this._radiusAxis.dataToRadius(data[0], clamp),\n this._angleAxis.dataToAngle(data[1], clamp)\n ]);\n },\n\n /**\n * Convert a (x, y) point to data\n * @param {Array.<number>} point\n * @param {boolean} [clamp=false]\n * @return {Array.<number>}\n */\n pointToData: function (point, clamp) {\n var coord = this.pointToCoord(point);\n return [\n this._radiusAxis.radiusToData(coord[0], clamp),\n this._angleAxis.angleToData(coord[1], clamp)\n ];\n },\n\n /**\n * Convert a (x, y) point to (radius, angle) coord\n * @param {Array.<number>} point\n * @return {Array.<number>}\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]);\n // Fix fixed extent in polarCreator\n // FIXME\n angleAxis.inverse\n ? (minAngle = maxAngle - 360)\n : (maxAngle = minAngle + 360);\n\n var radius = Math.sqrt(dx * dx + dy * dy);\n dx /= radius;\n dy /= radius;\n\n var radian = Math.atan2(-dy, dx) / Math.PI * 180;\n\n // move to angleExtent\n var dir = radian < minAngle ? 1 : -1;\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.<number>} coord\n * @return {Array.<number>}\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;\n // Inverse the y\n var y = -Math.sin(radian) * radius + this.cy;\n\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\n var angleAxis = this.getAngleAxis();\n var radiusAxis = this.getRadiusAxis();\n\n var radiusExtent = radiusAxis.getExtent().slice();\n radiusExtent[0] > radiusExtent[1] && radiusExtent.reverse();\n var angleExtent = angleAxis.getExtent();\n\n var RADIAN = Math.PI / 180;\n\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\n return d2 <= r * r && d2 >= r0 * r0;\n }\n };\n }\n\n};\n\nexport default Polar;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport ComponentModel from '../../model/Component';\nimport axisModelCreator from '../axisModelCreator';\nimport axisModelCommonMixin from '../axisModelCommonMixin';\n\nvar PolarAxisModel = ComponentModel.extend({\n\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\n});\n\nzrUtil.merge(PolarAxisModel.prototype, axisModelCommonMixin);\n\nvar polarAxisDefaultExtendedOption = {\n angle: {\n // polarIndex: 0,\n // polarId: '',\n\n startAngle: 90,\n\n clockwise: true,\n\n splitNumber: 12,\n\n axisLabel: {\n rotate: false\n }\n },\n radius: {\n // polarIndex: 0,\n // polarId: '',\n\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\nimport * as echarts from '../../echarts';\nimport './AxisModel';\n\nexport default echarts.extendComponentModel({\n\n type: 'polar',\n\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\n ecModel.eachComponent(axisType, function (axisModel) {\n if (axisModel.getCoordSysModel() === this) {\n foundAxisModel = axisModel;\n }\n }, this);\n return foundAxisModel;\n },\n\n defaultOption: {\n\n zlevel: 0,\n\n z: 0,\n\n center: ['50%', '50%'],\n\n radius: '80%'\n }\n});","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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// TODO Axis scale\n\nimport {__DEV__} from '../../config';\nimport * as zrUtil from 'zrender/src/core/util';\nimport Polar from './Polar';\nimport {parsePercent} from '../../util/number';\nimport {\n createScaleByModel,\n niceScaleExtent\n} from '../../coord/axisHelper';\nimport CoordinateSystem from '../../CoordinateSystem';\nimport {getStackedDimension} from '../../data/helper/dataStackHelper';\n\nimport './PolarModel';\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\n polar.cx = parsePercent(center[0], width);\n polar.cy = parsePercent(center[1], height);\n\n var radiusAxis = polar.getRadiusAxis();\n var size = Math.min(width, height) / 2;\n\n var radius = polarModel.get('radius');\n if (radius == null) {\n radius = [0, '100%'];\n }\n else if (!zrUtil.isArray(radius)) {\n // r0 = 0\n radius = [0, radius];\n }\n radius = [\n parsePercent(radius[0], size),\n parsePercent(radius[1], size)\n ];\n\n radiusAxis.inverse\n ? radiusAxis.setExtent(radius[1], radius[0])\n : radiusAxis.setExtent(radius[0], radius[1]);\n}\n\n/**\n * Update polar\n */\nfunction updatePolarScale(ecModel, api) {\n var polar = this;\n var angleAxis = polar.getAngleAxis();\n var radiusAxis = polar.getRadiusAxis();\n // Reset scale\n angleAxis.scale.setExtent(Infinity, -Infinity);\n radiusAxis.scale.setExtent(Infinity, -Infinity);\n\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(\n data, getStackedDimension(data, dim)\n );\n });\n zrUtil.each(data.mapDimension('angle', true), function (dim) {\n angleAxis.scale.unionExtentFromData(\n data, getStackedDimension(data, dim)\n );\n });\n }\n });\n\n niceScaleExtent(angleAxis.scale, angleAxis.model);\n niceScaleExtent(radiusAxis.scale, radiusAxis.model);\n\n // Fix extent of category angle axis\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/**\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 */\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 }\n\n // Inject axis instance\n axisModel.axis = axis;\n axis.model = axisModel;\n}\n\n\nvar polarCreator = {\n\n dimensions: Polar.prototype.dimensions,\n\n create: function (ecModel, api) {\n var polarList = [];\n ecModel.eachComponent('polar', function (polarModel, idx) {\n var polar = new Polar(idx);\n // Inject resize and update method\n polar.update = updatePolarScale;\n\n var radiusAxis = polar.getRadiusAxis();\n var angleAxis = polar.getAngleAxis();\n\n var radiusAxisModel = polarModel.findAxisModel('radiusAxis');\n var angleAxisModel = polarModel.findAxisModel('angleAxis');\n\n setAxis(radiusAxis, radiusAxisModel);\n setAxis(angleAxis, angleAxisModel);\n\n resizePolar(polar, polarModel, api);\n\n polarList.push(polar);\n\n polarModel.coordinateSystem = polar;\n polar.model = polarModel;\n });\n // Inject coordinateSystem to series\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\n if (__DEV__) {\n if (!polarModel) {\n throw new Error(\n 'Polar \"' + zrUtil.retrieve(\n seriesModel.get('polarIndex'),\n seriesModel.get('polarId'),\n 0\n ) + '\" not found'\n );\n }\n }\n seriesModel.coordinateSystem = polarModel.coordinateSystem;\n }\n });\n\n return polarList;\n }\n};\n\nCoordinateSystem.register('polar', polarCreator);","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../../util/graphic';\nimport Model from '../../model/Model';\nimport AxisView from './AxisView';\nimport AxisBuilder from './AxisBuilder';\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\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}\n\n// Remove the last tick which will overlap the first tick\nfunction fixAngleOverlap(list) {\n var firstItem = list[0];\n var lastItem = list[list.length - 1];\n if (firstItem\n && lastItem\n && Math.abs(Math.abs(firstItem.coord - lastItem.coord) - 360) < 1e-4\n ) {\n list.pop();\n }\n}\n\nexport default AxisView.extend({\n\n type: 'angleAxis',\n\n axisPointerClass: 'PolarAxisPointer',\n\n render: function (angleAxisModel, ecModel) {\n this.group.removeAll();\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\n var ticksAngles = angleAxis.getTicksCoords();\n var minorTickAngles = angleAxis.getMinorTicksCoords();\n\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\n fixAngleOverlap(labels);\n fixAngleOverlap(ticksAngles);\n\n zrUtil.each(elementList, function (name) {\n if (angleAxisModel.get(name + '.show')\n && (!angleAxis.scale.isBlank() || name === 'axisLine')\n ) {\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');\n\n // extent id of the axis radius (r0 and r)\n var rId = getRadiusIdx(polar);\n var r0Id = rId ? 0 : 1;\n\n var shape;\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 }\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 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\n var tickLen = (tickModel.get('inside') ? -1 : 1) * tickModel.get('length');\n var radius = radiusExtent[getRadiusIdx(polar)];\n\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(\n lines, {\n style: zrUtil.defaults(\n tickModel.getModel('lineStyle').getLineStyle(),\n {\n stroke: angleAxisModel.get('axisLine.lineStyle.color')\n }\n )\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\n var tickLen = (tickModel.get('inside') ? -1 : 1) * minorTickModel.get('length');\n var radius = radiusExtent[getRadiusIdx(polar)];\n\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(\n lines, {\n style: zrUtil.defaults(\n minorTickModel.getModel('lineStyle').getLineStyle(),\n zrUtil.defaults(\n tickModel.getLineStyle(), {\n stroke: angleAxisModel.get('axisLine.lineStyle.color')\n }\n )\n )\n }\n ));\n },\n\n /**\n * @private\n */\n _axisLabel: function (angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent, labels) {\n var rawCategoryData = angleAxisModel.getCategories(true);\n\n var commonLabelModel = angleAxisModel.getModel('axisLabel');\n\n var labelMargin = commonLabelModel.get('margin');\n var triggerEvent = angleAxisModel.get('triggerEvent');\n\n // Use length of ticksAngles because it may remove the last tick to avoid overlapping\n zrUtil.each(labels, function (labelItem, idx) {\n var labelModel = commonLabelModel;\n var tickValue = labelItem.tickValue;\n\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\n var labelTextAlign = Math.abs(p[0] - cx) / r < 0.3\n ? 'center' : (p[0] > cx ? 'left' : 'right');\n var labelTextVerticalAlign = Math.abs(p[1] - cy) / r < 0.3\n ? 'middle' : (p[1] > cy ? 'top' : 'bottom');\n\n if (rawCategoryData && rawCategoryData[tickValue] && rawCategoryData[tickValue].textStyle) {\n labelModel = new Model(\n rawCategoryData[tickValue].textStyle, commonLabelModel, commonLabelModel.ecModel\n );\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 });\n\n // Pack data for mouse event\n if (triggerEvent) {\n textEl.eventData = AxisBuilder.makeAxisEventDataBase(angleAxisModel);\n textEl.eventData.targetType = 'axisLabel';\n textEl.eventData.value = labelItem.rawLabel;\n }\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\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n\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 }\n\n // Simple optimization\n // Batching the lines if color are the same\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\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\n areaColors = areaColors instanceof Array ? areaColors : [areaColors];\n\n var splitAreas = [];\n\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\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 }\n\n // Simple optimization\n // Batching the lines if color are the same\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* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport '../coord/polar/polarCreator';\nimport './axis/AngleAxisView';","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../../util/graphic';\nimport AxisBuilder from './AxisBuilder';\nimport AxisView from './AxisView';\n\nvar axisBuilderAttrs = [\n 'axisLine', 'axisTickLabel', 'axisName'\n];\nvar selfBuilderAttrs = [\n 'splitLine', 'splitArea', 'minorSplitLine'\n];\n\nexport default AxisView.extend({\n\n type: 'radiusAxis',\n\n axisPointerClass: 'PolarAxisPointer',\n\n render: function (radiusAxisModel, ecModel) {\n this.group.removeAll();\n if (!radiusAxisModel.get('show')) {\n return;\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\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\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\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n\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 }\n\n // Simple optimization\n // Batching the lines if color are the same\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\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\n areaColors = areaColors instanceof Array ? areaColors : [areaColors];\n\n var splitAreas = [];\n\n var prevRadius = ticksCoords[0].coord;\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 }\n\n // Simple optimization\n // Batching the lines if color are the same\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/**\n * @inner\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* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport '../coord/polar/polarCreator';\nimport './axis/RadiusAxisView';","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as formatUtil from '../../util/format';\nimport BaseAxisPointer from './BaseAxisPointer';\nimport * as graphic from '../../util/graphic';\nimport * as viewHelper from './viewHelper';\nimport * as matrix from 'zrender/src/core/matrix';\nimport AxisBuilder from '../axis/AxisBuilder';\nimport AxisView from '../axis/AxisView';\n\n\nvar PolarAxisPointer = BaseAxisPointer.extend({\n\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\n var coordValue;\n coordValue = axis['dataTo' + formatUtil.capitalFirst(axis.dim)](value);\n\n var axisPointerType = axisPointerModel.get('type');\n if (axisPointerType && axisPointerType !== 'none') {\n var elStyle = viewHelper.buildElStyle(axisPointerModel);\n var pointerOption = pointerShapeBuilder[axisPointerType](\n axis, polar, coordValue, otherExtent, elStyle\n );\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 }\n\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\n var labelRotation = axisModel.getModel('axisLabel').get('rotate') || 0;\n var labelLayout = AxisBuilder.innerTextLayout(\n axisAngle, labelRotation * Math.PI / 180, -1\n );\n align = labelLayout.textAlign;\n verticalAlign = labelLayout.textVerticalAlign;\n }\n else { // 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\n ? 'center' : (position[0] > cx ? 'left' : 'right');\n verticalAlign = Math.abs(position[1] - cy) / r < 0.3\n ? 'middle' : (position[1] > cy ? 'top' : 'bottom');\n }\n\n return {\n position: position,\n align: align,\n verticalAlign: verticalAlign\n };\n}\n\n\nvar pointerShapeBuilder = {\n\n line: function (axis, polar, coordValue, otherExtent, elStyle) {\n return axis.dim === 'angle'\n ? {\n type: 'Line',\n shape: viewHelper.makeLineShape(\n polar.coordToPoint([otherExtent[0], coordValue]),\n polar.coordToPoint([otherExtent[1], coordValue])\n )\n }\n : {\n type: 'Circle',\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: coordValue\n }\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\n return axis.dim === 'angle'\n ? {\n type: 'Sector',\n shape: viewHelper.makeSectorShape(\n polar.cx, polar.cy,\n otherExtent[0], otherExtent[1],\n // In ECharts y is negative if angle is positive\n (-coordValue - bandWidth / 2) * radian,\n (-coordValue + bandWidth / 2) * radian\n )\n }\n : {\n type: 'Sector',\n shape: viewHelper.makeSectorShape(\n polar.cx, polar.cy,\n coordValue - bandWidth / 2,\n coordValue + bandWidth / 2,\n 0, Math.PI * 2\n )\n };\n }\n};\n\nAxisView.registerAxisPointerClass('PolarAxisPointer', PolarAxisPointer);\n\nexport default PolarAxisPointer;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport barPolar from '../layout/barPolar';\n\nimport '../coord/polar/polarCreator';\nimport './angleAxis';\nimport './radiusAxis';\nimport './axisPointer';\nimport './axisPointer/PolarAxisPointer';\n\n// For reducing size of echarts.min, barLayoutPolar is required by polar.\necharts.registerLayout(zrUtil.curry(barPolar, 'bar'));\n\n// Polar view\necharts.extendComponentView({\n type: 'polar'\n});","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as modelUtil from '../../util/model';\nimport ComponentModel from '../../model/Component';\nimport Model from '../../model/Model';\nimport selectableMixin from '../../component/helper/selectableMixin';\nimport geoCreator from './geoCreator';\n\nvar GeoModel = ComponentModel.extend({\n\n type: 'geo',\n\n /**\n * @type {module:echarts/coord/geo/Geo}\n */\n coordinateSystem: null,\n\n layoutMode: 'box',\n\n init: function (option) {\n ComponentModel.prototype.init.apply(this, arguments);\n\n // Default label emphasis `show`\n modelUtil.defaultEmphasis(option, 'label', ['show']);\n },\n\n optionUpdated: function () {\n var option = this.option;\n var self = this;\n\n option.regions = geoCreator.getFilledRegions(option.regions, option.map, option.nameMap);\n\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 return optionModelMap;\n }, zrUtil.createHashMap());\n\n this.updateSelectedMap(option.regions);\n },\n\n defaultOption: {\n\n zlevel: 0,\n\n z: 0,\n\n show: true,\n\n left: 'center',\n\n top: 'center',\n\n\n // width:,\n // height:,\n // right\n // bottom\n\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\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 silent: false,\n\n // Map type\n map: '',\n\n // Define left-top, right-bottom coords to control view\n // For example, [ [180, 90], [-180, -90] ]\n boundingCoords: null,\n\n // Default on center of map\n center: null,\n\n zoom: 1,\n\n scaleLimit: null,\n\n // selectedMode: false\n\n label: {\n show: false,\n color: '#000'\n },\n\n itemStyle: {\n // color: 各异,\n borderWidth: 0.5,\n borderColor: '#444',\n color: '#eee'\n },\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\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 if (typeof formatter === 'function') {\n params.status = status;\n return formatter(params);\n }\n else if (typeof formatter === 'string') {\n return formatter.replace('{a}', name != null ? name : '');\n }\n },\n\n setZoom: function (zoom) {\n this.option.zoom = zoom;\n },\n\n setCenter: function (center) {\n this.option.center = center;\n }\n});\n\nzrUtil.mixin(GeoModel, selectableMixin);\n\nexport default GeoModel;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport MapDraw from '../helper/MapDraw';\nimport * as echarts from '../../echarts';\n\nexport default echarts.extendComponentView({\n\n type: 'geo',\n\n init: function (ecModel, api) {\n var mapDraw = new MapDraw(api, true);\n this._mapDraw = mapDraw;\n\n this.group.add(mapDraw.group);\n },\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'\n && payload.from === this.uid\n ) {\n return;\n }\n\n var mapDraw = this._mapDraw;\n if (geoModel.get('show')) {\n mapDraw.draw(geoModel, ecModel, api, this, payload);\n }\n else {\n this._mapDraw.group.removeAll();\n }\n\n this.group.silent = geoModel.get('silent');\n },\n\n dispose: function () {\n this._mapDraw && this._mapDraw.remove();\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\nimport * as echarts from '../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\n\nimport '../coord/geo/GeoModel';\nimport '../coord/geo/geoCreator';\nimport './geo/GeoView';\nimport '../action/geoRoam';\n\nfunction makeAction(method, actionInfo) {\n actionInfo.update = 'updateView';\n echarts.registerAction(actionInfo, function (payload, ecModel) {\n var selected = {};\n\n ecModel.eachComponent(\n { mainType: 'geo', 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 );\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* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as layout from '../../util/layout';\nimport * as numberUtil from '../../util/number';\nimport CoordinateSystem from '../../CoordinateSystem';\n\n// (24*60*60*1000)\nvar PROXIMATE_ONE_DAY = 86400000;\n\n/**\n * Calendar\n *\n * @constructor\n *\n * @param {Object} calendarModel calendarModel\n * @param {Object} ecModel ecModel\n * @param {Object} api api\n */\nfunction Calendar(calendarModel, ecModel, api) {\n this._model = calendarModel;\n}\n\nCalendar.prototype = {\n\n constructor: Calendar,\n\n type: 'calendar',\n\n dimensions: ['time', 'value'],\n\n // Required in createListFromData\n getDimensionsInfo: function () {\n return [{name: 'time', type: 'time'}, 'value'];\n },\n\n getRangeInfo: function () {\n return this._rangeInfo;\n },\n\n getModel: function () {\n return this._model;\n },\n\n getRect: function () {\n return this._rect;\n },\n\n getCellWidth: function () {\n return this._sw;\n },\n\n getCellHeight: function () {\n return this._sh;\n },\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\n date = numberUtil.parseDate(date);\n\n var y = date.getFullYear();\n\n var m = date.getMonth() + 1;\n m = m < 10 ? '0' + m : m;\n\n var d = date.getDate();\n d = d < 10 ? '0' + d : d;\n\n var day = date.getDay();\n\n day = Math.abs((day + 7 - this.getFirstDayOfWeek()) % 7);\n\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\n getNextNDay: function (date, n) {\n n = n || 0;\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\n return this.getDateInfo(date);\n },\n\n update: function (ecModel, api) {\n\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\n\n this._rangeInfo = this._getRangeInfo(this._initRangeOption());\n var weeks = this._rangeInfo.weeks || 1;\n var whNames = ['width', 'height'];\n var cellSize = this._model.get('cellSize').slice();\n var layoutParams = this._model.getBoxLayoutParams();\n var cellNumbers = this._orient === 'horizontal' ? [weeks, 7] : [7, weeks];\n\n zrUtil.each([0, 1], function (idx) {\n if (cellSizeSpecified(cellSize, idx)) {\n layoutParams[whNames[idx]] = cellSize[idx] * cellNumbers[idx];\n }\n });\n\n var whGlobal = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var calendarRect = this._rect = layout.getLayoutRect(layoutParams, whGlobal);\n\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 /**\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\n var dayInfo = this.getDateInfo(data);\n var range = this._rangeInfo;\n var date = dayInfo.formatedDate;\n\n // if not in range return [NaN, NaN]\n if (clamp && !(\n dayInfo.time >= range.start.time\n && dayInfo.time < range.end.time + PROXIMATE_ONE_DAY\n )) {\n return [NaN, NaN];\n }\n\n var week = dayInfo.day;\n var nthWeek = this._getRangeInfo([range.start.time, date]).nthWeek;\n\n if (this._orient === 'vertical') {\n return [\n this._rect.x + week * this._sw + this._sw / 2,\n this._rect.y + nthWeek * this._sh + this._sh / 2\n ];\n\n }\n\n return [\n this._rect.x + nthWeek * this._sw + this._sw / 2,\n this._rect.y + week * this._sh + this._sh / 2\n ];\n\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\n var date = this.pointToDate(point);\n\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\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\n center: point,\n\n tl: [\n point[0] - this._sw / 2,\n point[1] - this._sh / 2\n ],\n\n tr: [\n point[0] + this._sw / 2,\n point[1] - this._sh / 2\n ],\n\n br: [\n point[0] + this._sw / 2,\n point[1] + this._sh / 2\n ],\n\n bl: [\n point[0] - this._sw / 2,\n point[1] + this._sh / 2\n ]\n\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\n var start = this.getDateInfo(rg);\n var firstDay = start.date;\n firstDay.setMonth(firstDay.getMonth() + 1);\n\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 = [\n this.getDateInfo(range[0]),\n this.getDateInfo(range[1])\n ];\n\n var reversed;\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)\n - Math.floor(range[0].time / PROXIMATE_ONE_DAY) + 1;\n\n // Consider case1 (#11677 #10430):\n // Set the system timezone as \"UK\", set the range to `['2016-07-01', '2016-12-31']`\n\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 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);\n // The bias can not over a month, so just compare date.\n var dateNum = date.getDate();\n if (dateNum !== endDateNum) {\n var sign = date.getTime() - range[1].time > 0 ? 1 : -1;\n while (\n (dateNum = date.getDate()) !== endDateNum\n && (date.getTime() - range[1].time) * sign > 0\n ) {\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\n reversed && range.reverse();\n\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\n || (nthWeek === 0 && day < rangeInfo.fweek)\n || (nthWeek === rangeInfo.weeks && day > rangeInfo.lweek)\n ) {\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\n return this.getDateInfo(date);\n }\n};\n\nCalendar.dimensions = Calendar.prototype.dimensions;\n\nCalendar.getDimensionsInfo = Calendar.prototype.getDimensionsInfo;\n\nCalendar.create = function (ecModel, api) {\n var calendarList = [];\n\n ecModel.eachComponent('calendar', function (calendarModel) {\n var calendar = new Calendar(calendarModel, ecModel, api);\n calendarList.push(calendar);\n calendarModel.coordinateSystem = calendar;\n });\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\n var coordSys = calendarModel\n ? calendarModel.coordinateSystem\n : seriesModel\n ? seriesModel.coordinateSystem\n : null;\n\n return coordSys === this ? coordSys[methodName](value) : null;\n}\n\nCoordinateSystem.register('calendar', Calendar);\n\nexport default Calendar;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport ComponentModel from '../../model/Component';\nimport {\n getLayoutParams,\n sizeCalculable,\n mergeLayoutParam\n} from '../../util/layout';\n\nvar CalendarModel = ComponentModel.extend({\n\n type: 'calendar',\n\n /**\n * @type {module:echarts/coord/calendar/Calendar}\n */\n coordinateSystem: null,\n\n defaultOption: {\n zlevel: 0,\n z: 2,\n left: 80,\n top: 60,\n\n cellSize: 20,\n\n // horizontal vertical\n orient: 'horizontal',\n\n // month separate line style\n splitLine: {\n show: true,\n lineStyle: {\n color: '#000',\n width: 1,\n type: 'solid'\n }\n },\n\n // rect style temporarily unused emphasis\n itemStyle: {\n color: '#fff',\n borderWidth: 1,\n borderColor: '#ccc'\n },\n\n // week text style\n dayLabel: {\n show: true,\n\n // a week first day\n firstDay: 0,\n\n // start end\n position: 'start',\n margin: '50%', // 50% of cellSize\n nameMap: 'en',\n color: '#000'\n },\n\n // month text style\n monthLabel: {\n show: true,\n\n // start end\n position: 'start',\n margin: 5,\n\n // center or left\n align: 'center',\n\n // cn en []\n nameMap: 'en',\n formatter: null,\n color: '#000'\n },\n\n // year text style\n yearLabel: {\n show: true,\n\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\n CalendarModel.superApply(this, 'init', arguments);\n\n mergeAndNormalizeLayoutParams(option, inputPositionParams);\n },\n\n /**\n * @override\n */\n mergeOption: function (option, extraOpt) {\n CalendarModel.superApply(this, 'mergeOption', arguments);\n\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 }\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 return cellSize[hvIdx] != null && cellSize[hvIdx] !== 'auto';\n });\n\n mergeLayoutParam(target, raw, {\n type: 'box', ignoreSize: ignoreSize\n });\n}\n\nexport default CalendarModel;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../../util/graphic';\nimport * as formatUtil from '../../util/format';\nimport * as numberUtil from '../../util/number';\n\nvar MONTH_TEXT = {\n EN: [\n 'Jan', 'Feb', 'Mar',\n 'Apr', 'May', 'Jun',\n 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'\n ],\n CN: [\n '一月', '二月', '三月',\n '四月', '五月', '六月',\n '七月', '八月', '九月',\n '十月', '十一月', '十二月'\n ]\n};\n\nvar WEEK_TEXT = {\n EN: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n CN: ['日', '一', '二', '三', '四', '五', '六']\n};\n\nexport default echarts.extendComponentView({\n\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\n render: function (calendarModel, ecModel, api) {\n\n var group = this.group;\n\n group.removeAll();\n\n var coordSys = calendarModel.coordinateSystem;\n\n // range info\n var rangeData = coordSys.getRangeInfo();\n var orient = coordSys.getOrient();\n\n this._renderDayRect(calendarModel, rangeData, group);\n\n // _renderLines must be called prior to following function\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\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;\n i <= rangeData.end.time;\n i = coordSys.getNextNDay(i, 1).time\n ) {\n\n var point = coordSys.dataToRect([i], false).tl;\n\n // every rect\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\n group.add(rect);\n }\n\n },\n\n // render separate line\n _renderLines: function (calendarModel, rangeData, orient, group) {\n\n var self = this;\n\n var coordSys = calendarModel.coordinateSystem;\n\n var lineStyleModel = calendarModel.getModel('splitLine.lineStyle').getLineStyle();\n var show = calendarModel.get('splitLine.show');\n\n var lineWidth = lineStyleModel.lineWidth;\n\n this._tlpoints = [];\n this._blpoints = [];\n this._firstDayOfMonth = [];\n this._firstDayPoints = [];\n\n\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\n self._firstDayOfMonth.push(coordSys.getDateInfo(date));\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 self._blpoints.push(points[points.length - 1]);\n\n show && self._drawSplitline(points, lineStyleModel, group);\n }\n\n\n // render top/left line\n show && this._drawSplitline(self._getEdgesPoints(self._tlpoints, lineWidth, orient), lineStyleModel, group);\n\n // render bottom/right line\n show && this._drawSplitline(self._getEdgesPoints(self._blpoints, lineWidth, orient), lineStyleModel, group);\n\n },\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;\n\n // both ends of the line are extend half lineWidth\n rs[0][idx] = rs[0][idx] - lineWidth / 2;\n rs[1][idx] = rs[1][idx] + lineWidth / 2;\n\n return rs;\n },\n\n // render split line\n _drawSplitline: function (points, lineStyleModel, group) {\n\n var poyline = new graphic.Polyline({\n z2: 20,\n shape: {\n points: points\n },\n style: lineStyleModel\n });\n\n group.add(poyline);\n },\n\n // render month line of one week points\n _getLinePointsOfOneWeek: function (calendarModel, date, orient) {\n\n var coordSys = calendarModel.coordinateSystem;\n date = coordSys.getDateInfo(date);\n\n var points = [];\n\n for (var i = 0; i < 7; i++) {\n\n var tmpD = coordSys.getNextNDay(date.time, i);\n var point = coordSys.dataToRect([tmpD.time], false);\n\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 },\n\n _formatterLabel: function (formatter, params) {\n\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 },\n\n _yearTextPositionControl: function (textEl, point, orient, position, margin) {\n\n point = point.slice();\n var aligns = ['center', 'bottom'];\n\n if (position === 'bottom') {\n point[1] += margin;\n aligns = ['center', 'top'];\n }\n else if (position === 'left') {\n point[0] -= margin;\n }\n else if (position === 'right') {\n point[0] += margin;\n aligns = ['center', 'top'];\n }\n else { // top\n point[1] -= margin;\n }\n\n var rotate = 0;\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\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\n var idx = orient === 'horizontal' ? 0 : 1;\n\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\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\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({z2: 30});\n graphic.setTextStyle(yearText.style, yearLabel, {text: content}),\n yearText.attr(this._yearTextPositionControl(yearText, posPoints[pos], orient, pos, margin));\n\n group.add(yearText);\n },\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 }\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\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\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\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({z2: 30});\n zrUtil.extend(\n graphic.setTextStyle(monthText.style, monthLabel, {text: content}),\n this._monthTextPositionControl(tmp, isCenter, orient, pos, margin)\n );\n\n group.add(monthText);\n }\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 }\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\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(\n rangeData.end.time, (7 - rangeData.lweek)\n ).time;\n\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(\n rangeData.start.time, -(7 + rangeData.fweek)\n ).time;\n margin = -margin;\n }\n\n for (var i = 0; i < 7; i++) {\n\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({z2: 30});\n\n zrUtil.extend(\n graphic.setTextStyle(weekText.style, dayLabel, {text: nameMap[day]}),\n this._weekTextPositionControl(point, orient, pos, margin, cellSize)\n );\n group.add(weekText);\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\nimport '../coord/calendar/Calendar';\nimport '../coord/calendar/CalendarModel';\nimport './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\nimport {__DEV__} from '../config';\nimport * as echarts from '../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\n\nimport * as modelUtil from '../util/model';\nimport * as graphicUtil from '../util/graphic';\nimport * as layoutUtil from '../util/layout';\nimport {parsePercent} from '../util/number';\n\nvar _nonShapeGraphicElements = {\n\n // Reserved but not supported in graphic component.\n path: null,\n compoundPath: null,\n\n // Supported in graphic component.\n group: graphicUtil.Group,\n image: graphicUtil.Image,\n text: graphicUtil.Text\n};\n\n// -------------\n// Preprocessor\n// -------------\n\necharts.registerPreprocessor(function (option) {\n var graphicOption = option.graphic;\n\n // 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 if (zrUtil.isArray(graphicOption)) {\n if (!graphicOption[0] || !graphicOption[0].elements) {\n option.graphic = [{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 }\n else if (graphicOption && !graphicOption.elements) {\n option.graphic = [{elements: [graphicOption]}];\n }\n});\n\n// ------\n// Model\n// ------\n\nvar GraphicModel = echarts.extendComponentModel({\n\n type: 'graphic',\n\n defaultOption: {\n\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\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.<Object>}\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\n GraphicModel.superApply(this, 'mergeOption', arguments);\n\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\n var flattenedList = [];\n this._flatten(newList, flattenedList);\n\n var mappingResult = modelUtil.mappingToExists(existList, flattenedList);\n modelUtil.makeIdAndName(mappingResult);\n\n // Clear elOptionsToUpdate\n var elOptionsToUpdate = this._elOptionsToUpdate = [];\n\n zrUtil.each(mappingResult, function (resultItem, index) {\n var newElOption = resultItem.option;\n\n if (__DEV__) {\n zrUtil.assert(\n zrUtil.isObject(newElOption) || resultItem.exist,\n 'Empty graphic option definition'\n );\n }\n\n if (!newElOption) {\n return;\n }\n\n elOptionsToUpdate.push(newElOption);\n\n setKeyInfoToNewElOption(resultItem, newElOption);\n\n mergeNewElOptionToExist(existList, index, newElOption);\n\n setLayoutInfoToExist(existList[index], newElOption);\n\n }, this);\n\n // Clean\n for (var i = existList.length - 1; i >= 0; i--) {\n if (existList[i] == null) {\n existList.splice(i, 1);\n }\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.<Object>} optionList option list\n * @param {Array.<Object>} 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\n var children = option.children;\n if (option.type === 'group' && children) {\n this._flatten(children, result, option);\n }\n // Deleting for JSON output, and for not affecting group creation.\n delete option.children;\n }, this);\n },\n\n // FIXME\n // Pass to view using payload? setOption has a payload?\n useElOptionsToUpdate: function () {\n var els = this._elOptionsToUpdate;\n // Clear to avoid render duplicately when zooming.\n this._elOptionsToUpdate = null;\n return els;\n }\n});\n\n// -----\n// View\n// -----\n\necharts.extendComponentView({\n\n type: 'graphic',\n\n /**\n * @override\n */\n init: function (ecModel, api) {\n\n /**\n * @private\n * @type {module:zrender/core/util.HashMap}\n */\n this._elMap = zrUtil.createHashMap();\n\n /**\n * @private\n * @type {module:echarts/graphic/GraphicModel}\n */\n this._lastGraphicModel;\n },\n\n /**\n * @override\n */\n render: function (graphicModel, ecModel, api) {\n\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\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 this._lastGraphicModel = graphicModel;\n\n this._updateElements(graphicModel);\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;\n\n // Top-down tranverse to assign graphic settings to each elements.\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\n var elOptionStyle = elOption.style;\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 }\n\n // Compatible with previous setting: both support fill and textFill,\n // stroke and textStroke.\n !elOptionStyle.hasOwnProperty('textFill') && elOptionStyle.fill && (\n elOptionStyle.textFill = elOptionStyle.fill\n );\n !elOptionStyle.hasOwnProperty('textStroke') && elOptionStyle.stroke && (\n elOptionStyle.textStroke = elOptionStyle.stroke\n );\n }\n\n // Remove unnecessary props to avoid potential problems.\n var elOptionCleaned = getCleanedElOption(elOption);\n\n // For simple, do not support parent change, otherwise reorder is needed.\n if (__DEV__) {\n existEl && zrUtil.assert(\n targetElParent === existEl.parent,\n 'Changing parent is not supported.'\n );\n }\n\n if (!$action || $action === 'merge') {\n existEl\n ? existEl.attr(elOptionCleaned)\n : createEl(id, targetElParent, elOptionCleaned, elMap);\n }\n else if ($action === 'replace') {\n removeEl(existEl, elMap);\n createEl(id, targetElParent, elOptionCleaned, elMap);\n }\n else if ($action === 'remove') {\n removeEl(existEl, elMap);\n }\n\n var el = elMap.get(id);\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();\n\n // Top-down to calculate percentage width/height of group\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 var parentEl = el.parent;\n var isParentRoot = parentEl === rootGroup;\n // Like 'position:absolut' in css, default 0.\n el.__ecGraphicWidth = parsePercent(\n el.__ecGraphicWidthOption,\n isParentRoot ? apiWidth : parentEl.__ecGraphicWidth\n ) || 0;\n el.__ecGraphicHeight = parsePercent(\n el.__ecGraphicHeightOption,\n isParentRoot ? apiHeight : parentEl.__ecGraphicHeight\n ) || 0;\n }\n\n // Bottom-up tranvese all elements (consider ec resize) to locate elements.\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 ? {\n width: apiWidth,\n height: apiHeight\n }\n : {\n width: parentEl.__ecGraphicWidth,\n height: parentEl.__ecGraphicHeight\n };\n\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 layoutUtil.positionElement(\n el, elOption, containerInfo, null,\n {hv: elOption.hv, 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\n if (__DEV__) {\n zrUtil.assert(graphicType, 'graphic type MUST be set');\n }\n\n var Clz = _nonShapeGraphicElements.hasOwnProperty(graphicType)\n // Those graphic elements are not shapes. They should not be\n // overwritten by users, so do them first.\n ? _nonShapeGraphicElements[graphicType]\n : graphicUtil.getShapeClass(graphicType);\n\n if (__DEV__) {\n zrUtil.assert(Clz, 'graphic type can not be found');\n }\n\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 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}\n\n// Remove unnecessary props to avoid potential problems.\nfunction getCleanedElOption(elOption) {\n elOption = zrUtil.extend({}, elOption);\n zrUtil.each(\n ['id', 'parentId', '$action', 'hv', 'bounding'].concat(layoutUtil.LOCATION_PARAMS),\n function (name) {\n delete elOption[name];\n }\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;\n\n // Set id and type after id assigned.\n newElOption.id = resultItem.keyInfo.id;\n !newElOption.type && existElOption && (newElOption.type = existElOption.type);\n\n // Set parent id if not specified\n if (newElOption.parentId == null) {\n var newElParentOption = newElOption.parentOption;\n if (newElParentOption) {\n newElOption.parentId = newElParentOption.id;\n }\n else if (existElOption) {\n newElOption.parentId = existElOption.parentId;\n }\n }\n\n // Clear\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\n var $action = newElOption.$action || 'merge';\n if ($action === 'merge') {\n if (existElOption) {\n\n if (__DEV__) {\n var newType = newElOption.type;\n zrUtil.assert(\n !newType || existElOption.type === newType,\n 'Please set $action: \"replace\" to change `type`'\n );\n }\n\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);\n // Rigid body, use ignoreSize.\n layoutUtil.mergeLayoutParam(existElOption, newElOptCopy, {ignoreSize: true});\n // Will be used in render.\n layoutUtil.copyLayoutParams(newElOption, existElOption);\n }\n else {\n existList[index] = newElOptCopy;\n }\n }\n else if ($action === 'replace') {\n existList[index] = newElOptCopy;\n }\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 existItem.hv = newElOption.hv = [\n // Rigid body, dont care `width`.\n isSetLoc(newElOption, ['left', 'right']),\n // Rigid body, dont care `height`.\n isSetLoc(newElOption, ['top', 'bottom'])\n ];\n // Give default group size. Otherwise layout error may occur.\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;\n // Simple optimize for large amount of elements that no need event.\n if (!el.silent && !el.ignore && !eventData) {\n eventData = el.eventData = {\n componentType: 'graphic',\n componentIndex: graphicModel.componentIndex,\n name: el.name\n };\n }\n\n // `elOption.info` enables user to mount some info on\n // elements and use them in event handlers.\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\n\nvar features = {};\n\nexport function register(name, ctor) {\n features[name] = ctor;\n}\n\nexport function get(name) {\n return features[name];\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as featureManager from './featureManager';\n\nvar ToolboxModel = echarts.extendComponentModel({\n\n type: 'toolbox',\n\n layoutMode: {\n type: 'box',\n ignoreSize: true\n },\n\n optionUpdated: function () {\n ToolboxModel.superApply(this, 'optionUpdated', arguments);\n\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\n defaultOption: {\n\n show: true,\n\n z: 6,\n\n zlevel: 0,\n\n orient: 'horizontal',\n\n left: 'right',\n\n top: 'top',\n\n // right\n // bottom\n\n backgroundColor: 'transparent',\n\n borderColor: '#ccc',\n\n borderRadius: 0,\n\n borderWidth: 0,\n\n padding: 5,\n\n itemSize: 15,\n\n itemGap: 8,\n\n showTitle: true,\n\n iconStyle: {\n borderColor: '#666',\n color: 'none'\n },\n emphasis: {\n iconStyle: {\n borderColor: '#3E98C5'\n }\n },\n // textStyle: {},\n\n // feature\n\n tooltip: {\n show: false\n }\n }\n});\n\nexport default ToolboxModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {\n getLayoutRect,\n box as layoutBox,\n positionElement\n} from '../../util/layout';\nimport * as formatUtil from '../../util/format';\nimport * as graphic from '../../util/graphic';\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 */\nexport function layout(group, componentModel, api) {\n var boxLayoutParams = componentModel.getBoxLayoutParams();\n var padding = componentModel.get('padding');\n var viewportSize = {width: api.getWidth(), height: api.getHeight()};\n\n var rect = getLayoutRect(\n boxLayoutParams,\n viewportSize,\n padding\n );\n\n layoutBox(\n componentModel.get('orient'),\n group,\n componentModel.get('itemGap'),\n rect.width,\n rect.height\n );\n\n positionElement(\n group,\n boxLayoutParams,\n viewportSize,\n padding\n );\n}\n\nexport function makeBackground(rect, componentModel) {\n var padding = formatUtil.normalizeCssArray(\n componentModel.get('padding')\n );\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 });\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as textContain from 'zrender/src/contain/text';\nimport * as featureManager from './featureManager';\nimport * as graphic from '../../util/graphic';\nimport Model from '../../model/Model';\nimport DataDiffer from '../../data/DataDiffer';\nimport * as listComponentHelper from '../helper/listComponent';\n\nexport default echarts.extendComponentView({\n\n type: 'toolbox',\n\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\n var featureNames = [];\n zrUtil.each(featureOpts, function (opt, name) {\n featureNames.push(name);\n });\n\n (new DataDiffer(this._featureNames || [], featureNames))\n .add(processFeature)\n .update(processFeature)\n .remove(zrUtil.curry(processFeature, null))\n .execute();\n\n // Keep for diff.\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;\n\n // FIX#11236, merge feature title from MagicType newOption. TODO: consider seriesIndex ?\n if (payload && payload.newTitle != null && payload.featureName === featureName) {\n featureOpt.title = payload.newTitle;\n }\n\n if (featureName && !oldName) { // Create\n if (isUserFeatureName(featureName)) {\n feature = {\n model: featureModel,\n onclick: featureModel.option.onclick,\n featureName: featureName\n };\n }\n else {\n var Feature = featureManager.get(featureName);\n if (!Feature) {\n return;\n }\n feature = new Feature(featureModel, ecModel, api);\n }\n features[featureName] = feature;\n }\n else {\n feature = features[oldName];\n // If feature does not exsit.\n if (!feature) {\n return;\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;\n // FIXME\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');\n\n // 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 var icons = feature.getIcons ? feature.getIcons() : featureModel.get('icon');\n var titles = featureModel.get('title') || {};\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 var iconPaths = featureModel.iconPaths = {};\n zrUtil.each(icons, function (iconStr, iconName) {\n var path = graphic.createIcon(\n iconStr,\n {},\n {\n x: -itemSize / 2,\n y: -itemSize / 2,\n width: itemSize,\n height: itemSize\n }\n );\n path.setStyle(iconStyleModel.getItemStyle());\n path.hoverStyle = iconStyleEmphasisModel.getItemStyle();\n\n // Text position calculation\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\n var tooltipModel = toolboxModel.getModel('tooltip');\n if (tooltipModel && tooltipModel.get('show')) {\n path.attr('tooltip', zrUtil.extend({\n content: titles[iconName],\n formatter: tooltipModel.get('formatter', true)\n || 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'\n ? (toolboxModel.get('right') == null ? 'right' : 'left')\n : (toolboxModel.get('bottom') == null ? 'bottom' : 'top');\n path.setStyle({\n textFill: iconStyleEmphasisModel.get('textFill')\n || hoverStyle.fill || hoverStyle.stroke || '#000',\n textBackgroundColor: iconStyleEmphasisModel.get('textBackgroundColor'),\n textPosition: iconStyleEmphasisModel.get('textPosition') || defaultTextPosition\n });\n })\n .on('mouseout', function () {\n path.setStyle({\n textFill: null,\n textBackgroundColor: null\n });\n });\n }\n path.trigger(featureModel.get('iconStatus.' + iconName) || 'normal');\n\n group.add(path);\n path.on('click', zrUtil.bind(\n feature.onclick, feature, ecModel, api, iconName\n ));\n\n iconPaths[iconName] = path;\n });\n }\n\n listComponentHelper.layout(group, toolboxModel, api);\n // Render background after group is layout\n // FIXME\n group.add(listComponentHelper.makeBackground(group.getBoundingRect(), toolboxModel));\n\n // Adjust icon title positions to avoid them out of screen\n group.eachChild(function (icon) {\n var titleText = icon.__title;\n var hoverStyle = icon.hoverStyle;\n // May be background element\n if (hoverStyle && titleText) {\n var rect = textContain.getBoundingRect(\n titleText, textContain.makeFont(hoverStyle)\n );\n var offsetX = icon.position[0] + group.position[0];\n var offsetY = icon.position[1] + group.position[1] + itemSize;\n\n var needPutOnTop = false;\n if (offsetY + rect.height > api.getHeight()) {\n hoverStyle.textPosition = 'top';\n needPutOnTop = true;\n }\n var topOffset = needPutOnTop ? (-5 - rect.height) : (itemSize + 8);\n if (offsetX + rect.width / 2 > api.getWidth()) {\n hoverStyle.textPosition = ['100%', topOffset];\n hoverStyle.textAlign = 'right';\n }\n else if (offsetX - rect.width / 2 < 0) {\n hoverStyle.textPosition = [0, topOffset];\n hoverStyle.textAlign = 'left';\n }\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\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\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\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport env from 'zrender/src/core/env';\nimport lang from '../../../lang';\nimport * as featureManager from '../featureManager';\n\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};\n\nSaveAsImage.prototype.unusable = !env.canvasSupported;\n\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)\n || ecModel.get('backgroundColor') || '#fff',\n connectedBackgroundColor: model.get('connectedBackgroundColor'),\n excludeComponents: model.get('excludeComponents'),\n pixelRatio: model.get('pixelRatio')\n });\n // Chrome and Firefox\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 }\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 while (n--) {\n u8arr[n] = bstr.charCodeAt(n);\n }\n var blob = new Blob([u8arr]);\n window.navigator.msSaveOrOpenBlob(blob, title + '.' + type);\n }\n else {\n var lang = model.get('lang');\n var html = ''\n + '<body style=\"margin:0;\">'\n + '<img src=\"' + url + '\" style=\"max-width:100%;\" title=\"' + ((lang && lang[0]) || '') + '\" />'\n + '</body>';\n var tab = window.open();\n tab.document.write(html);\n }\n }\n};\n\nfeatureManager.register(\n 'saveAsImage', SaveAsImage\n);\n\nexport default SaveAsImage;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport lang from '../../../lang';\nimport * as featureManager from '../featureManager';\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 /* eslint-enable */\n },\n // `line`, `bar`, `stack`, `tiled`\n title: zrUtil.clone(magicTypeLang.title),\n option: {},\n seriesIndex: {}\n};\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 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};\n\nvar radioTypes = [\n ['line', 'bar'],\n ['stack']\n];\n\nproto.onclick = function (ecModel, api, type) {\n var model = this.model;\n var seriesIndex = model.get('seriesIndex.' + type);\n // Not supported magicType\n if (!seriesOptGenreator[type]) {\n return;\n }\n var newOption = {\n series: []\n };\n var generateNewSeriesTypes = function (seriesModel) {\n var seriesType = seriesModel.subType;\n var seriesId = seriesModel.id;\n var newSeriesOpt = seriesOptGenreator[type](\n 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 }\n // Modify boundaryGap\n var coordSys = seriesModel.coordinateSystem;\n if (coordSys && coordSys.type === 'cartesian2d' && (type === 'line' || type === 'bar')) {\n var categoryAxis = coordSys.getAxesByScale('ordinal')[0];\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\n newOption[axisType] = newOption[axisType] || [];\n for (var i = 0; i <= axisIndex; i++) {\n newOption[axisType][axisIndex] = newOption[axisType][axisIndex] || {};\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\n model.setIconStatus(type, 'emphasis');\n\n ecModel.eachComponent(\n {\n mainType: 'series',\n query: seriesIndex == null ? null : {\n seriesIndex: seriesIndex\n }\n }, generateNewSeriesTypes\n );\n\n var newTitle;\n // Change title of stack\n if (type === 'stack') {\n var isStack = newOption.series && newOption.series[0] && newOption.series[0].stack === INNER_STACK_KEYWORD;\n newTitle = isStack\n ? zrUtil.merge({ stack: magicTypeLang.title.tiled }, magicTypeLang.title)\n : 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});\n\nfeatureManager.register('magicType', MagicType);\n\nexport default MagicType;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as eventTool from 'zrender/src/core/event';\nimport lang from '../../../lang';\nimport * as featureManager from '../featureManager';\n\nvar dataViewLang = lang.toolbox.dataView;\n\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 */\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 if (baseAxis.type === 'category') {\n var key = baseAxis.dim + '_' + baseAxis.index;\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 seriesGroupByCategoryAxis[key].series.push(seriesModel);\n }\n else {\n otherSeries.push(seriesModel);\n }\n }\n else {\n otherSeries.push(seriesModel);\n }\n });\n\n return {\n seriesGroupByCategoryAxis: seriesGroupByCategoryAxis,\n other: otherSeries,\n meta: meta\n };\n}\n\n/**\n * Assemble content of series on cateogory axis\n * @param {Array.<module:echarts/model/Series>} series\n * @return {string}\n * @inner\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\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 });\n // Assemble table content\n var lines = [headers.join(ITEM_SPLITER)];\n for (var i = 0; i < columns[0].length; i++) {\n var items = [];\n for (var j = 0; j < columns.length; j++) {\n items.push(columns[j][i]);\n }\n lines.push(items.join(ITEM_SPLITER));\n }\n tables.push(lines.join('\\n'));\n });\n return tables.join('\\n\\n' + BLOCK_SPLITER + '\\n\\n');\n}\n\n/**\n * Assemble content of other series\n * @param {Array.<module:echarts/model/Series>} series\n * @return {string}\n * @inner\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 for (var i = 0; i < argLen - 1; i++) {\n vals[i] = arguments[i];\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/**\n * @param {module:echarts/model/Global}\n * @return {Object}\n * @inner\n */\nfunction getContentFromModel(ecModel) {\n\n var result = groupSeries(ecModel);\n\n return {\n value: zrUtil.filter([\n assembleSeriesWithCategoryAxis(result.seriesGroupByCategoryAxis),\n assembleOtherSeries(result.other)\n ], function (str) {\n return str.replace(/[\\n\\t\\s]/g, '');\n }).join('\\n\\n' + BLOCK_SPLITER + '\\n\\n'),\n\n meta: result.meta\n };\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 */\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 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 */\nfunction parseTSVContents(tsv) {\n var tsvLines = tsv.split(/\\n+/g);\n var headers = trim(tsvLines.shift()).split(itemSplitRegex);\n\n var categories = [];\n var series = zrUtil.map(headers, function (header) {\n return {\n name: header,\n data: []\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 for (var j = 0; j < items.length; j++) {\n series[j] && (series[j].data[i] = items[j]);\n }\n }\n return {\n series: series,\n categories: categories\n };\n}\n\n/**\n * @param {string} str\n * @return {Array.<Object>}\n * @inner\n */\nfunction parseListContents(str) {\n var lines = str.split(/\\n+/g);\n var seriesName = trim(lines.shift());\n\n var data = [];\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 if (!line) {\n continue;\n }\n var items = line.split(itemSplitRegex);\n var name = '';\n var value;\n var hasName = false;\n if (isNaN(items[0])) { // 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 }\n else {\n value = data[i] = [];\n }\n for (var j = 0; j < items.length; j++) {\n value.push(+items[j]);\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/**\n * @param {string} str\n * @param {Array.<Object>} blockMetaList\n * @return {Object}\n * @inner\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 }\n else {\n var result = parseListContents(block);\n newOption.series.push(result);\n }\n });\n return newOption;\n}\n\n/**\n * @alias {module:echarts/component/toolbox/feature/DataView}\n * @constructor\n * @param {module:echarts/model/Model} model\n */\nfunction DataView(model) {\n\n this._dom = null;\n\n this.model = model;\n}\n\nDataView.defaultOption = {\n show: true,\n readOnly: false,\n optionToContent: null,\n contentToOption: null,\n\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 if (this._dom) {\n container.removeChild(this._dom);\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';\n\n // Create elements\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\n var viewMain = document.createElement('div');\n var textarea = document.createElement('textarea');\n viewMain.style.cssText = 'display:block;width:100%;overflow:auto;';\n\n var optionToContent = model.get('optionToContent');\n var contentToOption = model.get('contentToOption');\n var result = getContentFromModel(ecModel);\n if (typeof optionToContent === 'function') {\n var htmlOrDom = optionToContent(api.getOption());\n if (typeof htmlOrDom === 'string') {\n viewMain.innerHTML = htmlOrDom;\n }\n else if (zrUtil.isDom(htmlOrDom)) {\n viewMain.appendChild(htmlOrDom);\n }\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\n var buttonContainer = document.createElement('div');\n buttonContainer.style.cssText = 'position:absolute;bottom:0;left:0;right:0;';\n\n var buttonStyle = 'float:right;margin-right:20px;border:none;'\n + 'cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px';\n var closeButton = document.createElement('div');\n var refreshButton = document.createElement('div');\n\n buttonStyle += ';background-color:' + model.get('buttonColor');\n buttonStyle += ';color:' + model.get('buttonTextColor');\n\n var self = this;\n\n function close() {\n container.removeChild(root);\n self._dom = null;\n }\n eventTool.addEventListener(closeButton, 'click', close);\n\n eventTool.addEventListener(refreshButton, 'click', function () {\n var newOption;\n try {\n if (typeof contentToOption === 'function') {\n newOption = contentToOption(viewMain, api.getOption());\n }\n else {\n newOption = parseContents(textarea.value, blockMetaList);\n }\n }\n catch (e) {\n close();\n throw new Error('Data view format error ' + e);\n }\n if (newOption) {\n api.dispatchAction({\n type: 'changeDataView',\n newOption: newOption\n });\n }\n\n close();\n });\n\n closeButton.innerHTML = lang[1];\n refreshButton.innerHTML = lang[2];\n refreshButton.style.cssText = buttonStyle;\n closeButton.style.cssText = buttonStyle;\n\n !model.get('readOnly') && buttonContainer.appendChild(refreshButton);\n buttonContainer.appendChild(closeButton);\n\n root.appendChild(header);\n root.appendChild(viewMain);\n root.appendChild(buttonContainer);\n\n viewMain.style.height = (container.clientHeight - 80) + 'px';\n\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/**\n * @inner\n */\nfunction tryMergeDataOption(newData, originalData) {\n return zrUtil.map(newData, function (newVal, idx) {\n var original = originalData && originalData[idx];\n if (zrUtil.isObject(original) && !zrUtil.isArray(original)) {\n var newValIsObject = zrUtil.isObject(newVal) && !zrUtil.isArray(newVal);\n if (!newValIsObject) {\n newVal = {\n value: newVal\n };\n }\n // original data has name but new data has no name\n var shouldDeleteName = original.name != null && newVal.name == null;\n // Original data has option\n newVal = zrUtil.defaults(newVal, original);\n shouldDeleteName && (delete newVal.name);\n return newVal;\n }\n else {\n return newVal;\n }\n });\n}\n\nfeatureManager.register('dataView', DataView);\n\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 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 }\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\n ecModel.mergeOption(zrUtil.defaults({\n series: newSeriesOptList\n }, payload.newOption));\n});\n\nexport default DataView;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {__DEV__} from '../../config';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../../util/graphic';\nimport * as modelUtil from '../../util/model';\nimport * as brushHelper from './brushHelper';\n\nvar each = zrUtil.each;\nvar indexOf = zrUtil.indexOf;\nvar curry = zrUtil.curry;\n\nvar COORD_CONVERTS = ['dataToPoint', 'pointToData'];\n\n// FIXME\n// how to genarialize to more coordinate systems.\nvar INCLUDE_FINDER_MAIN_TYPES = [\n 'grid', 'xAxis', 'yAxis', 'geo', 'graph',\n 'polar', 'radiusAxis', 'angleAxis', 'bmap'\n];\n\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: <a representitive cartesian in grid (first cartesian by default)>,\n * coordSyses: all cartesians.\n * gridModel: <grid component>\n * xAxes: correspond to coordSyses on index\n * yAxes: correspond to coordSyses on index\n * }\n * or {\n * panelId: ...,\n * coordSys: <geo coord sys>\n * coordSyses: [<geo coord sys>]\n * geoModel: <geo component>\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: <Array> 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.<number>}. like: {xAxisIndex: [3, 4]}\n * @param {module:echarts/model/Global} ecModel\n * @param {Object} [opt]\n * @param {Array.<string>} [opt.include] include coordinate system types.\n */\nfunction BrushTargetManager(option, ecModel, opt) {\n /**\n * @private\n * @type {Array.<Object>}\n */\n var targetInfoList = this._targetInfoList = [];\n var info = {};\n var foundCpts = parseFinder(ecModel, option);\n\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);\n // area.coordRange is the first of area.coordRanges\n if (!area.coordRange) {\n area.coordRange = coordRange;\n // 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 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(\n targetInfo.coordSyses,\n function (coordSys) {\n var result = coordConvert[area.brushType](1, coordSys, area.range);\n cb(area, result.values, coordSys, ecModel);\n }\n );\n }\n }, this);\n};\n\nproto.setInputRanges = function (areas, ecModel) {\n each(areas, function (area) {\n var targetInfo = this.findTargetInfo(area, ecModel);\n\n if (__DEV__) {\n zrUtil.assert(\n !targetInfo || targetInfo === true || area.coordRange,\n 'coordRange must be specified when coord index specified.'\n );\n zrUtil.assert(\n !targetInfo || targetInfo !== true || area.range,\n 'range must be specified in global brush.'\n );\n }\n\n area.range = area.range || [];\n\n // convert coordRange to global range and set panelId.\n if (targetInfo && targetInfo !== true) {\n area.panelId = targetInfo.panelId;\n // (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 var result = coordConvert[area.brushType](0, targetInfo.coordSys, area.coordRange);\n var rangeOffset = area.__rangeOffset;\n area.range = rangeOffset\n ? diffProcessor[area.brushType](\n result.values,\n rangeOffset.offset,\n getScales(result.xyMinMax, rangeOffset.xyMinMax)\n )\n : 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(\n rect, api, targetInfo.coordSysModel\n ),\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 || (\n targetInfo && indexOf(targetInfo.coordSyses, seriesModel.coordinateSystem) >= 0\n );\n};\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 */\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 if (areaPanelId) {\n if (targetInfo.panelId === areaPanelId) {\n return targetInfo;\n }\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(\n ecModel, option, {includeMainTypes: INCLUDE_FINDER_MAIN_TYPES}\n );\n}\n\nvar targetInfoBuilders = {\n\n grid: function (foundCpts, targetInfoList) {\n var xAxisModels = foundCpts.xAxisModels;\n var yAxisModels = foundCpts.yAxisModels;\n var gridModels = foundCpts.gridModels;\n // Remove duplicated.\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\n gridModelMap.each(function (gridModel) {\n var grid = gridModel.coordinateSystem;\n var cartesians = [];\n\n each(grid.getCartesians(), function (cartesian, index) {\n if (indexOf(xAxisModels, cartesian.getAxis('x').model) >= 0\n || indexOf(yAxisModels, cartesian.getAxis('y').model) >= 0\n ) {\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\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};\n\nvar targetInfoMatchers = [\n\n // grid\n function (foundCpts, targetInfo) {\n var xAxisModel = foundCpts.xAxisModel;\n var yAxisModel = foundCpts.yAxisModel;\n var gridModel = foundCpts.gridModel;\n\n !gridModel && xAxisModel && (gridModel = xAxisModel.axis.grid.model);\n !gridModel && yAxisModel && (gridModel = yAxisModel.axis.grid.model);\n\n return gridModel && gridModel === targetInfo.gridModel;\n },\n\n // geo\n function (foundCpts, targetInfo) {\n var geoModel = foundCpts.geoModel;\n return geoModel && geoModel === targetInfo.geoModel;\n }\n];\n\nvar panelRectBuilder = {\n\n grid: function () {\n // grid is not Transformable.\n return this.coordSys.grid.getRect().clone();\n },\n\n geo: function () {\n var coordSys = this.coordSys;\n var rect = coordSys.getBoundingRect().clone();\n // geo roam and zoom transform\n rect.applyTransform(graphic.getTransform(coordSys));\n return rect;\n }\n};\n\nvar coordConvert = {\n\n lineX: curry(axisConvert, 0),\n\n lineY: curry(axisConvert, 1),\n\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 = [\n formatMinMax([xminymin[0], xmaxymax[0]]),\n formatMinMax([xminymin[1], xmaxymax[1]])\n ];\n return {values: values, 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 {values: values, xyMinMax: xyMinMax};\n }\n};\n\nfunction axisConvert(axisNameIndex, to, coordSys, rangeOrCoordRange) {\n if (__DEV__) {\n zrUtil.assert(\n coordSys.type === 'cartesian2d',\n 'lineX/lineY brush is available only in cartesian2d.'\n );\n }\n\n var axis = coordSys.getAxis(['x', 'y'][axisNameIndex]);\n var values = formatMinMax(zrUtil.map([0, 1], function (i) {\n return to\n ? axis.coordToData(axis.toLocalCoord(rangeOrCoordRange[i]))\n : axis.toGlobalCoord(axis.dataToCoord(rangeOrCoordRange[i]));\n }));\n var xyMinMax = [];\n xyMinMax[axisNameIndex] = values;\n xyMinMax[1 - axisNameIndex] = [NaN, NaN];\n\n return {values: values, xyMinMax: xyMinMax};\n}\n\nvar diffProcessor = {\n lineX: curry(axisDiffProcessor, 0),\n\n lineY: curry(axisDiffProcessor, 1),\n\n rect: function (values, refer, scales) {\n return [\n [values[0][0] - scales[0] * refer[0][0], values[0][1] - scales[0] * refer[0][1]],\n [values[1][0] - scales[1] * refer[1][0], values[1][1] - scales[1] * refer[1][1]]\n ];\n },\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 [\n values[0] - scales[axisNameIndex] * refer[0],\n values[1] - scales[axisNameIndex] * refer[1]\n ];\n}\n\n// We have to process scale caused by dataZoom manually,\n// although it might be not accurate.\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\n ? [xyMinMax[0][1] - xyMinMax[0][0], xyMinMax[1][1] - xyMinMax[1][0]]\n : [NaN, NaN];\n}\n\nexport default BrushTargetManager;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\n\nvar each = zrUtil.each;\n\nvar ATTR = '\\0_ec_hist_store';\n\n/**\n * @param {module:echarts/model/Global} ecModel\n * @param {Object} newSnapshot {dataZoomId, batch: [payloadInfo, ...]}\n */\nexport function push(ecModel, newSnapshot) {\n var store = giveStore(ecModel);\n\n // If previous dataZoom can not be found,\n // complete an range with current range.\n each(newSnapshot, function (batchItem, dataZoomId) {\n var i = store.length - 1;\n for (; i >= 0; i--) {\n var snapshot = store[i];\n if (snapshot[dataZoomId]) {\n break;\n }\n }\n if (i < 0) {\n // No origin range set, create one by current range.\n var dataZoomModel = ecModel.queryComponents(\n {mainType: 'dataZoom', subType: 'select', id: dataZoomId}\n )[0];\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\n store.push(newSnapshot);\n}\n\n/**\n * @param {module:echarts/model/Global} ecModel\n * @return {Object} snapshot\n */\nexport function pop(ecModel) {\n var store = giveStore(ecModel);\n var head = store[store.length - 1];\n store.length > 1 && store.pop();\n\n // Find top for all dataZoom.\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 if (batchItem) {\n snapshot[dataZoomId] = batchItem;\n break;\n }\n }\n });\n\n return snapshot;\n}\n\n/**\n * @param {module:echarts/model/Global} ecModel\n */\nexport function clear(ecModel) {\n ecModel[ATTR] = null;\n}\n\n/**\n * @param {module:echarts/model/Global} ecModel\n * @return {number} records. always >= 1.\n */\nexport function count(ecModel) {\n return giveStore(ecModel).length;\n}\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.<Object>}\n */\nfunction giveStore(ecModel) {\n var store = ecModel[ATTR];\n if (!store) {\n store = ecModel[ATTR] = [{}];\n }\n return store;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport Component from '../../model/Component';\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\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as formatUtil from '../../util/format';\n\n\nvar AXIS_DIMS = ['x', 'y', 'z', 'radius', 'angle', 'single'];\n// Supported coords.\nvar COORDS = ['cartesian2d', 'polar', 'singleAxis'];\n\n/**\n * @param {string} coordType\n * @return {boolean}\n */\nexport function isCoordSupported(coordType) {\n return zrUtil.indexOf(COORDS, coordType) >= 0;\n}\n\n/**\n * Create \"each\" method to iterate names.\n *\n * @pubilc\n * @param {Array.<string>} names\n * @param {Array.<string>=} attrs\n * @return {Function}\n */\nexport function 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\n return function (callback, context) {\n zrUtil.each(names, function (name, index) {\n var nameObj = {name: name, capital: capitalNames[index]};\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/**\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 */\nexport var eachAxisDim = createNameEach(AXIS_DIMS, ['axisIndex', 'axis', 'index', 'id']);\n\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 */\nexport function createLinkedNodesFinder(forEachNode, forEachEdgeType, edgeIdGetter) {\n\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\n var existsLink;\n do {\n existsLink = false;\n forEachNode(processSingleNode);\n }\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as numberUtil from '../../util/number';\nimport * as helper from './helper';\nimport sliderMove from '../helper/sliderMove';\n\nvar each = zrUtil.each;\nvar asc = numberUtil.asc;\n\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 */\nvar AxisProxy = function (dimName, axisIndex, dataZoomModel, ecModel) {\n\n /**\n * @private\n * @type {string}\n */\n this._dimName = dimName;\n\n /**\n * @private\n */\n this._axisIndex = axisIndex;\n\n /**\n * @private\n * @type {Array.<number>}\n */\n this._valueWindow;\n\n /**\n * @private\n * @type {Array.<number>}\n */\n this._percentWindow;\n\n /**\n * @private\n * @type {Array.<number>}\n */\n this._dataExtent;\n\n /**\n * {minSpan, maxSpan, minValueSpan, maxValueSpan}\n * @private\n * @type {Object}\n */\n this._minMaxSpan;\n\n /**\n * @readOnly\n * @type {module: echarts/model/Global}\n */\n this.ecModel = ecModel;\n\n /**\n * @private\n * @type {module: echarts/component/dataZoom/DataZoomModel}\n */\n this._dataZoomModel = dataZoomModel;\n\n // /**\n // * @readOnly\n // * @private\n // */\n // this.hasSeriesStacked;\n};\n\nAxisProxy.prototype = {\n\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.<number>} Value can only be NaN or finite value.\n */\n getDataValueWindow: function () {\n return this._valueWindow.slice();\n },\n\n /**\n * @return {Array.<number>}\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\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 if (this._axisIndex === (axisModel && axisModel.componentIndex)) {\n seriesModels.push(seriesModel);\n }\n }\n }, this);\n\n return seriesModels;\n },\n\n getAxisModel: function () {\n return this.ecModel.getComponent(this._dimName + 'Axis', this._axisIndex);\n },\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 if (isCartesian) {\n coordSysIndexName = 'gridIndex';\n otherAxisDim = axisDim === 'x' ? 'y' : 'x';\n }\n else {\n coordSysIndexName = 'polarIndex';\n otherAxisDim = axisDim === 'angle' ? 'radius' : 'angle';\n }\n var foundOtherAxisModel;\n ecModel.eachComponent(otherAxisDim + 'Axis', function (otherAxisModel) {\n if ((otherAxisModel.get(coordSysIndexName) || 0)\n === (axisModel.get(coordSysIndexName) || 0)\n ) {\n foundOtherAxisModel = otherAxisModel;\n }\n });\n return foundOtherAxisModel;\n },\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 var rangePropMode = this._dataZoomModel.getRangePropMode();\n var percentExtent = [0, 100];\n var percentWindow = [];\n var valueWindow = [];\n var hasPropModeValue;\n\n each(['start', 'end'], function (prop, idx) {\n var boundPercent = opt[prop];\n var boundValue = opt[prop + 'Value'];\n\n // 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]);\n // Use scale.parse to math round for category or time axis.\n boundValue = scale.parse(numberUtil.linearMap(\n boundPercent, percentExtent, dataExtent\n ));\n }\n else {\n hasPropModeValue = true;\n boundValue = boundValue == null ? dataExtent[idx] : scale.parse(boundValue);\n // 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 boundPercent = numberUtil.linearMap(\n boundValue, dataExtent, percentExtent\n );\n }\n\n // valueWindow[idx] = round(boundValue);\n // percentWindow[idx] = round(boundPercent);\n valueWindow[idx] = boundValue;\n percentWindow[idx] = boundPercent;\n });\n\n asc(valueWindow);\n asc(percentWindow);\n\n // 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 var spans = this._minMaxSpan;\n hasPropModeValue\n ? restrictSet(valueWindow, percentWindow, dataExtent, percentExtent, false)\n : 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 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();\n // Culculate data window and data extent, and record them.\n this._dataExtent = calculateDataExtent(this, this._dimName, targetSeries);\n\n // 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\n // `calculateDataWindow` uses min/maxSpan.\n setMinMaxSpan(this);\n\n var dataWindow = this.calculateDataWindow(dataZoomModel.settledOption);\n\n this._valueWindow = dataWindow.valueWindow;\n this._percentWindow = dataWindow.percentWindow;\n\n // Update axis setting then.\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 }\n\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\n // TODO\n // filterMode 'weakFilter' and 'empty' is not optimized for huge data yet.\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 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 if (thisHasValue && !thisLeftOut && !thisRightOut) {\n return true;\n }\n thisHasValue && (hasValue = true);\n thisLeftOut && (leftOut = true);\n thisRightOut && (rightOut = true);\n }\n // If both left out and right out, do not filter.\n return hasValue && leftOut && rightOut;\n });\n }\n else {\n each(dataDims, function (dim) {\n if (filterMode === 'empty') {\n seriesModel.setData(\n seriesData = seriesData.map(dim, function (value) {\n return !isInWindow(value) ? NaN : value;\n })\n );\n }\n else {\n var range = {};\n range[dim] = valueWindow;\n\n // console.time('select');\n seriesData.selectRange(range);\n // 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\n each(seriesModels, function (seriesModel) {\n var seriesData = seriesModel.getData();\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 }\n\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 fixExtentByAxis(axisProxy, dataExtent);\n\n return dataExtent;\n}\n\nfunction fixExtentByAxis(axisProxy, dataExtent) {\n var axisModel = axisProxy.getAxisModel();\n var min = axisModel.getMin(true);\n\n // For category axis, if min/max/scale are not set, extent is determined\n // by axis.data by default.\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 }\n else if (isCategoryAxis) {\n dataExtent[0] = axisDataLen > 0 ? 0 : NaN;\n }\n\n var max = axisModel.getMax(true);\n if (max != null && max !== 'dataMax' && typeof max !== 'function') {\n dataExtent[1] = max;\n }\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 }\n\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 return dataExtent;\n}\n\nfunction setAxisModel(axisProxy, isRestore) {\n var axisModel = axisProxy.getAxisModel();\n\n var percentWindow = axisProxy._percentWindow;\n var valueWindow = axisProxy._valueWindow;\n\n if (!percentWindow) {\n return;\n }\n\n // [0, 500]: arbitrary value, guess axis extent.\n var precision = numberUtil.getPixelPrecision(valueWindow, [0, 500]);\n precision = Math.min(precision, 20);\n // isRestore or isFull\n var useOrigin = isRestore || (percentWindow[0] === 0 && percentWindow[1] === 100);\n\n axisModel.setRange(\n useOrigin ? null : +valueWindow[0].toFixed(precision),\n useOrigin ? null : +valueWindow[1].toFixed(precision)\n );\n}\n\nfunction setMinMaxSpan(axisProxy) {\n var minMaxSpan = axisProxy._minMaxSpan = {};\n var dataZoomModel = axisProxy._dataZoomModel;\n var dataExtent = axisProxy._dataExtent;\n\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));\n\n // minValueSpan and maxValueSpan has higher priority than minSpan and maxSpan\n if (valueSpan != null) {\n percentSpan = numberUtil.linearMap(\n dataExtent[0] + valueSpan, dataExtent, [0, 100], true\n );\n }\n else if (percentSpan != null) {\n valueSpan = numberUtil.linearMap(\n percentSpan, [0, 100], dataExtent, true\n ) - dataExtent[0];\n }\n\n minMaxSpan[minMax + 'Span'] = percentSpan;\n minMaxSpan[minMax + 'ValueSpan'] = valueSpan;\n });\n}\n\nexport default AxisProxy;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {__DEV__} from '../../config';\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport env from 'zrender/src/core/env';\nimport * as modelUtil from '../../util/model';\nimport * as helper from './helper';\nimport AxisProxy from './AxisProxy';\n\nvar each = zrUtil.each;\nvar eachAxisDim = helper.eachAxisDim;\n\nvar DataZoomModel = echarts.extendComponentModel({\n\n type: 'dataZoom',\n\n dependencies: [\n 'xAxis', 'yAxis', 'zAxis', 'radiusAxis', 'angleAxis', 'singleAxis', 'series'\n ],\n\n /**\n * @protected\n */\n defaultOption: {\n zlevel: 0,\n z: 4, // Higher than normal component (z: 2).\n orient: null, // Default auto by axisIndex. Possible value: 'horizontal', 'vertical'.\n xAxisIndex: null, // Default the first horizontal category axis.\n yAxisIndex: null, // Default the first vertical category axis.\n\n filterMode: 'filter', // 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\n throttle: null, // 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, // Start percent. 0 ~ 100\n end: 100, // End percent. 0 ~ 100\n startValue: null, // Start value. If startValue specified, start is ignored.\n endValue: null, // End value. If endValue specified, end is ignored.\n minSpan: null, // 0 ~ 100\n maxSpan: null, // 0 ~ 100\n minValueSpan: null, // The range of dataZoom can not be smaller than that.\n maxValueSpan: null, // The range of dataZoom can not be larger than that.\n rangeMode: null // Array, can be 'value' or 'percent'.\n },\n\n /**\n * @override\n */\n init: function (option, parentModel, ecModel) {\n\n /**\n * key like x_0, y_1\n * @private\n * @type {Object}\n */\n this._dataIntervalByAxis = {};\n\n /**\n * @private\n */\n this._dataInfo = {};\n\n /**\n * key like x_0, y_1\n * @private\n */\n this._axisProxies = {};\n\n /**\n * @readOnly\n */\n this.textStyleModel;\n\n /**\n * @private\n */\n this._autoThrottle = true;\n\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 this._rangePropMode = ['percent', 'percent'];\n\n var inputRawOption = retrieveRawOption(option);\n\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 this.settledOption = inputRawOption;\n\n this.mergeDefaultAndTheme(option, ecModel);\n\n this.doInit(inputRawOption);\n },\n\n /**\n * @override\n */\n mergeOption: function (newOption) {\n var inputRawOption = retrieveRawOption(newOption);\n\n //FIX #2591\n zrUtil.merge(this.option, newOption, true);\n zrUtil.merge(this.settledOption, inputRawOption, true);\n\n this.doInit(inputRawOption);\n },\n\n /**\n * @protected\n */\n doInit: function (inputRawOption) {\n var thisOption = this.option;\n\n // Disable realtime view update if canvas is not supported.\n if (!env.canvasSupported) {\n thisOption.realtime = false;\n }\n\n this._setDefaultThrottle(inputRawOption);\n\n updateRangeUse(this, inputRawOption);\n\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 }\n // Otherwise do nothing and use the merge result.\n }, this);\n\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\n this.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel, ecModel) {\n var axisModel = this.dependentModels[dimNames.axis][axisIndex];\n\n // If exists, share axisProxy with other dataZoomModels.\n var axisProxy = axisModel.__dzAxisProxy || (\n // Use the first dataZoomModel as the main model of axisProxy.\n axisModel.__dzAxisProxy = new AxisProxy(\n dimNames.name, axisIndex, this, ecModel\n )\n );\n // 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(\n thisOption[axisIndexName]\n );\n }, this);\n\n if (autoMode === 'axisIndex') {\n this._autoSetAxisIndex();\n }\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\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\n var orient = thisOption.orient;\n\n if (orient == null && hasIndexSpecified) {\n return 'orient';\n }\n else if (!hasIndexSpecified) {\n if (orient == null) {\n thisOption.orient = 'horizontal';\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 }\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 var axisIndices = [];\n var axisModels = this.dependentModels[dimNames.axis];\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 thisOption[dimNames.axisIndex] = axisIndices;\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来判断考虑timelog等axis type\n\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\n var axisIndex = seriesModel.get(dimNames.axisIndex);\n var axisId = seriesModel.get(dimNames.axisId);\n\n var axisModel = seriesModel.ecModel.queryComponents({\n mainType: dimNames.axis,\n index: axisIndex,\n id: axisId\n })[0];\n\n if (__DEV__) {\n if (!axisModel) {\n throw new Error(\n dimNames.axis + ' \"' + zrUtil.retrieve(\n axisIndex,\n axisId,\n 0\n ) + '\" not found'\n );\n }\n }\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;\n\n // Find the first axis\n this.eachTargetAxis(function (dimNames) {\n !dim && (dim = dimNames.name);\n }, this);\n\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\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 if (this._autoThrottle) {\n var globalOption = this.ecModel.option;\n this.option.throttle = (\n globalOption.animation && globalOption.animationDurationUpdate > 0\n ) ? 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 if (indices.length) {\n firstAxisModel = this.dependentModels[dimNames.axis][indices[0]];\n }\n }\n }, this);\n\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(\n this.get(dimNames.axisIndex),\n function (axisIndex) {\n callback.call(context, dimNames, axisIndex, this, ecModel);\n },\n this\n );\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 <start, startValue>:\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 <end or endValue> but not set <start or startValue> when calling\n // `dispatchAction`.\n // The pair <end, endValue> 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\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.<number>} [startPercent, endPercent]\n */\n getPercentRange: function () {\n var axisProxy = this.findRepresentativeAxisProxy();\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.<number>} [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 if (axisProxy) {\n return axisProxy.getDataValueWindow();\n }\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 }\n\n // Find the first hosted axisProxy\n var axisProxies = this._axisProxies;\n for (var key in axisProxies) {\n if (axisProxies.hasOwnProperty(key) && axisProxies[key].hostedBy(this)) {\n return axisProxies[key];\n }\n }\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 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.<string>}\n */\n getRangePropMode: function () {\n return this._rangePropMode.slice();\n }\n\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 */\nfunction retrieveRawOption(option) {\n var ret = {};\n each(\n ['start', 'end', 'startValue', 'endValue', 'throttle'],\n function (name) {\n option.hasOwnProperty(name) && (ret[name] = option[name]);\n }\n );\n return ret;\n}\n\nfunction updateRangeUse(dataZoomModel, inputRawOption) {\n var rangePropMode = dataZoomModel._rangePropMode;\n var rangeModeInOption = dataZoomModel.get('rangeMode');\n\n each([['start', 'startValue'], ['end', 'endValue']], function (names, index) {\n var percentSpecified = inputRawOption[names[0]] != null;\n var valueSpecified = inputRawOption[names[1]] != null;\n if (percentSpecified && !valueSpecified) {\n rangePropMode[index] = 'percent';\n }\n else if (!percentSpecified && valueSpecified) {\n rangePropMode[index] = 'value';\n }\n else if (rangeModeInOption) {\n rangePropMode[index] = rangeModeInOption[index];\n }\n else if (percentSpecified) { // percentSpecified && valueSpecified\n rangePropMode[index] = 'percent';\n }\n // else remain its original setting.\n });\n}\n\nexport default DataZoomModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport ComponentView from '../../view/Component';\n\nexport default ComponentView.extend({\n\n type: 'dataZoom',\n\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\n dataZoomModel.eachTargetAxis(function (dimNames, axisIndex) {\n var axisModel = ecModel.getComponent(dimNames.axis, axisIndex);\n if (axisModel) {\n var coordModel = axisModel.getCoordSysModel();\n coordModel && save(\n coordModel,\n axisModel,\n coordSysLists[coordModel.mainType] || (coordSysLists[coordModel.mainType] = []),\n coordModel.componentIndex\n );\n }\n }, this);\n\n function save(coordModel, axisModel, store, coordIndex) {\n var item;\n for (var i = 0; i < store.length; i++) {\n if (store[i].model === coordModel) {\n item = store[i];\n break;\n }\n }\n if (!item) {\n store.push(item = {\n model: coordModel, axisModels: [], coordIndex: coordIndex\n });\n }\n item.axisModels.push(axisModel);\n }\n\n return coordSysLists;\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\nimport DataZoomModel from './DataZoomModel';\n\nexport default DataZoomModel.extend({\n type: 'dataZoom.select'\n});\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport DataZoomView from './DataZoomView';\n\nexport default DataZoomView.extend({\n type: 'dataZoom.select'\n});","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport {createHashMap, each} from 'zrender/src/core/util';\n\necharts.registerProcessor({\n\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\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\n return seriesModelMap;\n },\n\n modifyOutputEnd: true,\n\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\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 });\n\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 dataZoomModel.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel) {\n dataZoomModel.getAxisProxy(dimNames.name, axisIndex).filterData(dataZoomModel, api);\n });\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\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\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as helper from './helper';\n\n\necharts.registerAction('dataZoom', function (payload, ecModel) {\n\n var linkedNodesFinder = helper.createLinkedNodesFinder(\n zrUtil.bind(ecModel.eachComponent, ecModel, 'dataZoom'),\n helper.eachAxisDim,\n function (model, dimNames) {\n return model.get(dimNames.axisIndex);\n }\n );\n\n var effectedModels = [];\n\n ecModel.eachComponent(\n {mainType: 'dataZoom', query: payload},\n function (model, index) {\n effectedModels.push.apply(\n effectedModels, linkedNodesFinder(model).nodes\n );\n }\n );\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 * Only work for toolbox dataZoom. User\n * MUST NOT import this module directly.\n */\n\nimport './dataZoom/typeDefaulter';\n\nimport './dataZoom/DataZoomModel';\nimport './dataZoom/DataZoomView';\n\nimport './dataZoom/SelectZoomModel';\nimport './dataZoom/SelectZoomView';\n\nimport './dataZoom/dataZoomProcessor';\nimport './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\nimport * as echarts from '../../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport BrushController from '../../helper/BrushController';\nimport BrushTargetManager from '../../helper/BrushTargetManager';\nimport * as history from '../../dataZoom/history';\nimport sliderMove from '../../helper/sliderMove';\nimport lang from '../../../lang';\nimport * as featureManager from '../featureManager';\n\n// Use dataZoomSelect\nimport '../../dataZoomSelect';\n\nvar dataZoomLang = lang.toolbox.dataZoom;\nvar each = zrUtil.each;\n\n// Spectial component id start with \\0ec\\0, see echarts/model/Global.js~hasInnerId\nvar DATA_ZOOM_ID_BASE = '\\0_ec_\\0toolbox-dataZoom_';\n\nfunction DataZoom(model, ecModel, api) {\n\n /**\n * @private\n * @type {module:echarts/component/helper/BrushController}\n */\n (this._brushController = new BrushController(api.getZr()))\n .on('brush', zrUtil.bind(this._onBrush, this))\n .mount();\n\n /**\n * @private\n * @type {boolean}\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};\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\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/**\n * @private\n */\nvar handlers = {\n\n zoom: function () {\n var nextActive = !this._isZoomActive;\n\n this.api.dispatchAction({\n type: 'takeGlobalCursor',\n key: 'dataZoomSelect',\n dataZoomSelectActive: nextActive\n });\n },\n\n back: function () {\n this._dispatchZoomAction(history.pop(this.ecModel));\n }\n};\n\n/**\n * @private\n */\nproto._onBrush = function (areas, opt) {\n if (!opt.isEnd || !areas.length) {\n return;\n }\n var snapshot = {};\n var ecModel = this.ecModel;\n\n this._brushController.updateCovers([]); // remove cover\n\n var brushTargetManager = new BrushTargetManager(\n retrieveAxisSetting(this.model.option), ecModel, {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 if (brushType === 'rect') {\n setBatch('x', coordSys, coordRange[0]);\n setBatch('y', coordSys, coordRange[1]);\n }\n else {\n setBatch(({lineX: 'x', lineY: 'y'})[brushType], coordSys, coordRange);\n }\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);\n\n // Restrict range.\n var minMaxSpan = dataZoomModel.findRepresentativeAxisProxy(axisModel).getMinMaxSpan();\n if (minMaxSpan.minValueSpan != null || minMaxSpan.maxValueSpan != null) {\n minMax = sliderMove(\n 0, minMax.slice(), axis.scale.getExtent(), 0,\n minMaxSpan.minValueSpan, minMaxSpan.maxValueSpan\n );\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({mainType: 'dataZoom', subType: 'select'}, function (dzModel) {\n var has = dzModel.getAxisModel(dimName, axisModel.componentIndex);\n has && (found = dzModel);\n });\n return found;\n }\n};\n\n/**\n * @private\n */\nproto._dispatchZoomAction = function (snapshot) {\n var batch = [];\n\n // Convert from hash map to array.\n each(snapshot, function (batchItem, dataZoomId) {\n batch.push(zrUtil.clone(batchItem));\n });\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 = {};\n // Compatible with previous setting: null => all axis, false => no axis.\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(\n 'back',\n history.count(ecModel) > 1 ? 'emphasis' : 'normal'\n );\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'\n ? payload.dataZoomSelectActive : false;\n }\n\n view._isZoomActive = zoomActive;\n\n featureModel.setIconStatus('zoom', zoomActive ? 'emphasis' : 'normal');\n\n var brushTargetManager = new BrushTargetManager(\n retrieveAxisSetting(featureModel.option), ecModel, {include: ['grid']}\n );\n\n view._brushController\n .setPanels(brushTargetManager.makePanelOpts(api, function (targetInfo) {\n return (targetInfo.xAxisDeclared && !targetInfo.yAxisDeclared)\n ? 'lineX'\n : (!targetInfo.xAxisDeclared && targetInfo.yAxisDeclared)\n ? 'lineY'\n : 'rect';\n }))\n .enableBrush(\n zoomActive\n ? {\n brushType: 'auto',\n brushStyle: featureModel.getModel('brushStyle').getItemStyle()\n }\n : false\n );\n}\n\n\nfeatureManager.register('dataZoom', DataZoom);\n\n\n// Create special dataZoom option for select\n// FIXME consider the case of merge option, where axes options are not exists.\necharts.registerPreprocessor(function (option) {\n if (!option) {\n return;\n }\n\n var dataZoomOpts = option.dataZoom || (option.dataZoom = []);\n if (!zrUtil.isArray(dataZoomOpts)) {\n option.dataZoom = dataZoomOpts = [dataZoomOpts];\n }\n\n var toolboxOpt = option.toolbox;\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;\n // FIXME: If add dataZoom when setOption in merge mode,\n // no axis info to be added. See `test/dataZoom-extreme.html`\n addForAxis('xAxis', dataZoomOpt);\n addForAxis('yAxis', dataZoomOpt);\n }\n }\n\n function addForAxis(axisName, dataZoomOpt) {\n if (!dataZoomOpt) {\n return;\n }\n\n // Try not to modify model, because it is not merged yet.\n var axisIndicesName = axisName + 'Index';\n var givenAxisIndices = dataZoomOpt[axisIndicesName];\n if (givenAxisIndices != null\n && givenAxisIndices !== 'all'\n && !zrUtil.isArray(givenAxisIndices)\n ) {\n givenAxisIndices = (givenAxisIndices === false || givenAxisIndices === 'none') ? [] : [givenAxisIndices];\n }\n\n forEachComponent(axisName, function (axisOpt, axisIndex) {\n if (givenAxisIndices != null\n && givenAxisIndices !== 'all'\n && zrUtil.indexOf(givenAxisIndices, axisIndex) === -1\n ) {\n return;\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 };\n // FIXME\n // Only support one axis now.\n newOpt[axisIndicesName] = axisIndex;\n dataZoomOpts.push(newOpt);\n });\n }\n\n function forEachComponent(mainType, cb) {\n var opts = option[mainType];\n if (!zrUtil.isArray(opts)) {\n opts = opts ? [opts] : [];\n }\n each(opts, cb);\n }\n});\n\nexport default DataZoom;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../../echarts';\nimport * as history from '../../dataZoom/history';\nimport lang from '../../../lang';\nimport * as featureManager from '../featureManager';\n\nvar restoreLang = lang.toolbox.restore;\n\nfunction Restore(model) {\n this.model = model;\n}\n\nRestore.defaultOption = {\n show: true,\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 /* eslint-enable */\n title: restoreLang.title\n};\n\nvar proto = Restore.prototype;\n\nproto.onclick = function (ecModel, api, type) {\n history.clear(ecModel);\n\n api.dispatchAction({\n type: 'restore',\n from: this.uid\n });\n};\n\nfeatureManager.register('restore', Restore);\n\necharts.registerAction(\n {type: 'restore', event: 'restore', update: 'prepareAndUpdate'},\n function (payload, ecModel) {\n ecModel.resetOption('recreate');\n }\n);\n\nexport default Restore;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport './toolbox/ToolboxModel';\nimport './toolbox/ToolboxView';\nimport './toolbox/feature/SaveAsImage';\nimport './toolbox/feature/MagicType';\nimport './toolbox/feature/DataView';\nimport './toolbox/feature/DataZoom';\nimport './toolbox/feature/Restore';","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\n\nexport default echarts.extendComponentModel({\n\n type: 'tooltip',\n\n dependencies: ['axisPointer'],\n\n defaultOption: {\n zlevel: 0,\n\n z: 60,\n\n show: true,\n\n // tooltip主体内容\n showContent: true,\n\n // 'trigger' only works on coordinate system.\n // 'item' | 'axis' | 'none'\n trigger: 'item',\n\n // 'click' | 'mousemove' | 'none'\n triggerOn: 'mousemove|click',\n\n alwaysShowContent: false,\n\n displayMode: 'single', // 'single' | 'multipleByCoordSys'\n\n renderMode: 'auto', // '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\n // 位置 {Array} | {Function}\n // position: null\n // Consider triggered from axisPointer handle, verticalAlign should be 'middle'\n // align: null,\n // verticalAlign: null,\n\n // 是否约束 content 在 viewRect 中。默认 false 是为了兼容以前版本。\n confine: false,\n\n // 内容格式器:{string}Template ¦ {Function}\n // formatter: null\n\n showDelay: 0,\n\n // 隐藏延迟单位ms\n hideDelay: 100,\n\n // 动画变换时间单位s\n transitionDuration: 0.4,\n\n enterable: false,\n\n // 提示背景颜色默认为透明度为0.7的黑色\n backgroundColor: 'rgba(50,50,50,0.7)',\n\n // 提示边框颜色\n borderColor: '#333',\n\n // 提示边框圆角单位px默认为4\n borderRadius: 4,\n\n // 提示边框线宽单位px默认为0无边框\n borderWidth: 0,\n\n // 提示内边距单位px默认各方向内边距为5\n // 接受数组分别设定上右下左边距同css\n padding: 5,\n\n // Extra css text\n extraCssText: '',\n\n // 坐标轴指示器,坐标轴触发有效\n axisPointer: {\n // 默认为直线\n // 可选为:'line' | 'shadow' | 'cross'\n type: 'line',\n\n // type 为 line 的时候有效,指定 tooltip line 所在的轴,可选\n // 可选 'x' | 'y' | 'angle' | 'radius' | 'auto'\n // 默认 'auto',会选择类型为 category 的轴,对于双数值轴,笛卡尔坐标系会默认选择 x 轴\n // 极坐标系会默认选择 angle 轴\n axis: 'auto',\n\n animation: 'auto',\n animationDurationUpdate: 200,\n animationEasingUpdate: 'exponentialOut',\n\n crossStyle: {\n color: '#999',\n width: 1,\n type: 'dashed',\n\n // TODO formatter\n textStyle: {}\n }\n\n // lineStyle and shadowStyle should not be specified here,\n // otherwise it will always override those styles on option.axisPointer.\n },\n textStyle: {\n color: '#fff',\n fontSize: 14\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\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as zrColor from 'zrender/src/tool/color';\nimport * as eventUtil from 'zrender/src/core/event';\nimport * as domUtil from 'zrender/src/core/dom';\nimport env from 'zrender/src/core/env';\nimport * as formatUtil from '../../util/format';\n\nvar each = zrUtil.each;\nvar toCamelCase = formatUtil.toCamelCase;\n\nvar vendors = ['', '-webkit-', '-moz-', '-o-'];\n\nvar gCssText = 'position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;';\n\n/**\n * @param {number} duration\n * @return {string}\n * @inner\n */\nfunction assembleTransition(duration) {\n var transitionCurve = 'cubic-bezier(0.23, 1, 0.32, 1)';\n var transitionText = 'left ' + duration + 's ' + transitionCurve + ','\n + 'top ' + duration + 's ' + transitionCurve;\n return zrUtil.map(vendors, function (vendorPrefix) {\n return vendorPrefix + 'transition:' + transitionText;\n }).join(';');\n}\n\n/**\n * @param {Object} textStyle\n * @return {string}\n * @inner\n */\nfunction assembleFont(textStyleModel) {\n var cssText = [];\n\n var fontSize = textStyleModel.get('fontSize');\n var color = textStyleModel.getTextColor();\n\n color && cssText.push('color:' + color);\n\n cssText.push('font:' + textStyleModel.getFont());\n\n var lineHeight = textStyleModel.get('lineHeight');\n if (lineHeight == null) {\n lineHeight = Math.round(fontSize * 3 / 2);\n }\n\n fontSize\n && cssText.push('line-height:' + lineHeight + 'px');\n\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\n && cssText.push('text-shadow:' + shadowOffsetX + 'px ' + shadowOffsetY + 'px '\n + shadowBlur + 'px ' + shadowColor);\n\n each(['decoration', 'align'], function (name) {\n var val = textStyleModel.get(name);\n val && cssText.push('text-' + name + ':' + val);\n });\n\n return cssText.join(';');\n}\n\n/**\n * @param {Object} tooltipModel\n * @return {string}\n * @inner\n */\nfunction assembleCssText(tooltipModel) {\n\n var cssText = [];\n\n var transitionDuration = tooltipModel.get('transitionDuration');\n var backgroundColor = tooltipModel.get('backgroundColor');\n var textStyleModel = tooltipModel.getModel('textStyle');\n var padding = tooltipModel.get('padding');\n\n // Animation transition. Do not animate when transitionDuration is 0.\n transitionDuration\n && cssText.push(assembleTransition(transitionDuration));\n\n if (backgroundColor) {\n if (env.canvasSupported) {\n cssText.push('background-Color:' + backgroundColor);\n }\n else {\n // for ie\n cssText.push(\n 'background-Color:#' + zrColor.toHex(backgroundColor)\n );\n cssText.push('filter:alpha(opacity=70)');\n }\n }\n\n // Border style\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\n && cssText.push(borderName + ':' + val + (name === 'color' ? '' : 'px'));\n });\n\n // Text style\n cssText.push(assembleFont(textStyleModel));\n\n // Padding\n if (padding != null) {\n cssText.push('padding:' + formatUtil.normalizeCssArray(padding).join('px ') + 'px');\n }\n\n return cssText.join(';') + ';';\n}\n\n// If not able to make, do not modify the input `out`.\nfunction makeStyleCoord(out, zr, appendToBody, zrX, zrY) {\n var zrPainter = zr && zr.painter;\n\n if (appendToBody) {\n var zrViewportRoot = zrPainter && zrPainter.getViewportRoot();\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 }\n else {\n out[0] = zrX;\n out[1] = zrY;\n // 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 var viewportRootOffset = zrPainter && zrPainter.getViewportRootOffset();\n if (viewportRootOffset) {\n out[0] += viewportRootOffset.offsetLeft;\n out[1] += viewportRootOffset.offsetTop;\n }\n }\n out[2] = out[0] / zr.getWidth(); // The ratio of left to width\n out[3] = out[1] / zr.getHeight(); // The ratio of top to height\n}\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 */\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\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 }\n else {\n container.appendChild(el);\n }\n\n this._container = container;\n\n this._show = false;\n\n /**\n * @private\n */\n this._hideTimeout;\n\n // 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 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 self._inContent = true;\n };\n el.onmousemove = function (e) {\n e = e || window.event;\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 el.onmouseleave = function () {\n if (self._enterable) {\n if (self._show) {\n self.hideLater(self._hideDelay);\n }\n }\n self._inContent = false;\n };\n}\n\nTooltipContent.prototype = {\n\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\n || document.defaultView.getComputedStyle(container);\n var domStyle = container.style;\n if (domStyle.position !== 'absolute' && stl.position !== 'absolute') {\n domStyle.position = 'relative';\n }\n var alwaysShowContent = tooltipModel.get('alwaysShowContent');\n alwaysShowContent && this._moveTooltipIfResized();\n // 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 var ratioY = this._styleCoord[3]; // The ratio of top to height\n var realX = ratioX * this._zr.getWidth();\n var realY = ratioY * this._zr.getHeight();\n this.moveTo(realX, realY);\n },\n\n show: function (tooltipModel) {\n clearTimeout(this._hideTimeout);\n var el = this.el;\n var styleCoord = this._styleCoord;\n\n el.style.cssText = gCssText + assembleCssText(tooltipModel)\n // 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;'\n + (tooltipModel.get('extraCssText') || '');\n\n el.style.display = el.innerHTML ? 'block' : 'none';\n\n // 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 el.style.pointerEvents = this._enterable ? 'auto' : 'none';\n\n this._show = true;\n },\n\n setContent: function (content) {\n this.el.innerHTML = content == null ? '' : content;\n },\n\n setEnterable: function (enterable) {\n this._enterable = enterable;\n },\n\n getSize: function () {\n var el = this.el;\n return [el.clientWidth, el.clientHeight];\n },\n\n moveTo: function (zrX, zrY) {\n var styleCoord = this._styleCoord;\n makeStyleCoord(styleCoord, this._zr, this._appendToBody, zrX, zrY);\n\n var style = this.el.style;\n style.left = styleCoord[0] + 'px';\n style.top = styleCoord[1] + 'px';\n },\n\n hide: function () {\n this.el.style.display = 'none';\n this._show = false;\n },\n\n hideLater: function (time) {\n if (this._show && !(this._inContent && this._enterable)) {\n if (time) {\n this._hideDelay = time;\n // Set show false to avoid invoke hideLater multiple times\n this._show = false;\n this._hideTimeout = setTimeout(zrUtil.bind(this.hide, this), time);\n }\n else {\n this.hide();\n }\n }\n },\n\n isShow: function () {\n return this._show;\n },\n\n dispose: function () {\n this.el.parentNode.removeChild(this.el);\n },\n\n getOuterSize: function () {\n var width = this.el.clientWidth;\n var height = this.el.clientHeight;\n\n // Consider browser compatibility.\n // IE8 does not support getComputedStyle.\n if (document.defaultView && document.defaultView.getComputedStyle) {\n var stl = document.defaultView.getComputedStyle(this.el);\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 {width: width, height: height};\n }\n\n};\n\nexport default TooltipContent;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\n// import Group from 'zrender/src/container/Group';\nimport Text from 'zrender/src/graphic/Text';\nimport * as graphicUtil from '../../util/graphic';\n\n\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 out[3] = out[1] / zr.getHeight(); // The ratio of top to height\n}\n\n/**\n * @alias module:echarts/component/tooltip/TooltipRichContent\n * @constructor\n */\nfunction TooltipRichContent(api) {\n\n var zr = this._zr = api.getZr();\n\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\n this._show = false;\n\n /**\n * @private\n */\n this._hideTimeout;\n}\n\nTooltipRichContent.prototype = {\n\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 var ratioY = this._styleCoord[3]; // The ratio of top to height\n var realX = ratioX * this._zr.getWidth();\n var realY = ratioY * this._zr.getHeight();\n this.moveTo(realX, realY);\n },\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 while (startId >= 0) {\n var endId = text.indexOf(suffix);\n var name = text.substr(startId + prefix.length, endId - startId - prefix.length);\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 }\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 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 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 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 self._inContent = false;\n });\n },\n\n setEnterable: function (enterable) {\n this._enterable = enterable;\n },\n\n getSize: function () {\n var bounding = this.el.getBoundingRect();\n return [bounding.width, bounding.height];\n },\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\n hide: function () {\n if (this.el) {\n this.el.hide();\n }\n this._show = false;\n },\n\n hideLater: function (time) {\n if (this._show && !(this._inContent && this._enterable)) {\n if (time) {\n this._hideDelay = time;\n // Set show false to avoid invoke hideLater multiple times\n this._show = false;\n this._hideTimeout = setTimeout(zrUtil.bind(this.hide, this), time);\n }\n else {\n this.hide();\n }\n }\n },\n\n isShow: function () {\n return this._show;\n },\n\n dispose: function () {\n clearTimeout(this._hideTimeout);\n\n if (this.el) {\n this._zr.remove(this.el);\n }\n },\n\n getOuterSize: function () {\n var size = this.getSize();\n return {\n width: size[0],\n height: size[1]\n };\n }\n};\n\nexport default TooltipRichContent;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport env from 'zrender/src/core/env';\nimport TooltipContent from './TooltipContent';\nimport TooltipRichContent from './TooltipRichContent';\nimport * as formatUtil from '../../util/format';\nimport * as numberUtil from '../../util/number';\nimport * as graphic from '../../util/graphic';\nimport findPointFromSeries from '../axisPointer/findPointFromSeries';\nimport * as layoutUtil from '../../util/layout';\nimport Model from '../../model/Model';\nimport * as globalListener from '../axisPointer/globalListener';\nimport * as axisHelper from '../../coord/axisHelper';\nimport * as axisPointerViewHelper from '../axisPointer/viewHelper';\nimport { getTooltipRenderMode } from '../../util/model';\n\nvar bind = zrUtil.bind;\nvar each = zrUtil.each;\nvar parsePercent = numberUtil.parsePercent;\n\nvar proxyRect = new graphic.Rect({\n shape: {x: -1, y: -1, width: 2, height: 2}\n});\n\nexport default echarts.extendComponentView({\n\n type: 'tooltip',\n\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\n var tooltipContent;\n if (this._renderMode === 'html') {\n tooltipContent = new TooltipContent(api.getDom(), api, {\n appendToBody: tooltipModel.get('appendToBody', true)\n });\n this._newLine = '<br/>';\n }\n else {\n tooltipContent = new TooltipRichContent(api);\n this._newLine = '\\n';\n }\n\n this._tooltipContent = tooltipContent;\n },\n\n render: function (tooltipModel, ecModel, api) {\n if (env.node) {\n return;\n }\n\n // Reset\n this.group.removeAll();\n\n /**\n * @private\n * @type {module:echarts/component/tooltip/TooltipModel}\n */\n this._tooltipModel = tooltipModel;\n\n /**\n * @private\n * @type {module:echarts/model/Global}\n */\n this._ecModel = ecModel;\n\n /**\n * @private\n * @type {module:echarts/ExtensionAPI}\n */\n this._api = api;\n\n /**\n * Should be cleaned when render.\n * @private\n * @type {Array.<Array.<Object>>}\n */\n this._lastDataByCoordSys = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this._alwaysShowContent = tooltipModel.get('alwaysShowContent');\n\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\n _initGlobalListener: function () {\n var tooltipModel = this._tooltipModel;\n var triggerOn = tooltipModel.get('triggerOn');\n\n globalListener.register(\n 'itemTooltip',\n this._api,\n 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 }\n else if (currTrigger === 'leave') {\n this._hide(dispatchAction);\n }\n }\n }, this)\n );\n },\n\n _keepShow: function () {\n var tooltipModel = this._tooltipModel;\n var ecModel = this._ecModel;\n var api = this._api;\n\n // Try to keep the tooltip show when refreshing\n if (this._lastX != null\n && this._lastY != null\n // 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 ) {\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);\n\n // Reset ticket\n this._ticket = '';\n\n // When triggered from axisPointer.\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;\n // Manually show tooltip while view is not using zrender elements.\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n target: el\n }, dispatchAction);\n }\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 }\n else if (payload.seriesIndex != null) {\n\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 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 }\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\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\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 if (!seriesModel) {\n return;\n }\n\n var data = seriesModel.getData();\n var tooltipModel = buildTooltipModel([\n data.getItemModel(dataIndex),\n seriesModel,\n (seriesModel.coordinateSystem || {}).model,\n tooltipModel\n ]);\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\n return true;\n },\n\n _tryShow: function (e, dispatchAction) {\n var el = e.target;\n var tooltipModel = this._tooltipModel;\n\n if (!tooltipModel) {\n return;\n }\n\n // Save mouse x, mouse y. So we can try to keep showing the tip if chart is refreshed\n this._lastX = e.offsetX;\n this._lastY = e.offsetY;\n\n var dataByCoordSys = e.dataByCoordSys;\n if (dataByCoordSys && dataByCoordSys.length) {\n this._showAxisTooltip(dataByCoordSys, e);\n }\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 this._showSeriesItemTooltip(e, el, dispatchAction);\n }\n // Tooltip provided directly. Like legend.\n else if (el && el.tooltip) {\n this._lastDataByCoordSys = null;\n this._showComponentItemTooltip(e, el, dispatchAction);\n }\n else {\n this._lastDataByCoordSys = null;\n this._hide(dispatchAction);\n }\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\n ? (this._showTimout = setTimeout(cb, delay))\n : cb();\n },\n\n _showAxisTooltip: function (dataByCoordSys, e) {\n var ecModel = this._ecModel;\n var globalTooltipModel = this._tooltipModel;\n\n var point = [e.offsetX, e.offsetY];\n\n var singleDefaultHTML = [];\n var singleParamsList = [];\n var singleTooltipModel = buildTooltipModel([\n e.tooltipOption,\n globalTooltipModel\n ]);\n\n var renderMode = this._renderMode;\n var newLine = this._newLine;\n\n var markers = {};\n\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\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(\n axisValue, axisModel.axis, ecModel,\n item.seriesDataIndices,\n item.valueLabelOpt\n );\n\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\n var html;\n if (zrUtil.isObject(seriesTooltip)) {\n html = seriesTooltip.html;\n var newMarkers = seriesTooltip.markers;\n zrUtil.merge(markers, newMarkers);\n }\n else {\n html = seriesTooltip;\n }\n seriesDefaultHTML.push(html);\n }\n });\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 var firstLine = valueLabel;\n if (renderMode !== 'html') {\n singleDefaultHTML.push(seriesDefaultHTML.join(newLine));\n }\n else {\n singleDefaultHTML.push(\n (firstLine ? formatUtil.encodeHTML(firstLine) + newLine : '')\n + seriesDefaultHTML.join(newLine)\n );\n }\n });\n }, this);\n\n // In most case, the second axis is shown upper than the first one.\n singleDefaultHTML.reverse();\n singleDefaultHTML = singleDefaultHTML.join(this._newLine + this._newLine);\n\n var positionExpr = e.position;\n this._showOrMove(singleTooltipModel, function () {\n if (this._updateContentNotChangedOnAxis(dataByCoordSys)) {\n this._updatePosition(\n singleTooltipModel,\n positionExpr,\n point[0], point[1],\n this._tooltipContent,\n singleParamsList\n );\n }\n else {\n this._showTooltipContent(\n singleTooltipModel, singleDefaultHTML, singleParamsList, Math.random(),\n point[0], point[1], positionExpr, undefined, markers\n );\n }\n });\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;\n // 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 var seriesIndex = el.seriesIndex;\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex);\n\n // For example, graph link.\n var dataModel = el.dataModel || seriesModel;\n var dataIndex = el.dataIndex;\n var dataType = el.dataType;\n var data = dataModel.getData(dataType);\n\n var tooltipModel = buildTooltipModel([\n data.getItemModel(dataIndex),\n dataModel,\n seriesModel && (seriesModel.coordinateSystem || {}).model,\n this._tooltipModel\n ]);\n\n var tooltipTrigger = tooltipModel.get('trigger');\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 if (zrUtil.isObject(seriesTooltip)) {\n defaultHtml = seriesTooltip.html;\n markers = seriesTooltip.markers;\n }\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(\n tooltipModel, defaultHtml, params, asyncTicket,\n e.offsetX, e.offsetY, e.position, e.target, markers\n );\n });\n\n // FIXME\n // duplicated showtip if manuallyShowTip is called from dispatchAction.\n dispatchAction({\n type: 'showTip',\n dataIndexInside: dataIndex,\n dataIndex: data.getRawIndex(dataIndex),\n seriesIndex: seriesIndex,\n from: this.uid\n });\n },\n\n _showComponentItemTooltip: function (e, el, dispatchAction) {\n var tooltipOpt = el.tooltip;\n if (typeof tooltipOpt === 'string') {\n var content = tooltipOpt;\n tooltipOpt = {\n content: content,\n // Fixed formatter\n formatter: content\n };\n }\n var subTooltipModel = new Model(tooltipOpt, this._tooltipModel, this._ecModel);\n var defaultHtml = subTooltipModel.get('content');\n var asyncTicket = Math.random();\n\n // 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(\n subTooltipModel, defaultHtml, subTooltipModel.get('formatterParams') || {},\n asyncTicket, e.offsetX, e.offsetY, e.position, el\n );\n });\n\n // If not dispatch showTip, tip may be hide triggered by axis.\n dispatchAction({\n type: 'showTip',\n from: this.uid\n });\n },\n\n _showTooltipContent: function (\n tooltipModel, defaultHtml, params, asyncTicket, x, y, positionExpr, el, markers\n ) {\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\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 }\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 this._updatePosition(\n tooltipModel, positionExpr, x, y, tooltipContent, params, el\n );\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(\n tooltipModel, positionExpr, x, y, tooltipContent, params, el\n );\n },\n\n /**\n * @param {string|Function|Array.<number>|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|<Array.<Object>} params\n * @param {module:zrender/Element} el target element\n * @param {module:echarts/ExtensionAPI} api\n * @return {Array.<number>}\n */\n _updatePosition: function (tooltipModel, positionExpr, x, y, content, params, el) {\n var viewWidth = this._api.getWidth();\n var viewHeight = this._api.getHeight();\n\n positionExpr = positionExpr || tooltipModel.get('position');\n\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 }\n else if (zrUtil.isObject(positionExpr)) {\n positionExpr.width = contentSize[0];\n positionExpr.height = contentSize[1];\n var layoutRect = layoutUtil.getLayoutRect(\n positionExpr, {width: viewWidth, height: viewHeight}\n );\n x = layoutRect.x;\n y = layoutRect.y;\n align = null;\n // When positionExpr is left/top/right/bottom,\n // align and verticalAlign will not work.\n vAlign = null;\n }\n // Specify tooltip position by string 'top' 'bottom' 'left' 'right' around graphic element\n else if (typeof positionExpr === 'string' && el) {\n var pos = calcTooltipPosition(\n positionExpr, rect, contentSize\n );\n x = pos[0];\n y = pos[1];\n }\n else {\n var pos = refixTooltipPosition(\n x, y, content, viewWidth, viewHeight, align ? null : 20, vAlign ? null : 20\n );\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(\n x, y, content, viewWidth, viewHeight\n );\n x = pos[0];\n y = pos[1];\n }\n\n content.moveTo(x, y);\n },\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\n && lastCoordSys.length === dataByCoordSys.length;\n\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\n contentNotChanged && each(lastDataByAxis, function (lastItem, indexAxis) {\n var thisItem = thisDataByAxis[indexAxis] || {};\n var lastIndices = lastItem.seriesDataIndices || [];\n var newIndices = thisItem.seriesDataIndices || [];\n\n contentNotChanged\n &= lastItem.value === thisItem.value\n && lastItem.axisType === thisItem.axisType\n && lastItem.axisId === thisItem.axisId\n && lastIndices.length === newIndices.length;\n\n contentNotChanged && each(lastIndices, function (lastIdxItem, j) {\n var newIdxItem = newIndices[j];\n contentNotChanged\n &= lastIdxItem.seriesIndex === newIdxItem.seriesIndex\n && lastIdxItem.dataIndex === newIdxItem.dataIndex;\n });\n });\n });\n\n this._lastDataByCoordSys = dataByCoordSys;\n\n return !!contentNotChanged;\n },\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\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\n dispose: function (ecModel, api) {\n if (env.node) {\n return;\n }\n this._tooltipContent.dispose();\n globalListener.unregister('itemTooltip', api);\n }\n});\n\n\n/**\n * @param {Array.<Object|module:echarts/model/Model>} modelCascade\n * From top to bottom. (the last one should be globalTooltipModel);\n */\nfunction buildTooltipModel(modelCascade) {\n var resultModel = modelCascade.pop();\n while (modelCascade.length) {\n var tooltipOpt = modelCascade.pop();\n if (tooltipOpt) {\n if (Model.isInstance(tooltipOpt)) {\n tooltipOpt = tooltipOpt.get('tooltip', true);\n }\n // In each data item tooltip can be simply write:\n // {\n // value: 10,\n // tooltip: 'Something you need to know'\n // }\n if (typeof tooltipOpt === 'string') {\n tooltipOpt = {formatter: tooltipOpt};\n }\n resultModel = new Model(tooltipOpt, resultModel, resultModel.ecModel);\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 }\n else {\n x += gapH;\n }\n }\n if (gapV != null) {\n if (y + height + gapV > viewHeight) {\n y -= height + gapV;\n }\n else {\n y += gapV;\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\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\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 switch (position) {\n case 'inside':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n break;\n case 'top':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y - domHeight - gap;\n break;\n case 'bottom':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y + rectHeight + gap;\n break;\n case 'left':\n x = rect.x - domWidth - gap;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n break;\n case 'right':\n x = rect.x + rectWidth + gap;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n }\n return [x, y];\n}\n\nfunction isCenterAlign(align) {\n return align === 'center' || align === 'middle';\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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// FIXME Better way to pack data in graphic element\n\nimport * as echarts from '../echarts';\n\nimport './axisPointer';\nimport './tooltip/TooltipModel';\nimport './tooltip/TooltipView';\n\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 {\n type: 'showTip',\n event: 'showTip',\n update: 'tooltip:manuallyShowTip'\n },\n // noop\n function () {}\n);\n\necharts.registerAction(\n {\n type: 'hideTip',\n event: 'hideTip',\n update: 'tooltip:manuallyHideTip'\n },\n // noop\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\nimport * as zrUtil from 'zrender/src/core/util';\n\nvar DEFAULT_TOOLBOX_BTNS = ['rect', 'polygon', 'keep', 'clear'];\n\nexport default function (option, isNew) {\n var brushComponents = option && option.brush;\n if (!zrUtil.isArray(brushComponents)) {\n brushComponents = brushComponents ? [brushComponents] : [];\n }\n\n if (!brushComponents.length) {\n return;\n }\n\n var brushComponentSpecifiedBtns = [];\n\n zrUtil.each(brushComponents, function (brushOpt) {\n var tbs = brushOpt.hasOwnProperty('toolbox')\n ? brushOpt.toolbox : [];\n\n if (tbs instanceof Array) {\n brushComponentSpecifiedBtns = brushComponentSpecifiedBtns.concat(tbs);\n }\n });\n\n var toolbox = option && option.toolbox;\n\n if (zrUtil.isArray(toolbox)) {\n toolbox = toolbox[0];\n }\n if (!toolbox) {\n toolbox = {feature: {}};\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\n brushTypes.push.apply(brushTypes, brushComponentSpecifiedBtns);\n\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport VisualMapping from './VisualMapping';\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/**\n * @param {Object} option\n * @param {Array.<string>} stateList\n * @param {Function} [supplementVisualOption]\n * @return {Object} visualMappings <state, <visualType, module:echarts/visual/VisualMapping>>\n */\nexport function createVisualMappings(option, stateList, supplementVisualOption) {\n var visualMappings = {};\n\n each(stateList, function (state) {\n var mappings = visualMappings[state] = createMappings();\n\n each(option[state], function (visualData, visualType) {\n if (!VisualMapping.isValidType(visualType)) {\n return;\n }\n var mappingOption = {\n type: visualType,\n visual: visualData\n };\n supplementVisualOption && supplementVisualOption(mappingOption, state);\n mappings[visualType] = new VisualMapping(mappingOption);\n\n // Prepare a alpha for opacity, for some case that opacity\n // is not supported, such as rendering using gradient color.\n if (visualType === 'opacity') {\n mappingOption = zrUtil.clone(mappingOption);\n mappingOption.type = 'colorAlpha';\n mappings.__hidden.__alphaForOpacity = new VisualMapping(mappingOption);\n }\n });\n });\n\n return visualMappings;\n\n function createMappings() {\n var Creater = function () {};\n // Make sure hidden fields will not be visited by\n // object iteration (with hasOwnProperty checking).\n Creater.prototype.__hidden = Creater.prototype;\n var obj = new Creater();\n return obj;\n }\n}\n\n/**\n * @param {Object} thisOption\n * @param {Object} newOption\n * @param {Array.<string>} keys\n */\nexport function 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 }\n else {\n delete thisOption[key];\n }\n });\n}\n\n/**\n * @param {Array.<string>} stateList\n * @param {Object} visualMappings <state, Object.<visualType, module:echarts/visual/VisualMapping>>\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?\nexport function 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\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 }\n else {\n data.each([dimension], eachItem);\n }\n\n function eachItem(valueOrIndex, index) {\n dataIndex = dimension == null ? valueOrIndex : index;\n\n var rawDataItem = data.getRawDataItem(dataIndex);\n // Consider performance\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(\n valueOrIndex, getVisual, setVisual\n );\n }\n }\n}\n\n/**\n * @param {module:echarts/data/List} data\n * @param {Array.<string>} stateList\n * @param {Object} visualMappings <state, Object.<visualType, module:echarts/visual/VisualMapping>>\n * @param {Function} getValueState param: valueOrIndex, return: state.\n * @param {number} [dim] dimension or dimension index.\n */\nexport function 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 while ((dataIndex = params.next()) != null) {\n var rawDataItem = data.getRawDataItem(dataIndex);\n\n // Consider performance\n if (rawDataItem && rawDataItem.visualMap === false) {\n continue;\n }\n\n var value = dim != null\n ? data.get(dim, dataIndex, true)\n : dataIndex;\n\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 {progress: progress};\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as polygonContain from 'zrender/src/contain/polygon';\nimport BoundingRect from 'zrender/src/core/BoundingRect';\nimport {linePolygonIntersect} from '../../util/graphic';\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\n && area.boundingRect.contain(itemLayout[0], itemLayout[1])\n && 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)\n || polygonContain.contain(points, x + width, y)\n || polygonContain.contain(points, x, y + height)\n || polygonContain.contain(points, x + width, y + height)\n || BoundingRect.create(itemLayout).contain(p[0], p[1])\n || linePolygonIntersect(x, y, x + width, y, points)\n || linePolygonIntersect(x, y, x, y + height, points)\n || linePolygonIntersect(x + width, y, x + width, y + height, points)\n || linePolygonIntersect(x, y + height, x + width, y + height, points)\n ) {\n return true;\n }\n }\n }\n};\n\nfunction getLineSelectors(xyIndex) {\n var xy = ['x', 'y'];\n var wh = ['width', 'height'];\n\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 = [\n itemLayout[xy[xyIndex]],\n itemLayout[xy[xyIndex]] + itemLayout[wh[xyIndex]]\n ];\n layoutRange[1] < layoutRange[0] && layoutRange.reverse();\n return inLineRange(layoutRange[0], range)\n || inLineRange(layoutRange[1], range)\n || inLineRange(range[0], layoutRange)\n || inLineRange(range[1], layoutRange);\n }\n }\n };\n}\n\nfunction inLineRange(p, range) {\n return range[0] <= p && p <= range[1];\n}\n\nexport default selector;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport BoundingRect from 'zrender/src/core/BoundingRect';\nimport * as visualSolution from '../../visual/visualSolution';\nimport selector from './selector';\nimport * as throttleUtil from '../../util/throttle';\nimport BrushTargetManager from '../helper/BrushTargetManager';\n\nvar STATE_LIST = ['inBrush', 'outOfBrush'];\nvar DISPATCH_METHOD = '__ecBrushSelect';\nvar DISPATCH_FLAG = '__ecInBrushSelectEvent';\nvar PRIORITY_BRUSH = echarts.PRIORITY.VISUAL.BRUSH;\n\n/**\n * Layout for visual, the priority higher than other layout, and before brush visual.\n */\necharts.registerLayout(PRIORITY_BRUSH, function (ecModel, api, payload) {\n ecModel.eachComponent({mainType: 'brush'}, function (brushModel) {\n payload && payload.type === 'takeGlobalCursor' && brushModel.setBrushOption(\n payload.key === 'brush' ? payload.brushOption : {brushType: false}\n );\n });\n layoutCovers(ecModel);\n});\n\nexport function layoutCovers(ecModel) {\n ecModel.eachComponent({mainType: 'brush'}, function (brushModel) {\n var brushTargetManager = brushModel.brushTargetManager = new BrushTargetManager(brushModel.option, ecModel);\n brushTargetManager.setInputRanges(brushModel.areas, ecModel);\n });\n}\n\n/**\n * Register the visual encoding if this modules required.\n */\necharts.registerVisual(PRIORITY_BRUSH, function (ecModel, api, payload) {\n\n var brushSelected = [];\n var throttleType;\n var throttleDelay;\n\n ecModel.eachComponent({mainType: 'brush'}, function (brushModel, brushIndex) {\n\n var thisBrushSelected = {\n brushId: brushModel.id,\n brushIndex: brushIndex,\n brushName: brushModel.name,\n areas: zrUtil.clone(brushModel.areas),\n selected: []\n };\n // Every brush component exists in event params, convenient\n // for user to find by index.\n brushSelected.push(thisBrushSelected);\n\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) { // Only the first throttle setting works.\n throttleType = brushOption.throttleType;\n throttleDelay = brushOption.throttleDelay;\n }\n\n // Add boundingRect and selectors to range.\n var areas = zrUtil.map(brushModel.areas, function (area) {\n return bindSelector(\n zrUtil.defaults(\n {boundingRect: boundingRectBuilders[area.brushType](area)},\n area\n )\n );\n });\n\n var visualMappings = visualSolution.createVisualMappings(\n brushModel.option, STATE_LIST, function (mappingOption) {\n mappingOption.mappingMethod = 'fixed';\n }\n );\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 }\n\n // If no supported brush or no brush on the series,\n // all visuals should be in original state.\n function brushed(rangeInfoList) {\n return !!rangeInfoList.length;\n }\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\n // Step A\n ecModel.eachSeries(function (seriesModel, seriesIndex) {\n var rangeInfoList = rangeInfoBySeries[seriesIndex] = [];\n\n seriesModel.subType === 'parallel'\n ? stepAParallel(seriesModel, seriesIndex, rangeInfoList)\n : stepAOthers(seriesModel, seriesIndex, rangeInfoList);\n });\n\n function stepAParallel(seriesModel, seriesIndex) {\n var coordSys = seriesModel.coordinateSystem;\n hasBrushExists |= coordSys.hasAxisBrushed();\n\n linkOthers(seriesIndex) && coordSys.eachActiveState(\n seriesModel.getData(),\n function (activeState, dataIndex) {\n activeState === 'active' && (selectedDataIndexForLink[dataIndex] = 1);\n }\n );\n }\n\n function stepAOthers(seriesModel, seriesIndex, rangeInfoList) {\n var selectorsByBrushType = getSelectorsByBrushType(seriesModel);\n if (!selectorsByBrushType || brushModelNotControll(brushModel, seriesIndex)) {\n return;\n }\n\n zrUtil.each(areas, function (area) {\n selectorsByBrushType[area.brushType]\n && brushModel.brushTargetManager.controlSeries(area, seriesModel, ecModel)\n && 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 }\n\n // Step B\n ecModel.eachSeries(function (seriesModel, seriesIndex) {\n var seriesBrushSelected = {\n seriesId: seriesModel.id,\n seriesIndex: seriesIndex,\n seriesName: seriesModel.name,\n dataIndex: []\n };\n // Every series exists in event params, convenient\n // for user to find series by seriesIndex.\n thisBrushSelected.selected.push(seriesBrushSelected);\n\n var selectorsByBrushType = getSelectorsByBrushType(seriesModel);\n var rangeInfoList = rangeInfoBySeries[seriesIndex];\n\n var data = seriesModel.getData();\n var getValueState = linkOthers(seriesIndex)\n ? function (dataIndex) {\n return selectedDataIndexForLink[dataIndex]\n ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush')\n : 'outOfBrush';\n }\n : function (dataIndex) {\n return checkInRange(selectorsByBrushType, rangeInfoList, data, dataIndex)\n ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush')\n : 'outOfBrush';\n };\n\n // If no supported brush or no brush, all visuals are in original state.\n (linkOthers(seriesIndex) ? hasBrushExists : brushed(rangeInfoList))\n && visualSolution.applyVisual(\n STATE_LIST, visualMappings, data, getValueState\n );\n });\n\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 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\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 if (selectorsByBrushType[area.brushType](\n dataIndex, data, area.selectors, area\n )) {\n return true;\n }\n }\n}\n\nfunction getSelectorsByBrushType(seriesModel) {\n var brushSelector = seriesModel.brushSelector;\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 }\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 return brushSelector;\n}\n\nfunction brushModelNotControll(brushModel, seriesIndex) {\n var seriesIndices = brushModel.option.seriesIndex;\n return seriesIndices != null\n && seriesIndices !== 'all'\n && (\n zrUtil.isArray(seriesIndices)\n ? zrUtil.indexOf(seriesIndices, seriesIndex) < 0\n : seriesIndex !== seriesIndices\n );\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\n lineX: zrUtil.noop,\n\n lineY: zrUtil.noop,\n\n rect: function (area) {\n return getBoundingRectFromMinMax(area.range);\n },\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(\n minMax[0][0],\n minMax[1][0],\n minMax[0][1] - minMax[0][0],\n minMax[1][1] - minMax[1][0]\n );\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport {__DEV__} from '../../config';\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as visualSolution from '../../visual/visualSolution';\nimport Model from '../../model/Model';\n\nvar DEFAULT_OUT_OF_BRUSH_COLOR = ['#ddd'];\n\nvar BrushModel = echarts.extendComponentModel({\n\n type: 'brush',\n\n dependencies: ['geo', 'grid', 'xAxis', 'yAxis', 'parallel', 'series'],\n\n /**\n * @protected\n */\n defaultOption: {\n // inBrush: null,\n // outOfBrush: null,\n toolbox: null, // Default value see preprocessor.\n brushLink: null, // Series indices array, broadcast using dataIndex.\n // or 'all', which means all series. 'none' or null means no series.\n seriesIndex: 'all', // seriesIndex array, specify series controlled by this brush component.\n geoIndex: null, //\n xAxisIndex: null,\n yAxisIndex: null,\n\n brushType: 'rect', // Default brushType, see BrushController.\n brushMode: 'single', // Default brushMode, 'single' or 'multiple'\n transformable: true, // Default transformable.\n brushStyle: { // Default brushStyle\n borderWidth: 1,\n color: 'rgba(120,140,180,0.3)',\n borderColor: 'rgba(120,140,180,0.8)'\n },\n\n throttleType: 'fixRate', // Throttle in brushSelected event. 'fixRate' or 'debounce'.\n // If null, no throttle. Valid only in the first brush component\n throttleDelay: 0, // Unit: ms, 0 means every event will be triggered.\n\n // FIXME\n // 试验效果\n removeOnClick: true,\n\n z: 10000\n },\n\n /**\n * @readOnly\n * @type {Array.<Object>}\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.<Object>}\n */\n coordInfoList: [],\n\n optionUpdated: function (newOption, isInit) {\n var thisOption = this.option;\n\n !isInit && visualSolution.replaceVisualOption(\n thisOption, newOption, ['inBrush', 'outOfBrush']\n );\n\n var inBrush = thisOption.inBrush = thisOption.inBrush || {};\n // Always give default visual, consider setOption at the second time.\n thisOption.outOfBrush = thisOption.outOfBrush || {color: DEFAULT_OUT_OF_BRUSH_COLOR};\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.<Object>} [ranges]\n */\n setAreas: function (areas) {\n if (__DEV__) {\n zrUtil.assert(zrUtil.isArray(areas));\n zrUtil.each(areas, function (area) {\n zrUtil.assert(area.brushType, 'Illegal areas');\n });\n }\n\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});\n\nfunction generateBrushOption(option, brushOption) {\n return zrUtil.merge(\n {\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 },\n brushOption,\n true\n );\n}\n\nexport default BrushModel;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport BrushController from '../helper/BrushController';\nimport {layoutCovers} from './visualEncoding';\n\nexport default echarts.extendComponentView({\n\n type: 'brush',\n\n init: function (ecModel, api) {\n\n /**\n * @readOnly\n * @type {module:echarts/model/Global}\n */\n this.ecModel = ecModel;\n\n /**\n * @readOnly\n * @type {module:echarts/ExtensionAPI}\n */\n this.api = api;\n\n /**\n * @readOnly\n * @type {module:echarts/component/brush/BrushModel}\n */\n this.model;\n\n /**\n * @private\n * @type {module:echarts/component/helper/BrushController}\n */\n (this._brushController = new BrushController(api.getZr()))\n .on('brush', zrUtil.bind(this._onBrush, this))\n .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 // /**\n // * @override\n // */\n // updateLayout: updateController,\n\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\n this.model.brushTargetManager.setOutputRanges(areas, this.ecModel);\n\n // 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 (!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});\n\nfunction updateController(brushModel, ecModel, api, payload) {\n // Do not update controller when drawing.\n (!payload || payload.$from !== brushModel.id) && this._brushController\n .setPanels(brushModel.brushTargetManager.makePanelOpts(api))\n .enableBrush(brushModel.brushOption)\n .updateCovers(brushModel.areas.slice());\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\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', event: 'brush' /*, update: 'updateView' */},\n function (payload, ecModel) {\n ecModel.eachComponent({mainType: 'brush', query: payload}, function (brushModel) {\n brushModel.setAreas(payload.areas);\n });\n }\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 */\necharts.registerAction(\n {type: 'brushSelect', event: 'brushSelected', update: 'none'},\n function () {}\n);\n\necharts.registerAction(\n {type: 'brushEnd', event: 'brushEnd', update: 'none'},\n 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\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as featureManager from '../featureManager';\nimport lang from '../../../lang';\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 /**\n * @private\n * @type {string}\n */\n this._brushType;\n\n /**\n * @private\n * @type {string}\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', // 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', // 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', // 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', // 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', // 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 /* eslint-enable */\n },\n // `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear`\n title: zrUtil.clone(brushLang.title)\n};\n\nvar proto = Brush.prototype;\n\n// proto.updateLayout = function (featureModel, ecModel, api) {\n/* eslint-disable */\nproto.render =\n/* eslint-enable */\nproto.updateView = function (featureModel, ecModel, api) {\n var brushType;\n var brushMode;\n var isBrushed;\n\n ecModel.eachComponent({mainType: 'brush'}, 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\n zrUtil.each(featureModel.get('type', true), function (type) {\n featureModel.setIconStatus(\n type,\n (\n type === 'keep'\n ? brushMode === 'multiple'\n : type === 'clear'\n ? isBrushed\n : type === brushType\n ) ? 'emphasis' : 'normal'\n );\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\n api.dispatchAction({\n type: 'brush',\n command: 'clear',\n // Clear all areas of all brush components.\n areas: []\n });\n }\n else {\n api.dispatchAction({\n type: 'takeGlobalCursor',\n key: 'brush',\n brushOption: {\n brushType: type === 'keep'\n ? brushType\n : (brushType === type ? false : type),\n brushMode: type === 'keep'\n ? (brushMode === 'multiple' ? 'single' : 'multiple')\n : brushMode\n }\n });\n }\n};\n\nfeatureManager.register('brush', Brush);\n\nexport default Brush;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport * as echarts from '../echarts';\nimport preprocessor from './brush/preprocessor';\n\nimport './brush/visualEncoding';\nimport './brush/BrushModel';\nimport './brush/BrushView';\nimport './brush/brushAction';\nimport './toolbox/feature/Brush';\n\necharts.registerPreprocessor(preprocessor);","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as echarts from '../echarts';\nimport * as graphic from '../util/graphic';\nimport {getLayoutRect} from '../util/layout';\nimport {windowOpen} from '../util/format';\n\n// Model\necharts.extendComponentModel({\n\n type: 'title',\n\n layoutMode: {type: 'box', ignoreSize: true},\n\n defaultOption: {\n // 一级层叠\n zlevel: 0,\n // 二级层叠\n z: 6,\n show: true,\n\n text: '',\n // 超链接跳转\n // link: null,\n // 仅支持self | blank\n target: 'blank',\n subtext: '',\n\n // 超链接跳转\n // sublink: null,\n // 仅支持self | blank\n subtarget: 'blank',\n\n // 'center' ¦ 'left' ¦ 'right'\n // ¦ {number}x坐标单位px\n left: 0,\n // 'top' ¦ 'bottom' ¦ 'center'\n // ¦ {number}y坐标单位px\n top: 0,\n\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\n backgroundColor: 'rgba(0,0,0,0)',\n\n // 标题边框颜色\n borderColor: '#ccc',\n\n // 标题边框线宽单位px默认为0无边框\n borderWidth: 0,\n\n // 标题内边距单位px默认各方向内边距为5\n // 接受数组分别设定上右下左边距同css\n padding: 5,\n\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});\n\n// View\necharts.extendComponentView({\n\n type: 'title',\n\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\n var textStyleModel = titleModel.getModel('textStyle');\n var subtextStyleModel = titleModel.getModel('subtextStyle');\n\n var textAlign = titleModel.get('textAlign');\n var textVerticalAlign = zrUtil.retrieve2(\n titleModel.get('textBaseline'), titleModel.get('textVerticalAlign')\n );\n\n var textEl = new graphic.Text({\n style: graphic.setTextStyle({}, textStyleModel, {\n text: titleModel.get('text'),\n textFill: textStyleModel.getTextColor()\n }, {disableBox: true}),\n z2: 10\n });\n\n var textRect = textEl.getBoundingRect();\n\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 }, {disableBox: true}),\n z2: 10\n });\n\n var link = titleModel.get('link');\n var sublink = titleModel.get('sublink');\n var triggerEvent = titleModel.get('triggerEvent', true);\n\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 if (sublink) {\n subTextEl.on('click', function () {\n windowOpen(sublink, '_' + titleModel.get('subtarget'));\n });\n }\n\n textEl.eventData = subTextEl.eventData = triggerEvent\n ? {\n componentType: 'title',\n componentIndex: titleModel.componentIndex\n }\n : null;\n\n group.add(textEl);\n subText && group.add(subTextEl);\n // 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(\n layoutOption, {\n width: api.getWidth(),\n height: api.getHeight()\n }, titleModel.get('padding')\n );\n // Adjust text align based on position\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 if (textAlign === 'middle') {\n textAlign = 'center';\n }\n // Adjust layout by text align\n if (textAlign === 'right') {\n layoutRect.x += layoutRect.width;\n }\n else if (textAlign === 'center') {\n layoutRect.x += layoutRect.width / 2;\n }\n }\n if (!textVerticalAlign) {\n textVerticalAlign = titleModel.get('top') || titleModel.get('bottom');\n if (textVerticalAlign === 'center') {\n textVerticalAlign = 'middle';\n }\n if (textVerticalAlign === 'bottom') {\n layoutRect.y += layoutRect.height;\n }\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);\n\n // Render background\n // Get groupRect again because textAlign has been changed\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\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\nimport * as zrUtil from 'zrender/src/core/util';\n\nexport default function (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\n var ec2Types = {'number': 'value', 'time': 'time'};\n\n // Compatible with ec2\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 if (!has(controlStyle, 'position')) {\n controlStyle.position = opt.controlPosition;\n }\n if (controlStyle.position === 'none' && !has(controlStyle, 'show')) {\n controlStyle.show = false;\n delete controlStyle.position;\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 transferItem(dataItem);\n }\n });\n}\n\nfunction transferItem(opt) {\n var itemStyle = opt.itemStyle || (opt.itemStyle = {});\n\n var itemStyleEmphasis = itemStyle.emphasis || (itemStyle.emphasis = {});\n\n // Transfer label out\n var label = opt.label || (opt.label || {});\n var labelNormal = label.normal || (label.normal = {});\n var excludeLabelAttr = {normal: 1, 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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport Component from '../../model/Component';\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\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\n\necharts.registerAction(\n\n {type: 'timelineChange', event: 'timelineChanged', update: 'prepareAndUpdate'},\n\n function (payload, ecModel) {\n\n var timelineModel = ecModel.getComponent('timeline');\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 }\n\n // Set normalized currentIndex to payload.\n ecModel.resetOption('timeline');\n\n return zrUtil.defaults({\n currentIndex: timelineModel.option.currentIndex\n }, payload);\n }\n);\n\necharts.registerAction(\n\n {type: 'timelinePlayChange', event: 'timelinePlayChanged', update: 'update'},\n\n function (payload, ecModel) {\n var timelineModel = ecModel.getComponent('timeline');\n if (timelineModel && payload.playState != null) {\n timelineModel.setPlayState(payload.playState);\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\nimport * as zrUtil from 'zrender/src/core/util';\nimport ComponentModel from '../../model/Component';\nimport List from '../../data/List';\nimport * as modelUtil from '../../util/model';\n\nvar TimelineModel = ComponentModel.extend({\n\n type: 'timeline',\n\n layoutMode: 'box',\n\n /**\n * @protected\n */\n defaultOption: {\n\n zlevel: 0, // 一级层叠\n z: 4, // 二级层叠\n show: true,\n\n axisType: 'time', // 模式是时间类型,支持 value, category\n\n realtime: true,\n\n left: '20%',\n top: null,\n right: '20%',\n bottom: 0,\n width: null,\n height: 40,\n padding: 5,\n\n controlPosition: 'left', // 'left' 'right' 'top' 'bottom' 'none'\n autoPlay: false,\n rewind: false, // 反向播放\n loop: true,\n playInterval: 2000, // 播放时间间隔单位ms\n\n currentIndex: 0,\n\n itemStyle: {},\n label: {\n color: '#000'\n },\n\n data: []\n },\n\n /**\n * @override\n */\n init: function (option, parentModel, ecModel) {\n\n /**\n * @private\n * @type {module:echarts/data/List}\n */\n this._data;\n\n /**\n * @private\n * @type {Array.<string>}\n */\n this._names;\n\n this.mergeDefaultAndTheme(option, ecModel);\n this._initData();\n },\n\n /**\n * @override\n */\n mergeOption: function (option) {\n TimelineModel.superApply(this, 'mergeOption', arguments);\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 var count = this._data.count();\n\n if (this.option.loop) {\n currentIndex = (currentIndex % count + count) % count;\n }\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 }\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 = ({category: 'ordinal', time: 'time'})[axisType] || 'number';\n\n var data = this._data = new List([{name: 'value', type: dimType}], this);\n\n data.initData(dataArr, names);\n },\n\n getData: function () {\n return this._data;\n },\n\n /**\n * @public\n * @return {Array.<string>} categoreis\n */\n getCategories: function () {\n if (this.get('axisType') === 'category') {\n return this._names.slice();\n }\n }\n\n});\n\nexport default TimelineModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport TimelineModel from './TimelineModel';\nimport dataFormatMixin from '../../model/mixin/dataFormat';\n\nvar SliderTimelineModel = TimelineModel.extend({\n\n type: 'timeline.slider',\n\n /**\n * @protected\n */\n defaultOption: {\n\n backgroundColor: 'rgba(0,0,0,0)', // 时间轴背景颜色\n borderColor: '#ccc', // 时间轴边框颜色\n borderWidth: 0, // 时间轴边框线宽单位px默认为0无边框\n\n orient: 'horizontal', // 'vertical'\n inverse: false,\n\n tooltip: { // boolean or Object\n trigger: 'item' // data item may also have tootip attr.\n },\n\n symbol: 'emptyCircle',\n symbolSize: 10,\n\n lineStyle: {\n show: true,\n width: 2,\n color: '#304654'\n },\n label: { // 文本标签\n position: 'auto', // 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\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\n controlStyle: {\n show: true,\n showPlayBtn: true,\n showPrevBtn: true,\n showNextBtn: true,\n itemSize: 22,\n itemGap: 12,\n position: 'left', // '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', // 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', // 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', // 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', // jshint ignore:line\n\n color: '#304654',\n borderColor: '#304654',\n borderWidth: 1\n },\n\n emphasis: {\n label: {\n show: true,\n // 其余属性默认使用全局文本样式详见TEXTSTYLE\n color: '#c23531'\n },\n\n itemStyle: {\n color: '#c23531'\n },\n\n controlStyle: {\n color: '#c23531',\n borderColor: '#c23531',\n borderWidth: 2\n }\n },\n data: []\n }\n\n});\n\nzrUtil.mixin(SliderTimelineModel, dataFormatMixin);\n\nexport default SliderTimelineModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport ComponentView from '../../view/Component';\n\nexport default ComponentView.extend({\n type: 'timeline'\n});\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport Axis from '../../coord/Axis';\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.<number>} coordExtent\n * @param {string} axisType\n * @param {string} position\n */\nvar TimelineAxis = function (dim, scale, coordExtent, axisType) {\n\n Axis.call(this, dim, scale, coordExtent);\n\n /**\n * Axis type\n * - 'category'\n * - 'value'\n * - 'time'\n * - 'log'\n * @type {string}\n */\n this.type = axisType || 'value';\n\n /**\n * Axis model\n * @param {module:echarts/component/TimelineModel}\n */\n this.model = null;\n};\n\nTimelineAxis.prototype = {\n\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\n};\n\nzrUtil.inherits(TimelineAxis, Axis);\n\nexport default TimelineAxis;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport BoundingRect from 'zrender/src/core/BoundingRect';\nimport * as matrix from 'zrender/src/core/matrix';\nimport * as graphic from '../../util/graphic';\nimport * as layout from '../../util/layout';\nimport TimelineView from './TimelineView';\nimport TimelineAxis from './TimelineAxis';\nimport {createSymbol} from '../../util/symbol';\nimport * as axisHelper from '../../coord/axisHelper';\nimport * as numberUtil from '../../util/number';\nimport {encodeHTML} from '../../util/format';\n\nvar bind = zrUtil.bind;\nvar each = zrUtil.each;\n\nvar PI = Math.PI;\n\nexport default TimelineView.extend({\n\n type: 'timeline.slider',\n\n init: function (ecModel, api) {\n\n this.api = api;\n\n /**\n * @private\n * @type {module:echarts/component/timeline/TimelineAxis}\n */\n this._axis;\n\n /**\n * @private\n * @type {module:zrender/core/BoundingRect}\n */\n this._viewRect;\n\n /**\n * @type {number}\n */\n this._timer;\n\n /**\n * @type {module:zrender/Element}\n */\n this._currentPointer;\n\n /**\n * @type {module:zrender/container/Group}\n */\n this._mainGroup;\n\n /**\n * @type {module:zrender/container/Group}\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\n this.group.removeAll();\n\n if (timelineModel.get('show', true)) {\n\n var layoutInfo = this._layout(timelineModel, api);\n var mainGroup = this._createGroup('mainGroup');\n var labelGroup = this._createGroup('labelGroup');\n\n /**\n * @private\n * @type {module:echarts/component/timeline/TimelineAxis}\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(\n ['AxisLine', 'AxisTick', 'Control', 'CurrentPointer'],\n function (name) {\n this['_render' + name](layoutInfo, mainGroup, axis, timelineModel);\n },\n this\n );\n\n this._renderAxisLabel(layoutInfo, labelGroup, axis, timelineModel);\n this._position(layoutInfo, timelineModel);\n }\n\n this._doPlayStop();\n },\n\n /**\n * @override\n */\n remove: function () {\n this._clearTimer();\n this.group.removeAll();\n },\n\n /**\n * @override\n */\n dispose: function () {\n this._clearTimer();\n },\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);\n // Auto label offset.\n if (labelPosOpt == null || labelPosOpt === 'auto') {\n labelPosOpt = orient === 'horizontal'\n ? ((viewRect.y + viewRect.height / 2) < api.getHeight() / 2 ? '-' : '+')\n : ((viewRect.x + viewRect.width / 2) < api.getWidth() / 2 ? '+' : '-');\n }\n else if (isNaN(labelPosOpt)) {\n labelPosOpt = ({\n horizontal: {top: '-', bottom: '+'},\n vertical: {left: '-', right: '+'}\n })[orient][labelPosOpt];\n }\n\n var labelAlignMap = {\n horizontal: 'center',\n vertical: (labelPosOpt >= 0 || labelPosOpt === '+') ? 'left' : 'right'\n };\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 };\n\n // Position\n var mainLength = orient === 'vertical' ? viewRect.height : viewRect.width;\n\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;\n\n // Special label rotate.\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;\n\n // position[0] means left, position[1] means middle.\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 }\n else { // '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 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\n rotation: rotationMap[orient],\n labelRotation: labelRotation,\n labelPosOpt: labelPosOpt,\n labelAlign: timelineModel.get('label.align') || labelAlignMap[orient],\n labelBaseline: timelineModel.get('label.verticalAlign')\n || timelineModel.get('label.baseline')\n || labelBaselineMap[orient],\n\n // Based on mainGroup.\n playPosition: playPosition,\n prevBtnPosition: prevBtnPosition,\n nextBtnPosition: nextBtnPosition,\n axisExtent: axisExtent,\n\n controlSize: controlSize,\n controlGap: controlGap\n };\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\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\n var mainGroup = this._mainGroup;\n var labelGroup = this._labelGroup;\n\n var viewRect = layoutInfo.viewRect;\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\n var mainPosition = mainGroup.position;\n var labelsPosition = labelGroup.position;\n\n labelsPosition[0] = mainPosition[0] = viewBound[0][0];\n\n var labelPosOpt = layoutInfo.labelPosOpt;\n\n if (isNaN(labelPosOpt)) { // '+' or '-'\n var mainBoundIdx = labelPosOpt === '+' ? 0 : 1;\n toBound(mainPosition, mainBound, viewBound, 1, mainBoundIdx);\n toBound(labelsPosition, labelBound, viewBound, 1, 1 - mainBoundIdx);\n }\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\n setOrigin(mainGroup);\n setOrigin(labelGroup);\n\n function setOrigin(targetGroup) {\n var pos = targetGroup.position;\n targetGroup.origin = [\n viewBound[0][0] - pos[0],\n viewBound[1][0] - pos[1]\n ];\n }\n\n function getBound(rect) {\n // [[xmin, xmax], [ymin, ymax]]\n return [\n [rect.x, rect.x + rect.width],\n [rect.y, rect.y + rect.height]\n ];\n }\n\n function toBound(fromPos, from, to, dimIdx, boundIdx) {\n fromPos[dimIdx] += to[dimIdx][boundIdx] - from[dimIdx][boundIdx];\n }\n },\n\n _createAxis: function (layoutInfo, timelineModel) {\n var data = timelineModel.getData();\n var axisType = timelineModel.get('axisType');\n\n var scale = axisHelper.createScaleByModel(timelineModel, axisType);\n\n // Customize scale. The `tickValue` is `dataIndex`.\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\n var axis = new TimelineAxis('value', scale, layoutInfo.axisExtent, axisType);\n axis.model = timelineModel;\n\n return axis;\n },\n\n _createGroup: function (name) {\n var newGroup = this['_' + name] = new graphic.Group();\n this.group.add(newGroup);\n return newGroup;\n },\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], y1: 0,\n x2: axisExtent[1], y2: 0\n },\n style: zrUtil.extend(\n {lineCap: 'round'},\n timelineModel.getModel('lineStyle').getLineStyle()\n ),\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();\n // Show all ticks, despite ignoring strategy.\n var ticks = axis.scale.getTicks();\n\n // The value is dataIndex, see the costomized scale.\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 }\n else {\n el.dataIndex = el.dataModel = null;\n }\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\n each(labels, function (labelItem) {\n // The tickValue is dataIndex, see the costomized scale.\n var dataIndex = labelItem.tickValue;\n\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\n group.add(textEl);\n graphic.setHoverStyle(\n textEl, graphic.setTextStyle({}, hoverLabelModel)\n );\n\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\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\n makeBtn(\n layoutInfo.nextBtnPosition,\n 'controlStyle.nextIcon',\n bind(this._changeTimeline, this, inverse ? '-' : '+')\n );\n makeBtn(\n layoutInfo.prevBtnPosition,\n 'controlStyle.prevIcon',\n bind(this._changeTimeline, this, inverse ? '+' : '-')\n );\n makeBtn(\n layoutInfo.playPosition,\n 'controlStyle.' + (playState ? 'stopIcon' : 'playIcon'),\n bind(this._handlePlayClick, this, !playState),\n true\n );\n\n function makeBtn(position, iconPath, onclick, willRotate) {\n if (!position) {\n return;\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\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\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 };\n\n // Reuse when exists, for animation and drag.\n this._currentPointer = giveSymbol(\n pointerModel, pointerModel, this._mainGroup, {}, this._currentPointer, callback\n );\n },\n\n _handlePlayClick: function (nextState) {\n this._clearTimer();\n this.api.dispatchAction({\n type: 'timelinePlayChange',\n playState: nextState,\n from: this.uid\n });\n },\n\n _handlePointerDrag: function (dx, dy, e) {\n this._clearTimer();\n this._pointerChangeTimeline([e.offsetX, e.offsetY]);\n },\n\n _handlePointerDragend: function (e) {\n this._pointerChangeTimeline([e.offsetX, e.offsetY], true);\n },\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\n toCoord > axisExtent[1] && (toCoord = axisExtent[1]);\n toCoord < axisExtent[0] && (toCoord = axisExtent[0]);\n\n this._currentPointer.position[0] = toCoord;\n this._currentPointer.dirty();\n\n var targetDataIndex = this._findNearestTick(toCoord);\n var timelineModel = this.model;\n\n if (trigger || (\n targetDataIndex !== timelineModel.getCurrentIndex()\n && timelineModel.get('realtime')\n )) {\n this._changeTimeline(targetDataIndex);\n }\n },\n\n _doPlayStop: function () {\n this._clearTimer();\n\n if (this.model.getPlayState()) {\n this._timer = setTimeout(\n bind(handleFrame, this),\n this.model.get('playInterval')\n );\n }\n\n function handleFrame() {\n // Do not cache\n var timelineModel = this.model;\n this._changeTimeline(\n timelineModel.getCurrentIndex()\n + (timelineModel.get('rewind', true) ? -1 : 1)\n );\n }\n },\n\n _toAxisCoord: function (vertex) {\n var trans = this._mainGroup.getLocalTransform();\n return graphic.applyTransform(vertex, trans, true);\n },\n\n _findNearestTick: function (axisCoord) {\n var data = this.model.getData();\n var dist = Infinity;\n var targetDataIndex;\n var axis = this._axis;\n\n data.each(['value'], function (value, dataIndex) {\n var coord = axis.dataToCoord(value);\n var d = Math.abs(coord - axisCoord);\n if (d < dist) {\n dist = d;\n targetDataIndex = dataIndex;\n }\n });\n\n return targetDataIndex;\n },\n\n _clearTimer: function () {\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n },\n\n _changeTimeline: function (nextIndex) {\n var currentIndex = this.model.getCurrentIndex();\n\n if (nextIndex === '+') {\n nextIndex = currentIndex + 1;\n }\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});\n\nfunction getViewRect(model, api) {\n return layout.getLayoutRect(\n model.getBoxLayoutParams(),\n {\n width: api.getWidth(),\n height: api.getHeight()\n },\n model.get('padding')\n );\n}\n\nfunction makeIcon(timelineModel, objPath, rect, opts) {\n var style = opts.style;\n var icon = graphic.createIcon(\n timelineModel.get(objPath),\n opts || {},\n new BoundingRect(rect[0], rect[1], rect[2], rect[3])\n );\n // TODO createIcon won't use style in opt.\n if (style) {\n icon.setStyle(style);\n }\n return icon;\n}\n\n/**\n * Create symbol or update symbol\n * opt: basic position and event handlers\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 }\n else {\n symbol.setColor(color);\n group.add(symbol); // Group may be new, also need to add.\n callback && callback.onUpdate(symbol);\n }\n\n // Style\n var itemStyle = itemStyleModel.getItemStyle(['color', 'symbol', 'symbolSize']);\n symbol.setStyle(itemStyle);\n\n // Transform and events.\n opt = zrUtil.merge({\n rectHover: true,\n z2: 100\n }, opt, true);\n\n var symbolSize = hostModel.get('symbolSize');\n symbolSize = symbolSize instanceof Array\n ? symbolSize.slice()\n : [+symbolSize, +symbolSize];\n symbolSize[0] /= 2;\n symbolSize[1] /= 2;\n opt.scale = symbolSize;\n\n var symbolOffset = hostModel.get('symbolOffset');\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\n symbol.attr(opt);\n\n // 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 symbol.updateTransform();\n\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({position: [toCoord, 0]});\n }\n else {\n pointer.stopAnimation(true);\n pointer.animateTo(\n {position: [toCoord, 0]},\n pointerModel.get('animationDuration', true),\n pointerModel.get('animationEasing', true)\n );\n }\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * DataZoom component entry\n */\n\nimport * as echarts from '../echarts';\nimport preprocessor from './timeline/preprocessor';\n\nimport './timeline/typeDefaulter';\nimport './timeline/timelineAction';\nimport './timeline/SliderTimelineModel';\nimport './timeline/SliderTimelineView';\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\nimport {__DEV__} from '../../config';\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport env from 'zrender/src/core/env';\nimport * as modelUtil from '../../util/model';\nimport * as formatUtil from '../../util/format';\nimport dataFormatMixin from '../../model/mixin/dataFormat';\n\nvar addCommas = formatUtil.addCommas;\nvar encodeHTML = formatUtil.encodeHTML;\n\nfunction fillLabel(opt) {\n modelUtil.defaultEmphasis(opt, 'label', ['show']);\n}\nvar MarkerModel = echarts.extendComponentModel({\n\n type: 'marker',\n\n dependencies: ['series', 'grid', 'polar', 'geo'],\n\n /**\n * @overrite\n */\n init: function (option, parentModel, ecModel) {\n\n if (__DEV__) {\n if (this.type === 'marker') {\n throw new Error('Marker component is abstract component. Use markLine, markPoint, markArea instead.');\n }\n }\n this.mergeDefaultAndTheme(option, ecModel);\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\n _mergeOption: function (newOpt, ecModel, createdBySelf, isInit) {\n var MarkerModel = this.constructor;\n var modelPropName = this.mainType + 'Model';\n if (!createdBySelf) {\n ecModel.eachSeries(function (seriesModel) {\n\n var markerOpt = seriesModel.get(this.mainType, true);\n\n var markerModel = seriesModel[modelPropName];\n if (!markerOpt || !markerOpt.data) {\n seriesModel[modelPropName] = null;\n return;\n }\n if (!markerModel) {\n if (isInit) {\n // Default label emphasis `position` and `show`\n fillLabel(markerOpt);\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 }\n else {\n fillLabel(item);\n }\n });\n\n markerModel = new MarkerModel(\n markerOpt, this, ecModel\n );\n\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\n markerModel.__hostSeries = seriesModel;\n }\n else {\n markerModel._mergeOption(markerOpt, ecModel, true);\n }\n seriesModel[modelPropName] = markerModel;\n }, this);\n }\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)\n ? zrUtil.map(value, addCommas).join(', ') : addCommas(value);\n var name = data.getName(dataIndex);\n var html = encodeHTML(this.name);\n var newLine = renderMode === 'html' ? '<br/>' : '\\n';\n if (value != null || name) {\n html += newLine;\n }\n if (name) {\n html += encodeHTML(name);\n if (value != null) {\n html += ' : ';\n }\n }\n if (value != null) {\n html += encodeHTML(formattedValue);\n }\n return html;\n },\n\n getData: function () {\n return this._data;\n },\n\n setData: function (data) {\n this._data = data;\n }\n});\n\nzrUtil.mixin(MarkerModel, dataFormatMixin);\n\nexport default MarkerModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport MarkerModel from './MarkerModel';\n\nexport default MarkerModel.extend({\n\n type: 'markPoint',\n\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* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as numberUtil from '../../util/number';\nimport {isDimensionStacked} from '../../data/helper/dataStackHelper';\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}\n\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\n// return precision;\n// }\n\nfunction markerTypeCalculatorWithExtent(\n mlType, data, otherDataDim, targetDataDim, otherCoordIndex, targetCoordIndex\n) {\n var coordArr = [];\n\n var stacked = isDimensionStacked(data, targetDataDim /*, otherDataDim*/);\n var calcDataDim = stacked\n ? data.getCalculationInfo('stackResultDimension')\n : targetDataDim;\n\n var value = numCalculate(data, calcDataDim, mlType);\n\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);\n // Make it simple, do not visit all stacked value to count precision.\n var precision = numberUtil.getPrecision(data.get(targetDataDim, dataIndex));\n precision = Math.min(precision, 20);\n if (precision >= 0) {\n coordArr[targetCoordIndex] = +coordArr[targetCoordIndex].toFixed(precision);\n }\n\n return [coordArr, coordArrValue];\n}\n\nvar curry = zrUtil.curry;\n// TODO Specified percent\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 * @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/**\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 */\nexport function dataTransform(seriesModel, item) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n\n // 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\n // parseFloat first because item.x and item.y can be percent string like '20%'\n if (item && !hasXAndY(item) && !zrUtil.isArray(item.coord) && coordSys) {\n var dims = coordSys.dimensions;\n var axisInfo = getAxisInfo(item, data, coordSys, seriesModel);\n\n // Clone the option\n // Transform the properties xAxis, yAxis, radiusAxis, angleAxis, geoCoord to value\n item = zrUtil.clone(item);\n\n if (item.type\n && markerTypeCalculator[item.type]\n && axisInfo.baseAxis && axisInfo.valueAxis\n ) {\n var otherCoordIndex = indexOf(dims, axisInfo.baseAxis.dim);\n var targetCoordIndex = indexOf(dims, axisInfo.valueAxis.dim);\n\n var coordInfo = markerTypeCalculator[item.type](\n data, axisInfo.baseDataDim, axisInfo.valueDataDim,\n otherCoordIndex, targetCoordIndex\n );\n item.coord = coordInfo[0];\n // Force to use the value of calculated value.\n // let item use the value without stack.\n item.value = coordInfo[1];\n\n }\n else {\n // FIXME Only has one of xAxis and yAxis.\n var coord = [\n item.xAxis != null ? item.xAxis : item.radiusAxis,\n item.yAxis != null ? item.yAxis : item.angleAxis\n ];\n // Each coord support max, min, average\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 item.coord = coord;\n }\n }\n return item;\n}\n\nexport function getAxisInfo(item, data, coordSys, seriesModel) {\n var ret = {};\n\n if (item.valueIndex != null || item.valueDim != null) {\n ret.valueDataDim = item.valueIndex != null\n ? 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 }\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 for (var i = 0; i < dimensions.length; i++) {\n var dimItem = data.getDimensionInfo(dimensions[i]);\n if (dimItem.name === dataDim) {\n return dimItem.coordDim;\n }\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 */\nexport function dataFilter(coordSys, item) {\n // Alwalys return true if there is no coordSys\n return (coordSys && coordSys.containData && item.coord && !hasXOrY(item))\n ? coordSys.containData(item.coord) : true;\n}\n\nexport function dimValueGetter(item, dimName, dataIndex, dimIndex) {\n // x, y, radius, angle\n if (dimIndex < 2) {\n return item.coord && item.coord[dimIndex];\n }\n return item.value;\n}\n\nexport function 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 }\n else if (type === 'median') {\n return data.getMedian(valueDataDim);\n }\n else {\n // max & min\n return data.getDataExtent(valueDataDim, true)[type === 'max' ? 1 : 0];\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\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\n\nexport default echarts.extendComponentView({\n\n type: 'marker',\n\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\n render: function (markerModel, ecModel, api) {\n var markerGroupMap = this.markerGroupMap;\n markerGroupMap.each(function (item) {\n item.__keep = false;\n });\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\n markerGroupMap.each(function (item) {\n !item.__keep && this.group.remove(item.group);\n }, this);\n },\n\n renderSeries: 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\nimport * as zrUtil from 'zrender/src/core/util';\nimport SymbolDraw from '../../chart/helper/SymbolDraw';\nimport * as numberUtil from '../../util/number';\nimport List from '../../data/List';\nimport * as markerHelper from './markerHelper';\nimport MarkerView from './MarkerView';\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 if (!isNaN(xPx) && !isNaN(yPx)) {\n point = [xPx, yPx];\n }\n // Chart like bar may have there own marker positioning logic\n else if (seriesModel.getMarkerPosition) {\n // Use the getMarkerPoisition\n point = seriesModel.getMarkerPosition(\n mpData.getValues(mpData.dimensions, idx)\n );\n }\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\n }\n\n // Use x, y if has any\n if (!isNaN(xPx)) {\n point[0] = xPx;\n }\n if (!isNaN(yPx)) {\n point[1] = yPx;\n }\n\n mpData.setItemLayout(idx, point);\n });\n}\n\nexport default MarkerView.extend({\n\n type: 'markPoint',\n\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\n updateTransform: 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\n renderSeries: function (seriesModel, mpModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var seriesId = seriesModel.id;\n var seriesData = seriesModel.getData();\n\n var symbolDrawMap = this.markerGroupMap;\n var symbolDraw = symbolDrawMap.get(seriesId)\n || symbolDrawMap.set(seriesId, new SymbolDraw());\n\n var mpData = createList(coordSys, seriesModel, mpModel);\n\n // FIXME\n mpModel.setData(mpData);\n\n updateMarkerLayout(mpModel.getData(), seriesModel, api);\n\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 if (isFnSymbol) {\n symbol = symbol(rawIdx, dataParams);\n }\n if (isFnSymbolSize) {\n // FIXME 这里不兼容 ECharts 2.x2.x 貌似参数是整个数据?\n symbolSize = symbolSize(rawIdx, dataParams);\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')\n || seriesData.getVisual('color')\n });\n });\n\n // TODO Text are wrong\n symbolDraw.updateData(mpData);\n this.group.add(symbolDraw.group);\n\n // Set host model for tooltip\n // FIXME\n mpData.eachItemGraphicEl(function (el) {\n el.traverse(function (child) {\n child.dataModel = mpModel;\n });\n });\n\n symbolDraw.__keep = true;\n\n symbolDraw.group.silent = mpModel.get('silent') || seriesModel.get('silent');\n }\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 */\nfunction createList(coordSys, seriesModel, mpModel) {\n var coordDimsInfos;\n if (coordSys) {\n coordDimsInfos = zrUtil.map(coordSys && coordSys.dimensions, function (coordDim) {\n var info = seriesModel.getData().getDimensionInfo(\n seriesModel.getData().mapDimension(coordDim)\n ) || {};\n // In map series data don't have lng and lat dimension. Fallback to same with coordSys\n return zrUtil.defaults({name: coordDim}, info);\n });\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(\n markerHelper.dataTransform, seriesModel\n ));\n if (coordSys) {\n dataOpt = zrUtil.filter(\n dataOpt, zrUtil.curry(markerHelper.dataFilter, coordSys)\n );\n }\n\n mpData.initData(dataOpt, null,\n coordSys ? markerHelper.dimValueGetter : function (item) {\n return item.value;\n }\n );\n\n return mpData;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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// HINT Markpoint can't be used too much\nimport * as echarts from '../echarts';\n\nimport './marker/MarkPointModel';\nimport './marker/MarkPointView';\n\necharts.registerPreprocessor(function (opt) {\n // Make sure markPoint component is enabled\n opt.markPoint = opt.markPoint || {};\n});","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport MarkerModel from './MarkerModel';\n\nexport default MarkerModel.extend({\n\n type: 'markLine',\n\n defaultOption: {\n zlevel: 0,\n z: 5,\n\n symbol: ['circle', 'arrow'],\n symbolSize: [8, 16],\n\n //symbolRotate: 0,\n\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* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport List from '../../data/List';\nimport * as numberUtil from '../../util/number';\nimport * as markerHelper from './markerHelper';\nimport LineDraw from '../../chart/helper/LineDraw';\nimport MarkerView from './MarkerView';\nimport {getStackedDimension} from '../../data/helper/dataStackHelper';\n\nvar markLineTransform = function (seriesModel, coordSys, mlModel, item) {\n var data = seriesModel.getData();\n // Special type markLine like 'min', 'max', 'average', 'median'\n var mlType = item.type;\n\n if (!zrUtil.isArray(item)\n && (\n mlType === 'min' || mlType === 'max' || mlType === 'average' || mlType === 'median'\n // In case\n // data: [{\n // yAxis: 10\n // }]\n || (item.xAxis != null || item.yAxis != null)\n )\n ) {\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 }\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 var valueIndex = valueAxis.dim === 'x' ? 0 : 1;\n var baseIndex = 1 - valueIndex;\n\n var mlFrom = zrUtil.clone(item);\n var mlTo = {};\n\n mlFrom.type = null;\n\n mlFrom.coord = [];\n mlTo.coord = [];\n mlFrom.coord[baseIndex] = -Infinity;\n mlTo.coord[baseIndex] = Infinity;\n\n var precision = mlModel.get('precision');\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\n item = [mlFrom, mlTo, { // 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 = [\n markerHelper.dataTransform(seriesModel, item[0]),\n markerHelper.dataTransform(seriesModel, item[1]),\n zrUtil.extend({}, item[2])\n ];\n\n // Avoid line data type is extended by from(to) data type\n item[2].type = item[2].type || '';\n\n // Merge from option and to option into line option\n zrUtil.merge(item[2], item[0]);\n zrUtil.merge(item[2], item[1]);\n\n return item;\n};\n\nfunction isInifinity(val) {\n return !isNaN(val) && !isFinite(val);\n}\n\n// If a markLine has one dim\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])\n && 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;\n // In case\n // {\n // markLine: {\n // data: [{ yAxis: 2 }]\n // }\n // }\n if (\n fromCoord && toCoord\n && (ifMarkLineHasOnlyDim(1, fromCoord, toCoord, coordSys)\n || ifMarkLineHasOnlyDim(0, fromCoord, toCoord, coordSys))\n ) {\n return true;\n }\n }\n return markerHelper.dataFilter(coordSys, item[0])\n && markerHelper.dataFilter(coordSys, item[1]);\n}\n\nfunction updateSingleMarkerEndLayout(\n data, idx, isFrom, seriesModel, api\n) {\n var coordSys = seriesModel.coordinateSystem;\n var itemModel = data.getItemModel(idx);\n\n var point;\n var xPx = numberUtil.parsePercent(itemModel.get('x'), api.getWidth());\n var yPx = numberUtil.parsePercent(itemModel.get('y'), api.getHeight());\n if (!isNaN(xPx) && !isNaN(yPx)) {\n point = [xPx, yPx];\n }\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(\n data.getValues(data.dimensions, idx)\n );\n }\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 }\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 if (coordSys.type === 'cartesian2d') {\n var xAxis = coordSys.getAxis('x');\n var yAxis = coordSys.getAxis('y');\n var dims = coordSys.dimensions;\n if (isInifinity(data.get(dims[0], idx))) {\n point[0] = xAxis.toGlobalCoord(xAxis.getExtent()[isFrom ? 0 : 1]);\n }\n else if (isInifinity(data.get(dims[1], idx))) {\n point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[isFrom ? 0 : 1]);\n }\n }\n\n // Use x, y if has any\n if (!isNaN(xPx)) {\n point[0] = xPx;\n }\n if (!isNaN(yPx)) {\n point[1] = yPx;\n }\n }\n\n data.setItemLayout(idx, point);\n}\n\nexport default MarkerView.extend({\n\n type: 'markLine',\n\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\n // this.markerGroupMap.get(seriesModel.id).updateLayout();\n\n // }\n // }, this);\n // },\n\n updateTransform: 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\n this.markerGroupMap.get(seriesModel.id).updateLayout();\n\n }\n }, this);\n },\n\n renderSeries: function (seriesModel, mlModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var seriesId = seriesModel.id;\n var seriesData = seriesModel.getData();\n\n var lineDrawMap = this.markerGroupMap;\n var lineDraw = lineDrawMap.get(seriesId)\n || lineDrawMap.set(seriesId, new LineDraw());\n this.group.add(lineDraw.group);\n\n var mlData = createList(coordSys, seriesModel, mlModel);\n\n var fromData = mlData.from;\n var toData = mlData.to;\n var lineData = mlData.line;\n\n mlModel.__from = fromData;\n mlModel.__to = toData;\n // Line data for tooltip and formatter\n mlModel.setData(lineData);\n\n var symbolType = mlModel.get('symbol');\n var symbolSize = mlModel.get('symbolSize');\n if (!zrUtil.isArray(symbolType)) {\n symbolType = [symbolType, symbolType];\n }\n if (typeof symbolSize === 'number') {\n symbolSize = [symbolSize, symbolSize];\n }\n\n // Update visual and layout of from symbol and to symbol\n mlData.from.each(function (idx) {\n updateDataVisualAndLayout(fromData, idx, true);\n updateDataVisualAndLayout(toData, idx, false);\n });\n\n // Update visual and layout of line\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, [\n fromData.getItemLayout(idx),\n toData.getItemLayout(idx)\n ]);\n\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\n lineDraw.updateData(lineData);\n\n // Set host model for tooltip\n // FIXME\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\n updateSingleMarkerEndLayout(\n data, idx, isFrom, seriesModel, api\n );\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\n lineDraw.group.silent = mlModel.get('silent') || seriesModel.get('silent');\n }\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 */\nfunction createList(coordSys, seriesModel, mlModel) {\n\n var coordDimsInfos;\n if (coordSys) {\n coordDimsInfos = zrUtil.map(coordSys && coordSys.dimensions, function (coordDim) {\n var info = seriesModel.getData().getDimensionInfo(\n seriesModel.getData().mapDimension(coordDim)\n ) || {};\n // In map series data don't have lng and lat dimension. Fallback to same with coordSys\n return zrUtil.defaults({name: coordDim}, info);\n });\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);\n // No dimensions\n var lineData = new List([], mlModel);\n\n var optData = zrUtil.map(mlModel.get('data'), zrUtil.curry(\n markLineTransform, seriesModel, coordSys, mlModel\n ));\n if (coordSys) {\n optData = zrUtil.filter(\n optData, zrUtil.curry(markLineFilter, coordSys)\n );\n }\n var dimValueGetter = coordSys ? markerHelper.dimValueGetter : function (item) {\n return item.value;\n };\n fromData.initData(\n zrUtil.map(optData, function (item) {\n return item[0];\n }),\n null,\n dimValueGetter\n );\n toData.initData(\n zrUtil.map(optData, function (item) {\n return item[1];\n }),\n null,\n dimValueGetter\n );\n lineData.initData(\n zrUtil.map(optData, function (item) {\n return item[2];\n })\n );\n lineData.hasItemOption = true;\n\n return {\n from: fromData,\n to: toData,\n line: lineData\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\nimport * as echarts from '../echarts';\n\nimport './marker/MarkLineModel';\nimport './marker/MarkLineView';\n\necharts.registerPreprocessor(function (opt) {\n // Make sure markLine component is enabled\n opt.markLine = opt.markLine || {};\n});","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport MarkerModel from './MarkerModel';\n\nexport default MarkerModel.extend({\n\n type: 'markArea',\n\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\n emphasis: {\n label: {\n show: true,\n position: 'top'\n }\n }\n }\n});","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n// TODO Better on polar\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as colorUtil from 'zrender/src/tool/color';\nimport List from '../../data/List';\nimport * as numberUtil from '../../util/number';\nimport * as graphic from '../../util/graphic';\nimport * as markerHelper from './markerHelper';\nimport MarkerView from './MarkerView';\n\n\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;\n\n // FIXME make sure lt is less than rb\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\n rbCoord[0] = retrieve(rbCoord[0], Infinity);\n rbCoord[1] = retrieve(rbCoord[1], Infinity);\n\n // Merge option into one\n var result = zrUtil.mergeAll([{}, lt, rb]);\n\n result.coord = [\n lt.coord, rb.coord\n ];\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}\n\n// If a markArea has one dim\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 if (coordSys.type === 'cartesian2d') {\n // In case\n // {\n // markArea: {\n // data: [{ yAxis: 2 }]\n // }\n // }\n if (\n fromCoord && toCoord\n && (ifMarkLineHasOnlyDim(1, fromCoord, toCoord, coordSys)\n || ifMarkLineHasOnlyDim(0, fromCoord, toCoord, coordSys))\n ) {\n return true;\n }\n }\n return markerHelper.dataFilter(coordSys, {\n coord: fromCoord,\n x: item.x0,\n y: item.y0\n })\n || markerHelper.dataFilter(coordSys, {\n coord: toCoord,\n x: item.x1,\n y: item.y1\n });\n}\n\n// dims can be ['x0', 'y0'], ['x1', 'y1'], ['x0', 'y1'], ['x1', 'y0']\nfunction getSingleMarkerEndPoint(data, idx, dims, seriesModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var itemModel = data.getItemModel(idx);\n\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 if (!isNaN(xPx) && !isNaN(yPx)) {\n point = [xPx, yPx];\n }\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(\n data.getValues(dims, idx)\n );\n }\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 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 if (isInifinity(x)) {\n point[0] = xAxis.toGlobalCoord(xAxis.getExtent()[dims[0] === 'x0' ? 0 : 1]);\n }\n else if (isInifinity(y)) {\n point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[dims[1] === 'y0' ? 0 : 1]);\n }\n }\n\n // Use x, y if has any\n if (!isNaN(xPx)) {\n point[0] = xPx;\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']];\n\nMarkerView.extend({\n\n type: 'markArea',\n\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\n updateTransform: 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\n renderSeries: function (seriesModel, maModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var seriesId = seriesModel.id;\n var seriesData = seriesModel.getData();\n\n var areaGroupMap = this.markerGroupMap;\n var polygonGroup = areaGroupMap.get(seriesId)\n || areaGroupMap.set(seriesId, {group: new graphic.Group()});\n\n this.group.add(polygonGroup.group);\n polygonGroup.__keep = true;\n\n var areaData = createList(coordSys, seriesModel, maModel);\n\n // Line data for tooltip and formatter\n maModel.setData(areaData);\n\n // Update visual and layout of line\n areaData.each(function (idx) {\n // Layout\n var points = zrUtil.map(dimPermutations, function (dim) {\n return getSingleMarkerEndPoint(areaData, idx, dim, seriesModel, api);\n });\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 var allClipped = true;\n zrUtil.each(dimPermutations, function (dim) {\n if (!allClipped) {\n return;\n }\n var xValue = areaData.get(dim[0], idx);\n var yValue = areaData.get(dim[1], idx);\n // If is infinity, the axis should be considered not clipped\n if ((isInifinity(xValue) || coordSys.getAxis('x').containData(xValue))\n && (isInifinity(yValue) || coordSys.getAxis('y').containData(yValue))\n ) {\n allClipped = false;\n }\n });\n areaData.setItemLayout(idx, {\n points: points,\n allClipped: allClipped\n });\n\n // Visual\n areaData.setItemVisual(idx, {\n color: seriesData.getVisual('color')\n });\n });\n\n\n areaData.diff(polygonGroup.__data)\n .add(function (idx) {\n var layout = areaData.getItemLayout(idx);\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 })\n .update(function (newIdx, oldIdx) {\n var polygon = polygonGroup.__data.getItemGraphicEl(oldIdx);\n var layout = areaData.getItemLayout(newIdx);\n if (!layout.allClipped) {\n if (polygon) {\n graphic.updateProps(polygon, {\n shape: {\n points: layout.points\n }\n }, maModel, newIdx);\n }\n else {\n polygon = new graphic.Polygon({\n shape: {\n points: layout.points\n }\n });\n }\n areaData.setItemGraphicEl(newIdx, polygon);\n polygonGroup.group.add(polygon);\n }\n else if (polygon) {\n polygonGroup.group.remove(polygon);\n }\n })\n .remove(function (idx) {\n var polygon = polygonGroup.__data.getItemGraphicEl(idx);\n polygonGroup.group.remove(polygon);\n })\n .execute();\n\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(\n zrUtil.defaults(\n itemModel.getModel('itemStyle').getItemStyle(),\n {\n fill: colorUtil.modifyAlpha(color, 0.4),\n stroke: color\n }\n )\n );\n\n polygon.hoverStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle();\n\n graphic.setLabelStyle(\n polygon.style, polygon.hoverStyle, labelModel, labelHoverModel,\n {\n labelFetcher: maModel,\n labelDataIndex: idx,\n defaultText: areaData.getName(idx) || '',\n isRectText: true,\n autoColor: color\n }\n );\n\n graphic.setHoverStyle(polygon, {});\n\n polygon.dataModel = maModel;\n });\n\n polygonGroup.__data = areaData;\n\n polygonGroup.group.silent = maModel.get('silent') || seriesModel.get('silent');\n }\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 */\nfunction createList(coordSys, seriesModel, maModel) {\n\n var coordDimsInfos;\n var areaData;\n var dims = ['x0', 'y0', 'x1', 'y1'];\n if (coordSys) {\n coordDimsInfos = zrUtil.map(coordSys && coordSys.dimensions, function (coordDim) {\n var data = seriesModel.getData();\n var info = data.getDimensionInfo(\n data.mapDimension(coordDim)\n ) || {};\n // In map series data don't have lng and lat dimension. Fallback to same with coordSys\n return zrUtil.defaults({name: coordDim}, 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 }\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(\n markAreaTransform, seriesModel, coordSys, maModel\n ));\n if (coordSys) {\n optData = zrUtil.filter(\n optData, zrUtil.curry(markAreaFilter, coordSys)\n );\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* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../echarts';\n\nimport './marker/MarkAreaModel';\nimport './marker/MarkAreaView';\n\necharts.registerPreprocessor(function (opt) {\n // Make sure markArea component is enabled\n opt.markArea = opt.markArea || {};\n});","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport Model from '../../model/Model';\nimport {isNameSpecified} from '../../util/model';\nimport lang from '../../lang';\n\nvar langSelector = lang.legend.selector;\n\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};\n\nvar LegendModel = echarts.extendComponentModel({\n\n type: 'legend.plain',\n\n dependencies: ['series'],\n\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\n init: function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n\n option.selected = option.selected || {};\n this._updateSelector(option);\n },\n\n mergeOption: function (option) {\n LegendModel.superCall(this, 'mergeOption', option);\n this._updateSelector(option);\n },\n\n _updateSelector: function (option) {\n var selector = option.selector;\n if (selector === true) {\n selector = option.selector = ['all', 'inverse'];\n }\n if (zrUtil.isArray(selector)) {\n zrUtil.each(selector, function (item, index) {\n zrUtil.isString(item) && (item = {type: item});\n selector[index] = zrUtil.merge(item, defaultSelectorOption[item.type]);\n });\n }\n },\n\n optionUpdated: function () {\n this._updateData(this.ecModel);\n\n var legendData = this._data;\n\n // If selectedMode is single, try to select one\n if (legendData[0] && this.get('selectedMode') === 'single') {\n var hasSelected = false;\n // If has any selected in option.selected\n for (var i = 0; i < legendData.length; i++) {\n var name = legendData[i].get('name');\n if (this.isSelected(name)) {\n // Force to unselect others\n this.select(name);\n hasSelected = true;\n break;\n }\n }\n // Try select the first if selectedMode is single\n !hasSelected && this.select(legendData[0].get('name'));\n }\n },\n\n _updateData: function (ecModel) {\n var potentialData = [];\n var availableNames = [];\n\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 }\n else {\n isPotential = true;\n }\n }\n else {\n isPotential = true;\n }\n\n if (isPotential && isNameSpecified(seriesModel)) {\n potentialData.push(seriesModel.name);\n }\n });\n\n /**\n * @type {Array.<string>}\n * @private\n */\n this._availableNames = availableNames;\n\n // If legend.data not specified in option, use availableNames as data,\n // which is convinient for user preparing option.\n var rawData = this.get('data') || potentialData;\n\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 return new Model(dataItem, this, this.ecModel);\n }, this);\n\n /**\n * @type {Array.<module:echarts/model/Model>}\n * @private\n */\n this._data = legendData;\n },\n\n /**\n * @return {Array.<module:echarts/model/Model>}\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 if (selectedMode === 'single') {\n var data = this._data;\n zrUtil.each(data, function (dataItem) {\n selected[dataItem.get('name')] = false;\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;\n // Default is true\n if (!selected.hasOwnProperty(name)) {\n selected[name] = true;\n }\n this[selected[name] ? 'unSelect' : 'select'](name);\n },\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\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);\n // Initially, default value is true\n if (!selected.hasOwnProperty(name)) {\n selected[name] = true;\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])\n && zrUtil.indexOf(this._availableNames, name) >= 0;\n },\n\n getOrient: function () {\n return this.get('orient') === 'vertical'\n ? {index: 1, name: 'vertical'}\n : {index: 0, name: 'horizontal'};\n },\n\n defaultOption: {\n // 一级层叠\n zlevel: 0,\n // 二级层叠\n z: 4,\n show: true,\n\n // 布局方式,默认为水平布局,可选为:\n // 'horizontal' | 'vertical'\n orient: 'horizontal',\n\n left: 'center',\n // right: 'center',\n\n top: 0,\n // bottom: null,\n\n // 水平对齐\n // 'auto' | 'left' | 'right'\n // 默认为 'auto', 根据 x 的位置判断是左对齐还是右对齐\n align: 'auto',\n\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\n // the color of unselected legend symbol\n inactiveColor: '#ccc',\n\n // the borderColor of unselected legend symbol\n inactiveBorderColor: '#ccc',\n\n itemStyle: {\n // the default borderWidth of legend symbol\n borderWidth: 0\n },\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\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\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\n emphasis: {\n selectorLabel: {\n show: true,\n color: '#eee',\n backgroundColor: '#666'\n }\n },\n\n // Value can be 'start' or 'end'\n selectorPosition: 'auto',\n\n selectorItemGap: 7,\n\n selectorButtonGap: 10,\n\n // Tooltip 相关配置\n tooltip: {\n show: false\n }\n }\n});\n\nexport default LegendModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\n\nfunction legendSelectActionHandler(methodName, payload, ecModel) {\n var selectedMap = {};\n var isToggleSelect = methodName === 'toggleSelected';\n var isSelected;\n // Update all legend components\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 }\n else if (methodName === 'allSelect' || methodName === 'inverseSelect') {\n legendModel[methodName]();\n }\n else {\n legendModel[methodName](payload.name);\n isSelected = legendModel.isSelected(payload.name);\n }\n var legendData = legendModel.getData();\n zrUtil.each(legendData, function (model) {\n var name = model.get('name');\n // Wrap element\n if (name === '\\n' || name === '') {\n return;\n }\n var isItemSelected = legendModel.isSelected(name);\n if (selectedMap.hasOwnProperty(name)) {\n // Unselected if any legend is unselected\n selectedMap[name] = selectedMap[name] && isItemSelected;\n }\n else {\n selectedMap[name] = isItemSelected;\n }\n });\n });\n // Return the event explicitly\n return (methodName === 'allSelect' || methodName === 'inverseSelect')\n ? {\n selected: selectedMap\n }\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 */\necharts.registerAction(\n 'legendToggleSelect', 'legendselectchanged',\n zrUtil.curry(legendSelectActionHandler, 'toggleSelected')\n);\n\necharts.registerAction(\n 'legendAllSelect', 'legendselectall',\n zrUtil.curry(legendSelectActionHandler, 'allSelect')\n);\n\necharts.registerAction(\n 'legendInverseSelect', 'legendinverseselect',\n zrUtil.curry(legendSelectActionHandler, 'inverseSelect')\n);\n\n/**\n * @event legendSelect\n * @type {Object}\n * @property {string} type 'legendSelect'\n * @property {string} name Series name or data item name\n */\necharts.registerAction(\n 'legendSelect', 'legendselected',\n zrUtil.curry(legendSelectActionHandler, 'select')\n);\n\n/**\n * @event legendUnSelect\n * @type {Object}\n * @property {string} type 'legendUnSelect'\n * @property {string} name Series name or data item name\n */\necharts.registerAction(\n 'legendUnSelect', 'legendunselected',\n zrUtil.curry(legendSelectActionHandler, '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\nimport {__DEV__} from '../../config';\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport {createSymbol} from '../../util/symbol';\nimport * as graphic from '../../util/graphic';\nimport {makeBackground} from '../helper/listComponent';\nimport * as layoutUtil from '../../util/layout';\n\nvar curry = zrUtil.curry;\nvar each = zrUtil.each;\nvar Group = graphic.Group;\n\nexport default echarts.extendComponentView({\n\n type: 'legend.plain',\n\n newlineDisabled: false,\n\n /**\n * @override\n */\n init: function () {\n\n /**\n * @private\n * @type {module:zrender/container/Group}\n */\n this.group.add(this._contentGroup = new Group());\n\n /**\n * @private\n * @type {module:zrender/Element}\n */\n this._backgroundEl;\n\n /**\n * @private\n * @type {module:zrender/container/Group}\n */\n this.group.add(this._selectorGroup = new Group());\n\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 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\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 if (!itemAlign || itemAlign === 'auto') {\n itemAlign = (\n legendModel.get('left') === 'right'\n && orient === 'vertical'\n ) ? 'right' : 'left';\n }\n\n var selector = legendModel.get('selector', true);\n var selectorPosition = legendModel.get('selectorPosition', true);\n if (selector && (!selectorPosition || selectorPosition === 'auto')) {\n selectorPosition = orient === 'horizontal' ? 'end' : 'start';\n }\n\n this.renderInner(itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition);\n\n // Perform layout.\n var positionInfo = legendModel.getBoxLayoutParams();\n var viewportSize = {width: api.getWidth(), height: api.getHeight()};\n var padding = legendModel.get('padding');\n\n var maxSize = layoutUtil.getLayoutRect(positionInfo, viewportSize, padding);\n\n var mainRect = this.layoutInner(legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition);\n\n // Place mainGroup, based on the calculated `mainRect`.\n var layoutRect = layoutUtil.getLayoutRect(\n zrUtil.defaults({width: mainRect.width, height: mainRect.height}, positionInfo),\n viewportSize,\n padding\n );\n this.group.attr('position', [layoutRect.x - mainRect.x, layoutRect.y - mainRect.y]);\n\n // Render background after group is layout.\n this.group.add(\n this._backgroundEl = makeBackground(mainRect, legendModel)\n );\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\n var excludeSeriesId = [];\n ecModel.eachRawSeries(function (seriesModel) {\n !seriesModel.get('legendHoverLink') && excludeSeriesId.push(seriesModel.id);\n });\n\n each(legendModel.getData(), function (itemModel, dataIndex) {\n var name = itemModel.get('name');\n\n // Use empty string or \\n as a newline string\n if (!this.newlineDisabled && (name === '' || name === '\\n')) {\n contentGroup.add(new Group({\n newline: true\n }));\n return;\n }\n\n // Representitive series.\n var seriesModel = ecModel.getSeriesByName(name)[0];\n\n if (legendDrawnMap.get(name)) {\n // Have been drawed\n return;\n }\n\n // Legend to control series.\n if (seriesModel) {\n var data = seriesModel.getData();\n var color = data.getVisual('color');\n var borderColor = data.getVisual('borderColor');\n\n // If color is a callback function\n if (typeof color === 'function') {\n // Use the first data\n color = color(seriesModel.getDataParams(0));\n }\n\n // If borderColor is a callback function\n if (typeof borderColor === 'function') {\n // Use the first data\n borderColor = borderColor(seriesModel.getDataParams(0));\n }\n\n // Using rect symbol defaultly\n var legendSymbolType = data.getVisual('legendSymbol') || 'roundRect';\n var symbolType = data.getVisual('symbol');\n\n var itemGroup = this._createItem(\n name, dataIndex, itemModel, legendModel,\n legendSymbolType, symbolType,\n itemAlign, color, borderColor,\n selectMode\n );\n\n itemGroup.on('click', curry(dispatchSelectAction, name, null, api, excludeSeriesId))\n .on('mouseover', curry(dispatchHighlightAction, seriesModel.name, null, api, excludeSeriesId))\n .on('mouseout', curry(dispatchDownplayAction, seriesModel.name, null, api, excludeSeriesId));\n\n legendDrawnMap.set(name, true);\n }\n else {\n // Legend to control data. In pie and funnel.\n ecModel.eachRawSeries(function (seriesModel) {\n\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 if (!provider.containName(name)) {\n return;\n }\n\n var idx = provider.indexOfName(name);\n\n var color = provider.getItemVisual(idx, 'color');\n var borderColor = provider.getItemVisual(idx, 'borderColor');\n\n var legendSymbolType = 'roundRect';\n\n var itemGroup = this._createItem(\n name, dataIndex, itemModel, legendModel,\n legendSymbolType, null,\n itemAlign, color, borderColor,\n selectMode\n );\n\n // FIXME: consider different series has items with the same name.\n itemGroup.on('click', curry(dispatchSelectAction, null, name, api, excludeSeriesId))\n // Should not specify the series name, consider legend controls\n // more than one pie series.\n .on('mouseover', curry(dispatchHighlightAction, null, name, api, excludeSeriesId))\n .on('mouseout', curry(dispatchDownplayAction, null, name, api, excludeSeriesId));\n\n legendDrawnMap.set(name, true);\n }\n\n }, this);\n }\n\n if (__DEV__) {\n if (!legendDrawnMap.get(name)) {\n console.warn(\n name + ' series not exists. Legend data should be same with series name or data name.'\n );\n }\n }\n }, this);\n\n if (selector) {\n this._createSelector(selector, legendModel, api, orient, selectorPosition);\n }\n },\n\n _createSelector: function (selector, legendModel, api, orient, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n\n each(selector, function (selectorItem) {\n createSelectorButton(selectorItem);\n });\n\n function createSelectorButton(selectorItem) {\n var type = selectorItem.type;\n\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\n selectorGroup.add(labelText);\n\n var labelModel = legendModel.getModel('selectorLabel');\n var emphasisLabelModel = legendModel.getModel('emphasis.selectorLabel');\n\n graphic.setLabelStyle(\n labelText.style, labelText.hoverStyle = {}, labelModel, emphasisLabelModel,\n {\n defaultText: selectorItem.title,\n isRectText: false\n }\n );\n graphic.setHoverStyle(labelText);\n }\n },\n\n _createItem: function (\n name, dataIndex, itemModel, legendModel,\n legendSymbolType, symbolType,\n itemAlign, color, borderColor, selectMode\n ) {\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\n var isSelected = legendModel.isSelected(name);\n var itemGroup = new Group();\n\n var textStyleModel = itemModel.getModel('textStyle');\n\n var itemIcon = itemModel.get('icon');\n\n var tooltipModel = itemModel.getModel('tooltip');\n var legendGlobalTooltipModel = tooltipModel.parentModel;\n\n // Use user given icon first\n legendSymbolType = itemIcon || legendSymbolType;\n var legendSymbol = createSymbol(\n legendSymbolType,\n 0,\n 0,\n itemWidth,\n itemHeight,\n isSelected ? color : inactiveColor,\n // symbolKeepAspect default true for legend\n symbolKeepAspect == null ? true : symbolKeepAspect\n );\n itemGroup.add(\n setSymbolStyle(\n legendSymbol, legendSymbolType, legendModelItemStyle,\n borderColor, inactiveBorderColor, isSelected\n )\n );\n\n // Compose symbols\n // PENDING\n if (!itemIcon && symbolType\n // At least show one symbol, can't be all none\n && ((symbolType !== legendSymbolType) || symbolType === 'none')\n ) {\n var size = itemHeight * 0.8;\n if (symbolType === 'none') {\n symbolType = 'circle';\n }\n var legendSymbolCenter = createSymbol(\n symbolType,\n (itemWidth - size) / 2,\n (itemHeight - size) / 2,\n size,\n size,\n isSelected ? color : inactiveColor,\n // symbolKeepAspect default true for legend\n symbolKeepAspect == null ? true : symbolKeepAspect\n );\n // Put symbol in the center\n itemGroup.add(\n setSymbolStyle(\n legendSymbolCenter, symbolType, legendModelItemStyle,\n borderColor, inactiveBorderColor, isSelected\n )\n );\n }\n\n var textX = itemAlign === 'left' ? itemWidth + 5 : -5;\n var textAlign = itemAlign;\n\n var formatter = legendModel.get('formatter');\n var content = name;\n if (typeof formatter === 'string' && formatter) {\n content = formatter.replace('{name}', name != null ? name : '');\n }\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 }));\n\n // Add a invisible rect to increase the area of mouse hover\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\n itemGroup.eachChild(function (child) {\n child.silent = true;\n });\n\n hitRect.silent = !selectMode;\n\n this.getContentGroup().add(itemGroup);\n\n graphic.setHoverStyle(itemGroup);\n\n itemGroup.__legendDataIndex = dataIndex;\n\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();\n\n // Place items in contentGroup.\n layoutUtil.box(\n legendModel.get('orient'),\n contentGroup,\n legendModel.get('itemGap'),\n maxSize.width,\n maxSize.height\n );\n\n var contentRect = contentGroup.getBoundingRect();\n var contentPos = [-contentRect.x, -contentRect.y];\n\n if (selector) {\n // Place buttons in selectorGroup\n layoutUtil.box(\n // Buttons in selectorGroup always layout horizontally\n 'horizontal',\n selectorGroup,\n legendModel.get('selectorItemGap', true)\n );\n\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n\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 }\n else {\n contentPos[orientIdx] += selectorRect[wh] + selectorButtonGap;\n }\n\n //Always align selector to content as 'middle'\n selectorPos[1 - orientIdx] += contentRect[hw] / 2 - selectorRect[hw] / 2;\n selectorGroup.attr('position', selectorPos);\n contentGroup.attr('position', contentPos);\n\n var mainRect = {x: 0, y: 0};\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 }\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});\n\nfunction setSymbolStyle(symbol, symbolType, legendModelItemStyle, borderColor, inactiveBorderColor, isSelected) {\n var itemStyle;\n if (symbolType !== 'line' && symbolType.indexOf('empty') < 0) {\n itemStyle = legendModelItemStyle.getItemStyle();\n symbol.style.stroke = borderColor;\n if (!isSelected) {\n itemStyle.stroke = inactiveBorderColor;\n }\n }\n else {\n itemStyle = legendModelItemStyle.getItemStyle(['borderWidth', 'borderColor']);\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 });\n // highlight after select\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 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 if (!(el && el.useHoverLayer)) {\n api.dispatchAction({\n type: 'downplay',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\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\nexport default function (ecModel) {\n\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\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 return true;\n });\n }\n\n}","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n// Do not contain scrollable legend, for sake of file size.\n\nimport * as echarts from '../echarts';\n\nimport './legend/LegendModel';\nimport './legend/legendAction';\nimport './legend/LegendView';\n\nimport legendFilter from './legend/legendFilter';\nimport Component from '../model/Component';\n\n// Series Filter\necharts.registerProcessor(echarts.PRIORITY.PROCESSOR.SERIES_FILTER, legendFilter);\n\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\nimport LegendModel from './LegendModel';\nimport {\n mergeLayoutParam,\n getLayoutParams\n} from '../../util/layout';\n\nvar ScrollableLegendModel = LegendModel.extend({\n\n type: 'legend.scroll',\n\n /**\n * @param {number} scrollDataIndex\n */\n setScrollDataIndex: function (scrollDataIndex) {\n this.option.scrollDataIndex = scrollDataIndex;\n },\n\n defaultOption: {\n scrollDataIndex: 0,\n pageButtonItemGap: 5,\n pageButtonGap: null,\n pageButtonPosition: 'end', // 'start' or 'end'\n pageFormatter: '{current}/{total}', // 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, // Can be [10, 3], which represents [width, height]\n pageTextStyle: {\n color: '#333'\n },\n\n animationDurationUpdate: 800\n },\n\n /**\n * @override\n */\n init: function (option, parentModel, ecModel, extraOpt) {\n var inputPositionParams = getLayoutParams(option);\n\n ScrollableLegendModel.superCall(this, 'init', option, parentModel, ecModel, extraOpt);\n\n mergeAndNormalizeLayoutParams(this, option, inputPositionParams);\n },\n\n /**\n * @override\n */\n mergeOption: function (option, extraOpt) {\n ScrollableLegendModel.superCall(this, 'mergeOption', option, extraOpt);\n\n mergeAndNormalizeLayoutParams(this, this.option, option);\n }\n\n});\n\n// Do not `ignoreSize` to enable setting {left: 10, right: 10}.\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', ignoreSize: ignoreSize\n });\n}\n\nexport default ScrollableLegendModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../../util/graphic';\nimport * as layoutUtil from '../../util/layout';\nimport LegendView from './LegendView';\n\nvar Group = graphic.Group;\n\nvar WH = ['width', 'height'];\nvar XY = ['x', 'y'];\n\nvar ScrollableLegendView = LegendView.extend({\n\n type: 'legend.scroll',\n\n newlineDisabled: true,\n\n init: function () {\n\n ScrollableLegendView.superCall(this, 'init');\n\n /**\n * @private\n * @type {number} For `scroll`.\n */\n this._currentIndex = 0;\n\n /**\n * @private\n * @type {module:zrender/container/Group}\n */\n this.group.add(this._containerGroup = new Group());\n this._containerGroup.add(this.getContentGroup());\n\n /**\n * @private\n * @type {module:zrender/container/Group}\n */\n this.group.add(this._controllerGroup = new Group());\n\n /**\n *\n * @private\n */\n this._showController;\n },\n\n /**\n * @override\n */\n resetInner: function () {\n ScrollableLegendView.superCall(this, 'resetInner');\n\n this._controllerGroup.removeAll();\n this._containerGroup.removeClipPath();\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;\n\n // Render content items.\n ScrollableLegendView.superCall(this, 'renderInner', itemAlign,\n legendModel, ecModel, api, selector, orient, selectorPosition);\n\n var controllerGroup = this._controllerGroup;\n\n // FIXME: support be 'auto' adapt to size number text length,\n // e.g., '3/12345' should not overlap with the control arrow button.\n var pageIconSize = legendModel.get('pageIconSize', true);\n if (!zrUtil.isArray(pageIconSize)) {\n pageIconSize = [pageIconSize, pageIconSize];\n }\n\n createPageButton('pagePrev', 0);\n\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\n createPageButton('pageNext', 1);\n\n function createPageButton(name, iconIdx) {\n var pageDataIndexName = name + 'DataIndex';\n var icon = graphic.createIcon(\n legendModel.get('pageIcons', true)[legendModel.getOrient().name][iconIdx],\n {\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(\n me._pageGo, me, pageDataIndexName, legendModel, api\n )\n },\n {\n x: -pageIconSize[0] / 2,\n y: -pageIconSize[1] / 2,\n width: pageIconSize[0],\n height: pageIconSize[1]\n }\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\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\n selector && layoutUtil.box(\n // Buttons in selectorGroup always layout horizontally\n 'horizontal',\n selectorGroup,\n legendModel.get('selectorItemGap', true)\n );\n\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n\n var processMaxSize = zrUtil.clone(maxSize);\n selector && (processMaxSize[wh] = maxSize[wh] - selectorRect[wh] - selectorButtonGap);\n\n var mainRect = this._layoutContentAndController(legendModel, isFirstRender,\n processMaxSize, orientIdx, wh, hw, yx\n );\n\n if (selector) {\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += mainRect[wh] + selectorButtonGap;\n }\n else {\n var offset = selectorRect[wh] + selectorButtonGap;\n selectorPos[orientIdx] -= offset;\n mainRect[xy] -= offset;\n }\n mainRect[wh] += selectorRect[wh] + selectorButtonGap;\n\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\n selectorGroup.attr('position', selectorPos);\n }\n\n return mainRect;\n },\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;\n\n // Place items in contentGroup.\n layoutUtil.box(\n legendModel.get('orient'),\n contentGroup,\n legendModel.get('itemGap'),\n !orientIdx ? null : maxSize.width,\n orientIdx ? null : maxSize.height\n );\n\n layoutUtil.box(\n // Buttons in controller are layout always horizontally.\n 'horizontal',\n controllerGroup,\n legendModel.get('pageButtonItemGap', true)\n );\n\n var contentRect = contentGroup.getBoundingRect();\n var controllerRect = controllerGroup.getBoundingRect();\n var showController = this._showController = contentRect[wh] > maxSize[wh];\n\n var contentPos = [-contentRect.x, -contentRect.y];\n // 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 if (!isFirstRender) {\n contentPos[orientIdx] = contentGroup.position[orientIdx];\n }\n\n // Layout container group based on 0.\n var containerPos = [0, 0];\n var controllerPos = [-controllerRect.x, -controllerRect.y];\n var pageButtonGap = zrUtil.retrieve2(\n legendModel.get('pageButtonGap', true), legendModel.get('itemGap', true)\n );\n\n // Place containerGroup and controllerGroup and contentGroup.\n if (showController) {\n var pageButtonPosition = legendModel.get('pageButtonPosition', true);\n // controller is on the right / bottom.\n if (pageButtonPosition === 'end') {\n controllerPos[orientIdx] += maxSize[wh] - controllerRect[wh];\n }\n // controller is on the left / top.\n else {\n containerPos[orientIdx] += controllerRect[wh] + pageButtonGap;\n }\n }\n\n // Always align controller to content as 'middle'.\n controllerPos[1 - orientIdx] += contentRect[hw] / 2 - controllerRect[hw] / 2;\n\n contentGroup.attr('position', contentPos);\n containerGroup.attr('position', containerPos);\n controllerGroup.attr('position', controllerPos);\n\n // Calculate `mainRect` and set `clipPath`.\n // mainRect should not be calculated by `this.group.getBoundingRect()`\n // for sake of the overflow.\n var mainRect = {x: 0, y: 0};\n\n // Consider content may be overflow (should be clipped).\n mainRect[wh] = showController ? maxSize[wh] : contentRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], controllerRect[hw]);\n\n // `containerRect[yx] + containerPos[1 - orientIdx]` is 0.\n mainRect[yx] = Math.min(0, controllerRect[yx] + controllerPos[1 - orientIdx]);\n\n containerGroup.__rectSize = maxSize[wh];\n if (showController) {\n var clipShape = {x: 0, y: 0};\n clipShape[wh] = Math.max(maxSize[wh] - controllerRect[wh] - pageButtonGap, 0);\n clipShape[hw] = mainRect[hw];\n containerGroup.setClipPath(new graphic.Rect({shape: clipShape}));\n // Consider content may be larger than container, container rect\n // can not be obtained from `containerGroup.getBoundingRect()`.\n containerGroup.__rectSize = clipShape[wh];\n }\n else {\n // Do not remove or ignore controller. Keep them set as placeholders.\n controllerGroup.eachChild(function (child) {\n child.attr({invisible: true, silent: true});\n });\n }\n\n // Content translate animation.\n var pageInfo = this._getPageInfo(legendModel);\n pageInfo.pageIndex != null && graphic.updateProps(\n 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\n this._updatePageInfoView(legendModel, pageInfo);\n\n return mainRect;\n },\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\n _updatePageInfoView: function (legendModel, pageInfo) {\n var controllerGroup = this._controllerGroup;\n\n zrUtil.each(['pagePrev', 'pageNext'], function (name) {\n var canJump = pageInfo[name + 'DataIndex'] != null;\n var icon = controllerGroup.childOfName(name);\n if (icon) {\n icon.setStyle(\n 'fill',\n canJump\n ? legendModel.get('pageIconColor', true)\n : legendModel.get('pageIconInactiveColor', true)\n );\n icon.cursor = canJump ? 'pointer' : 'default';\n }\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\n pageText && pageFormatter && pageText.setStyle(\n 'text',\n zrUtil.isString(pageFormatter)\n ? pageFormatter.replace('{current}', current).replace('{total}', total)\n : pageFormatter({current: current, total: total})\n );\n },\n\n /**\n * @param {module:echarts/model/Model} legendModel\n * @return {Object} {\n * contentPosition: Array.<number>, 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 var children = contentGroup.children();\n var targetItem = children[targetItemIndex];\n var itemCount = children.length;\n var pCount = !itemCount ? 0 : 1;\n\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;\n\n // 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,\n winStartItemInfo = targetItemInfo,\n winEndItemInfo = targetItemInfo,\n currItemInfo = null;\n i <= itemCount;\n ++i\n ) {\n currItemInfo = getItemInfo(children[i]);\n if (\n // Half of the last item is out of the window.\n (!currItemInfo && winEndItemInfo.e > winStartItemInfo.s + containerRectSize)\n // 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 ) {\n if (winEndItemInfo.i > winStartItemInfo.i) {\n winStartItemInfo = winEndItemInfo;\n }\n else { // e.g., when page size is smaller than item size.\n winStartItemInfo = currItemInfo;\n }\n if (winStartItemInfo) {\n if (result.pageNextDataIndex == null) {\n result.pageNextDataIndex = winStartItemInfo.i;\n }\n ++result.pageCount;\n }\n }\n winEndItemInfo = currItemInfo;\n }\n\n for (var i = targetItemIndex - 1,\n winStartItemInfo = targetItemInfo,\n winEndItemInfo = targetItemInfo,\n currItemInfo = null;\n i >= -1;\n --i\n ) {\n currItemInfo = getItemInfo(children[i]);\n if (\n // 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))\n // e.g., when page size is smaller than item size.\n && winStartItemInfo.i < winEndItemInfo.i\n ) {\n winEndItemInfo = winStartItemInfo;\n if (result.pagePrevDataIndex == null) {\n result.pagePrevDataIndex = winStartItemInfo.i;\n }\n ++result.pageCount;\n ++result.pageIndex;\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\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\n contentGroup.eachChild(function (child, idx) {\n var legendDataIdx = child.__legendDataIndex;\n // 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 if (defaultIndex == null && legendDataIdx != null) {\n defaultIndex = idx;\n }\n if (legendDataIdx === targetDataIndex) {\n index = idx;\n }\n });\n\n return index != null ? index : defaultIndex;\n }\n\n});\n\nexport default ScrollableLegendView;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\n\n/**\n * @event legendScroll\n * @type {Object}\n * @property {string} type 'legendScroll'\n * @property {string} scrollDataIndex\n */\necharts.registerAction(\n 'legendScroll', 'legendscroll',\n function (payload, ecModel) {\n var scrollDataIndex = payload.scrollDataIndex;\n\n scrollDataIndex != null && ecModel.eachComponent(\n {mainType: 'legend', subType: 'scroll', query: payload},\n function (legendModel) {\n legendModel.setScrollDataIndex(scrollDataIndex);\n }\n );\n }\n);","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * Legend component entry file8\n */\n\nimport './legend';\nimport './legend/ScrollableLegendModel';\nimport './legend/ScrollableLegendView';\nimport './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\nimport DataZoomModel from './DataZoomModel';\n\nvar SliderZoomModel = DataZoomModel.extend({\n\n type: 'dataZoom.slider',\n\n layoutMode: 'box',\n\n /**\n * @protected\n */\n defaultOption: {\n show: true,\n\n // ph => placeholder. Using placehoder here because\n // deault value can only be drived in view stage.\n right: 'ph', // Default align to grid rect.\n top: 'ph', // Default align to grid rect.\n width: 'ph', // Default align to grid rect.\n height: 'ph', // Default align to grid rect.\n left: null, // Default align to grid rect.\n bottom: null, // Default align to grid rect.\n\n backgroundColor: 'rgba(47,69,84,0)', // 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', // border color of the box. For compatibility,\n // if dataBackgroundColor is set, borderColor\n // is ignored.\n\n fillerColor: 'rgba(167,183,204,0.4)', // 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 /* 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 /* eslint-enable */\n // Percent of the slider height\n handleSize: '100%',\n\n handleStyle: {\n color: '#a7b7cc'\n },\n\n labelPrecision: null,\n labelFormatter: null,\n showDetail: true,\n showDataShadow: 'auto', // Default auto decision.\n realtime: true,\n zoomLock: false, // Whether disable zoom.\n textStyle: {\n color: '#333'\n }\n }\n\n});\n\nexport default SliderZoomModel;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as eventTool from 'zrender/src/core/event';\nimport * as graphic from '../../util/graphic';\nimport * as throttle from '../../util/throttle';\nimport DataZoomView from './DataZoomView';\nimport * as numberUtil from '../../util/number';\nimport * as layout from '../../util/layout';\nimport sliderMove from '../helper/sliderMove';\n\nvar Rect = graphic.Rect;\nvar linearMap = numberUtil.linearMap;\nvar asc = numberUtil.asc;\nvar bind = zrUtil.bind;\nvar each = zrUtil.each;\n\n// Constants\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'];\n\nvar SliderZoomView = DataZoomView.extend({\n\n type: 'dataZoom.slider',\n\n init: function (ecModel, api) {\n\n /**\n * @private\n * @type {Object}\n */\n this._displayables = {};\n\n /**\n * @private\n * @type {string}\n */\n this._orient;\n\n /**\n * [0, 100]\n * @private\n */\n this._range;\n\n /**\n * [coord of the first handle, coord of the second handle]\n * @private\n */\n this._handleEnds;\n\n /**\n * [length, thick]\n * @private\n * @type {Array.<number>}\n */\n this._size;\n\n /**\n * @private\n * @type {number}\n */\n this._handleWidth;\n\n /**\n * @private\n * @type {number}\n */\n this._handleHeight;\n\n /**\n * @private\n */\n this._location;\n\n /**\n * @private\n */\n this._dragging;\n\n /**\n * @private\n */\n this._dataShadowInfo;\n\n this.api = api;\n },\n\n /**\n * @override\n */\n render: function (dataZoomModel, ecModel, api, payload) {\n SliderZoomView.superApply(this, 'render', arguments);\n\n throttle.createOrUpdate(\n this,\n '_dispatchZoomAction',\n this.dataZoomModel.get('throttle'),\n 'fixRate'\n );\n\n this._orient = dataZoomModel.get('orient');\n\n if (this.dataZoomModel.get('show') === false) {\n this.group.removeAll();\n return;\n }\n\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 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\n _buildView: function () {\n var thisGroup = this.group;\n\n thisGroup.removeAll();\n\n this._resetLocation();\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;\n\n // If some of x/y/width/height are not specified,\n // auto-adapt according to target grid.\n var coordRect = this._findCoordRect();\n var ecSize = {width: api.getWidth(), height: api.getHeight()};\n // Default align by coordinate system rect.\n var positionInfo = this._orient === HORIZONTAL\n ? {\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 };\n\n // Do not write back to option and replace value 'ph', because\n // the 'ph' value should be recalculated when resize.\n var layoutParams = layout.getLayoutParams(dataZoomModel.option);\n\n // Replace the placeholder value.\n zrUtil.each(['right', 'top', 'width', 'height'], function (name) {\n if (layoutParams[name] === 'ph') {\n layoutParams[name] = positionInfo[name];\n }\n });\n\n var layoutRect = layout.getLayoutRect(\n layoutParams,\n ecSize,\n dataZoomModel.padding\n );\n\n this._location = {x: layoutRect.x, y: layoutRect.y};\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;\n\n // Just use the first axis to determine mapping.\n var targetAxisModel = this.dataZoomModel.getFirstTargetAxisModel();\n var inverse = targetAxisModel && targetAxisModel.get('inverse');\n\n var barGroup = this._displayables.barGroup;\n var otherAxisInverse = (this._dataShadowInfo || {}).otherAxisInverse;\n\n // Transform barGroup.\n barGroup.attr(\n (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], rotation: Math.PI / 2}\n // Dont use Math.PI, considering shadow direction.\n : {scale: otherAxisInverse ? [-1, -1] : [-1, 1], rotation: Math.PI / 2}\n );\n\n // Position barGroup\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\n _renderBackground: function () {\n var dataZoomModel = this.dataZoomModel;\n var size = this._size;\n var barGroup = this._displayables.barGroup;\n\n barGroup.add(new Rect({\n silent: true,\n shape: {\n x: 0, y: 0, width: size[0], height: size[1]\n },\n style: {\n fill: dataZoomModel.get('backgroundColor')\n },\n z2: -40\n }));\n\n // Click panel, over shadow, below handles.\n barGroup.add(new Rect({\n shape: {\n x: 0, y: 0, width: size[0], height: size[1]\n },\n style: {\n fill: 'transparent'\n },\n z2: 0,\n onclick: zrUtil.bind(this._onClickPanelClick, this)\n }));\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\n var otherDim = seriesModel.getShadowDim\n ? seriesModel.getShadowDim() // @see candlestick\n : info.otherDim;\n\n if (otherDim == null) {\n return;\n }\n\n var otherDataExtent = data.getDataExtent(otherDim);\n // Nice extent.\n var otherOffset = (otherDataExtent[1] - otherDataExtent[0]) * 0.3;\n otherDataExtent = [\n otherDataExtent[0] - otherOffset,\n otherDataExtent[1] + otherOffset\n ];\n var otherShadowExtent = [0, size[1]];\n\n var thisShadowExtent = [0, size[0]];\n\n var areaPoints = [[size[0], 0], [0, 0]];\n var linePoints = [];\n var step = thisShadowExtent[1] / (data.count() - 1);\n var thisCoord = 0;\n\n // Optimize for large data shadow\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 }\n\n // FIXME\n // Should consider axis.min/axis.max when drawing dataShadow.\n\n // FIXME\n // 应该使用统一的空判断还是在list里进行空判断\n var isEmpty = value == null || isNaN(value) || value === '';\n // See #4235.\n var otherCoord = isEmpty\n ? 0 : linearMap(value, otherDataExtent, otherShadowExtent, true);\n\n // Attempt to draw data shadow precisely when there are empty value.\n if (isEmpty && !lastIsEmpty && index) {\n areaPoints.push([areaPoints[areaPoints.length - 1][0], 0]);\n linePoints.push([linePoints[linePoints.length - 1][0], 0]);\n }\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\n thisCoord += step;\n lastIsEmpty = isEmpty;\n });\n\n var dataZoomModel = this.dataZoomModel;\n // var dataBackgroundModel = dataZoomModel.getModel('dataBackground');\n this._displayables.barGroup.add(new graphic.Polygon({\n shape: {points: areaPoints},\n style: zrUtil.defaults(\n {fill: dataZoomModel.get('dataBackgroundColor')},\n dataZoomModel.getModel('dataBackground.areaStyle').getAreaStyle()\n ),\n silent: true,\n z2: -20\n }));\n this._displayables.barGroup.add(new graphic.Polyline({\n shape: {points: linePoints},\n style: dataZoomModel.getModel('dataBackground.lineStyle').getLineStyle(),\n silent: true,\n z2: -19\n }));\n },\n\n _prepareDataShadowInfo: function () {\n var dataZoomModel = this.dataZoomModel;\n var showDataShadow = dataZoomModel.get('showDataShadow');\n\n if (showDataShadow === false) {\n return;\n }\n\n // Find a representative series.\n var result;\n var ecModel = this.ecModel;\n\n dataZoomModel.eachTargetAxis(function (dimNames, axisIndex) {\n var seriesModels = dataZoomModel\n .getAxisProxy(dimNames.name, axisIndex)\n .getTargetSeriesModels();\n\n zrUtil.each(seriesModels, function (seriesModel) {\n if (result) {\n return;\n }\n\n if (showDataShadow !== true && zrUtil.indexOf(\n SHOW_DATA_SHADOW_SERIES_TYPE, seriesModel.get('type')\n ) < 0\n ) {\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\n result = {\n thisAxis: thisAxis,\n series: seriesModel,\n thisDim: dimNames.name,\n otherDim: otherDim,\n otherAxisInverse: otherAxisInverse\n };\n\n }, this);\n\n }, this);\n\n return result;\n },\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\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 }));\n\n // Frame border.\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')\n || dataZoomModel.get('borderColor'),\n lineWidth: DEFAULT_FRAME_BORDER_WIDTH,\n fill: 'rgba(0,0,0,0)'\n }\n }));\n\n each([0, 1], function (handleIndex) {\n var path = graphic.createIcon(\n dataZoomModel.get('handleIcon'),\n {\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, y: 0, width: 2, height: 2}\n );\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\n path.setStyle(dataZoomModel.getModel('handleStyle').getItemStyle());\n var handleColor = dataZoomModel.get('handleColor');\n // Compatitable with previous version\n if (handleColor != null) {\n path.style.fill = handleColor;\n }\n\n barGroup.add(handles[handleIndex] = path);\n\n var textStyleModel = dataZoomModel.textStyleModel;\n\n this.group.add(\n handleLabels[handleIndex] = new graphic.Text({\n silent: true,\n invisible: true,\n style: {\n x: 0, y: 0, text: '',\n textVerticalAlign: 'middle',\n textAlign: 'center',\n textFill: textStyleModel.getTextColor(),\n textFont: textStyleModel.getFont()\n },\n z2: 10\n }));\n\n }, this);\n },\n\n /**\n * @private\n */\n _resetInterval: function () {\n var range = this._range = this.dataZoomModel.getPercentRange();\n var viewExtent = this._getViewExtent();\n\n this._handleEnds = [\n linearMap(range[0], [0, 100], viewExtent, true),\n linearMap(range[1], [0, 100], viewExtent, true)\n ];\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 var viewExtend = this._getViewExtent();\n var minMaxSpan = dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();\n var percentExtent = [0, 100];\n\n sliderMove(\n delta,\n handleEnds,\n viewExtend,\n dataZoomModel.get('zoomLock') ? 'all' : handleIndex,\n minMaxSpan.minSpan != null\n ? linearMap(minMaxSpan.minSpan, percentExtent, viewExtend, true) : null,\n minMaxSpan.maxSpan != null\n ? linearMap(minMaxSpan.maxSpan, percentExtent, viewExtend, true) : null\n );\n\n var lastRange = this._range;\n var range = this._range = asc([\n linearMap(handleEnds[0], viewExtend, percentExtent, true),\n linearMap(handleEnds[1], viewExtend, percentExtent, true)\n ]);\n\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\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);\n\n // Filler\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 = ['', ''];\n\n // FIXME\n // date型支持formatterautoformatterec2 date.getAutoFormatter\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\n var dataInterval = nonRealtime\n // See #4434, data and axis are not processed and reset yet in non-realtime mode.\n ? axisProxy.calculateDataWindow({\n start: range[0], end: range[1]\n }).valueWindow\n : axisProxy.getDataValueWindow();\n\n labelTexts = [\n this._formatLabel(dataInterval[0], axis),\n this._formatLabel(dataInterval[1], axis)\n ];\n }\n }\n\n var orderedHandleEnds = asc(this._handleEnds.slice());\n\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(\n displaybles.handles[handleIndex].parent, this.group\n );\n var direction = graphic.transformDirection(\n handleIndex === 0 ? 'right' : 'left', barTransform\n );\n var offset = this._handleWidth / 2 + LABEL_GAP;\n var textPoint = graphic.applyTransform(\n [\n orderedHandleEnds[handleIndex] + (handleIndex === 0 ? -offset : offset),\n this._size[1] / 2\n ],\n barTransform\n );\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\n var labelPrecision = dataZoomModel.get('labelPrecision');\n if (labelPrecision == null || labelPrecision === 'auto') {\n labelPrecision = axis.getPixelPrecision();\n }\n\n var valueStr = (value == null || isNaN(value))\n ? ''\n // FIXME Glue code\n : (axis.type === 'category' || axis.type === 'time')\n ? axis.scale.getLabel(Math.round(value))\n // param of toFixed should less then 20.\n : value.toFixed(Math.min(labelPrecision, 20));\n\n return zrUtil.isFunction(labelFormatter)\n ? labelFormatter(value, valueStr)\n : zrUtil.isString(labelFormatter)\n ? labelFormatter.replace('{value}', valueStr)\n : 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\n var handleLabels = this._displayables.handleLabels;\n handleLabels[0].attr('invisible', !showOrHide);\n handleLabels[1].attr('invisible', !showOrHide);\n },\n\n _onDragMove: function (handleIndex, dx, dy, event) {\n this._dragging = true;\n\n // For mobile device, prevent screen slider on the button.\n eventTool.stop(event.event);\n\n // Transform dx, dy to bar coordination.\n var barTransform = this._displayables.barGroup.getLocalTransform();\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);\n\n // Avoid dispatch dataZoom repeatly but range not changed,\n // which cause bad visual effect when progressive enabled.\n changed && realtime && this._dispatchZoomAction();\n },\n\n _onDragEnd: function () {\n this._dragging = false;\n this._showDataInfo(false);\n\n // While in realtime mode and stream mode, dispatch action when\n // drag end will cause the whole view rerender, which is unnecessary.\n var realtime = this.dataZoomModel.get('realtime');\n !realtime && this._dispatchZoomAction();\n },\n\n _onClickPanelClick: function (e) {\n var size = this._size;\n var localPoint = this._displayables.barGroup.transformCoordToLocal(e.offsetX, e.offsetY);\n\n if (localPoint[0] < 0 || localPoint[0] > size[0]\n || localPoint[1] < 0 || localPoint[1] > size[1]\n ) {\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 this._updateView();\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\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 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});\n\nfunction getOtherDim(thisDim) {\n // FIXME\n // 这个逻辑和getOtherAxis里一致但是写在这里是否不好\n var map = {x: 'y', y: 'x', radius: 'angle', angle: 'radius'};\n return map[thisDim];\n}\n\nfunction getCursor(orient) {\n return orient === 'vertical' ? 'ns-resize' : 'ew-resize';\n}\n\nexport default SliderZoomView;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport './dataZoom/typeDefaulter';\n\nimport './dataZoom/DataZoomModel';\nimport './dataZoom/DataZoomView';\n\nimport './dataZoom/SliderZoomModel';\nimport './dataZoom/SliderZoomView';\n\nimport './dataZoom/dataZoomProcessor';\nimport './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\nimport DataZoomModel from './DataZoomModel';\n\nexport default DataZoomModel.extend({\n\n type: 'dataZoom.inside',\n\n /**\n * @protected\n */\n defaultOption: {\n disabled: false, // Whether disable this inside zoom.\n zoomLock: false, // Whether disable zoom but only pan.\n zoomOnMouseWheel: true, // Can be: true / false / 'shift' / 'ctrl' / 'alt'.\n moveOnMouseMove: true, // Can be: true / false / 'shift' / 'ctrl' / 'alt'.\n moveOnMouseWheel: false, // Can be: true / false / 'shift' / 'ctrl' / 'alt'.\n preventDefaultMouseMove: true\n }\n});","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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// 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.\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport RoamController from '../../component/helper/RoamController';\nimport * as throttleUtil from '../../util/throttle';\n\n\nvar ATTR = '\\0_ec_dataZoom_roams';\n\n\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.<string>} 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 */\nexport function register(api, dataZoomInfo) {\n var store = giveStore(api);\n var theDataZoomId = dataZoomInfo.dataZoomId;\n var theCoordId = dataZoomInfo.coordId;\n\n // Do clean when a dataZoom changes its target coordnate system.\n // Avoid memory leak, dispose all not-used-registered.\n zrUtil.each(store, function (record, coordId) {\n var dataZoomInfos = record.dataZoomInfos;\n if (dataZoomInfos[theDataZoomId]\n && zrUtil.indexOf(dataZoomInfo.allCoordIds, theCoordId) < 0\n ) {\n delete dataZoomInfos[theDataZoomId];\n record.count--;\n }\n });\n\n cleanStore(store);\n\n var record = store[theCoordId];\n // Create if needed.\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 }\n\n // Update reference of dataZoom.\n !(record.dataZoomInfos[theDataZoomId]) && record.count++;\n record.dataZoomInfos[theDataZoomId] = dataZoomInfo;\n\n var controllerParams = mergeControllerParams(record.dataZoomInfos);\n record.controller.enable(controllerParams.controlType, controllerParams.opt);\n\n // Consider resize, area should be always updated.\n record.controller.setPointerChecker(dataZoomInfo.containsPoint);\n\n // Update throttle.\n throttleUtil.createOrUpdate(\n record,\n 'dispatchAction',\n dataZoomInfo.dataZoomModel.get('throttle', true),\n 'fixRate'\n );\n}\n\n/**\n * @public\n * @param {module:echarts/ExtensionAPI} api\n * @param {string} dataZoomId\n */\nexport function unregister(api, dataZoomId) {\n var store = giveStore(api);\n\n zrUtil.each(store, function (record) {\n record.controller.dispose();\n var dataZoomInfos = record.dataZoomInfos;\n if (dataZoomInfos[dataZoomId]) {\n delete dataZoomInfos[dataZoomId];\n record.count--;\n }\n });\n\n cleanStore(store);\n}\n\n/**\n * @public\n */\nexport function generateCoordId(coordModel) {\n return coordModel.type + '\\0_' + coordModel.id;\n}\n\n/**\n * Key: coordId, value: {dataZoomInfos: [], count, controller}\n * @type {Array.<Object>}\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\n zrUtil.each(['pan', 'zoom', 'scrollMove'], function (eventName) {\n controller.on(eventName, function (event) {\n var batch = [];\n\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\n !info.dataZoomModel.get('disabled', true) && range && batch.push({\n dataZoomId: info.dataZoomId,\n start: range[0],\n end: range[1]\n });\n });\n\n batch.length && newRecord.dispatchAction(batch);\n });\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/**\n * This action will be throttled.\n */\nfunction dispatchAction(api, batch) {\n api.dispatchAction({\n type: 'dataZoom',\n batch: batch\n });\n}\n\n/**\n * Merge roamController settings when multiple dataZooms share one roamController.\n */\nfunction mergeControllerParams(dataZoomInfos) {\n var controlType;\n // 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 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\n zrUtil.each(dataZoomInfos, function (dataZoomInfo) {\n var dataZoomModel = dataZoomInfo.dataZoomModel;\n var oneType = dataZoomModel.get('disabled', true)\n ? false\n : dataZoomModel.get('zoomLock', true)\n ? 'move'\n : true;\n if (typePriority[prefix + oneType] > typePriority[prefix + controlType]) {\n controlType = oneType;\n }\n\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 preventDefaultMouseMove &= dataZoomModel.get('preventDefaultMouseMove', true);\n });\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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport DataZoomView from './DataZoomView';\nimport sliderMove from '../helper/sliderMove';\nimport * as roams from './roams';\n\nvar bind = zrUtil.bind;\n\nvar InsideZoomView = DataZoomView.extend({\n\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.<number>}\n */\n this._range;\n },\n\n /**\n * @override\n */\n render: function (dataZoomModel, ecModel, api, payload) {\n InsideZoomView.superApply(this, 'render', arguments);\n\n // 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 this._range = dataZoomModel.getPercentRange();\n\n // Reset controllers.\n zrUtil.each(this.getTargetCoordInfo(), function (coordInfoList, coordSysName) {\n\n var allCoordIds = zrUtil.map(coordInfoList, function (coordInfo) {\n return roams.generateCoordId(coordInfo.model);\n });\n\n zrUtil.each(coordInfoList, function (coordInfo) {\n var coordModel = coordInfo.model;\n\n var getRange = {};\n zrUtil.each(['pan', 'zoom', 'scrollMove'], function (eventName) {\n getRange[eventName] = bind(roamHandlers[eventName], this, coordInfo, coordSysName);\n }, this);\n\n roams.register(\n api,\n {\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 );\n }, this);\n\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\n});\n\nvar roamHandlers = {\n\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();\n\n // Calculate transform by the first axis.\n var axisModel = coordInfo.axisModels[0];\n if (!axisModel) {\n return;\n }\n\n var directionInfo = getDirectionInfo[coordSysName](\n null, [e.originX, e.originY], axisModel, controller, coordInfo\n );\n var percentPoint = (\n directionInfo.signal > 0\n ? (directionInfo.pixelStart + directionInfo.pixelLength - directionInfo.pixel)\n : (directionInfo.pixel - directionInfo.pixelStart)\n ) / directionInfo.pixelLength * (range[1] - range[0]) + range[0];\n\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;\n\n // Restrict range.\n var minMaxSpan = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();\n\n sliderMove(0, range, [0, 100], 0, minMaxSpan.minSpan, minMaxSpan.maxSpan);\n\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](\n [e.oldX, e.oldY], [e.newX, e.newY], axisModel, controller, coordInfo\n );\n\n return directionInfo.signal\n * (range[1] - range[0])\n * 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](\n [0, 0], [e.scrollDelta, e.scrollDelta], axisModel, controller, coordInfo\n );\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();\n\n // Calculate transform by the first axis.\n var axisModel = coordInfo.axisModels[0];\n if (!axisModel) {\n return;\n }\n\n var percentDelta = getPercentDelta(\n range, axisModel, coordInfo, coordSysName, controller, e\n );\n\n sliderMove(percentDelta, range, [0, 100], 'all');\n\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\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 }\n else { // 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\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\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];\n // ret.pixelLength = Math.abs(radiusExtent[1] - radiusExtent[0]);\n // ret.pixelStart = Math.min(radiusExtent[0], radiusExtent[1]);\n ret.pixelLength = radiusExtent[1] - radiusExtent[0];\n ret.pixelStart = radiusExtent[0];\n ret.signal = axis.inverse ? 1 : -1;\n }\n else { // 'angleAxis'\n ret.pixel = newPoint[1] - oldPoint[1];\n // ret.pixelLength = Math.abs(angleExtent[1] - angleExtent[0]);\n // ret.pixelStart = Math.min(angleExtent[0], angleExtent[1]);\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\n singleAxis: function (oldPoint, newPoint, axisModel, controller, coordInfo) {\n var axis = axisModel.axis;\n var rect = coordInfo.model.coordinateSystem.getRect();\n var ret = {};\n\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 }\n else { // '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};\n\nexport default InsideZoomView;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport './dataZoom/typeDefaulter';\n\nimport './dataZoom/DataZoomModel';\nimport './dataZoom/DataZoomView';\n\nimport './dataZoom/InsideZoomModel';\nimport './dataZoom/InsideZoomView';\n\nimport './dataZoom/dataZoomProcessor';\nimport './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\nimport './dataZoomSlider';\nimport './dataZoomInside';\n\n// Do not include './dataZoomSelect',\n// since it only work for toolbox dataZoom.\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\n\nvar each = zrUtil.each;\n\nexport default function (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 }\n\n // rename splitList to pieces\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 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 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","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport Component from '../../model/Component';\n\nComponent.registerSubTypeDefaulter('visualMap', function (option) {\n // Compatible with ec2, when splitNumber === 0, continuous visualMap will be used.\n return (\n !option.categories\n && (\n !(\n option.pieces\n ? option.pieces.length > 0\n : option.splitNumber > 0\n )\n || option.calculable\n )\n )\n ? '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\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as visualSolution from '../../visual/visualSolution';\nimport VisualMapping from '../../visual/VisualMapping';\n\nvar VISUAL_PRIORITY = echarts.PRIORITY.VISUAL.COMPONENT;\n\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 if (!visualMapModel.isTargetSeries(seriesModel)\n || (pipelineContext && pipelineContext.large)\n ) {\n return;\n }\n\n resetDefines.push(visualSolution.incrementalApplyVisual(\n visualMapModel.stateList,\n visualMapModel.targetVisuals,\n zrUtil.bind(visualMapModel.getValueState, visualMapModel),\n visualMapModel.getDataDimension(seriesModel.getData())\n ));\n });\n\n return resetDefines;\n }\n});\n\n// Only support color.\necharts.registerVisual(VISUAL_PRIORITY, {\n createOnAllSeries: true,\n reset: function (seriesModel, ecModel) {\n var data = seriesModel.getData();\n var visualMetaList = [];\n\n ecModel.eachComponent('visualMap', function (visualMapModel) {\n if (visualMapModel.isTargetSeries(seriesModel)) {\n var visualMeta = visualMapModel.getVisualMeta(\n zrUtil.bind(getColorVisual, null, seriesModel, visualMapModel)\n ) || {stops: [], outerColors: []};\n\n var concreteDim = visualMapModel.getDataDimension(data);\n var dimInfo = data.getDimensionInfo(concreteDim);\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 });\n\n // console.log(JSON.stringify(visualMetaList.map(a => a.stops)));\n seriesModel.getData().setVisual('visualMeta', visualMetaList);\n }\n});\n\n// FIXME\n// performance and export for heatmap?\n// value can be Infinity or -Infinity\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 for (var i = 0, len = visualTypes.length; i < len; i++) {\n var type = visualTypes[i];\n var mapping = mappings[\n type === 'opacity' ? '__alphaForOpacity' : type\n ];\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 * @file Visual mapping.\n */\n\nimport * as zrUtil from 'zrender/src/core/util';\n\nvar visualDefault = {\n\n /**\n * @public\n */\n get: function (visualType, key, isCategory) {\n var value = zrUtil.clone(\n (defaultOption[visualType] || {})[key]\n );\n\n return isCategory\n ? (zrUtil.isArray(value) ? value[value.length - 1] : value)\n : value;\n }\n\n};\n\nvar defaultOption = {\n\n color: {\n active: ['#006edd', '#e0ffff'],\n inactive: ['rgba(0,0,0,0)']\n },\n\n colorHue: {\n active: [0, 360],\n inactive: [0, 0]\n },\n\n colorSaturation: {\n active: [0.3, 1],\n inactive: [0, 0]\n },\n\n colorLightness: {\n active: [0.9, 0.5],\n inactive: [0, 0]\n },\n\n colorAlpha: {\n active: [0.3, 1],\n inactive: [0, 0]\n },\n\n opacity: {\n active: [0.3, 1],\n inactive: [0, 0]\n },\n\n symbol: {\n active: ['circle', 'roundRect', 'diamond'],\n inactive: ['none']\n },\n\n symbolSize: {\n active: [10, 50],\n inactive: [0, 0]\n }\n};\n\nexport default visualDefault;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport env from 'zrender/src/core/env';\nimport visualDefault from '../../visual/visualDefault';\nimport VisualMapping from '../../visual/VisualMapping';\nimport * as visualSolution from '../../visual/visualSolution';\nimport * as modelUtil from '../../util/model';\nimport * as numberUtil from '../../util/number';\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;\n\nvar VisualMapModel = echarts.extendComponentModel({\n\n type: 'visualMap',\n\n dependencies: ['series'],\n\n /**\n * @readOnly\n * @type {Array.<string>}\n */\n stateList: ['inRange', 'outOfRange'],\n\n /**\n * @readOnly\n * @type {Array.<string>}\n */\n replacableOptionKeys: [\n 'inRange', 'outOfRange', 'target', 'controller', 'color'\n ],\n\n /**\n * [lowerBound, upperBound]\n *\n * @readOnly\n * @type {Array.<number>}\n */\n dataBound: [-Infinity, Infinity],\n\n /**\n * @readOnly\n * @type {string|Object}\n */\n layoutMode: {type: 'box', ignoreSize: true},\n\n /**\n * @protected\n */\n defaultOption: {\n show: true,\n\n zlevel: 0,\n z: 4,\n\n seriesIndex: 'all', // 'all' or null/undefined: all series.\n // A number or an array of number: the specified series.\n\n // set min: 0, max: 200, only for campatible with ec2.\n // In fact min max should not have default value.\n min: 0, // min value, must specified if pieces is not specified.\n max: 200, // max value, must specified if pieces is not specified.\n\n dimension: null,\n inRange: null, // 'color', 'colorHue', 'colorSaturation', 'colorLightness', 'colorAlpha',\n // 'symbol', 'symbolSize'\n outOfRange: null, // 'color', 'colorHue', 'colorSaturation',\n // 'colorLightness', 'colorAlpha',\n // 'symbol', 'symbolSize'\n\n left: 0, // 'center' ¦ 'left' ¦ 'right' ¦ {number} (px)\n right: null, // The same as left.\n top: null, // 'top' ¦ 'bottom' ¦ 'center' ¦ {number} (px)\n bottom: 0, // The same as top.\n\n itemWidth: null,\n itemHeight: null,\n inverse: false,\n orient: 'vertical', // 'horizontal' ¦ 'vertical'\n\n backgroundColor: 'rgba(0,0,0,0)',\n borderColor: '#ccc', // 值域边框颜色\n contentColor: '#5793f3',\n inactiveColor: '#aaa',\n borderWidth: 0, // 值域边框线宽单位px默认为0无边框\n padding: 5, // 值域内边距单位px默认各方向内边距为5\n // 接受数组分别设定上右下左边距同css\n textGap: 10, //\n precision: 0, // 小数精度默认为0无小数点\n color: null, //颜色deprecated兼容ec2顺序同pieces不同于inRange/outOfRange\n\n formatter: null,\n text: null, // 文本,如['高', '低']兼容ec2text[0]对应高值text[1]对应低值\n textStyle: {\n color: '#333' // 值域文字颜色\n }\n },\n\n /**\n * @protected\n */\n init: function (option, parentModel, ecModel) {\n\n /**\n * @private\n * @type {Array.<number>}\n */\n this._dataExtent;\n\n /**\n * @readOnly\n */\n this.targetVisuals = {};\n\n /**\n * @readOnly\n */\n this.controllerVisuals = {};\n\n /**\n * @readOnly\n */\n this.textStyleModel;\n\n /**\n * [width, height]\n * @readOnly\n * @type {Array.<number>}\n */\n this.itemSize;\n\n this.mergeDefaultAndTheme(option, ecModel);\n },\n\n /**\n * @protected\n */\n optionUpdated: function (newOption, isInit) {\n var thisOption = this.option;\n\n // FIXME\n // necessary?\n // Disable realtime view update if canvas is not supported.\n if (!env.canvasSupported) {\n thisOption.realtime = false;\n }\n\n !isInit && visualSolution.replaceVisualOption(\n thisOption, newOption, this.replacableOptionKeys\n );\n\n this.textStyleModel = this.getModel('textStyle');\n\n this.resetItemSize();\n\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\n this.controllerVisuals = visualSolution.createVisualMappings(\n this.option.controller, stateList, supplementVisualOption\n );\n this.targetVisuals = visualSolution.createVisualMappings(\n this.option.target, stateList, supplementVisualOption\n );\n },\n\n /**\n * @protected\n * @return {Array.<number>} 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 }\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.<number>} value Real value, or this.dataBound[0 or 1].\n * @param {boolean} [isCategory=false] Only available when value is number.\n * @param {Array.<string>} 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\n ? value\n : (isMinMax\n ? [toFixed(value[0]), toFixed(value[1])]\n : toFixed(value)\n );\n\n if (zrUtil.isString(formatter)) {\n return formatter\n .replace('{value}', isMinMax ? textValue[0] : textValue)\n .replace('{value2}', isMinMax ? textValue[1] : textValue);\n }\n else if (zrUtil.isFunction(formatter)) {\n return isMinMax\n ? formatter(value[0], value[1])\n : formatter(value);\n }\n\n if (isMinMax) {\n if (value[0] === dataBound[0]) {\n return edgeSymbols[0] + ' ' + textValue[1];\n }\n else if (value[1] === dataBound[1]) {\n return edgeSymbols[1] + ' ' + textValue[0];\n }\n else {\n return textValue[0] + ' - ' + textValue[1];\n }\n }\n else { // Format single value (includes category case).\n return textValue;\n }\n\n function toFixed(val) {\n return val === dataBound[0]\n ? 'min'\n : val === dataBound[1]\n ? 'max'\n : (+val).toFixed(Math.min(precision, 20));\n }\n },\n\n /**\n * @protected\n */\n resetExtent: function () {\n var thisOption = this.option;\n\n // 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\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 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 for (var i = dimNames.length - 1; i >= 0; i--) {\n var dimName = dimNames[i];\n var dimInfo = list.getDimensionInfo(dimName);\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 = {inRange: thisOption.inRange, outOfRange: thisOption.outOfRange};\n\n var target = thisOption.target || (thisOption.target = {});\n var controller = thisOption.controller || (thisOption.controller = {});\n\n zrUtil.merge(target, base); // Do not override\n zrUtil.merge(controller, base); // Do not override\n\n var isCategory = this.isCategory();\n\n completeSingle.call(this, target);\n completeSingle.call(this, controller);\n completeInactive.call(this, target, 'inRange', 'outOfRange');\n // completeInactive.call(this, target, 'outOfRange', 'inRange');\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)\n // If there has been inRange: {symbol: ...}, adding color is a mistake.\n // So adding color only when no inRange defined.\n && !base.inRange\n ) {\n base.inRange = {color: thisOption.color.slice().reverse()};\n }\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 base.inRange = base.inRange || {color: ecModel.get('gradientColor')};\n\n // If using shortcut like: {inRange: 'symbol'}, complete default value.\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 if (defa) {\n base[state] = {};\n base[state][visualType] = defa;\n }\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;\n\n // Compatibable with ec2:\n // Only inactive color to rgba(0,0,0,0) can not\n // make label transparent, so use opacity also.\n if (visualType === 'color'\n && !optAbsent.hasOwnProperty('opacity')\n && !optAbsent.hasOwnProperty('colorAlpha')\n ) {\n optAbsent.opacity = [0, 0];\n }\n }\n });\n }\n }\n\n function completeController(controller) {\n var symbolExists = (controller.inRange || {}).symbol\n || (controller.outOfRange || {}).symbol;\n var symbolSizeExists = (controller.inRange || {}).symbolSize\n || (controller.outOfRange || {}).symbolSize;\n var inactiveColor = this.get('inactiveColor');\n\n each(this.stateList, function (state) {\n\n var itemSize = this.itemSize;\n var visuals = controller[state];\n\n // Set inactive color for controller if no other color\n // attr (like colorAlpha) specified.\n if (!visuals) {\n visuals = controller[state] = {\n color: isCategory ? inactiveColor : [inactiveColor]\n };\n }\n\n // Consistent symbol and symbolSize if not specified.\n if (visuals.symbol == null) {\n visuals.symbol = symbolExists\n && zrUtil.clone(symbolExists)\n || (isCategory ? 'roundRect' : ['roundRect']);\n }\n if (visuals.symbolSize == null) {\n visuals.symbolSize = symbolSizeExists\n && zrUtil.clone(symbolSizeExists)\n || (isCategory ? itemSize[0] : [itemSize[0], itemSize[0]]);\n }\n\n // Filter square and none.\n visuals.symbol = mapVisual(visuals.symbol, function (symbol) {\n return (symbol === 'none' || symbol === 'square') ? 'roundRect' : symbol;\n });\n\n // Normalize symbolSize\n var symbolSize = visuals.symbolSize;\n\n if (symbolSize != null) {\n var max = -Infinity;\n // symbolSize can be object when categories defined.\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\n }, this);\n }\n },\n\n /**\n * @protected\n */\n resetItemSize: function () {\n this.itemSize = [\n parseFloat(this.get('itemWidth')),\n parseFloat(this.get('itemHeight'))\n ];\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\n});\n\nexport default VisualMapModel;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport VisualMapModel from './VisualMapModel';\nimport * as numberUtil from '../../util/number';\n\n// Constant\nvar DEFAULT_BAR_BOUND = [20, 140];\n\nvar ContinuousModel = VisualMapModel.extend({\n\n type: 'visualMap.continuous',\n\n /**\n * @protected\n */\n defaultOption: {\n align: 'auto', // 'auto', 'left', 'right', 'top', 'bottom'\n calculable: false, // This prop effect default component type determine,\n // See echarts/component/visualMap/typeDefaulter.\n range: null, // 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, // Whether realtime update.\n itemHeight: null, // The length of the range control edge.\n itemWidth: null, // The length of the other side.\n hoverLink: true, // Enable hover highlight.\n hoverLinkDataSize: null, // 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 * @override\n */\n optionUpdated: function (newOption, isInit) {\n ContinuousModel.superApply(this, 'optionUpdated', arguments);\n\n this.resetExtent();\n\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\n var itemSize = this.itemSize;\n\n this._orient === 'horizontal' && itemSize.reverse();\n\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 }\n else if (zrUtil.isArray(range)) {\n if (range[0] > range[1]) {\n range.reverse();\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\n zrUtil.each(this.stateList, function (state) {\n var symbolSize = this.option.controller[state].symbolSize;\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 this._resetRange();\n },\n\n /**\n * @public\n */\n getSelected: function () {\n var dataExtent = this.getExtent();\n\n var dataInterval = numberUtil.asc(\n (this.get('range') || []).slice()\n );\n\n // Clamp\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\n return dataInterval;\n },\n\n /**\n * @override\n */\n getValueState: function (value) {\n var range = this.option.range;\n var dataExtent = this.getExtent();\n\n // When range[0] === dataExtent[0], any value larger than dataExtent[0] maps to 'inRange'.\n // range[1] is processed likewise.\n return (\n (range[0] <= dataExtent[0] || range[0] <= value)\n && (range[1] >= dataExtent[1] || value <= range[1])\n ) ? 'inRange' : 'outOfRange';\n },\n\n /**\n * @params {Array.<number>} range target value: range[0] <= value && value <= range[1]\n * @return {Array.<Object>} [{seriesId, dataIndices: <Array.<number>>}, ...]\n */\n findTargetDataIndices: function (range) {\n var result = [];\n\n this.eachTargetSeries(function (seriesModel) {\n var dataIndices = [];\n var data = seriesModel.getData();\n\n data.each(this.getDataDimension(data), function (value, dataIndex) {\n range[0] <= value && value <= range[1] && dataIndices.push(dataIndex);\n }, this);\n\n result.push({seriesId: seriesModel.id, dataIndex: dataIndices});\n }, this);\n\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 }\n\n // Format to: outOfRange -- inRange -- outOfRange.\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 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 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 setStop(oVals[oIdx], 'outOfRange');\n }\n }\n\n var stopsLen = stops.length;\n\n return {\n stops: stops,\n outerColors: [\n stopsLen ? stops[0].color : 'transparent',\n stopsLen ? stops[stopsLen - 1].color : 'transparent'\n ]\n };\n }\n\n});\n\nfunction getColorStopValues(visualMapModel, valueState, dataExtent) {\n if (dataExtent[0] === dataExtent[1]) {\n return dataExtent.slice();\n }\n\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 var count = 200;\n var step = (dataExtent[1] - dataExtent[0]) / count;\n\n var value = dataExtent[0];\n var stopValues = [];\n for (var i = 0; i <= count && value < dataExtent[1]; i++) {\n stopValues.push(value);\n value += step;\n }\n stopValues.push(dataExtent[1]);\n\n return stopValues;\n}\n\nexport default ContinuousModel;\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\nimport * as zrUtil from 'zrender/src/core/util';\nimport * as graphic from '../../util/graphic';\nimport * as formatUtil from '../../util/format';\nimport * as layout from '../../util/layout';\nimport VisualMapping from '../../visual/VisualMapping';\n\nexport default echarts.extendComponentView({\n\n type: 'visualMap',\n\n /**\n * @readOnly\n * @type {Object}\n */\n autoPositionValues: {left: 1, right: 1, top: 1, bottom: 1},\n\n init: function (ecModel, api) {\n /**\n * @readOnly\n * @type {module:echarts/model/Global}\n */\n this.ecModel = ecModel;\n\n /**\n * @readOnly\n * @type {module:echarts/ExtensionAPI}\n */\n this.api = api;\n\n /**\n * @readOnly\n * @type {module:echarts/component/visualMap/visualMapModel}\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\n group.add(new graphic.Rect({\n z2: -1, // 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\n var forceState = opts.forceState;\n var visualMapModel = this.visualMapModel;\n var visualObj = {};\n\n // Default values.\n if (visualCluster === 'symbol') {\n visualObj.symbol = visualMapModel.get('itemSymbol');\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[\n forceState || visualMapModel.getValueState(targetValue)\n ];\n var visualTypes = VisualMapping.prepareVisualTypes(mappings);\n\n zrUtil.each(visualTypes, function (type) {\n var visualMapping = mappings[type];\n if (opts.convertOpacityToAlpha && type === 'opacity') {\n type = 'colorAlpha';\n visualMapping = mappings.__alphaForOpacity;\n }\n if (VisualMapping.dependsOn(type, visualCluster)) {\n visualMapping && visualMapping.applyVisual(\n targetValue, getter, setter\n );\n }\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\n layout.positionElement(\n group,\n model.getBoxLayoutParams(),\n {width: api.getWidth(), height: api.getHeight()}\n );\n },\n\n /**\n * @protected\n * @abstract\n */\n doRender: zrUtil.noop\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\nimport * as zrUtil from 'zrender/src/core/util';\nimport {getLayoutRect} from '../../util/layout';\n\n/**\n * @param {module:echarts/component/visualMap/VisualMapModel} visualMapModel\\\n * @param {module:echarts/ExtensionAPI} api\n * @param {Array.<number>} itemSize always [short, long]\n * @return {string} 'left' or 'right' or 'top' or 'bottom'\n */\nexport function 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 }\n\n // Auto decision align.\n var ecSize = {width: api.getWidth(), height: api.getHeight()};\n var realIndex = modelOption.orient === 'horizontal' ? 1 : 0;\n\n var paramsSet = [\n ['left', 'right', 'width'],\n ['top', 'bottom', 'height']\n ];\n var reals = paramsSet[realIndex];\n var fakeValue = [0, null, 10];\n\n var layoutInput = {};\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\n return reals[\n (rect.margin[rParam[2]] || 0) + rect[rParam[0]] + rect[rParam[1]] * 0.5\n < ecSize[rParam[1]] * 0.5 ? 0 : 1\n ];\n}\n\n/**\n * Prepare dataIndex for outside usage, where dataIndex means rawIndex, and\n * dataIndexInside means filtered index.\n */\nexport function 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 batchItem.highlightKey = 'visualMap' + (visualMapModel ? visualMapModel.componentIndex : '');\n });\n return batch;\n}\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport LinearGradient from 'zrender/src/graphic/LinearGradient';\nimport * as eventTool from 'zrender/src/core/event';\nimport VisualMapView from './VisualMapView';\nimport * as graphic from '../../util/graphic';\nimport * as numberUtil from '../../util/number';\nimport sliderMove from '../helper/sliderMove';\nimport * as helper from './helper';\nimport * as modelUtil from '../../util/model';\n\nvar linearMap = numberUtil.linearMap;\nvar each = zrUtil.each;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\n\n// Arbitrary value\nvar HOVER_LINK_SIZE = 12;\nvar HOVER_LINK_OUT = 6;\n\n// 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\n type: 'visualMap.continuous',\n\n /**\n * @override\n */\n init: function () {\n\n ContinuousView.superApply(this, 'init', arguments);\n\n /**\n * @private\n */\n this._shapes = {};\n\n /**\n * @private\n */\n this._dataInterval = [];\n\n /**\n * @private\n */\n this._handleEnds = [];\n\n /**\n * @private\n */\n this._orient;\n\n /**\n * @private\n */\n this._useHandle;\n\n /**\n * @private\n */\n this._hoverLinkDataIndices = [];\n\n /**\n * @private\n */\n this._dragging;\n\n /**\n * @private\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\n var visualMapModel = this.visualMapModel;\n var thisGroup = this.group;\n\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 this._renderEndsText(thisGroup, dataRangeText, 0);\n this._renderEndsText(thisGroup, dataRangeText, 1);\n\n // Do this for background size calculation.\n this._updateView(true);\n\n // After updating view, inner shapes is built completely,\n // and then background can be rendered.\n this.renderBackground(thisGroup);\n\n // Real update view\n this._updateView();\n\n this._enableHoverLinkToSeries();\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 }\n\n // Compatible with ec2, text[0] map to high value, text[1] map low value.\n var text = dataRangeText[1 - endsIndex];\n text = text != null ? text + '' : '';\n\n var visualMapModel = this.visualMapModel;\n var textGap = visualMapModel.get('textGap');\n var itemSize = visualMapModel.itemSize;\n\n var barGroup = this._shapes.barGroup;\n var position = this._applyTransform(\n [\n itemSize[0] / 2,\n endsIndex === 0 ? -textGap : itemSize[1] + textGap\n ],\n barGroup\n );\n var align = this._applyTransform(\n endsIndex === 0 ? 'bottom' : 'top',\n barGroup\n );\n var orient = this._orient;\n var textStyleModel = this.visualMapModel.textStyleModel;\n\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 var barGroup = shapes.barGroup = this._createBarGroup(itemAlign);\n\n // Bar\n barGroup.add(shapes.outOfRange = createPolygon());\n barGroup.add(shapes.inRange = createPolygon(\n null,\n useHandle ? getCursor(this._orient) : null,\n zrUtil.bind(this._dragHandle, this, 'all', false),\n zrUtil.bind(this._dragHandle, this, 'all', true)\n ));\n\n var textRect = visualMapModel.textStyleModel.getTextRect('国');\n var textSize = mathMax(textRect.width, textRect.height);\n\n // Handle\n if (useHandle) {\n shapes.handleThumbs = [];\n shapes.handleLabels = [];\n shapes.handleLabelPoints = [];\n\n this._createHandle(barGroup, 0, itemSize, textSize, orient, itemAlign);\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(\n createHandlePoints(handleIndex, textSize),\n getCursor(this._orient),\n onDrift,\n onDragEnd\n );\n handleThumb.position[0] = itemSize[0];\n barGroup.add(handleThumb);\n\n // 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 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, y: 0, text: '',\n textFont: textStyleModel.getFont(),\n textFill: textStyleModel.getTextColor()\n }\n });\n this.group.add(handleLabel);\n\n var handleLabelPoint = [\n orient === 'horizontal'\n ? textSize / 2\n : textSize * 1.5,\n orient === 'horizontal'\n ? (handleIndex === 0 ? -(textSize * 1.5) : (textSize * 1.5))\n : (handleIndex === 0 ? -textSize / 2 : textSize / 2)\n ];\n\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({invisible: true, silent: true});\n barGroup.add(indicator);\n\n var textStyleModel = this.visualMapModel.textStyleModel;\n var indicatorLabel = new graphic.Text({\n silent: true,\n invisible: true,\n style: {\n x: 0, y: 0, text: '',\n textFont: textStyleModel.getFont(),\n textFill: textStyleModel.getTextColor()\n }\n });\n this.group.add(indicatorLabel);\n\n var indicatorLabelPoint = [\n orient === 'horizontal' ? textSize / 2 : HOVER_LINK_OUT + 3,\n 0\n ];\n\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 this._updateInterval(handleIndex, vertex[1]);\n\n // Considering realtime, update view should be executed\n // before dispatch action.\n this._updateView();\n }\n\n // dragEnd do not dispatch action when realtime.\n if (isEnd === !this.visualMapModel.get('realtime')) { // 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 }\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\n var dataInterval = this._dataInterval = visualMapModel.getSelected();\n var dataExtent = visualMapModel.getExtent();\n var sizeExtent = [0, visualMapModel.itemSize[1]];\n\n this._handleEnds = [\n linearMap(dataInterval[0], dataExtent, sizeExtent, true),\n linearMap(dataInterval[1], dataExtent, sizeExtent, true)\n ];\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\n sliderMove(\n delta,\n handleEnds,\n sizeExtent,\n handleIndex,\n // cross is forbiden\n 0\n );\n\n var dataExtent = visualMapModel.getExtent();\n // Update data interval.\n this._dataInterval = [\n linearMap(handleEnds[0], sizeExtent, dataExtent, true),\n linearMap(handleEnds[1], sizeExtent, dataExtent, true)\n ];\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\n var outOfRangeHandleEnds = [0, visualMapModel.itemSize[1]];\n var inRangeHandleEnds = forSketch ? outOfRangeHandleEnds : this._handleEnds;\n\n var visualInRange = this._createBarVisual(\n this._dataInterval, dataExtent, inRangeHandleEnds, 'inRange'\n );\n var visualOutOfRange = this._createBarVisual(\n dataExtent, dataExtent, outOfRangeHandleEnds, 'outOfRange'\n );\n\n shapes.inRange\n .setStyle({\n fill: visualInRange.barColor,\n opacity: visualInRange.opacity\n })\n .setShape('points', visualInRange.barPoints);\n shapes.outOfRange\n .setStyle({\n fill: visualOutOfRange.barColor,\n opacity: visualOutOfRange.opacity\n })\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 var colorStops = this._makeColorGradient(dataInterval, opts);\n\n var symbolSizes = [\n this.getControllerVisual(dataInterval[0], 'symbolSize', opts),\n 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: [\n colorStops[0].color,\n colorStops[colorStops.length - 1].color\n ]\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 var colorStops = [];\n var step = (dataInterval[1] - dataInterval[0]) / sampleNumber;\n\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 if (currValue > dataInterval[1]) {\n break;\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\n return colorStops;\n },\n\n /**\n * @private\n */\n _createBarPoints: function (handleEnds, symbolSizes) {\n var itemSize = this.visualMapModel.itemSize;\n\n return [\n [itemSize[0] - symbolSizes[0], handleEnds[0]],\n [itemSize[0], handleEnds[0]],\n [itemSize[0], handleEnds[1]],\n [itemSize[0] - symbolSizes[1], handleEnds[1]]\n ];\n },\n\n /**\n * @private\n */\n _createBarGroup: function (itemAlign) {\n var orient = this._orient;\n var inverse = this.visualMapModel.get('inverse');\n\n return new graphic.Group(\n (orient === 'horizontal' && !inverse)\n ? {scale: itemAlign === 'bottom' ? [1, 1] : [-1, 1], rotation: Math.PI / 2}\n : (orient === 'horizontal' && inverse)\n ? {scale: itemAlign === 'bottom' ? [-1, 1] : [1, 1], rotation: -Math.PI / 2}\n : (orient === 'vertical' && !inverse)\n ? {scale: itemAlign === 'left' ? [1, -1] : [-1, -1]}\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\n each([0, 1], function (handleIndex) {\n var handleThumb = handleThumbs[handleIndex];\n handleThumb.setStyle('fill', visualInRange.handlesColor[handleIndex]);\n handleThumb.position[1] = handleEnds[handleIndex];\n\n // Update handle label position.\n var textPoint = graphic.applyTransform(\n shapes.handleLabelPoints[handleIndex],\n graphic.getTransform(handleThumb, this.group)\n );\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(\n this._orient === 'horizontal'\n ? (handleIndex === 0 ? 'bottom' : 'top')\n : 'left',\n shapes.barGroup\n )\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\n var shapes = this._shapes;\n var indicator = shapes.indicator;\n if (!indicator) {\n return;\n }\n\n indicator.position[1] = pos;\n indicator.attr('invisible', false);\n indicator.setShape('points', createIndicatorPoints(\n !!rangeSymbol, halfHoverLinkSize, pos, itemSize[1]\n ));\n\n var opts = {convertOpacityToAlpha: true};\n var color = this.getControllerVisual(cursorValue, 'color', opts);\n indicator.setStyle('fill', color);\n\n // Update handle label position.\n var textPoint = graphic.applyTransform(\n shapes.indicatorLabelPoint,\n graphic.getTransform(indicator, this.group)\n );\n\n var indicatorLabel = shapes.indicatorLabel;\n indicatorLabel.attr('invisible', false);\n var align = this._applyTransform('left', shapes.barGroup);\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 this._shapes.barGroup\n\n .on('mousemove', function (e) {\n self._hovering = true;\n\n if (!self._dragging) {\n var itemSize = self.visualMapModel.itemSize;\n var pos = self._applyTransform(\n [e.offsetX, e.offsetY], self._shapes.barGroup, true, true\n );\n // For hover link show when hover handle, which might be\n // below or upper than sizeExtent.\n pos[1] = mathMin(mathMax(0, pos[1]), itemSize[1]);\n self._doHoverLinkToSeries(\n pos[1],\n 0 <= pos[0] && pos[0] <= itemSize[0]\n );\n }\n })\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 }\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();\n\n // For hover link show when hover handle, which might be below or upper than sizeExtent.\n cursorPos = mathMin(mathMax(sizeExtent[0], cursorPos), sizeExtent[1]);\n\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 = [\n linearMap(hoverRange[0], sizeExtent, dataExtent, true),\n linearMap(hoverRange[1], sizeExtent, dataExtent, true)\n ];\n // Consider data range is out of visualMap range, see test/visualMap-continuous.html,\n // where china and india has very large population.\n hoverRange[0] < sizeExtent[0] && (valueRange[0] = -Infinity);\n hoverRange[1] > sizeExtent[1] && (valueRange[1] = Infinity);\n\n // Do not show indicator when mouse is over handle,\n // otherwise labels overlap, especially when dragging.\n if (hoverOnBar) {\n if (valueRange[0] === -Infinity) {\n this._showIndicator(cursorValue, valueRange[1], '< ', halfHoverLinkSize);\n }\n else if (valueRange[1] === Infinity) {\n this._showIndicator(cursorValue, valueRange[0], '> ', halfHoverLinkSize);\n }\n else {\n this._showIndicator(cursorValue, cursorValue, '≈ ', halfHoverLinkSize);\n }\n }\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 var oldBatch = this._hoverLinkDataIndices;\n var newBatch = [];\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 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 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\n return graphic[\n zrUtil.isArray(vertex) ? 'applyTransform' : 'transformDirection'\n ](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 this._clearHoverLinkToSeries();\n },\n\n /**\n * @override\n */\n remove: function () {\n this._clearHoverLinkFromSeries();\n this._clearHoverLinkToSeries();\n }\n\n});\n\nfunction createPolygon(points, cursor, onDrift, onDragEnd) {\n return new graphic.Polygon({\n shape: {points: points},\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\n ? [[0, 0], [textSize, 0], [textSize, -textSize]]\n : [[0, 0], [textSize, 0], [textSize, textSize]];\n}\n\nfunction createIndicatorPoints(isRange, halfHoverLinkSize, pos, extentMax) {\n return isRange\n ? [ // indicate range\n [0, -mathMin(halfHoverLinkSize, mathMax(pos, 0))],\n [HOVER_LINK_OUT, 0],\n [0, mathMin(halfHoverLinkSize, mathMax(extentMax - pos, 0))]\n ]\n : [ // indicate single value\n [0, 0], [5, -5], [5, 5]\n ];\n}\n\nfunction getHalfHoverLinkSize(visualMapModel, dataExtent, sizeExtent) {\n var halfHoverLinkSize = HOVER_LINK_SIZE / 2;\n var hoverLinkDataSize = visualMapModel.get('hoverLinkDataSize');\n if (hoverLinkDataSize) {\n halfHoverLinkSize = linearMap(hoverLinkDataSize, dataExtent, sizeExtent, true) / 2;\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\nexport default ContinuousView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as echarts from '../../echarts';\n\nvar actionInfo = {\n type: 'selectDataRange',\n event: 'dataRangeSelected',\n // FIXME use updateView appears wrong\n update: 'update'\n};\n\necharts.registerAction(actionInfo, function (payload, ecModel) {\n\n ecModel.eachComponent({mainType: 'visualMap', query: payload}, function (model) {\n model.setSelected(payload.selected);\n });\n\n});\n","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * DataZoom component entry\n */\n\nimport * as echarts from '../echarts';\nimport preprocessor from './visualMap/preprocessor';\n\nimport './visualMap/typeDefaulter';\nimport './visualMap/visualEncoding';\nimport './visualMap/ContinuousModel';\nimport './visualMap/ContinuousView';\nimport './visualMap/visualMapAction';\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\nimport {__DEV__} from '../../config';\nimport * as zrUtil from 'zrender/src/core/util';\nimport VisualMapModel from './VisualMapModel';\nimport VisualMapping from '../../visual/VisualMapping';\nimport visualDefault from '../../visual/visualDefault';\nimport {reformIntervals} from '../../util/number';\n\nvar PiecewiseModel = VisualMapModel.extend({\n\n type: 'visualMap.piecewise',\n\n /**\n * Order Rule:\n *\n * option.categories / option.pieces / option.text / option.selected:\n * If !option.inverse,\n * Order when vertical: ['top', ..., 'bottom'].\n * Order when horizontal: ['left', ..., 'right'].\n * If option.inverse, the meaning of\n * the order should be reversed.\n *\n * this._pieceList:\n * The order is always [low, ..., high].\n *\n * Mapping from location to low-high:\n * If !option.inverse\n * When vertical, top is high.\n * When horizontal, right is high.\n * If option.inverse, reverse.\n */\n\n /**\n * @protected\n */\n defaultOption: {\n selected: null, // Object. If not specified, means selected.\n // When pieces and splitNumber: {'0': true, '5': true}\n // When categories: {'cate1': false, 'cate3': true}\n // When selected === false, means all unselected.\n\n minOpen: false, // Whether include values that smaller than `min`.\n maxOpen: false, // Whether include values that bigger than `max`.\n\n align: 'auto', // 'auto', 'left', 'right'\n itemWidth: 20, // When put the controller vertically, it is the length of\n // horizontal side of each item. Otherwise, vertical side.\n itemHeight: 14, // When put the controller vertically, it is the length of\n // vertical side of each item. Otherwise, horizontal side.\n itemSymbol: 'roundRect',\n pieceList: null, // Each item is Object, with some of those attrs:\n // {min, max, lt, gt, lte, gte, value,\n // color, colorSaturation, colorAlpha, opacity,\n // symbol, symbolSize}, which customize the range or visual\n // coding of the certain piece. Besides, see \"Order Rule\".\n categories: null, // category names, like: ['some1', 'some2', 'some3'].\n // Attr min/max are ignored when categories set. See \"Order Rule\"\n splitNumber: 5, // If set to 5, auto split five pieces equally.\n // If set to 0 and component type not set, component type will be\n // determined as \"continuous\". (It is less reasonable but for ec2\n // compatibility, see echarts/component/visualMap/typeDefaulter)\n selectedMode: 'multiple', // Can be 'multiple' or 'single'.\n itemGap: 10, // The gap between two items, in px.\n hoverLink: true, // Enable hover highlight.\n\n showLabel: null // By default, when text is used, label will hide (the logic\n // is remained for compatibility reason)\n },\n\n /**\n * @override\n */\n optionUpdated: function (newOption, isInit) {\n PiecewiseModel.superApply(this, 'optionUpdated', arguments);\n\n /**\n * The order is always [low, ..., high].\n * [{text: string, interval: Array.<number>}, ...]\n * @private\n * @type {Array.<Object>}\n */\n this._pieceList = [];\n\n this.resetExtent();\n\n /**\n * 'pieces', 'categories', 'splitNumber'\n * @type {string}\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\n this.resetVisual(function (mappingOption, state) {\n if (mode === 'categories') {\n mappingOption.mappingMethod = 'category';\n mappingOption.categories = zrUtil.clone(categories);\n }\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 if (state !== 'inRange') {\n // FIXME\n // outOfRange do not support special visual in pieces.\n piece.visual = null;\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\n var option = this.option;\n var visualTypesInPieces = {};\n var visualTypes = VisualMapping.listVisualTypes();\n var isCategory = this.isCategory();\n\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\n zrUtil.each(visualTypesInPieces, function (v, visualType) {\n var exists = 0;\n zrUtil.each(this.stateList, function (state) {\n exists |= has(option, state, visualType)\n || has(option.target, state, visualType);\n }, this);\n\n !exists && zrUtil.each(this.stateList, function (state) {\n (option[state] || (option[state] = {}))[visualType] = visualDefault.get(\n visualType, state === 'inRange' ? 'active' : 'inactive', isCategory\n );\n });\n }, this);\n\n function has(obj, state, visualType) {\n return obj && obj[state] && (\n zrUtil.isObject(obj[state])\n ? obj[state].hasOwnProperty(visualType)\n : obj[state] === visualType // e.g., inRange: 'symbol'\n );\n }\n\n VisualMapModel.prototype.completeVisualOption.apply(this, arguments);\n },\n\n _resetSelected: function (newOption, isInit) {\n var thisOption = this.option;\n var pieceList = this._pieceList;\n\n // Selected do not merge but all override.\n var selected = (isInit ? thisOption : newOption).selected || {};\n thisOption.selected = selected;\n\n // Consider 'not specified' means true.\n zrUtil.each(pieceList, function (piece, index) {\n var key = this.getSelectedMapKey(piece);\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\n zrUtil.each(pieceList, function (piece, index) {\n var key = this.getSelectedMapKey(piece);\n if (selected[key]) {\n hasSel\n ? (selected[key] = false)\n : (hasSel = true);\n }\n }, this);\n }\n // thisOption.selectedMode === 'multiple', default: all selected.\n },\n\n /**\n * @public\n */\n getSelectedMapKey: function (piece) {\n return this._mode === 'categories'\n ? 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\n return option.pieces && option.pieces.length > 0\n ? 'pieces'\n : this.option.categories\n ? 'categories'\n : '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\n return index != null\n ? (this.option.selected[this.getSelectedMapKey(this._pieceList[index])]\n ? 'inRange' : 'outOfRange'\n )\n : 'outOfRange';\n },\n\n /**\n * @public\n * @params {number} pieceIndex piece index in visualMapModel.getPieceList()\n * @return {Array.<Object>} [{seriesId, dataIndex: <Array.<number>>}, ...]\n */\n findTargetDataIndices: function (pieceIndex) {\n var result = [];\n\n this.eachTargetSeries(function (seriesModel) {\n var dataIndices = [];\n var data = seriesModel.getData();\n\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\n result.push({seriesId: seriesModel.id, dataIndex: dataIndices});\n }, this);\n\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 if (this.isCategory()) {\n representValue = piece.value;\n }\n else {\n if (piece.value != null) {\n representValue = piece.value;\n }\n else {\n var pieceInterval = piece.interval || [];\n representValue = (pieceInterval[0] === -Infinity && pieceInterval[1] === Infinity)\n ? 0\n : (pieceInterval[0] + pieceInterval[1]) / 2;\n }\n }\n return representValue;\n },\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({interval: interval});\n if (!valueState) {\n valueState = visualMapModel.getValueState(representValue);\n }\n var color = getColorVisual(representValue, valueState);\n if (interval[0] === -Infinity) {\n outerColors[0] = color;\n }\n else if (interval[1] === Infinity) {\n outerColors[1] = color;\n }\n else {\n stops.push(\n {value: interval[0], color: color},\n {value: interval[1], color: color}\n );\n }\n }\n\n // Suplement\n var pieceList = this._pieceList.slice();\n if (!pieceList.length) {\n pieceList.push({interval: [-Infinity, Infinity]});\n }\n else {\n var edge = pieceList[0].interval[0];\n edge !== -Infinity && pieceList.unshift({interval: [-Infinity, edge]});\n edge = pieceList[pieceList.length - 1].interval[1];\n edge !== Infinity && pieceList.push({interval: [edge, Infinity]});\n }\n\n var curr = -Infinity;\n zrUtil.each(pieceList, function (piece) {\n var interval = piece.interval;\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\n return {stops: stops, outerColors: outerColors};\n }\n\n});\n\n/**\n * Key is this._mode\n * @type {Object}\n * @this {module:echarts/component/viusalMap/PiecewiseMode}\n */\nvar resetMethods = {\n\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\n var splitStep = (dataExtent[1] - dataExtent[0]) / splitNumber;\n // Precision auto-adaption\n while (+splitStep.toFixed(precision) !== splitStep && precision < 5) {\n precision++;\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 (\n var index = 0, curr = dataExtent[0];\n index < splitNumber;\n curr += splitStep, index++\n ) {\n var max = index === splitNumber - 1 ? dataExtent[1] : (curr + splitStep);\n\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\n zrUtil.each(pieceList, function (piece, index) {\n piece.index = index;\n piece.text = this.formatValueText(piece.interval);\n }, this);\n },\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);\n\n // See \"Order Rule\".\n normalizeReverse(thisOption, this._pieceList);\n },\n\n pieces: function () {\n var thisOption = this.option;\n var pieceList = this._pieceList;\n\n zrUtil.each(thisOption.pieces, function (pieceListItem, index) {\n\n if (!zrUtil.isObject(pieceListItem)) {\n pieceListItem = {value: pieceListItem};\n }\n\n var item = {text: '', index: index};\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 }\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\n var closeList = [1, 0, 1];\n var infinityList = [-Infinity, Infinity];\n\n var useMinMax = [];\n for (var lg = 0; lg < 2; lg++) {\n var names = [['gte', 'gt', 'min'], ['lte', 'lt', 'max']][lg];\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 interval[lg] == null && (interval[lg] = infinityList[lg]);\n }\n useMinMax[0] && interval[1] === Infinity && (close[0] = 0);\n useMinMax[1] && interval[0] === -Infinity && (close[1] = 0);\n\n if (__DEV__) {\n if (interval[0] > interval[1]) {\n console.warn(\n 'Piece ' + index + 'is illegal: ' + interval\n + ' lower bound should not greater then uppper bound.'\n );\n }\n }\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\n pieceList.push(item);\n\n }, this);\n\n // See \"Order Rule\".\n normalizeReverse(thisOption, pieceList);\n // Only pieces\n reformIntervals(pieceList);\n\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(\n piece.value != null ? piece.value : piece.interval,\n false,\n edgeSymbols\n );\n }, this);\n }\n};\n\nfunction normalizeReverse(thisOption, pieceList) {\n var inverse = thisOption.inverse;\n if (thisOption.orient === 'vertical' ? !inverse : inverse) {\n pieceList.reverse();\n }\n}\n\nexport default PiecewiseModel;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nimport * as zrUtil from 'zrender/src/core/util';\nimport VisualMapView from './VisualMapView';\nimport * as graphic from '../../util/graphic';\nimport {createSymbol} from '../../util/symbol';\nimport * as layout from '../../util/layout';\nimport * as helper from './helper';\n\nvar PiecewiseVisualMapView = VisualMapView.extend({\n\n type: 'visualMap.piecewise',\n\n /**\n * @protected\n * @override\n */\n doRender: function () {\n var thisGroup = this.group;\n\n thisGroup.removeAll();\n\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 var itemAlign = this._getItemAlign();\n var itemSize = visualMapModel.itemSize;\n var viewData = this._getViewData();\n var endsText = viewData.endsText;\n var showLabel = zrUtil.retrieve(visualMapModel.get('showLabel', true), !endsText);\n\n endsText && this._renderEndsText(\n thisGroup, endsText[0], itemSize, showLabel, itemAlign\n );\n\n zrUtil.each(viewData.viewPieceList, renderItem, this);\n\n endsText && this._renderEndsText(\n thisGroup, endsText[1], itemSize, showLabel, itemAlign\n );\n\n layout.box(\n visualMapModel.get('orient'), thisGroup, visualMapModel.get('itemGap')\n );\n\n this.renderBackground(thisGroup);\n\n this.positionGroup(thisGroup);\n\n function renderItem(item) {\n var piece = item.piece;\n\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(\n itemGroup, representValue, [0, 0, itemSize[0], itemSize[1]]\n );\n\n if (showLabel) {\n var visualState = this.visualMapModel.getValueState(representValue);\n\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\n .on('mouseover', zrUtil.bind(onHoverLink, this, 'highlight'))\n .on('mouseout', zrUtil.bind(onHoverLink, this, 'downplay'));\n\n function onHoverLink(method) {\n var visualMapModel = this.visualMapModel;\n\n visualMapModel.option.hoverLink && this.api.dispatchAction({\n type: method,\n batch: helper.makeHighDownBatch(\n visualMapModel.findTargetDataIndices(pieceIndex),\n visualMapModel\n )\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(\n visualMapModel, this.api, visualMapModel.itemSize\n );\n }\n else { // horizontal, most case left unless specifying right.\n var align = modelOption.align;\n if (!align || align === 'auto') {\n align = 'left';\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\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\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\n var viewPieceList = zrUtil.map(visualMapModel.getPieceList(), function (piece, index) {\n return {piece: piece, indexInModelPieceList: index};\n });\n var endsText = visualMapModel.get('text');\n\n // Consider orient and inverse.\n var orient = visualMapModel.get('orient');\n var inverse = visualMapModel.get('inverse');\n\n // Order of model pieceList is always [low, ..., high]\n if (orient === 'horizontal' ? inverse : !inverse) {\n viewPieceList.reverse();\n }\n // Origin order of endsText is [high, low]\n else if (endsText) {\n endsText = endsText.slice().reverse();\n }\n\n return {viewPieceList: viewPieceList, endsText: endsText};\n },\n\n /**\n * @private\n */\n _createItemSymbol: function (group, representValue, shapeParam) {\n group.add(createSymbol(\n this.getControllerVisual(representValue, 'symbol'),\n shapeParam[0], shapeParam[1], shapeParam[2], shapeParam[3],\n this.getControllerVisual(representValue, 'color')\n ));\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 }\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});\n\nexport default PiecewiseVisualMapView;","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 */\n\nimport * as echarts from '../echarts';\nimport preprocessor from './visualMap/preprocessor';\n\nimport './visualMap/typeDefaulter';\nimport './visualMap/visualEncoding';\nimport './visualMap/PiecewiseModel';\nimport './visualMap/PiecewiseView';\nimport './visualMap/visualMapAction';\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 * visualMap component entry\n */\n\nimport './visualMapContinuous';\nimport './visualMapPiecewise';\n","import env from '../core/env';\n\n\nvar urn = 'urn:schemas-microsoft-com:vml';\nvar win = typeof window === 'undefined' ? null : window;\n\nvar vmlInited = false;\n\nexport var doc = win && win.document;\n\nexport function createNode(tagName) {\n return doCreateNode(tagName);\n}\n\n// Avoid assign to an exported variable, for transforming to cjs.\nvar doCreateNode;\n\nif (doc && !env.canvasSupported) {\n try {\n !doc.namespaces.zrvml && doc.namespaces.add('zrvml', urn);\n doCreateNode = function (tagName) {\n return doc.createElement('<zrvml:' + tagName + ' class=\"zrvml\">');\n };\n }\n catch (e) {\n doCreateNode = function (tagName) {\n return doc.createElement('<' + tagName + ' xmlns=\"' + urn + '\" class=\"zrvml\">');\n };\n }\n}\n\n// From raphael\nexport function initVML() {\n if (vmlInited || !doc) {\n return;\n }\n vmlInited = true;\n\n var styleSheets = doc.styleSheets;\n if (styleSheets.length < 31) {\n doc.createStyleSheet().addRule('.zrvml', 'behavior:url(#default#VML)');\n }\n else {\n // http://msdn.microsoft.com/en-us/library/ms531194%28VS.85%29.aspx\n styleSheets[0].addRule('.zrvml', 'behavior:url(#default#VML)');\n }\n}\n","// http://www.w3.org/TR/NOTE-VML\n// TODO Use proxy like svg instead of overwrite brush methods\n\nimport env from '../core/env';\nimport {applyTransform} from '../core/vector';\nimport BoundingRect from '../core/BoundingRect';\nimport * as colorTool from '../tool/color';\nimport * as textContain from '../contain/text';\nimport * as textHelper from '../graphic/helper/text';\nimport RectText from '../graphic/mixin/RectText';\nimport Displayable from '../graphic/Displayable';\nimport ZImage from '../graphic/Image';\nimport Text from '../graphic/Text';\nimport Path from '../graphic/Path';\nimport PathProxy from '../core/PathProxy';\nimport Gradient from '../graphic/Gradient';\nimport * as vmlCore from './core';\n\nvar CMD = PathProxy.CMD;\nvar round = Math.round;\nvar sqrt = Math.sqrt;\nvar abs = Math.abs;\nvar cos = Math.cos;\nvar sin = Math.sin;\nvar mathMax = Math.max;\n\nif (!env.canvasSupported) {\n\n var comma = ',';\n var imageTransformPrefix = 'progid:DXImageTransform.Microsoft';\n\n var Z = 21600;\n var Z2 = Z / 2;\n\n var ZLEVEL_BASE = 100000;\n var Z_BASE = 1000;\n\n var initRootElStyle = function (el) {\n el.style.cssText = 'position:absolute;left:0;top:0;width:1px;height:1px;';\n el.coordsize = Z + ',' + Z;\n el.coordorigin = '0,0';\n };\n\n var encodeHtmlAttribute = function (s) {\n return String(s).replace(/&/g, '&amp;').replace(/\"/g, '&quot;');\n };\n\n var rgb2Str = function (r, g, b) {\n return 'rgb(' + [r, g, b].join(',') + ')';\n };\n\n var append = function (parent, child) {\n if (child && parent && child.parentNode !== parent) {\n parent.appendChild(child);\n }\n };\n\n var remove = function (parent, child) {\n if (child && parent && child.parentNode === parent) {\n parent.removeChild(child);\n }\n };\n\n var getZIndex = function (zlevel, z, z2) {\n // z 的取值范围为 [0, 1000]\n return (parseFloat(zlevel) || 0) * ZLEVEL_BASE + (parseFloat(z) || 0) * Z_BASE + z2;\n };\n\n var parsePercent = textHelper.parsePercent;\n\n /***************************************************\n * PATH\n **************************************************/\n\n var setColorAndOpacity = function (el, color, opacity) {\n var colorArr = colorTool.parse(color);\n opacity = +opacity;\n if (isNaN(opacity)) {\n opacity = 1;\n }\n if (colorArr) {\n el.color = rgb2Str(colorArr[0], colorArr[1], colorArr[2]);\n el.opacity = opacity * colorArr[3];\n }\n };\n\n var getColorAndAlpha = function (color) {\n var colorArr = colorTool.parse(color);\n return [\n rgb2Str(colorArr[0], colorArr[1], colorArr[2]),\n colorArr[3]\n ];\n };\n\n var updateFillNode = function (el, style, zrEl) {\n // TODO pattern\n var fill = style.fill;\n if (fill != null) {\n // Modified from excanvas\n if (fill instanceof Gradient) {\n var gradientType;\n var angle = 0;\n var focus = [0, 0];\n // additional offset\n var shift = 0;\n // scale factor for offset\n var expansion = 1;\n var rect = zrEl.getBoundingRect();\n var rectWidth = rect.width;\n var rectHeight = rect.height;\n if (fill.type === 'linear') {\n gradientType = 'gradient';\n var transform = zrEl.transform;\n var p0 = [fill.x * rectWidth, fill.y * rectHeight];\n var p1 = [fill.x2 * rectWidth, fill.y2 * rectHeight];\n if (transform) {\n applyTransform(p0, p0, transform);\n applyTransform(p1, p1, transform);\n }\n var dx = p1[0] - p0[0];\n var dy = p1[1] - p0[1];\n angle = Math.atan2(dx, dy) * 180 / Math.PI;\n // The angle should be a non-negative number.\n if (angle < 0) {\n angle += 360;\n }\n\n // Very small angles produce an unexpected result because they are\n // converted to a scientific notation string.\n if (angle < 1e-6) {\n angle = 0;\n }\n }\n else {\n gradientType = 'gradientradial';\n var p0 = [fill.x * rectWidth, fill.y * rectHeight];\n var transform = zrEl.transform;\n var scale = zrEl.scale;\n var width = rectWidth;\n var height = rectHeight;\n focus = [\n // Percent in bounding rect\n (p0[0] - rect.x) / width,\n (p0[1] - rect.y) / height\n ];\n if (transform) {\n applyTransform(p0, p0, transform);\n }\n\n width /= scale[0] * Z;\n height /= scale[1] * Z;\n var dimension = mathMax(width, height);\n shift = 2 * 0 / dimension;\n expansion = 2 * fill.r / dimension - shift;\n }\n\n // We need to sort the color stops in ascending order by offset,\n // otherwise IE won't interpret it correctly.\n var stops = fill.colorStops.slice();\n stops.sort(function (cs1, cs2) {\n return cs1.offset - cs2.offset;\n });\n\n var length = stops.length;\n // Color and alpha list of first and last stop\n var colorAndAlphaList = [];\n var colors = [];\n for (var i = 0; i < length; i++) {\n var stop = stops[i];\n var colorAndAlpha = getColorAndAlpha(stop.color);\n colors.push(stop.offset * expansion + shift + ' ' + colorAndAlpha[0]);\n if (i === 0 || i === length - 1) {\n colorAndAlphaList.push(colorAndAlpha);\n }\n }\n\n if (length >= 2) {\n var color1 = colorAndAlphaList[0][0];\n var color2 = colorAndAlphaList[1][0];\n var opacity1 = colorAndAlphaList[0][1] * style.opacity;\n var opacity2 = colorAndAlphaList[1][1] * style.opacity;\n\n el.type = gradientType;\n el.method = 'none';\n el.focus = '100%';\n el.angle = angle;\n el.color = color1;\n el.color2 = color2;\n el.colors = colors.join(',');\n // When colors attribute is used, the meanings of opacity and o:opacity2\n // are reversed.\n el.opacity = opacity2;\n // FIXME g_o_:opacity ?\n el.opacity2 = opacity1;\n }\n if (gradientType === 'radial') {\n el.focusposition = focus.join(',');\n }\n }\n else {\n // FIXME Change from Gradient fill to color fill\n setColorAndOpacity(el, fill, style.opacity);\n }\n }\n };\n\n var updateStrokeNode = function (el, style) {\n // if (style.lineJoin != null) {\n // el.joinstyle = style.lineJoin;\n // }\n // if (style.miterLimit != null) {\n // el.miterlimit = style.miterLimit * Z;\n // }\n // if (style.lineCap != null) {\n // el.endcap = style.lineCap;\n // }\n if (style.lineDash) {\n el.dashstyle = style.lineDash.join(' ');\n }\n if (style.stroke != null && !(style.stroke instanceof Gradient)) {\n setColorAndOpacity(el, style.stroke, style.opacity);\n }\n };\n\n var updateFillAndStroke = function (vmlEl, type, style, zrEl) {\n var isFill = type === 'fill';\n var el = vmlEl.getElementsByTagName(type)[0];\n // Stroke must have lineWidth\n if (style[type] != null && style[type] !== 'none' && (isFill || (!isFill && style.lineWidth))) {\n vmlEl[isFill ? 'filled' : 'stroked'] = 'true';\n // FIXME Remove before updating, or set `colors` will throw error\n if (style[type] instanceof Gradient) {\n remove(vmlEl, el);\n }\n if (!el) {\n el = vmlCore.createNode(type);\n }\n\n isFill ? updateFillNode(el, style, zrEl) : updateStrokeNode(el, style);\n append(vmlEl, el);\n }\n else {\n vmlEl[isFill ? 'filled' : 'stroked'] = 'false';\n remove(vmlEl, el);\n }\n };\n\n var points = [[], [], []];\n var pathDataToString = function (path, m) {\n var M = CMD.M;\n var C = CMD.C;\n var L = CMD.L;\n var A = CMD.A;\n var Q = CMD.Q;\n\n var str = [];\n var nPoint;\n var cmdStr;\n var cmd;\n var i;\n var xi;\n var yi;\n var data = path.data;\n var dataLength = path.len();\n for (i = 0; i < dataLength;) {\n cmd = data[i++];\n cmdStr = '';\n nPoint = 0;\n switch (cmd) {\n case M:\n cmdStr = ' m ';\n nPoint = 1;\n xi = data[i++];\n yi = data[i++];\n points[0][0] = xi;\n points[0][1] = yi;\n break;\n case L:\n cmdStr = ' l ';\n nPoint = 1;\n xi = data[i++];\n yi = data[i++];\n points[0][0] = xi;\n points[0][1] = yi;\n break;\n case Q:\n case C:\n cmdStr = ' c ';\n nPoint = 3;\n var x1 = data[i++];\n var y1 = data[i++];\n var x2 = data[i++];\n var y2 = data[i++];\n var x3;\n var y3;\n if (cmd === Q) {\n // Convert quadratic to cubic using degree elevation\n x3 = x2;\n y3 = y2;\n x2 = (x2 + 2 * x1) / 3;\n y2 = (y2 + 2 * y1) / 3;\n x1 = (xi + 2 * x1) / 3;\n y1 = (yi + 2 * y1) / 3;\n }\n else {\n x3 = data[i++];\n y3 = data[i++];\n }\n points[0][0] = x1;\n points[0][1] = y1;\n points[1][0] = x2;\n points[1][1] = y2;\n points[2][0] = x3;\n points[2][1] = y3;\n\n xi = x3;\n yi = y3;\n break;\n case A:\n var x = 0;\n var y = 0;\n var sx = 1;\n var sy = 1;\n var angle = 0;\n if (m) {\n // Extract SRT from matrix\n x = m[4];\n y = m[5];\n sx = sqrt(m[0] * m[0] + m[1] * m[1]);\n sy = sqrt(m[2] * m[2] + m[3] * m[3]);\n angle = Math.atan2(-m[1] / sy, m[0] / sx);\n }\n\n var cx = data[i++];\n var cy = data[i++];\n var rx = data[i++];\n var ry = data[i++];\n var startAngle = data[i++] + angle;\n var endAngle = data[i++] + startAngle + angle;\n // FIXME\n // var psi = data[i++];\n i++;\n var clockwise = data[i++];\n\n var x0 = cx + cos(startAngle) * rx;\n var y0 = cy + sin(startAngle) * ry;\n\n var x1 = cx + cos(endAngle) * rx;\n var y1 = cy + sin(endAngle) * ry;\n\n var type = clockwise ? ' wa ' : ' at ';\n if (Math.abs(x0 - x1) < 1e-4) {\n // IE won't render arches drawn counter clockwise if x0 == x1.\n if (Math.abs(endAngle - startAngle) > 1e-2) {\n // Offset x0 by 1/80 of a pixel. Use something\n // that can be represented in binary\n if (clockwise) {\n x0 += 270 / Z;\n }\n }\n else {\n // Avoid case draw full circle\n if (Math.abs(y0 - cy) < 1e-4) {\n if ((clockwise && x0 < cx) || (!clockwise && x0 > cx)) {\n y1 -= 270 / Z;\n }\n else {\n y1 += 270 / Z;\n }\n }\n else if ((clockwise && y0 < cy) || (!clockwise && y0 > cy)) {\n x1 += 270 / Z;\n }\n else {\n x1 -= 270 / Z;\n }\n }\n }\n str.push(\n type,\n round(((cx - rx) * sx + x) * Z - Z2), comma,\n round(((cy - ry) * sy + y) * Z - Z2), comma,\n round(((cx + rx) * sx + x) * Z - Z2), comma,\n round(((cy + ry) * sy + y) * Z - Z2), comma,\n round((x0 * sx + x) * Z - Z2), comma,\n round((y0 * sy + y) * Z - Z2), comma,\n round((x1 * sx + x) * Z - Z2), comma,\n round((y1 * sy + y) * Z - Z2)\n );\n\n xi = x1;\n yi = y1;\n break;\n case CMD.R:\n var p0 = points[0];\n var p1 = points[1];\n // x0, y0\n p0[0] = data[i++];\n p0[1] = data[i++];\n // x1, y1\n p1[0] = p0[0] + data[i++];\n p1[1] = p0[1] + data[i++];\n\n if (m) {\n applyTransform(p0, p0, m);\n applyTransform(p1, p1, m);\n }\n\n p0[0] = round(p0[0] * Z - Z2);\n p1[0] = round(p1[0] * Z - Z2);\n p0[1] = round(p0[1] * Z - Z2);\n p1[1] = round(p1[1] * Z - Z2);\n str.push(\n // x0, y0\n ' m ', p0[0], comma, p0[1],\n // x1, y0\n ' l ', p1[0], comma, p0[1],\n // x1, y1\n ' l ', p1[0], comma, p1[1],\n // x0, y1\n ' l ', p0[0], comma, p1[1]\n );\n break;\n case CMD.Z:\n // FIXME Update xi, yi\n str.push(' x ');\n }\n\n if (nPoint > 0) {\n str.push(cmdStr);\n for (var k = 0; k < nPoint; k++) {\n var p = points[k];\n\n m && applyTransform(p, p, m);\n // 不 round 会非常慢\n str.push(\n round(p[0] * Z - Z2), comma, round(p[1] * Z - Z2),\n k < nPoint - 1 ? comma : ''\n );\n }\n }\n }\n\n return str.join('');\n };\n\n // Rewrite the original path method\n Path.prototype.brushVML = function (vmlRoot) {\n var style = this.style;\n\n var vmlEl = this._vmlEl;\n if (!vmlEl) {\n vmlEl = vmlCore.createNode('shape');\n initRootElStyle(vmlEl);\n\n this._vmlEl = vmlEl;\n }\n\n updateFillAndStroke(vmlEl, 'fill', style, this);\n updateFillAndStroke(vmlEl, 'stroke', style, this);\n\n var m = this.transform;\n var needTransform = m != null;\n var strokeEl = vmlEl.getElementsByTagName('stroke')[0];\n if (strokeEl) {\n var lineWidth = style.lineWidth;\n // Get the line scale.\n // Determinant of this.m_ means how much the area is enlarged by the\n // transformation. So its square root can be used as a scale factor\n // for width.\n if (needTransform && !style.strokeNoScale) {\n var det = m[0] * m[3] - m[1] * m[2];\n lineWidth *= sqrt(abs(det));\n }\n strokeEl.weight = lineWidth + 'px';\n }\n\n var path = this.path || (this.path = new PathProxy());\n if (this.__dirtyPath) {\n path.beginPath();\n path.subPixelOptimize = false;\n this.buildPath(path, this.shape);\n path.toStatic();\n this.__dirtyPath = false;\n }\n\n vmlEl.path = pathDataToString(path, this.transform);\n\n vmlEl.style.zIndex = getZIndex(this.zlevel, this.z, this.z2);\n\n // Append to root\n append(vmlRoot, vmlEl);\n\n // Text\n if (style.text != null) {\n this.drawRectText(vmlRoot, this.getBoundingRect());\n }\n else {\n this.removeRectText(vmlRoot);\n }\n };\n\n Path.prototype.onRemove = function (vmlRoot) {\n remove(vmlRoot, this._vmlEl);\n this.removeRectText(vmlRoot);\n };\n\n Path.prototype.onAdd = function (vmlRoot) {\n append(vmlRoot, this._vmlEl);\n this.appendRectText(vmlRoot);\n };\n\n /***************************************************\n * IMAGE\n **************************************************/\n var isImage = function (img) {\n // FIXME img instanceof Image 如果 img 是一个字符串的时候IE8 下会报错\n return (typeof img === 'object') && img.tagName && img.tagName.toUpperCase() === 'IMG';\n // return img instanceof Image;\n };\n\n // Rewrite the original path method\n ZImage.prototype.brushVML = function (vmlRoot) {\n var style = this.style;\n var image = style.image;\n\n // Image original width, height\n var ow;\n var oh;\n\n if (isImage(image)) {\n var src = image.src;\n if (src === this._imageSrc) {\n ow = this._imageWidth;\n oh = this._imageHeight;\n }\n else {\n var imageRuntimeStyle = image.runtimeStyle;\n var oldRuntimeWidth = imageRuntimeStyle.width;\n var oldRuntimeHeight = imageRuntimeStyle.height;\n imageRuntimeStyle.width = 'auto';\n imageRuntimeStyle.height = 'auto';\n\n // get the original size\n ow = image.width;\n oh = image.height;\n\n // and remove overides\n imageRuntimeStyle.width = oldRuntimeWidth;\n imageRuntimeStyle.height = oldRuntimeHeight;\n\n // Caching image original width, height and src\n this._imageSrc = src;\n this._imageWidth = ow;\n this._imageHeight = oh;\n }\n image = src;\n }\n else {\n if (image === this._imageSrc) {\n ow = this._imageWidth;\n oh = this._imageHeight;\n }\n }\n if (!image) {\n return;\n }\n\n var x = style.x || 0;\n var y = style.y || 0;\n\n var dw = style.width;\n var dh = style.height;\n\n var sw = style.sWidth;\n var sh = style.sHeight;\n var sx = style.sx || 0;\n var sy = style.sy || 0;\n\n var hasCrop = sw && sh;\n\n var vmlEl = this._vmlEl;\n if (!vmlEl) {\n // FIXME 使用 group 在 left, top 都不是 0 的时候就无法显示了。\n // vmlEl = vmlCore.createNode('group');\n vmlEl = vmlCore.doc.createElement('div');\n initRootElStyle(vmlEl);\n\n this._vmlEl = vmlEl;\n }\n\n var vmlElStyle = vmlEl.style;\n var hasRotation = false;\n var m;\n var scaleX = 1;\n var scaleY = 1;\n if (this.transform) {\n m = this.transform;\n scaleX = sqrt(m[0] * m[0] + m[1] * m[1]);\n scaleY = sqrt(m[2] * m[2] + m[3] * m[3]);\n\n hasRotation = m[1] || m[2];\n }\n if (hasRotation) {\n // If filters are necessary (rotation exists), create them\n // filters are bog-slow, so only create them if abbsolutely necessary\n // The following check doesn't account for skews (which don't exist\n // in the canvas spec (yet) anyway.\n // From excanvas\n var p0 = [x, y];\n var p1 = [x + dw, y];\n var p2 = [x, y + dh];\n var p3 = [x + dw, y + dh];\n applyTransform(p0, p0, m);\n applyTransform(p1, p1, m);\n applyTransform(p2, p2, m);\n applyTransform(p3, p3, m);\n\n var maxX = mathMax(p0[0], p1[0], p2[0], p3[0]);\n var maxY = mathMax(p0[1], p1[1], p2[1], p3[1]);\n\n var transformFilter = [];\n transformFilter.push('M11=', m[0] / scaleX, comma,\n 'M12=', m[2] / scaleY, comma,\n 'M21=', m[1] / scaleX, comma,\n 'M22=', m[3] / scaleY, comma,\n 'Dx=', round(x * scaleX + m[4]), comma,\n 'Dy=', round(y * scaleY + m[5]));\n\n vmlElStyle.padding = '0 ' + round(maxX) + 'px ' + round(maxY) + 'px 0';\n // FIXME DXImageTransform 在 IE11 的兼容模式下不起作用\n vmlElStyle.filter = imageTransformPrefix + '.Matrix('\n + transformFilter.join('') + ', SizingMethod=clip)';\n\n }\n else {\n if (m) {\n x = x * scaleX + m[4];\n y = y * scaleY + m[5];\n }\n vmlElStyle.filter = '';\n vmlElStyle.left = round(x) + 'px';\n vmlElStyle.top = round(y) + 'px';\n }\n\n var imageEl = this._imageEl;\n var cropEl = this._cropEl;\n\n if (!imageEl) {\n imageEl = vmlCore.doc.createElement('div');\n this._imageEl = imageEl;\n }\n var imageELStyle = imageEl.style;\n if (hasCrop) {\n // Needs know image original width and height\n if (!(ow && oh)) {\n var tmpImage = new Image();\n var self = this;\n tmpImage.onload = function () {\n tmpImage.onload = null;\n ow = tmpImage.width;\n oh = tmpImage.height;\n // Adjust image width and height to fit the ratio destinationSize / sourceSize\n imageELStyle.width = round(scaleX * ow * dw / sw) + 'px';\n imageELStyle.height = round(scaleY * oh * dh / sh) + 'px';\n\n // Caching image original width, height and src\n self._imageWidth = ow;\n self._imageHeight = oh;\n self._imageSrc = image;\n };\n tmpImage.src = image;\n }\n else {\n imageELStyle.width = round(scaleX * ow * dw / sw) + 'px';\n imageELStyle.height = round(scaleY * oh * dh / sh) + 'px';\n }\n\n if (!cropEl) {\n cropEl = vmlCore.doc.createElement('div');\n cropEl.style.overflow = 'hidden';\n this._cropEl = cropEl;\n }\n var cropElStyle = cropEl.style;\n cropElStyle.width = round((dw + sx * dw / sw) * scaleX);\n cropElStyle.height = round((dh + sy * dh / sh) * scaleY);\n cropElStyle.filter = imageTransformPrefix + '.Matrix(Dx='\n + (-sx * dw / sw * scaleX) + ',Dy=' + (-sy * dh / sh * scaleY) + ')';\n\n if (!cropEl.parentNode) {\n vmlEl.appendChild(cropEl);\n }\n if (imageEl.parentNode !== cropEl) {\n cropEl.appendChild(imageEl);\n }\n }\n else {\n imageELStyle.width = round(scaleX * dw) + 'px';\n imageELStyle.height = round(scaleY * dh) + 'px';\n\n vmlEl.appendChild(imageEl);\n\n if (cropEl && cropEl.parentNode) {\n vmlEl.removeChild(cropEl);\n this._cropEl = null;\n }\n }\n\n var filterStr = '';\n var alpha = style.opacity;\n if (alpha < 1) {\n filterStr += '.Alpha(opacity=' + round(alpha * 100) + ') ';\n }\n filterStr += imageTransformPrefix + '.AlphaImageLoader(src=' + image + ', SizingMethod=scale)';\n\n imageELStyle.filter = filterStr;\n\n vmlEl.style.zIndex = getZIndex(this.zlevel, this.z, this.z2);\n\n // Append to root\n append(vmlRoot, vmlEl);\n\n // Text\n if (style.text != null) {\n this.drawRectText(vmlRoot, this.getBoundingRect());\n }\n };\n\n ZImage.prototype.onRemove = function (vmlRoot) {\n remove(vmlRoot, this._vmlEl);\n\n this._vmlEl = null;\n this._cropEl = null;\n this._imageEl = null;\n\n this.removeRectText(vmlRoot);\n };\n\n ZImage.prototype.onAdd = function (vmlRoot) {\n append(vmlRoot, this._vmlEl);\n this.appendRectText(vmlRoot);\n };\n\n\n /***************************************************\n * TEXT\n **************************************************/\n\n var DEFAULT_STYLE_NORMAL = 'normal';\n\n var fontStyleCache = {};\n var fontStyleCacheCount = 0;\n var MAX_FONT_CACHE_SIZE = 100;\n var fontEl = document.createElement('div');\n\n var getFontStyle = function (fontString) {\n var fontStyle = fontStyleCache[fontString];\n if (!fontStyle) {\n // Clear cache\n if (fontStyleCacheCount > MAX_FONT_CACHE_SIZE) {\n fontStyleCacheCount = 0;\n fontStyleCache = {};\n }\n\n var style = fontEl.style;\n var fontFamily;\n try {\n style.font = fontString;\n fontFamily = style.fontFamily.split(',')[0];\n }\n catch (e) {\n }\n\n fontStyle = {\n style: style.fontStyle || DEFAULT_STYLE_NORMAL,\n variant: style.fontVariant || DEFAULT_STYLE_NORMAL,\n weight: style.fontWeight || DEFAULT_STYLE_NORMAL,\n size: parseFloat(style.fontSize || 12) | 0,\n family: fontFamily || 'Microsoft YaHei'\n };\n\n fontStyleCache[fontString] = fontStyle;\n fontStyleCacheCount++;\n }\n return fontStyle;\n };\n\n var textMeasureEl;\n // Overwrite measure text method\n textContain.$override('measureText', function (text, textFont) {\n var doc = vmlCore.doc;\n if (!textMeasureEl) {\n textMeasureEl = doc.createElement('div');\n textMeasureEl.style.cssText = 'position:absolute;top:-20000px;left:0;'\n + 'padding:0;margin:0;border:none;white-space:pre;';\n vmlCore.doc.body.appendChild(textMeasureEl);\n }\n\n try {\n textMeasureEl.style.font = textFont;\n }\n catch (ex) {\n // Ignore failures to set to invalid font.\n }\n textMeasureEl.innerHTML = '';\n // Don't use innerHTML or innerText because they allow markup/whitespace.\n textMeasureEl.appendChild(doc.createTextNode(text));\n return {\n width: textMeasureEl.offsetWidth\n };\n });\n\n var tmpRect = new BoundingRect();\n\n var drawRectText = function (vmlRoot, rect, textRect, fromTextEl) {\n\n var style = this.style;\n\n // Optimize, avoid normalize every time.\n this.__dirty && textHelper.normalizeTextStyle(style, true);\n\n var text = style.text;\n // Convert to string\n text != null && (text += '');\n if (!text) {\n return;\n }\n\n // Convert rich text to plain text. Rich text is not supported in\n // IE8-, but tags in rich text template will be removed.\n if (style.rich) {\n var contentBlock = textContain.parseRichText(text, style);\n text = [];\n for (var i = 0; i < contentBlock.lines.length; i++) {\n var tokens = contentBlock.lines[i].tokens;\n var textLine = [];\n for (var j = 0; j < tokens.length; j++) {\n textLine.push(tokens[j].text);\n }\n text.push(textLine.join(''));\n }\n text = text.join('\\n');\n }\n\n var x;\n var y;\n var align = style.textAlign;\n var verticalAlign = style.textVerticalAlign;\n\n var fontStyle = getFontStyle(style.font);\n // FIXME encodeHtmlAttribute ?\n var font = fontStyle.style + ' ' + fontStyle.variant + ' ' + fontStyle.weight + ' '\n + fontStyle.size + 'px \"' + fontStyle.family + '\"';\n\n textRect = textRect || textContain.getBoundingRect(\n text, font, align, verticalAlign, style.textPadding, style.textLineHeight\n );\n\n // Transform rect to view space\n var m = this.transform;\n // Ignore transform for text in other element\n if (m && !fromTextEl) {\n tmpRect.copy(rect);\n tmpRect.applyTransform(m);\n rect = tmpRect;\n }\n\n if (!fromTextEl) {\n var textPosition = style.textPosition;\n // Text position represented by coord\n if (textPosition instanceof Array) {\n x = rect.x + parsePercent(textPosition[0], rect.width);\n y = rect.y + parsePercent(textPosition[1], rect.height);\n\n align = align || 'left';\n }\n else {\n var res = this.calculateTextPosition\n ? this.calculateTextPosition({}, style, rect)\n : textContain.calculateTextPosition({}, style, rect);\n x = res.x;\n y = res.y;\n\n // Default align and baseline when has textPosition\n align = align || res.textAlign;\n verticalAlign = verticalAlign || res.textVerticalAlign;\n }\n }\n else {\n x = rect.x;\n y = rect.y;\n }\n\n x = textContain.adjustTextX(x, textRect.width, align);\n y = textContain.adjustTextY(y, textRect.height, verticalAlign);\n\n // Force baseline 'middle'\n y += textRect.height / 2;\n\n // var fontSize = fontStyle.size;\n // 1.75 is an arbitrary number, as there is no info about the text baseline\n // switch (baseline) {\n // case 'hanging':\n // case 'top':\n // y += fontSize / 1.75;\n // break;\n // case 'middle':\n // break;\n // default:\n // // case null:\n // // case 'alphabetic':\n // // case 'ideographic':\n // // case 'bottom':\n // y -= fontSize / 2.25;\n // break;\n // }\n\n // switch (align) {\n // case 'left':\n // break;\n // case 'center':\n // x -= textRect.width / 2;\n // break;\n // case 'right':\n // x -= textRect.width;\n // break;\n // case 'end':\n // align = elementStyle.direction == 'ltr' ? 'right' : 'left';\n // break;\n // case 'start':\n // align = elementStyle.direction == 'rtl' ? 'right' : 'left';\n // break;\n // default:\n // align = 'left';\n // }\n\n var createNode = vmlCore.createNode;\n\n var textVmlEl = this._textVmlEl;\n var pathEl;\n var textPathEl;\n var skewEl;\n if (!textVmlEl) {\n textVmlEl = createNode('line');\n pathEl = createNode('path');\n textPathEl = createNode('textpath');\n skewEl = createNode('skew');\n\n // FIXME Why here is not cammel case\n // Align 'center' seems wrong\n textPathEl.style['v-text-align'] = 'left';\n\n initRootElStyle(textVmlEl);\n\n pathEl.textpathok = true;\n textPathEl.on = true;\n\n textVmlEl.from = '0 0';\n textVmlEl.to = '1000 0.05';\n\n append(textVmlEl, skewEl);\n append(textVmlEl, pathEl);\n append(textVmlEl, textPathEl);\n\n this._textVmlEl = textVmlEl;\n }\n else {\n // 这里是在前面 appendChild 保证顺序的前提下\n skewEl = textVmlEl.firstChild;\n pathEl = skewEl.nextSibling;\n textPathEl = pathEl.nextSibling;\n }\n\n var coords = [x, y];\n var textVmlElStyle = textVmlEl.style;\n // Ignore transform for text in other element\n if (m && fromTextEl) {\n applyTransform(coords, coords, m);\n\n skewEl.on = true;\n\n skewEl.matrix = m[0].toFixed(3) + comma + m[2].toFixed(3) + comma\n + m[1].toFixed(3) + comma + m[3].toFixed(3) + ',0,0';\n\n // Text position\n skewEl.offset = (round(coords[0]) || 0) + ',' + (round(coords[1]) || 0);\n // Left top point as origin\n skewEl.origin = '0 0';\n\n textVmlElStyle.left = '0px';\n textVmlElStyle.top = '0px';\n }\n else {\n skewEl.on = false;\n textVmlElStyle.left = round(x) + 'px';\n textVmlElStyle.top = round(y) + 'px';\n }\n\n textPathEl.string = encodeHtmlAttribute(text);\n // TODO\n try {\n textPathEl.style.font = font;\n }\n // Error font format\n catch (e) {}\n\n updateFillAndStroke(textVmlEl, 'fill', {\n fill: style.textFill,\n opacity: style.opacity\n }, this);\n updateFillAndStroke(textVmlEl, 'stroke', {\n stroke: style.textStroke,\n opacity: style.opacity,\n lineDash: style.lineDash || null // style.lineDash can be `false`.\n }, this);\n\n textVmlEl.style.zIndex = getZIndex(this.zlevel, this.z, this.z2);\n\n // Attached to root\n append(vmlRoot, textVmlEl);\n };\n\n var removeRectText = function (vmlRoot) {\n remove(vmlRoot, this._textVmlEl);\n this._textVmlEl = null;\n };\n\n var appendRectText = function (vmlRoot) {\n append(vmlRoot, this._textVmlEl);\n };\n\n var list = [RectText, Displayable, ZImage, Path, Text];\n\n // In case Displayable has been mixed in RectText\n for (var i = 0; i < list.length; i++) {\n var proto = list[i].prototype;\n proto.drawRectText = drawRectText;\n proto.removeRectText = removeRectText;\n proto.appendRectText = appendRectText;\n }\n\n Text.prototype.brushVML = function (vmlRoot) {\n var style = this.style;\n if (style.text != null) {\n this.drawRectText(vmlRoot, {\n x: style.x || 0, y: style.y || 0,\n width: 0, height: 0\n }, this.getBoundingRect(), true);\n }\n else {\n this.removeRectText(vmlRoot);\n }\n };\n\n Text.prototype.onRemove = function (vmlRoot) {\n this.removeRectText(vmlRoot);\n };\n\n Text.prototype.onAdd = function (vmlRoot) {\n this.appendRectText(vmlRoot);\n };\n}","/**\n * VML Painter.\n *\n * @module zrender/vml/Painter\n */\n\nimport logError from '../core/log';\nimport * as vmlCore from './core';\nimport {each} from '../core/util';\n\nfunction parseInt10(val) {\n return parseInt(val, 10);\n}\n\n/**\n * @alias module:zrender/vml/Painter\n */\nfunction VMLPainter(root, storage) {\n\n vmlCore.initVML();\n\n this.root = root;\n\n this.storage = storage;\n\n var vmlViewport = document.createElement('div');\n\n var vmlRoot = document.createElement('div');\n\n vmlViewport.style.cssText = 'display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;';\n\n vmlRoot.style.cssText = 'position:absolute;left:0;top:0;';\n\n root.appendChild(vmlViewport);\n\n this._vmlRoot = vmlRoot;\n this._vmlViewport = vmlViewport;\n\n this.resize();\n\n // Modify storage\n var oldDelFromStorage = storage.delFromStorage;\n var oldAddToStorage = storage.addToStorage;\n storage.delFromStorage = function (el) {\n oldDelFromStorage.call(storage, el);\n\n if (el) {\n el.onRemove && el.onRemove(vmlRoot);\n }\n };\n\n storage.addToStorage = function (el) {\n // Displayable already has a vml node\n el.onAdd && el.onAdd(vmlRoot);\n\n oldAddToStorage.call(storage, el);\n };\n\n this._firstPaint = true;\n}\n\nVMLPainter.prototype = {\n\n constructor: VMLPainter,\n\n getType: function () {\n return 'vml';\n },\n\n /**\n * @return {HTMLDivElement}\n */\n getViewportRoot: function () {\n return this._vmlViewport;\n },\n\n getViewportRootOffset: function () {\n var viewportRoot = this.getViewportRoot();\n if (viewportRoot) {\n return {\n offsetLeft: viewportRoot.offsetLeft || 0,\n offsetTop: viewportRoot.offsetTop || 0\n };\n }\n },\n\n /**\n * 刷新\n */\n refresh: function () {\n\n var list = this.storage.getDisplayList(true, true);\n\n this._paintList(list);\n },\n\n _paintList: function (list) {\n var vmlRoot = this._vmlRoot;\n for (var i = 0; i < list.length; i++) {\n var el = list[i];\n if (el.invisible || el.ignore) {\n if (!el.__alreadyNotVisible) {\n el.onRemove(vmlRoot);\n }\n // Set as already invisible\n el.__alreadyNotVisible = true;\n }\n else {\n if (el.__alreadyNotVisible) {\n el.onAdd(vmlRoot);\n }\n el.__alreadyNotVisible = false;\n if (el.__dirty) {\n el.beforeBrush && el.beforeBrush();\n (el.brushVML || el.brush).call(el, vmlRoot);\n el.afterBrush && el.afterBrush();\n }\n }\n el.__dirty = false;\n }\n\n if (this._firstPaint) {\n // Detached from document at first time\n // to avoid page refreshing too many times\n\n // FIXME 如果每次都先 removeChild 可能会导致一些填充和描边的效果改变\n this._vmlViewport.appendChild(vmlRoot);\n this._firstPaint = false;\n }\n },\n\n resize: function (width, height) {\n var width = width == null ? this._getWidth() : width;\n var height = height == null ? this._getHeight() : height;\n\n if (this._width !== width || this._height !== height) {\n this._width = width;\n this._height = height;\n\n var vmlViewportStyle = this._vmlViewport.style;\n vmlViewportStyle.width = width + 'px';\n vmlViewportStyle.height = height + 'px';\n }\n },\n\n dispose: function () {\n this.root.innerHTML = '';\n\n this._vmlRoot =\n this._vmlViewport =\n this.storage = null;\n },\n\n getWidth: function () {\n return this._width;\n },\n\n getHeight: function () {\n return this._height;\n },\n\n clear: function () {\n if (this._vmlViewport) {\n this.root.removeChild(this._vmlViewport);\n }\n },\n\n _getWidth: function () {\n var root = this.root;\n var stl = root.currentStyle;\n\n return ((root.clientWidth || parseInt10(stl.width))\n - parseInt10(stl.paddingLeft)\n - parseInt10(stl.paddingRight)) | 0;\n },\n\n _getHeight: function () {\n var root = this.root;\n var stl = root.currentStyle;\n\n return ((root.clientHeight || parseInt10(stl.height))\n - parseInt10(stl.paddingTop)\n - parseInt10(stl.paddingBottom)) | 0;\n }\n};\n\n// Not supported methods\nfunction createMethodNotSupport(method) {\n return function () {\n logError('In IE8.0 VML mode painter not support method \"' + method + '\"');\n };\n}\n\n// Unsupported methods\neach([\n 'getLayer', 'insertLayer', 'eachLayer', 'eachBuiltinLayer', 'eachOtherLayer', 'getLayers',\n 'modLayer', 'delLayer', 'clearLayer', 'toDataURL', 'pathToImage'\n], function (name) {\n VMLPainter.prototype[name] = createMethodNotSupport(name);\n});\n\nexport default VMLPainter;","import './graphic';\nimport {registerPainter} from '../zrender';\nimport Painter from './Painter';\n\nregisterPainter('vml', Painter);","\nvar svgURI = 'http://www.w3.org/2000/svg';\n\nexport function createElement(name) {\n return document.createElementNS(svgURI, name);\n}","// TODO\n// 1. shadow\n// 2. Image: sx, sy, sw, sh\n\nimport {createElement} from './core';\nimport PathProxy from '../core/PathProxy';\nimport BoundingRect from '../core/BoundingRect';\nimport * as matrix from '../core/matrix';\nimport * as textContain from '../contain/text';\nimport * as textHelper from '../graphic/helper/text';\nimport Text from '../graphic/Text';\n\nvar CMD = PathProxy.CMD;\nvar arrayJoin = Array.prototype.join;\n\nvar NONE = 'none';\nvar mathRound = Math.round;\nvar mathSin = Math.sin;\nvar mathCos = Math.cos;\nvar PI = Math.PI;\nvar PI2 = Math.PI * 2;\nvar degree = 180 / PI;\n\nvar EPSILON = 1e-4;\n\nfunction round4(val) {\n return mathRound(val * 1e4) / 1e4;\n}\n\nfunction isAroundZero(val) {\n return val < EPSILON && val > -EPSILON;\n}\n\nfunction pathHasFill(style, isText) {\n var fill = isText ? style.textFill : style.fill;\n return fill != null && fill !== NONE;\n}\n\nfunction pathHasStroke(style, isText) {\n var stroke = isText ? style.textStroke : style.stroke;\n return stroke != null && stroke !== NONE;\n}\n\nfunction setTransform(svgEl, m) {\n if (m) {\n attr(svgEl, 'transform', 'matrix(' + arrayJoin.call(m, ',') + ')');\n }\n}\n\nfunction attr(el, key, val) {\n if (!val || val.type !== 'linear' && val.type !== 'radial') {\n // Don't set attribute for gradient, since it need new dom nodes\n el.setAttribute(key, val);\n }\n}\n\nfunction attrXLink(el, key, val) {\n el.setAttributeNS('http://www.w3.org/1999/xlink', key, val);\n}\n\nfunction bindStyle(svgEl, style, isText, el) {\n if (pathHasFill(style, isText)) {\n var fill = isText ? style.textFill : style.fill;\n fill = fill === 'transparent' ? NONE : fill;\n attr(svgEl, 'fill', fill);\n attr(svgEl, 'fill-opacity', style.fillOpacity != null ? style.fillOpacity * style.opacity : style.opacity);\n }\n else {\n attr(svgEl, 'fill', NONE);\n }\n\n if (pathHasStroke(style, isText)) {\n var stroke = isText ? style.textStroke : style.stroke;\n stroke = stroke === 'transparent' ? NONE : stroke;\n attr(svgEl, 'stroke', stroke);\n var strokeWidth = isText\n ? style.textStrokeWidth\n : style.lineWidth;\n var strokeScale = !isText && style.strokeNoScale\n ? el.getLineScale()\n : 1;\n attr(svgEl, 'stroke-width', strokeWidth / strokeScale);\n // stroke then fill for text; fill then stroke for others\n attr(svgEl, 'paint-order', isText ? 'stroke' : 'fill');\n attr(svgEl, 'stroke-opacity', style.strokeOpacity != null ? style.strokeOpacity : style.opacity);\n var lineDash = style.lineDash;\n if (lineDash) {\n attr(svgEl, 'stroke-dasharray', style.lineDash.join(','));\n attr(svgEl, 'stroke-dashoffset', mathRound(style.lineDashOffset || 0));\n }\n else {\n attr(svgEl, 'stroke-dasharray', '');\n }\n\n // PENDING\n style.lineCap && attr(svgEl, 'stroke-linecap', style.lineCap);\n style.lineJoin && attr(svgEl, 'stroke-linejoin', style.lineJoin);\n style.miterLimit && attr(svgEl, 'stroke-miterlimit', style.miterLimit);\n }\n else {\n attr(svgEl, 'stroke', NONE);\n }\n}\n\n/***************************************************\n * PATH\n **************************************************/\nfunction pathDataToString(path) {\n var str = [];\n var data = path.data;\n var dataLength = path.len();\n for (var i = 0; i < dataLength;) {\n var cmd = data[i++];\n var cmdStr = '';\n var nData = 0;\n switch (cmd) {\n case CMD.M:\n cmdStr = 'M';\n nData = 2;\n break;\n case CMD.L:\n cmdStr = 'L';\n nData = 2;\n break;\n case CMD.Q:\n cmdStr = 'Q';\n nData = 4;\n break;\n case CMD.C:\n cmdStr = 'C';\n nData = 6;\n break;\n case CMD.A:\n var cx = data[i++];\n var cy = data[i++];\n var rx = data[i++];\n var ry = data[i++];\n var theta = data[i++];\n var dTheta = data[i++];\n var psi = data[i++];\n var clockwise = data[i++];\n\n var dThetaPositive = Math.abs(dTheta);\n var isCircle = isAroundZero(dThetaPositive - PI2)\n || (clockwise ? dTheta >= PI2 : -dTheta >= PI2);\n\n // Mapping to 0~2PI\n var unifiedTheta = dTheta > 0 ? dTheta % PI2 : (dTheta % PI2 + PI2);\n\n var large = false;\n if (isCircle) {\n large = true;\n }\n else if (isAroundZero(dThetaPositive)) {\n large = false;\n }\n else {\n large = (unifiedTheta >= PI) === !!clockwise;\n }\n\n var x0 = round4(cx + rx * mathCos(theta));\n var y0 = round4(cy + ry * mathSin(theta));\n\n // It will not draw if start point and end point are exactly the same\n // We need to shift the end point with a small value\n // FIXME A better way to draw circle ?\n if (isCircle) {\n if (clockwise) {\n dTheta = PI2 - 1e-4;\n }\n else {\n dTheta = -PI2 + 1e-4;\n }\n\n large = true;\n\n if (i === 9) {\n // Move to (x0, y0) only when CMD.A comes at the\n // first position of a shape.\n // For instance, when drawing a ring, CMD.A comes\n // after CMD.M, so it's unnecessary to move to\n // (x0, y0).\n str.push('M', x0, y0);\n }\n }\n\n var x = round4(cx + rx * mathCos(theta + dTheta));\n var y = round4(cy + ry * mathSin(theta + dTheta));\n\n // FIXME Ellipse\n str.push('A', round4(rx), round4(ry),\n mathRound(psi * degree), +large, +clockwise, x, y);\n break;\n case CMD.Z:\n cmdStr = 'Z';\n break;\n case CMD.R:\n var x = round4(data[i++]);\n var y = round4(data[i++]);\n var w = round4(data[i++]);\n var h = round4(data[i++]);\n str.push(\n 'M', x, y,\n 'L', x + w, y,\n 'L', x + w, y + h,\n 'L', x, y + h,\n 'L', x, y\n );\n break;\n }\n cmdStr && str.push(cmdStr);\n for (var j = 0; j < nData; j++) {\n // PENDING With scale\n str.push(round4(data[i++]));\n }\n }\n return str.join(' ');\n}\n\nvar svgPath = {};\nexport {svgPath as path};\n\nsvgPath.brush = function (el) {\n var style = el.style;\n\n var svgEl = el.__svgEl;\n if (!svgEl) {\n svgEl = createElement('path');\n el.__svgEl = svgEl;\n }\n\n if (!el.path) {\n el.createPathProxy();\n }\n var path = el.path;\n\n if (el.__dirtyPath) {\n path.beginPath();\n path.subPixelOptimize = false;\n el.buildPath(path, el.shape);\n el.__dirtyPath = false;\n\n var pathStr = pathDataToString(path);\n if (pathStr.indexOf('NaN') < 0) {\n // Ignore illegal path, which may happen such in out-of-range\n // data in Calendar series.\n attr(svgEl, 'd', pathStr);\n }\n }\n\n bindStyle(svgEl, style, false, el);\n setTransform(svgEl, el.transform);\n\n if (style.text != null) {\n svgTextDrawRectText(el, el.getBoundingRect());\n }\n else {\n removeOldTextNode(el);\n }\n};\n\n/***************************************************\n * IMAGE\n **************************************************/\nvar svgImage = {};\nexport {svgImage as image};\n\nsvgImage.brush = function (el) {\n var style = el.style;\n var image = style.image;\n\n if (image instanceof HTMLImageElement) {\n var src = image.src;\n image = src;\n }\n if (!image) {\n return;\n }\n\n var x = style.x || 0;\n var y = style.y || 0;\n\n var dw = style.width;\n var dh = style.height;\n\n var svgEl = el.__svgEl;\n if (!svgEl) {\n svgEl = createElement('image');\n el.__svgEl = svgEl;\n }\n\n if (image !== el.__imageSrc) {\n attrXLink(svgEl, 'href', image);\n // Caching image src\n el.__imageSrc = image;\n }\n\n attr(svgEl, 'width', dw);\n attr(svgEl, 'height', dh);\n\n attr(svgEl, 'x', x);\n attr(svgEl, 'y', y);\n\n setTransform(svgEl, el.transform);\n\n if (style.text != null) {\n svgTextDrawRectText(el, el.getBoundingRect());\n }\n else {\n removeOldTextNode(el);\n }\n};\n\n/***************************************************\n * TEXT\n **************************************************/\nvar svgText = {};\nexport {svgText as text};\nvar _tmpTextHostRect = new BoundingRect();\nvar _tmpTextBoxPos = {};\nvar _tmpTextTransform = [];\nvar TEXT_ALIGN_TO_ANCHRO = {\n left: 'start',\n right: 'end',\n center: 'middle',\n middle: 'middle'\n};\n\n/**\n * @param {module:zrender/Element} el\n * @param {Object|boolean} [hostRect] {x, y, width, height}\n * If set false, rect text is not used.\n */\nvar svgTextDrawRectText = function (el, hostRect) {\n var style = el.style;\n var elTransform = el.transform;\n var needTransformTextByHostEl = el instanceof Text || style.transformText;\n\n el.__dirty && textHelper.normalizeTextStyle(style, true);\n\n var text = style.text;\n // Convert to string\n text != null && (text += '');\n if (!textHelper.needDrawText(text, style)) {\n return;\n }\n // render empty text for svg if no text but need draw text.\n text == null && (text = '');\n\n // Follow the setting in the canvas renderer, if not transform the\n // text, transform the hostRect, by which the text is located.\n if (!needTransformTextByHostEl && elTransform) {\n _tmpTextHostRect.copy(hostRect);\n _tmpTextHostRect.applyTransform(elTransform);\n hostRect = _tmpTextHostRect;\n }\n\n var textSvgEl = el.__textSvgEl;\n if (!textSvgEl) {\n textSvgEl = createElement('text');\n el.__textSvgEl = textSvgEl;\n }\n\n // style.font has been normalized by `normalizeTextStyle`.\n var textSvgElStyle = textSvgEl.style;\n var font = style.font || textContain.DEFAULT_FONT;\n var computedFont = textSvgEl.__computedFont;\n if (font !== textSvgEl.__styleFont) {\n textSvgElStyle.font = textSvgEl.__styleFont = font;\n // The computedFont might not be the orginal font if it is illegal font.\n computedFont = textSvgEl.__computedFont = textSvgElStyle.font;\n }\n\n var textPadding = style.textPadding;\n var textLineHeight = style.textLineHeight;\n\n var contentBlock = el.__textCotentBlock;\n if (!contentBlock || el.__dirtyText) {\n contentBlock = el.__textCotentBlock = textContain.parsePlainText(\n text, computedFont, textPadding, textLineHeight, style.truncate\n );\n }\n\n var outerHeight = contentBlock.outerHeight;\n var lineHeight = contentBlock.lineHeight;\n\n textHelper.getBoxPosition(_tmpTextBoxPos, el, style, hostRect);\n var baseX = _tmpTextBoxPos.baseX;\n var baseY = _tmpTextBoxPos.baseY;\n var textAlign = _tmpTextBoxPos.textAlign || 'left';\n var textVerticalAlign = _tmpTextBoxPos.textVerticalAlign;\n\n setTextTransform(\n textSvgEl, needTransformTextByHostEl, elTransform, style, hostRect, baseX, baseY\n );\n\n var boxY = textContain.adjustTextY(baseY, outerHeight, textVerticalAlign);\n var textX = baseX;\n var textY = boxY;\n\n // TODO needDrawBg\n if (textPadding) {\n textX = getTextXForPadding(baseX, textAlign, textPadding);\n textY += textPadding[0];\n }\n\n // `textBaseline` is set as 'middle'.\n textY += lineHeight / 2;\n\n bindStyle(textSvgEl, style, true, el);\n\n // FIXME\n // Add a <style> to reset all of the text font as inherit?\n // otherwise the outer <style> may set the unexpected style.\n\n // Font may affect position of each tspan elements\n var canCacheByTextString = contentBlock.canCacheByTextString;\n var tspanList = el.__tspanList || (el.__tspanList = []);\n var tspanOriginLen = tspanList.length;\n\n // Optimize for most cases, just compare text string to determine change.\n if (canCacheByTextString && el.__canCacheByTextString && el.__text === text) {\n if (el.__dirtyText && tspanOriginLen) {\n for (var idx = 0; idx < tspanOriginLen; ++idx) {\n updateTextLocation(tspanList[idx], textAlign, textX, textY + idx * lineHeight);\n }\n }\n }\n else {\n el.__text = text;\n el.__canCacheByTextString = canCacheByTextString;\n var textLines = contentBlock.lines;\n var nTextLines = textLines.length;\n\n var idx = 0;\n for (; idx < nTextLines; idx++) {\n // Using cached tspan elements\n var tspan = tspanList[idx];\n var singleLineText = textLines[idx];\n\n if (!tspan) {\n tspan = tspanList[idx] = createElement('tspan');\n textSvgEl.appendChild(tspan);\n tspan.appendChild(document.createTextNode(singleLineText));\n }\n else if (tspan.__zrText !== singleLineText) {\n tspan.innerHTML = '';\n tspan.appendChild(document.createTextNode(singleLineText));\n }\n updateTextLocation(tspan, textAlign, textX, textY + idx * lineHeight);\n }\n // Remove unused tspan elements\n if (tspanOriginLen > nTextLines) {\n for (; idx < tspanOriginLen; idx++) {\n textSvgEl.removeChild(tspanList[idx]);\n }\n tspanList.length = nTextLines;\n }\n }\n};\n\nfunction setTextTransform(textSvgEl, needTransformTextByHostEl, elTransform, style, hostRect, baseX, baseY) {\n matrix.identity(_tmpTextTransform);\n\n if (needTransformTextByHostEl && elTransform) {\n matrix.copy(_tmpTextTransform, elTransform);\n }\n\n // textRotation only apply in RectText.\n var textRotation = style.textRotation;\n if (hostRect && textRotation) {\n var origin = style.textOrigin;\n if (origin === 'center') {\n baseX = hostRect.width / 2 + hostRect.x;\n baseY = hostRect.height / 2 + hostRect.y;\n }\n else if (origin) {\n baseX = origin[0] + hostRect.x;\n baseY = origin[1] + hostRect.y;\n }\n\n _tmpTextTransform[4] -= baseX;\n _tmpTextTransform[5] -= baseY;\n // Positive: anticlockwise\n matrix.rotate(_tmpTextTransform, _tmpTextTransform, textRotation);\n _tmpTextTransform[4] += baseX;\n _tmpTextTransform[5] += baseY;\n }\n // See the definition in `Style.js#textOrigin`, the default\n // origin is from the result of `getBoxPosition`.\n\n setTransform(textSvgEl, _tmpTextTransform);\n}\n\n// FIXME merge the same code with `helper/text.js#getTextXForPadding`;\nfunction getTextXForPadding(x, textAlign, textPadding) {\n return textAlign === 'right'\n ? (x - textPadding[1])\n : textAlign === 'center'\n ? (x + textPadding[3] / 2 - textPadding[1] / 2)\n : (x + textPadding[3]);\n}\n\nfunction updateTextLocation(tspan, textAlign, x, y) {\n // Consider different font display differently in vertial align, we always\n // set vertialAlign as 'middle', and use 'y' to locate text vertically.\n attr(tspan, 'dominant-baseline', 'middle');\n attr(tspan, 'text-anchor', TEXT_ALIGN_TO_ANCHRO[textAlign]);\n attr(tspan, 'x', x);\n attr(tspan, 'y', y);\n}\n\nfunction removeOldTextNode(el) {\n if (el && el.__textSvgEl) {\n // textSvgEl may has no parentNode if el has been removed temporary.\n if (el.__textSvgEl.parentNode) {\n el.__textSvgEl.parentNode.removeChild(el.__textSvgEl);\n }\n el.__textSvgEl = null;\n el.__tspanList = [];\n el.__text = null;\n }\n}\n\nsvgText.drawRectText = svgTextDrawRectText;\n\nsvgText.brush = function (el) {\n var style = el.style;\n if (style.text != null) {\n svgTextDrawRectText(el, false);\n }\n else {\n removeOldTextNode(el);\n }\n};\n","// Myers' Diff Algorithm\n// Modified from https://github.com/kpdecker/jsdiff/blob/master/src/diff/base.js\n\nfunction Diff() {}\n\nDiff.prototype = {\n diff: function (oldArr, newArr, equals) {\n if (!equals) {\n equals = function (a, b) {\n return a === b;\n };\n }\n this.equals = equals;\n\n var self = this;\n\n oldArr = oldArr.slice();\n newArr = newArr.slice();\n // Allow subclasses to massage the input prior to running\n var newLen = newArr.length;\n var oldLen = oldArr.length;\n var editLength = 1;\n var maxEditLength = newLen + oldLen;\n var bestPath = [{ newPos: -1, components: [] }];\n\n // Seed editLength = 0, i.e. the content starts with the same values\n var oldPos = this.extractCommon(bestPath[0], newArr, oldArr, 0);\n if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {\n var indices = [];\n for (var i = 0; i < newArr.length; i++) {\n indices.push(i);\n }\n // Identity per the equality and tokenizer\n return [{\n indices: indices, count: newArr.length\n }];\n }\n\n // Main worker method. checks all permutations of a given edit length for acceptance.\n function execEditLength() {\n for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {\n var basePath;\n var addPath = bestPath[diagonalPath - 1];\n var removePath = bestPath[diagonalPath + 1];\n var oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;\n if (addPath) {\n // No one else is going to attempt to use this value, clear it\n bestPath[diagonalPath - 1] = undefined;\n }\n\n var canAdd = addPath && addPath.newPos + 1 < newLen;\n var canRemove = removePath && 0 <= oldPos && oldPos < oldLen;\n if (!canAdd && !canRemove) {\n // If this path is a terminal then prune\n bestPath[diagonalPath] = undefined;\n continue;\n }\n\n // Select the diagonal that we want to branch from. We select the prior\n // path whose position in the new string is the farthest from the origin\n // and does not pass the bounds of the diff graph\n if (!canAdd || (canRemove && addPath.newPos < removePath.newPos)) {\n basePath = clonePath(removePath);\n self.pushComponent(basePath.components, undefined, true);\n }\n else {\n basePath = addPath; // No need to clone, we've pulled it from the list\n basePath.newPos++;\n self.pushComponent(basePath.components, true, undefined);\n }\n\n oldPos = self.extractCommon(basePath, newArr, oldArr, diagonalPath);\n\n // If we have hit the end of both strings, then we are done\n if (basePath.newPos + 1 >= newLen && oldPos + 1 >= oldLen) {\n return buildValues(self, basePath.components, newArr, oldArr);\n }\n else {\n // Otherwise track this path as a potential candidate and continue.\n bestPath[diagonalPath] = basePath;\n }\n }\n\n editLength++;\n }\n\n while (editLength <= maxEditLength) {\n var ret = execEditLength();\n if (ret) {\n return ret;\n }\n }\n },\n\n pushComponent: function (components, added, removed) {\n var last = components[components.length - 1];\n if (last && last.added === added && last.removed === removed) {\n // We need to clone here as the component clone operation is just\n // as shallow array clone\n components[components.length - 1] = {count: last.count + 1, added: added, removed: removed };\n }\n else {\n components.push({count: 1, added: added, removed: removed });\n }\n },\n extractCommon: function (basePath, newArr, oldArr, diagonalPath) {\n var newLen = newArr.length;\n var oldLen = oldArr.length;\n var newPos = basePath.newPos;\n var oldPos = newPos - diagonalPath;\n var commonCount = 0;\n\n while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newArr[newPos + 1], oldArr[oldPos + 1])) {\n newPos++;\n oldPos++;\n commonCount++;\n }\n\n if (commonCount) {\n basePath.components.push({count: commonCount});\n }\n\n basePath.newPos = newPos;\n return oldPos;\n },\n tokenize: function (value) {\n return value.slice();\n },\n join: function (value) {\n return value.slice();\n }\n};\n\nfunction buildValues(diff, components, newArr, oldArr) {\n var componentPos = 0;\n var componentLen = components.length;\n var newPos = 0;\n var oldPos = 0;\n\n for (; componentPos < componentLen; componentPos++) {\n var component = components[componentPos];\n if (!component.removed) {\n var indices = [];\n for (var i = newPos; i < newPos + component.count; i++) {\n indices.push(i);\n }\n component.indices = indices;\n newPos += component.count;\n // Common case\n if (!component.added) {\n oldPos += component.count;\n }\n }\n else {\n var indices = [];\n for (var i = oldPos; i < oldPos + component.count; i++) {\n indices.push(i);\n }\n component.indices = indices;\n oldPos += component.count;\n }\n }\n\n return components;\n}\n\nfunction clonePath(path) {\n return { newPos: path.newPos, components: path.components.slice(0) };\n}\n\nvar arrayDiff = new Diff();\n\nexport default function (oldArr, newArr, callback) {\n return arrayDiff.diff(oldArr, newArr, callback);\n}","/**\n * @file Manages elements that can be defined in <defs> in SVG,\n * e.g., gradients, clip path, etc.\n * @author Zhang Wenli\n */\n\nimport {createElement} from '../core';\nimport * as zrUtil from '../../core/util';\nimport Path from '../../graphic/Path';\nimport ZImage from '../../graphic/Image';\nimport ZText from '../../graphic/Text';\nimport {\n path as svgPath,\n image as svgImage,\n text as svgText\n} from '../graphic';\n\n\nvar MARK_UNUSED = '0';\nvar MARK_USED = '1';\n\n/**\n * Manages elements that can be defined in <defs> in SVG,\n * e.g., gradients, clip path, etc.\n *\n * @class\n * @param {number} zrId zrender instance id\n * @param {SVGElement} svgRoot root of SVG document\n * @param {string|string[]} tagNames possible tag names\n * @param {string} markLabel label name to make if the element\n * is used\n */\nfunction Definable(\n zrId,\n svgRoot,\n tagNames,\n markLabel,\n domName\n) {\n this._zrId = zrId;\n this._svgRoot = svgRoot;\n this._tagNames = typeof tagNames === 'string' ? [tagNames] : tagNames;\n this._markLabel = markLabel;\n this._domName = domName || '_dom';\n\n this.nextId = 0;\n}\n\n\nDefinable.prototype.createElement = createElement;\n\n\n/**\n * Get the <defs> tag for svgRoot; optionally creates one if not exists.\n *\n * @param {boolean} isForceCreating if need to create when not exists\n * @return {SVGDefsElement} SVG <defs> element, null if it doesn't\n * exist and isForceCreating is false\n */\nDefinable.prototype.getDefs = function (isForceCreating) {\n var svgRoot = this._svgRoot;\n var defs = this._svgRoot.getElementsByTagName('defs');\n if (defs.length === 0) {\n // Not exist\n if (isForceCreating) {\n defs = svgRoot.insertBefore(\n this.createElement('defs'), // Create new tag\n svgRoot.firstChild // Insert in the front of svg\n );\n if (!defs.contains) {\n // IE doesn't support contains method\n defs.contains = function (el) {\n var children = defs.children;\n if (!children) {\n return false;\n }\n for (var i = children.length - 1; i >= 0; --i) {\n if (children[i] === el) {\n return true;\n }\n }\n return false;\n };\n }\n return defs;\n }\n else {\n return null;\n }\n }\n else {\n return defs[0];\n }\n};\n\n\n/**\n * Update DOM element if necessary.\n *\n * @param {Object|string} element style element. e.g., for gradient,\n * it may be '#ccc' or {type: 'linear', ...}\n * @param {Function|undefined} onUpdate update callback\n */\nDefinable.prototype.update = function (element, onUpdate) {\n if (!element) {\n return;\n }\n\n var defs = this.getDefs(false);\n if (element[this._domName] && defs.contains(element[this._domName])) {\n // Update DOM\n if (typeof onUpdate === 'function') {\n onUpdate(element);\n }\n }\n else {\n // No previous dom, create new\n var dom = this.add(element);\n if (dom) {\n element[this._domName] = dom;\n }\n }\n};\n\n\n/**\n * Add gradient dom to defs\n *\n * @param {SVGElement} dom DOM to be added to <defs>\n */\nDefinable.prototype.addDom = function (dom) {\n var defs = this.getDefs(true);\n defs.appendChild(dom);\n};\n\n\n/**\n * Remove DOM of a given element.\n *\n * @param {SVGElement} element element to remove dom\n */\nDefinable.prototype.removeDom = function (element) {\n var defs = this.getDefs(false);\n if (defs && element[this._domName]) {\n defs.removeChild(element[this._domName]);\n element[this._domName] = null;\n }\n};\n\n\n/**\n * Get DOMs of this element.\n *\n * @return {HTMLDomElement} doms of this defineable elements in <defs>\n */\nDefinable.prototype.getDoms = function () {\n var defs = this.getDefs(false);\n if (!defs) {\n // No dom when defs is not defined\n return [];\n }\n\n var doms = [];\n zrUtil.each(this._tagNames, function (tagName) {\n var tags = defs.getElementsByTagName(tagName);\n // Note that tags is HTMLCollection, which is array-like\n // rather than real array.\n // So `doms.concat(tags)` add tags as one object.\n doms = doms.concat([].slice.call(tags));\n });\n\n return doms;\n};\n\n\n/**\n * Mark DOMs to be unused before painting, and clear unused ones at the end\n * of the painting.\n */\nDefinable.prototype.markAllUnused = function () {\n var doms = this.getDoms();\n var that = this;\n zrUtil.each(doms, function (dom) {\n dom[that._markLabel] = MARK_UNUSED;\n });\n};\n\n\n/**\n * Mark a single DOM to be used.\n *\n * @param {SVGElement} dom DOM to mark\n */\nDefinable.prototype.markUsed = function (dom) {\n if (dom) {\n dom[this._markLabel] = MARK_USED;\n }\n};\n\n\n/**\n * Remove unused DOMs defined in <defs>\n */\nDefinable.prototype.removeUnused = function () {\n var defs = this.getDefs(false);\n if (!defs) {\n // Nothing to remove\n return;\n }\n\n var doms = this.getDoms();\n var that = this;\n zrUtil.each(doms, function (dom) {\n if (dom[that._markLabel] !== MARK_USED) {\n // Remove gradient\n defs.removeChild(dom);\n }\n });\n};\n\n\n/**\n * Get SVG proxy.\n *\n * @param {Displayable} displayable displayable element\n * @return {Path|Image|Text} svg proxy of given element\n */\nDefinable.prototype.getSvgProxy = function (displayable) {\n if (displayable instanceof Path) {\n return svgPath;\n }\n else if (displayable instanceof ZImage) {\n return svgImage;\n }\n else if (displayable instanceof ZText) {\n return svgText;\n }\n else {\n return svgPath;\n }\n};\n\n\n/**\n * Get text SVG element.\n *\n * @param {Displayable} displayable displayable element\n * @return {SVGElement} SVG element of text\n */\nDefinable.prototype.getTextSvgElement = function (displayable) {\n return displayable.__textSvgEl;\n};\n\n\n/**\n * Get SVG element.\n *\n * @param {Displayable} displayable displayable element\n * @return {SVGElement} SVG element\n */\nDefinable.prototype.getSvgElement = function (displayable) {\n return displayable.__svgEl;\n};\n\n\nexport default Definable;\n","/**\n * @file Manages SVG gradient elements.\n * @author Zhang Wenli\n */\n\nimport Definable from './Definable';\nimport * as zrUtil from '../../core/util';\nimport logError from '../../core/log';\nimport * as colorTool from '../../tool/color';\n\n/**\n * Manages SVG gradient elements.\n *\n * @class\n * @extends Definable\n * @param {number} zrId zrender instance id\n * @param {SVGElement} svgRoot root of SVG document\n */\nfunction GradientManager(zrId, svgRoot) {\n Definable.call(\n this,\n zrId,\n svgRoot,\n ['linearGradient', 'radialGradient'],\n '__gradient_in_use__'\n );\n}\n\n\nzrUtil.inherits(GradientManager, Definable);\n\n\n/**\n * Create new gradient DOM for fill or stroke if not exist,\n * but will not update gradient if exists.\n *\n * @param {SvgElement} svgElement SVG element to paint\n * @param {Displayable} displayable zrender displayable element\n */\nGradientManager.prototype.addWithoutUpdate = function (\n svgElement,\n displayable\n) {\n if (displayable && displayable.style) {\n var that = this;\n zrUtil.each(['fill', 'stroke'], function (fillOrStroke) {\n if (displayable.style[fillOrStroke]\n && (displayable.style[fillOrStroke].type === 'linear'\n || displayable.style[fillOrStroke].type === 'radial')\n ) {\n var gradient = displayable.style[fillOrStroke];\n var defs = that.getDefs(true);\n\n // Create dom in <defs> if not exists\n var dom;\n if (gradient._dom) {\n // Gradient exists\n dom = gradient._dom;\n if (!defs.contains(gradient._dom)) {\n // _dom is no longer in defs, recreate\n that.addDom(dom);\n }\n }\n else {\n // New dom\n dom = that.add(gradient);\n }\n\n that.markUsed(displayable);\n\n var id = dom.getAttribute('id');\n svgElement.setAttribute(fillOrStroke, 'url(#' + id + ')');\n }\n });\n }\n};\n\n\n/**\n * Add a new gradient tag in <defs>\n *\n * @param {Gradient} gradient zr gradient instance\n * @return {SVGLinearGradientElement | SVGRadialGradientElement}\n * created DOM\n */\nGradientManager.prototype.add = function (gradient) {\n var dom;\n if (gradient.type === 'linear') {\n dom = this.createElement('linearGradient');\n }\n else if (gradient.type === 'radial') {\n dom = this.createElement('radialGradient');\n }\n else {\n logError('Illegal gradient type.');\n return null;\n }\n\n // Set dom id with gradient id, since each gradient instance\n // will have no more than one dom element.\n // id may exists before for those dirty elements, in which case\n // id should remain the same, and other attributes should be\n // updated.\n gradient.id = gradient.id || this.nextId++;\n dom.setAttribute('id', 'zr' + this._zrId\n + '-gradient-' + gradient.id);\n\n this.updateDom(gradient, dom);\n this.addDom(dom);\n\n return dom;\n};\n\n\n/**\n * Update gradient.\n *\n * @param {Gradient} gradient zr gradient instance\n */\nGradientManager.prototype.update = function (gradient) {\n var that = this;\n Definable.prototype.update.call(this, gradient, function () {\n var type = gradient.type;\n var tagName = gradient._dom.tagName;\n if (type === 'linear' && tagName === 'linearGradient'\n || type === 'radial' && tagName === 'radialGradient'\n ) {\n // Gradient type is not changed, update gradient\n that.updateDom(gradient, gradient._dom);\n }\n else {\n // Remove and re-create if type is changed\n that.removeDom(gradient);\n that.add(gradient);\n }\n });\n};\n\n\n/**\n * Update gradient dom\n *\n * @param {Gradient} gradient zr gradient instance\n * @param {SVGLinearGradientElement | SVGRadialGradientElement} dom\n * DOM to update\n */\nGradientManager.prototype.updateDom = function (gradient, dom) {\n if (gradient.type === 'linear') {\n dom.setAttribute('x1', gradient.x);\n dom.setAttribute('y1', gradient.y);\n dom.setAttribute('x2', gradient.x2);\n dom.setAttribute('y2', gradient.y2);\n }\n else if (gradient.type === 'radial') {\n dom.setAttribute('cx', gradient.x);\n dom.setAttribute('cy', gradient.y);\n dom.setAttribute('r', gradient.r);\n }\n else {\n logError('Illegal gradient type.');\n return;\n }\n\n if (gradient.global) {\n // x1, x2, y1, y2 in range of 0 to canvas width or height\n dom.setAttribute('gradientUnits', 'userSpaceOnUse');\n }\n else {\n // x1, x2, y1, y2 in range of 0 to 1\n dom.setAttribute('gradientUnits', 'objectBoundingBox');\n }\n\n // Remove color stops if exists\n dom.innerHTML = '';\n\n // Add color stops\n var colors = gradient.colorStops;\n for (var i = 0, len = colors.length; i < len; ++i) {\n var stop = this.createElement('stop');\n stop.setAttribute('offset', colors[i].offset * 100 + '%');\n\n var color = colors[i].color;\n if (color.indexOf('rgba') > -1) {\n // Fix Safari bug that stop-color not recognizing alpha #9014\n var opacity = colorTool.parse(color)[3];\n var hex = colorTool.toHex(color);\n\n // stop-color cannot be color, since:\n // The opacity value used for the gradient calculation is the\n // *product* of the value of stop-opacity and the opacity of the\n // value of stop-color.\n // See https://www.w3.org/TR/SVG2/pservers.html#StopOpacityProperty\n stop.setAttribute('stop-color', '#' + hex);\n stop.setAttribute('stop-opacity', opacity);\n }\n else {\n stop.setAttribute('stop-color', colors[i].color);\n }\n\n dom.appendChild(stop);\n }\n\n // Store dom element in gradient, to avoid creating multiple\n // dom instances for the same gradient element\n gradient._dom = dom;\n};\n\n/**\n * Mark a single gradient to be used\n *\n * @param {Displayable} displayable displayable element\n */\nGradientManager.prototype.markUsed = function (displayable) {\n if (displayable.style) {\n var gradient = displayable.style.fill;\n if (gradient && gradient._dom) {\n Definable.prototype.markUsed.call(this, gradient._dom);\n }\n\n gradient = displayable.style.stroke;\n if (gradient && gradient._dom) {\n Definable.prototype.markUsed.call(this, gradient._dom);\n }\n }\n};\n\n\nexport default GradientManager;\n","/**\n * @file Manages SVG clipPath elements.\n * @author Zhang Wenli\n */\n\nimport Definable from './Definable';\nimport * as zrUtil from '../../core/util';\nimport * as matrix from '../../core/matrix';\n\n/**\n * Manages SVG clipPath elements.\n *\n * @class\n * @extends Definable\n * @param {number} zrId zrender instance id\n * @param {SVGElement} svgRoot root of SVG document\n */\nfunction ClippathManager(zrId, svgRoot) {\n Definable.call(this, zrId, svgRoot, 'clipPath', '__clippath_in_use__');\n}\n\n\nzrUtil.inherits(ClippathManager, Definable);\n\n\n/**\n * Update clipPath.\n *\n * @param {Displayable} displayable displayable element\n */\nClippathManager.prototype.update = function (displayable) {\n var svgEl = this.getSvgElement(displayable);\n if (svgEl) {\n this.updateDom(svgEl, displayable.__clipPaths, false);\n }\n\n var textEl = this.getTextSvgElement(displayable);\n if (textEl) {\n // Make another clipPath for text, since it's transform\n // matrix is not the same with svgElement\n this.updateDom(textEl, displayable.__clipPaths, true);\n }\n\n this.markUsed(displayable);\n};\n\n\n/**\n * Create an SVGElement of displayable and create a <clipPath> of its\n * clipPath\n *\n * @param {Displayable} parentEl parent element\n * @param {ClipPath[]} clipPaths clipPaths of parent element\n * @param {boolean} isText if parent element is Text\n */\nClippathManager.prototype.updateDom = function (\n parentEl,\n clipPaths,\n isText\n) {\n if (clipPaths && clipPaths.length > 0) {\n // Has clipPath, create <clipPath> with the first clipPath\n var defs = this.getDefs(true);\n var clipPath = clipPaths[0];\n var clipPathEl;\n var id;\n\n var dom = isText ? '_textDom' : '_dom';\n\n if (clipPath[dom]) {\n // Use a dom that is already in <defs>\n id = clipPath[dom].getAttribute('id');\n clipPathEl = clipPath[dom];\n\n // Use a dom that is already in <defs>\n if (!defs.contains(clipPathEl)) {\n // This happens when set old clipPath that has\n // been previously removed\n defs.appendChild(clipPathEl);\n }\n }\n else {\n // New <clipPath>\n id = 'zr' + this._zrId + '-clip-' + this.nextId;\n ++this.nextId;\n clipPathEl = this.createElement('clipPath');\n clipPathEl.setAttribute('id', id);\n defs.appendChild(clipPathEl);\n\n clipPath[dom] = clipPathEl;\n }\n\n // Build path and add to <clipPath>\n var svgProxy = this.getSvgProxy(clipPath);\n if (clipPath.transform\n && clipPath.parent.invTransform\n && !isText\n ) {\n /**\n * If a clipPath has a parent with transform, the transform\n * of parent should not be considered when setting transform\n * of clipPath. So we need to transform back from parent's\n * transform, which is done by multiplying parent's inverse\n * transform.\n */\n // Store old transform\n var transform = Array.prototype.slice.call(\n clipPath.transform\n );\n\n // Transform back from parent, and brush path\n matrix.mul(\n clipPath.transform,\n clipPath.parent.invTransform,\n clipPath.transform\n );\n svgProxy.brush(clipPath);\n\n // Set back transform of clipPath\n clipPath.transform = transform;\n }\n else {\n svgProxy.brush(clipPath);\n }\n\n var pathEl = this.getSvgElement(clipPath);\n\n clipPathEl.innerHTML = '';\n /**\n * Use `cloneNode()` here to appendChild to multiple parents,\n * which may happend when Text and other shapes are using the same\n * clipPath. Since Text will create an extra clipPath DOM due to\n * different transform rules.\n */\n clipPathEl.appendChild(pathEl.cloneNode());\n\n parentEl.setAttribute('clip-path', 'url(#' + id + ')');\n\n if (clipPaths.length > 1) {\n // Make the other clipPaths recursively\n this.updateDom(clipPathEl, clipPaths.slice(1), isText);\n }\n }\n else {\n // No clipPath\n if (parentEl) {\n parentEl.setAttribute('clip-path', 'none');\n }\n }\n};\n\n/**\n * Mark a single clipPath to be used\n *\n * @param {Displayable} displayable displayable element\n */\nClippathManager.prototype.markUsed = function (displayable) {\n var that = this;\n // displayable.__clipPaths can only be `null`/`undefined` or an non-empty array.\n if (displayable.__clipPaths) {\n zrUtil.each(displayable.__clipPaths, function (clipPath) {\n if (clipPath._dom) {\n Definable.prototype.markUsed.call(that, clipPath._dom);\n }\n if (clipPath._textDom) {\n Definable.prototype.markUsed.call(that, clipPath._textDom);\n }\n });\n }\n};\n\n\nexport default ClippathManager;\n","/**\n * @file Manages SVG shadow elements.\n * @author Zhang Wenli\n */\n\nimport Definable from './Definable';\nimport * as zrUtil from '../../core/util';\n\n/**\n * Manages SVG shadow elements.\n *\n * @class\n * @extends Definable\n * @param {number} zrId zrender instance id\n * @param {SVGElement} svgRoot root of SVG document\n */\nfunction ShadowManager(zrId, svgRoot) {\n Definable.call(\n this,\n zrId,\n svgRoot,\n ['filter'],\n '__filter_in_use__',\n '_shadowDom'\n );\n}\n\n\nzrUtil.inherits(ShadowManager, Definable);\n\n\n/**\n * Create new shadow DOM for fill or stroke if not exist,\n * but will not update shadow if exists.\n *\n * @param {SvgElement} svgElement SVG element to paint\n * @param {Displayable} displayable zrender displayable element\n */\nShadowManager.prototype.addWithoutUpdate = function (\n svgElement,\n displayable\n) {\n if (displayable && hasShadow(displayable.style)) {\n\n // Create dom in <defs> if not exists\n var dom;\n if (displayable._shadowDom) {\n // Gradient exists\n dom = displayable._shadowDom;\n\n var defs = this.getDefs(true);\n if (!defs.contains(displayable._shadowDom)) {\n // _shadowDom is no longer in defs, recreate\n this.addDom(dom);\n }\n }\n else {\n // New dom\n dom = this.add(displayable);\n }\n\n this.markUsed(displayable);\n\n var id = dom.getAttribute('id');\n svgElement.style.filter = 'url(#' + id + ')';\n }\n};\n\n\n/**\n * Add a new shadow tag in <defs>\n *\n * @param {Displayable} displayable zrender displayable element\n * @return {SVGFilterElement} created DOM\n */\nShadowManager.prototype.add = function (displayable) {\n var dom = this.createElement('filter');\n\n // Set dom id with shadow id, since each shadow instance\n // will have no more than one dom element.\n // id may exists before for those dirty elements, in which case\n // id should remain the same, and other attributes should be\n // updated.\n displayable._shadowDomId = displayable._shadowDomId || this.nextId++;\n dom.setAttribute('id', 'zr' + this._zrId\n + '-shadow-' + displayable._shadowDomId);\n\n this.updateDom(displayable, dom);\n this.addDom(dom);\n\n return dom;\n};\n\n\n/**\n * Update shadow.\n *\n * @param {Displayable} displayable zrender displayable element\n */\nShadowManager.prototype.update = function (svgElement, displayable) {\n var style = displayable.style;\n if (hasShadow(style)) {\n var that = this;\n Definable.prototype.update.call(this, displayable, function () {\n that.updateDom(displayable, displayable._shadowDom);\n });\n }\n else {\n // Remove shadow\n this.remove(svgElement, displayable);\n }\n};\n\n\n/**\n * Remove DOM and clear parent filter\n */\nShadowManager.prototype.remove = function (svgElement, displayable) {\n if (displayable._shadowDomId != null) {\n this.removeDom(svgElement);\n svgElement.style.filter = '';\n }\n};\n\n\n/**\n * Update shadow dom\n *\n * @param {Displayable} displayable zrender displayable element\n * @param {SVGFilterElement} dom DOM to update\n */\nShadowManager.prototype.updateDom = function (displayable, dom) {\n var domChild = dom.getElementsByTagName('feDropShadow');\n if (domChild.length === 0) {\n domChild = this.createElement('feDropShadow');\n }\n else {\n domChild = domChild[0];\n }\n\n var style = displayable.style;\n var scaleX = displayable.scale ? (displayable.scale[0] || 1) : 1;\n var scaleY = displayable.scale ? (displayable.scale[1] || 1) : 1;\n\n // TODO: textBoxShadowBlur is not supported yet\n var offsetX;\n var offsetY;\n var blur;\n var color;\n if (style.shadowBlur || style.shadowOffsetX || style.shadowOffsetY) {\n offsetX = style.shadowOffsetX || 0;\n offsetY = style.shadowOffsetY || 0;\n blur = style.shadowBlur;\n color = style.shadowColor;\n }\n else if (style.textShadowBlur) {\n offsetX = style.textShadowOffsetX || 0;\n offsetY = style.textShadowOffsetY || 0;\n blur = style.textShadowBlur;\n color = style.textShadowColor;\n }\n else {\n // Remove shadow\n this.removeDom(dom, style);\n return;\n }\n\n domChild.setAttribute('dx', offsetX / scaleX);\n domChild.setAttribute('dy', offsetY / scaleY);\n domChild.setAttribute('flood-color', color);\n\n // Divide by two here so that it looks the same as in canvas\n // See: https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-shadowblur\n var stdDx = blur / 2 / scaleX;\n var stdDy = blur / 2 / scaleY;\n var stdDeviation = stdDx + ' ' + stdDy;\n domChild.setAttribute('stdDeviation', stdDeviation);\n\n // Fix filter clipping problem\n dom.setAttribute('x', '-100%');\n dom.setAttribute('y', '-100%');\n dom.setAttribute('width', Math.ceil(blur / 2 * 200) + '%');\n dom.setAttribute('height', Math.ceil(blur / 2 * 200) + '%');\n\n dom.appendChild(domChild);\n\n // Store dom element in shadow, to avoid creating multiple\n // dom instances for the same shadow element\n displayable._shadowDom = dom;\n};\n\n/**\n * Mark a single shadow to be used\n *\n * @param {Displayable} displayable displayable element\n */\nShadowManager.prototype.markUsed = function (displayable) {\n if (displayable._shadowDom) {\n Definable.prototype.markUsed.call(this, displayable._shadowDom);\n }\n};\n\nfunction hasShadow(style) {\n // TODO: textBoxShadowBlur is not supported yet\n return style\n && (style.shadowBlur || style.shadowOffsetX || style.shadowOffsetY\n || style.textShadowBlur || style.textShadowOffsetX\n || style.textShadowOffsetY);\n}\n\n\nexport default ShadowManager;\n","/**\n * SVG Painter\n * @module zrender/svg/Painter\n */\n\nimport {createElement} from './core';\nimport * as util from '../core/util';\nimport logError from '../core/log';\nimport Path from '../graphic/Path';\nimport ZImage from '../graphic/Image';\nimport ZText from '../graphic/Text';\nimport arrayDiff from '../core/arrayDiff2';\nimport GradientManager from './helper/GradientManager';\nimport ClippathManager from './helper/ClippathManager';\nimport ShadowManager from './helper/ShadowManager';\nimport {\n path as svgPath,\n image as svgImage,\n text as svgText\n} from './graphic';\n\nfunction parseInt10(val) {\n return parseInt(val, 10);\n}\n\nfunction getSvgProxy(el) {\n if (el instanceof Path) {\n return svgPath;\n }\n else if (el instanceof ZImage) {\n return svgImage;\n }\n else if (el instanceof ZText) {\n return svgText;\n }\n else {\n return svgPath;\n }\n}\n\nfunction checkParentAvailable(parent, child) {\n return child && parent && child.parentNode !== parent;\n}\n\nfunction insertAfter(parent, child, prevSibling) {\n if (checkParentAvailable(parent, child) && prevSibling) {\n var nextSibling = prevSibling.nextSibling;\n nextSibling ? parent.insertBefore(child, nextSibling)\n : parent.appendChild(child);\n }\n}\n\nfunction prepend(parent, child) {\n if (checkParentAvailable(parent, child)) {\n var firstChild = parent.firstChild;\n firstChild ? parent.insertBefore(child, firstChild)\n : parent.appendChild(child);\n }\n}\n\n// function append(parent, child) {\n// if (checkParentAvailable(parent, child)) {\n// parent.appendChild(child);\n// }\n// }\n\nfunction remove(parent, child) {\n if (child && parent && child.parentNode === parent) {\n parent.removeChild(child);\n }\n}\n\nfunction getTextSvgElement(displayable) {\n return displayable.__textSvgEl;\n}\n\nfunction getSvgElement(displayable) {\n return displayable.__svgEl;\n}\n\n/**\n * @alias module:zrender/svg/Painter\n * @constructor\n * @param {HTMLElement} root 绘图容器\n * @param {module:zrender/Storage} storage\n * @param {Object} opts\n */\nvar SVGPainter = function (root, storage, opts, zrId) {\n\n this.root = root;\n this.storage = storage;\n this._opts = opts = util.extend({}, opts || {});\n\n var svgDom = createElement('svg');\n svgDom.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n svgDom.setAttribute('version', '1.1');\n svgDom.setAttribute('baseProfile', 'full');\n svgDom.style.cssText = 'user-select:none;position:absolute;left:0;top:0;';\n\n var bgRoot = createElement('g');\n svgDom.appendChild(bgRoot);\n var svgRoot = createElement('g');\n svgDom.appendChild(svgRoot);\n\n this.gradientManager = new GradientManager(zrId, svgRoot);\n this.clipPathManager = new ClippathManager(zrId, svgRoot);\n this.shadowManager = new ShadowManager(zrId, svgRoot);\n\n var viewport = document.createElement('div');\n viewport.style.cssText = 'overflow:hidden;position:relative';\n\n this._svgDom = svgDom;\n this._svgRoot = svgRoot;\n this._backgroundRoot = bgRoot;\n this._viewport = viewport;\n\n root.appendChild(viewport);\n viewport.appendChild(svgDom);\n\n this.resize(opts.width, opts.height);\n\n this._visibleList = [];\n};\n\nSVGPainter.prototype = {\n\n constructor: SVGPainter,\n\n getType: function () {\n return 'svg';\n },\n\n getViewportRoot: function () {\n return this._viewport;\n },\n\n getSvgDom: function () {\n return this._svgDom;\n },\n\n getSvgRoot: function () {\n return this._svgRoot;\n },\n\n getViewportRootOffset: function () {\n var viewportRoot = this.getViewportRoot();\n if (viewportRoot) {\n return {\n offsetLeft: viewportRoot.offsetLeft || 0,\n offsetTop: viewportRoot.offsetTop || 0\n };\n }\n },\n\n refresh: function () {\n\n var list = this.storage.getDisplayList(true);\n\n this._paintList(list);\n },\n\n setBackgroundColor: function (backgroundColor) {\n // TODO gradient\n // Insert a bg rect instead of setting background to viewport.\n // Otherwise, the exported SVG don't have background.\n if (this._backgroundRoot && this._backgroundNode) {\n this._backgroundRoot.removeChild(this._backgroundNode);\n }\n\n var bgNode = createElement('rect');\n bgNode.setAttribute('width', this.getWidth());\n bgNode.setAttribute('height', this.getHeight());\n bgNode.setAttribute('x', 0);\n bgNode.setAttribute('y', 0);\n bgNode.setAttribute('id', 0);\n bgNode.style.fill = backgroundColor;\n this._backgroundRoot.appendChild(bgNode);\n this._backgroundNode = bgNode;\n },\n\n _paintList: function (list) {\n this.gradientManager.markAllUnused();\n this.clipPathManager.markAllUnused();\n this.shadowManager.markAllUnused();\n\n var svgRoot = this._svgRoot;\n var visibleList = this._visibleList;\n var listLen = list.length;\n\n var newVisibleList = [];\n var i;\n for (i = 0; i < listLen; i++) {\n var displayable = list[i];\n var svgProxy = getSvgProxy(displayable);\n var svgElement = getSvgElement(displayable)\n || getTextSvgElement(displayable);\n if (!displayable.invisible) {\n if (displayable.__dirty) {\n svgProxy && svgProxy.brush(displayable);\n\n // Update clipPath\n this.clipPathManager.update(displayable);\n\n // Update gradient and shadow\n if (displayable.style) {\n this.gradientManager\n .update(displayable.style.fill);\n this.gradientManager\n .update(displayable.style.stroke);\n\n this.shadowManager\n .update(svgElement, displayable);\n }\n\n displayable.__dirty = false;\n }\n newVisibleList.push(displayable);\n }\n }\n\n var diff = arrayDiff(visibleList, newVisibleList);\n var prevSvgElement;\n\n // First do remove, in case element moved to the head and do remove\n // after add\n for (i = 0; i < diff.length; i++) {\n var item = diff[i];\n if (item.removed) {\n for (var k = 0; k < item.count; k++) {\n var displayable = visibleList[item.indices[k]];\n var svgElement = getSvgElement(displayable);\n var textSvgElement = getTextSvgElement(displayable);\n remove(svgRoot, svgElement);\n remove(svgRoot, textSvgElement);\n }\n }\n }\n for (i = 0; i < diff.length; i++) {\n var item = diff[i];\n if (item.added) {\n for (var k = 0; k < item.count; k++) {\n var displayable = newVisibleList[item.indices[k]];\n var svgElement = getSvgElement(displayable);\n var textSvgElement = getTextSvgElement(displayable);\n prevSvgElement\n ? insertAfter(svgRoot, svgElement, prevSvgElement)\n : prepend(svgRoot, svgElement);\n if (svgElement) {\n insertAfter(svgRoot, textSvgElement, svgElement);\n }\n else if (prevSvgElement) {\n insertAfter(\n svgRoot, textSvgElement, prevSvgElement\n );\n }\n else {\n prepend(svgRoot, textSvgElement);\n }\n // Insert text\n insertAfter(svgRoot, textSvgElement, svgElement);\n prevSvgElement = textSvgElement || svgElement\n || prevSvgElement;\n\n // zrender.Text only create textSvgElement.\n this.gradientManager\n .addWithoutUpdate(svgElement || textSvgElement, displayable);\n this.shadowManager\n .addWithoutUpdate(svgElement || textSvgElement, displayable);\n this.clipPathManager.markUsed(displayable);\n }\n }\n else if (!item.removed) {\n for (var k = 0; k < item.count; k++) {\n var displayable = newVisibleList[item.indices[k]];\n var svgElement = getSvgElement(displayable);\n var textSvgElement = getTextSvgElement(displayable);\n\n var svgElement = getSvgElement(displayable);\n var textSvgElement = getTextSvgElement(displayable);\n\n this.gradientManager.markUsed(displayable);\n this.gradientManager\n .addWithoutUpdate(svgElement || textSvgElement, displayable);\n\n this.shadowManager.markUsed(displayable);\n this.shadowManager\n .addWithoutUpdate(svgElement || textSvgElement, displayable);\n\n this.clipPathManager.markUsed(displayable);\n\n if (textSvgElement) { // Insert text.\n insertAfter(svgRoot, textSvgElement, svgElement);\n }\n prevSvgElement = svgElement\n || textSvgElement || prevSvgElement;\n }\n }\n }\n\n this.gradientManager.removeUnused();\n this.clipPathManager.removeUnused();\n this.shadowManager.removeUnused();\n\n this._visibleList = newVisibleList;\n },\n\n _getDefs: function (isForceCreating) {\n var svgRoot = this._svgDom;\n var defs = svgRoot.getElementsByTagName('defs');\n if (defs.length === 0) {\n // Not exist\n if (isForceCreating) {\n var defs = svgRoot.insertBefore(\n createElement('defs'), // Create new tag\n svgRoot.firstChild // Insert in the front of svg\n );\n if (!defs.contains) {\n // IE doesn't support contains method\n defs.contains = function (el) {\n var children = defs.children;\n if (!children) {\n return false;\n }\n for (var i = children.length - 1; i >= 0; --i) {\n if (children[i] === el) {\n return true;\n }\n }\n return false;\n };\n }\n return defs;\n }\n else {\n return null;\n }\n }\n else {\n return defs[0];\n }\n },\n\n resize: function (width, height) {\n var viewport = this._viewport;\n // FIXME Why ?\n viewport.style.display = 'none';\n\n // Save input w/h\n var opts = this._opts;\n width != null && (opts.width = width);\n height != null && (opts.height = height);\n\n width = this._getSize(0);\n height = this._getSize(1);\n\n viewport.style.display = '';\n\n if (this._width !== width || this._height !== height) {\n this._width = width;\n this._height = height;\n\n var viewportStyle = viewport.style;\n viewportStyle.width = width + 'px';\n viewportStyle.height = height + 'px';\n\n var svgRoot = this._svgDom;\n // Set width by 'svgRoot.width = width' is invalid\n svgRoot.setAttribute('width', width);\n svgRoot.setAttribute('height', height);\n }\n\n if (this._backgroundNode) {\n this._backgroundNode.setAttribute('width', width);\n this._backgroundNode.setAttribute('height', height);\n }\n },\n\n /**\n * 获取绘图区域宽度\n */\n getWidth: function () {\n return this._width;\n },\n\n /**\n * 获取绘图区域高度\n */\n getHeight: function () {\n return this._height;\n },\n\n _getSize: function (whIdx) {\n var opts = this._opts;\n var wh = ['width', 'height'][whIdx];\n var cwh = ['clientWidth', 'clientHeight'][whIdx];\n var plt = ['paddingLeft', 'paddingTop'][whIdx];\n var prb = ['paddingRight', 'paddingBottom'][whIdx];\n\n if (opts[wh] != null && opts[wh] !== 'auto') {\n return parseFloat(opts[wh]);\n }\n\n var root = this.root;\n // IE8 does not support getComputedStyle, but it use VML.\n var stl = document.defaultView.getComputedStyle(root);\n\n return (\n (root[cwh] || parseInt10(stl[wh]) || parseInt10(root.style[wh]))\n - (parseInt10(stl[plt]) || 0)\n - (parseInt10(stl[prb]) || 0)\n ) | 0;\n },\n\n dispose: function () {\n this.root.innerHTML = '';\n\n this._svgRoot\n = this._backgroundRoot\n = this._svgDom\n = this._backgroundNode\n = this._viewport\n = this.storage\n = null;\n },\n\n clear: function () {\n if (this._viewport) {\n this.root.removeChild(this._viewport);\n }\n },\n\n toDataURL: function () {\n this.refresh();\n var html = encodeURIComponent(this._svgDom.outerHTML.replace(/></g, '>\\n\\r<'));\n return 'data:image/svg+xml;charset=UTF-8,' + html;\n }\n};\n\n// Not supported methods\nfunction createMethodNotSupport(method) {\n return function () {\n logError('In SVG mode painter not support method \"' + method + '\"');\n };\n}\n\n// Unsuppoted methods\nutil.each([\n 'getLayer', 'insertLayer', 'eachLayer', 'eachBuiltinLayer',\n 'eachOtherLayer', 'getLayers', 'modLayer', 'delLayer', 'clearLayer',\n 'pathToImage'\n], function (name) {\n SVGPainter.prototype[name] = createMethodNotSupport(name);\n});\n\nexport default SVGPainter;","import './graphic';\nimport {registerPainter} from '../zrender';\nimport Painter from './Painter';\n\nregisterPainter('svg', Painter);","/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nexport * from './src/echarts';\nexport * from './src/export';\n\nimport './src/component/dataset';\n\n\n\n// ----------------------------------------------\n// All of the modules that are allowed to be\n// imported are listed below.\n//\n// Users MUST NOT import other modules that are\n// not included in this list.\n// ----------------------------------------------\n\n\n\n// ----------------\n// Charts (series)\n// ----------------\n\n\n\n// All of the series types, for example:\n// chart.setOption({\n// series: [{\n// type: 'line' // or 'bar', 'pie', ...\n// }]\n// });\n\nimport './src/chart/line';\nimport './src/chart/bar';\nimport './src/chart/pie';\nimport './src/chart/scatter';\nimport './src/chart/radar';\nimport './src/chart/map';\nimport './src/chart/tree';\nimport './src/chart/treemap';\nimport './src/chart/graph';\nimport './src/chart/gauge';\nimport './src/chart/funnel';\nimport './src/chart/parallel';\nimport './src/chart/sankey';\nimport './src/chart/boxplot';\nimport './src/chart/candlestick';\nimport './src/chart/effectScatter';\nimport './src/chart/lines';\nimport './src/chart/heatmap';\nimport './src/chart/pictorialBar';\nimport './src/chart/themeRiver';\nimport './src/chart/sunburst';\nimport './src/chart/custom';\n\n\n\n// -------------------\n// Coordinate systems\n// -------------------\n\n\n\n// All of the axis modules have been included in the\n// coordinate system module below, do not need to\n// make extra import.\n\n// `cartesian` coordinate system. For some historical\n// reasons, it is named as grid, for example:\n// chart.setOption({\n// grid: {...},\n// xAxis: {...},\n// yAxis: {...},\n// series: [{...}]\n// });\nimport './src/component/grid';\n\n// `polar` coordinate system, for example:\n// chart.setOption({\n// polar: {...},\n// radiusAxis: {...},\n// angleAxis: {...},\n// series: [{\n// coordinateSystem: 'polar'\n// }]\n// });\nimport './src/component/polar';\n\n// `geo` coordinate system, for example:\n// chart.setOption({\n// geo: {...},\n// series: [{\n// coordinateSystem: 'geo'\n// }]\n// });\nimport './src/component/geo';\n\n// `singleAxis` coordinate system (notice, it is a coordinate system\n// with only one axis, work for chart like theme river), for example:\n// chart.setOption({\n// singleAxis: {...}\n// series: [{type: 'themeRiver', ...}]\n// });\nimport './src/component/singleAxis';\n\n// `parallel` coordinate system, only work for parallel series, for example:\n// chart.setOption({\n// parallel: {...},\n// parallelAxis: [{...}, ...],\n// series: [{\n// type: 'parallel'\n// }]\n// });\nimport './src/component/parallel';\n\n// `calendar` coordinate system. for example,\n// chart.setOptionp({\n// calendar: {...},\n// series: [{\n// coordinateSystem: 'calendar'\n// }]\n// );\nimport './src/component/calendar';\n\n\n\n// ------------------\n// Other components\n// ------------------\n\n\n\n// `graphic` component, for example:\n// chart.setOption({\n// graphic: {...}\n// });\nimport './src/component/graphic';\n\n// `toolbox` component, for example:\n// chart.setOption({\n// toolbox: {...}\n// });\nimport './src/component/toolbox';\n\n// `tooltip` component, for example:\n// chart.setOption({\n// tooltip: {...}\n// });\nimport './src/component/tooltip';\n\n// `axisPointer` component, for example:\n// chart.setOption({\n// tooltip: {axisPointer: {...}, ...}\n// });\n// Or\n// chart.setOption({\n// axisPointer: {...}\n// });\nimport './src/component/axisPointer';\n\n// `brush` component, for example:\n// chart.setOption({\n// brush: {...}\n// });\n// Or\n// chart.setOption({\n// tooltip: {feature: {brush: {...}}\n// })\nimport './src/component/brush';\n\n// `title` component, for example:\n// chart.setOption({\n// title: {...}\n// });\nimport './src/component/title';\n\n// `timeline` component, for example:\n// chart.setOption({\n// timeline: {...}\n// });\nimport './src/component/timeline';\n\n// `markPoint` component, for example:\n// chart.setOption({\n// series: [{markPoint: {...}}]\n// });\nimport './src/component/markPoint';\n\n// `markLine` component, for example:\n// chart.setOption({\n// series: [{markLine: {...}}]\n// });\nimport './src/component/markLine';\n\n// `markArea` component, for example:\n// chart.setOption({\n// series: [{markArea: {...}}]\n// });\nimport './src/component/markArea';\n\n// `legend` component scrollable, for example:\n// chart.setOption({\n// legend: {type: 'scroll'}\n// });\nimport './src/component/legendScroll';\n\n// `legend` component not scrollable. for example:\n// chart.setOption({\n// legend: {...}\n// });\nimport './src/component/legend';\n\n// `dataZoom` component including both `dataZoomInside` and `dataZoomSlider`.\nimport './src/component/dataZoom';\n\n// `dataZoom` component providing drag, pinch, wheel behaviors\n// inside coodinate system, for example:\n// chart.setOption({\n// dataZoom: {type: 'inside'}\n// });\nimport './src/component/dataZoomInside';\n\n// `dataZoom` component providing a slider bar, for example:\n// chart.setOption({\n// dataZoom: {type: 'slider'}\n// });\nimport './src/component/dataZoomSlider';\n\n// `dataZoom` component including both `visualMapContinuous` and `visualMapPiecewise`.\nimport './src/component/visualMap';\n\n// `visualMap` component providing continuous bar, for example:\n// chart.setOption({\n// visualMap: {type: 'continuous'}\n// });\nimport './src/component/visualMapContinuous';\n\n// `visualMap` component providing pieces bar, for example:\n// chart.setOption({\n// visualMap: {type: 'piecewise'}\n// });\nimport './src/component/visualMapPiecewise';\n\n\n\n// -----------------\n// Render engines\n// -----------------\n\n\n\n// Provide IE 6,7,8 compatibility.\nimport 'zrender/src/vml/vml';\n\n// Render via SVG rather than canvas.\nimport 'zrender/src/svg/svg';\n"],"names":["isObject","each","isFunction","assert","clone","_calcOut","env","eventUtil.clientToLocal","dist","eventTool.stop","util.each","vec2.dist","util.mixin","ArrayCtor","create","copy","mul","scale","matrix.identity","matrix.create","matrix.mul","matrix.copy","matrix.invert","vector.applyTransform","matrix.scale","matrix.rotate","easing","easingFuncs","lerp","color.parse","logError","zrUtil.isObject","zrUtil.mixin","vec2.applyTransform","matrix.translate","zrUtil.indexOf","zrUtil.inherits","timsort","util.indexOf","util.createCanvas","util.isObject","DEFAULT_FONT","methods","$override","imageHelper.findExistImage","imageHelper.isImageReady","textContain.DEFAULT_FONT","textContain.makeFont","textContain.parsePlainText","textContain.adjustTextY","textContain.getWidth","textContain.adjustTextX","textContain.parseRichText","roundRectHelper.buildPath","imageHelper.createOrUpdateImage","textContain.calculateTextPosition","tmpRect","textHelper.normalizeTextStyle","textHelper.needDrawText","textHelper.renderText","util.extend","util.merge","Image","Dispatcher","zrUtil.map","zrUtil.noop","zrUtil.each","instances","version","init","dispose","HandlerProxy","zrUtil.bind","isArray","zrUtil.isArray","zrUtil.createHashMap","zrUtil.assert","map","zrUtil.isString","parseClassType","zrUtil.extend","zrUtil.slice","mathSqrt","EPSILON","v2Create","isNotAroundZero","v2DistSquare","mathMin","mathMax","mathSin","mathCos","vec2.create","min","max","cubicExtrema","curve.cubicExtrema","cubicAt","curve.cubicAt","quadraticExtremum","curve.quadraticExtremum","quadraticAt","curve.quadraticAt","vec2.min","vec2.max","dpr","len","bbox.fromLine","bbox.fromCubic","bbox.fromQuadratic","bbox.fromArc","containStroke","curve.cubicProjectPoint","PI2","CMD","curve.cubicRootAt","curve.quadraticRootAt","line.containStroke","cubic.containStroke","quadratic.containStroke","arc.containStroke","pathContain.containStroke","pathContain.contain","defaults","v2ApplyTransform","mergePath","textContain.getBoundingRect","textHelper.getStroke","distance","v2Distance","v2Min","v2Max","v2Clone","v2Sub","v2Scale","v2Add","buildPath","polyHelper.buildPath","subPixelOptimizeLine","subPixelOptimize","subPixelOptimizeRect","subPixelOptimizeOutputShape","vec2.normalize","Displayble","pathTool.extendFromString","pathTool.createFromString","pathTool.mergePath","subPixelOptimizeUtil.subPixelOptimizeLine","subPixelOptimizeUtil.subPixelOptimizeRect","subPixelOptimizeUtil.subPixelOptimize","colorTool.lift","zrUtil.isFunction","zrUtil.retrieve2","zrUtil.trim","applyTransform","invert","zrUtil.isArrayLike","vector.clone","zrUtil.defaults","graphicUtil.getFont","mixin","zrUtil.merge","zrUtil.clone","parsePercent","round","zrUtil.reduce","normalizeCssArray","zrUtil.normalizeCssArray","numberUtil.parseDate","truncateText","textContain.truncateText","zrUtil.curry","formatUtil.normalizeCssArray","merge","inner","componentUtil.getUID","layout.getLayoutParams","layout.mergeLayoutParam","componentUtil.enableSubTypeDefaulter","componentUtil.enableTopologicalTravel","modelUtil.normalizeToArray","modelUtil.mappingToExists","modelUtil.makeIdAndName","modelUtil.isIdInner","zrUtil.isTypedArray","zrUtil.setAsPrimitive","modelUtil.TEXT_STYLE_OPTIONS","set","modelUtil.makeInner","modelUtil.defaultEmphasis","modelUtil.isNameSpecified","Component","clazzUtil.enableClassExtend","clazzUtil.enableClassManagement","graphicUtil.isHighDownDispatcher","modelUtil.queryDataIndex","graphicUtil.getHighlightDigit","PI","graphic.Group","graphic.Rect","graphic.Arc","ComponentView","theme","zrender.init","zrUtil.createCanvas","graphic.Image","modelUtil.parseFinder","colorTool.parse","colorTool.stringify","ChartView","modelUtil.setAttribute","zrender.version","zrUtil.isDom","modelUtil.getAttribute","CoordinateSystem","zrUtil.$override","darkTheme","proto","roundNumber","numberUtil.round","numberUtil.nice","numberUtil.getPrecisionSafe","helper.getIntervalPrecision","formatUtil.addCommas","helper.intervalScaleNiceTicks","formatUtil.formatTime","scaleHelper.fixExtent","scaleProto","intervalScaleProto","getPrecisionSafe","mathFloor","mathCeil","mathPow","numberUtil.quantity","numberUtil.parsePercent","zrUtil.eqNaN","graphic.extendShape","graphic.Line","graphic.Circle","graphic.makeImage","graphic.makePath","dataStack","axisHelper.createScaleByModel","axisHelper.niceScaleExtent","Model","isAroundEqual","contain","bbox.fromPoints","polygonContain.contain","zrUtil.filter","parseGeoJSON","graphic","graphicUtil","SymbolClz","graphic.updateProps","graphic.initProps","graphic.setLabelStyle","graphic.setHoverStyle","scaleAndAdd","vec2.scaleAndAdd","vec2.copy","vec2.sub","Polyline","Polygon","graphic.Sector","graphic.LinearGradient","zrUtil.mergeAll","formatUtil.truncateText","graphic.Text","graphic.setTextStyle","matrixUtil.identity","matrixUtil.rotate","matrixUtil.mul","curry","echarts.extendComponentView","axisPointerModelHelper.fixValue","axisPointerModelHelper.getAxisPointerModel","layout","zrUtil.retrieve","cartesianAxisHelper.layout","graphic.groupTransition","echarts.registerPreprocessor","echarts.registerVisual","echarts.registerLayout","layoutPoints","echarts.registerProcessor","echarts.PRIORITY","echarts.extendChartView","echarts.extendSeriesModel","dataSelectableMixin","graphic.Polyline","echarts.registerAction","RADIAN","layout.getLayoutRect","IncrementalDisplayable","echarts.extendComponentModel","axisBuilderAttrs","graphic.Ring","graphic.Polygon","graphic.mergePath","createSymbol","symbolUtil.createSymbol","zrUtil.find","backwardCompat","points","i","parseGeoJson","getBoundingRect","bind","eventTool.isMiddleOrRightButtonOnMouseUpDown","interactionMutex.isTaken","graphic.CompoundPath","roamHelper.updateViewOnPan","roamHelper.updateViewOnZoom","graphic.Z2_EMPHASIS_LIFT","vector.copy","doConvert","echarts.registerCoordinateSystem","getViewRect","symbolNeedsDraw","graphic.BezierCurve","separation","sep","layout.positionElement","layout.getAvailableSize","Group","Rect","helper\n .retrieveTargetInfo","animationUtil.createWrap","helper.aboveViewRoot","graphic.isHighDownDispatcher","graphic.setAsHighDownDispatcher","graphic.setElementHoverStyle","noop","helper.retrieveTargetInfo","zrColor.fastLerp","zrColor.stringify","zrColor.modifyHSL","zrColor.modifyAlpha","zrColor.parse","mapVisual","helper.getPathToRoot","sort","vector.sub","vector.normalize","Line","zrUtil.retrieve3","LineGroup","makeSeriesScope","getSymbolSize","curveTool.quadraticAt","vec2.distSquare","mathAbs","quadraticSubdivide","curveTool.quadraticSubdivide","vec2.clone","graphic.modifyLabelStyle","normalize","simpleLayout","circularLayout","forceLayout","vec2.len","vec2.set","labelLayout","restrict","layoutUtil.getLayoutRect","graphic.applyTransform","AxisModel","numberUtil.asc","defaultOption","getAxisType","actionInfo","interactionMutex.take","interactionMutex.release","updateZ","trigger","getTransform","graphic.getTransform","graphic.transformDirection","graphicUtil.clipPointsByRect","AxisView","graphic.BoundingRect","brushHelper.makeRectPanelClipPath","brushHelper.makeRectIsTargetByCursor","brushHelper.makeLinearBrushOtherExtent","throttleUtil.createOrUpdate","opacityAccessPath","nodeOpacityPath","lineOpacityPath","getItemOpacity","fadeOutItem","fadeInItem","createGridClipShape","center","NORMAL_ITEM_STYLE_PATH","EMPHASIS_ITEM_STYLE_PATH","createNormalBox","createLarge","transInit","setLargeStyle","LargeArr","normalizeSymbolSize","matrix.clone","curveUtil.quadraticAt","quadraticDerivativeAt","curveUtil.quadraticDerivativeAt","vec2.lerp","lineContain.containStroke","quadraticContain.containStroke","HeatmapLayer","BAR_BORDER_WIDTH_QUERY","BarView","updateCommon","selfBuilderAttrs","singleAxisHelper.layout","modelHelper.makeKey","globalListener.register","globalListener.unregister","updateProps","axisPointerModelHelper.getAxisInfo","graphic.createIcon","axisHelper.getAxisRawValue","viewHelper.buildElStyle","viewHelper.buildCartesianSingleLabelElOption","viewHelper.getTransformedPosition","viewHelper.makeLineShape","viewHelper.makeRectShape","axisPointerModelHelper.collect","pointerShapeBuilder","themeRiverLayout","completeTreeValue","ROOT_TO_NODE_ACTION","helper\n .retrieveTargetInfo","initChildren","dataToCoordSize","CACHED_LABEL_STYLE_PROPERTIES","graphicUtil.CACHED_LABEL_STYLE_PROPERTIES","createOrUpdate","graphicUtil.makePath","graphicUtil.Image","graphicUtil.Text","graphicUtil.Group","graphicUtil.getShapeClass","graphicUtil.initProps","graphicUtil.updateProps","graphicUtil.setElementHoverStyle","graphicUtil.setAsHighDownDispatcher","graphicUtil.setTextStyle","getSeriesStackId","getAxisKey","elementList","formatUtil.capitalFirst","viewHelper.buildLabelElOption","viewHelper.makeSectorShape","barPolar","formatUtil.formatTplSimple","createEl","layoutUtil.positionElement","layoutUtil.LOCATION_PARAMS","layoutUtil.mergeLayoutParam","layoutUtil.copyLayoutParams","register","get","featureManager.get","layoutBox","listComponentHelper.layout","listComponentHelper.makeBackground","lang","featureManager.register","trim","eventTool.addEventListener","indexOf","parseFinder","ATTR","clear","eachAxisDim","asc","helper.isCoordSupported","numberUtil.linearMap","numberUtil.getPixelPrecision","helper.eachAxisDim","helper.createLinkedNodesFinder","handlers","history.pop","history.push","history.count","history.clear","toCamelCase","formatUtil.toCamelCase","zrColor.toHex","domUtil.transformLocalCoord","eventUtil.normalizeEvent","makeStyleCoord","makeDispatchAction","axisPointerViewHelper.getValueLabel","formatUtil.encodeHTML","formatUtil.formatTpl","visualSolution.createVisualMappings","visualSolution.applyVisual","visualSolution.replaceVisualOption","preprocessor","has","modelUtil.getDataItemValue","addCommas","encodeHTML","numberUtil.getPrecision","getAxisInfo","dataFilter","createList","markerHelper.dataTransform","markerHelper.dataFilter","markerHelper.dimValueGetter","markerHelper.getAxisInfo","markerHelper.numCalculate","dimValueGetter","retrieve","isInifinity","ifMarkLineHasOnlyDim","colorUtil.modifyAlpha","layoutUtil.box","mergeAndNormalizeLayoutParams","WH","XY","linearMap","throttle.createOrUpdate","throttle.clear","giveStore","dispatchAction","unregister","roams.generateCoordId","roams.register","roams.unregister","visualSolution.incrementalApplyVisual","helper.getItemAlign","getCursor","modelUtil.compressBatches","helper.makeHighDownBatch","layout.box","abs","Z_BASE","textHelper.parsePercent","length","vmlCore.createNode","vmlCore.doc","textContain.$override","doc","createNode","parseInt10","vmlCore.initVML","Painter","isAroundZero","pathDataToString","textHelper.getBoxPosition","getTextXForPadding","ZText","colorTool.toHex","remove","arrayDiff","createMethodNotSupport"],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAI,GAAG,CAAC;;;AAGR,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC/B,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC;CACxB;;KAEI,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACpC,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC;CACxB;;AAED,IAAI,OAAO,GAAG,KAAK,WAAW,EAAE;IAC5B,GAAG,GAAG,IAAI,CAAC;CACd;;AAED,AAAO,IAAI,OAAO,GAAG,GAAG;;ACxCxB;;;;;;AAMA,IAAI,OAAO,GAAG,MAAM,CAAC;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