echarts 4.0.1 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jshintrc-dist +70 -0
- package/KEYS +74 -0
- package/LICENSE +223 -29
- package/NOTICE +5 -0
- package/README.md +22 -8
- package/build/addHeader.js +113 -0
- package/build/amd2common.js +19 -0
- package/build/build.js +19 -0
- package/build/config.js +25 -1
- package/build/mangleString.js +19 -0
- package/build/optimize.js +19 -0
- package/build/pre-publish.js +26 -3
- package/build/preamble.js +20 -0
- package/build/rollup-plugin-ec-lang.js +20 -0
- package/build/rollup-plugin-ec-remove-dev.js +19 -0
- package/dist/echarts-en.common.js +7106 -1621
- package/dist/echarts-en.common.min.js +21 -1
- package/dist/echarts-en.js +13949 -4217
- package/dist/echarts-en.js.map +1 -1
- package/dist/echarts-en.min.js +21 -1
- package/dist/echarts-en.simple.js +5206 -1375
- package/dist/echarts-en.simple.min.js +21 -1
- package/dist/echarts.common.js +7106 -1621
- package/dist/echarts.common.min.js +21 -1
- package/dist/echarts.js +13949 -4217
- package/dist/echarts.js.map +1 -1
- package/dist/echarts.min.js +21 -1
- package/dist/echarts.simple.js +5206 -1375
- package/dist/echarts.simple.min.js +21 -1
- package/dist/extension/bmap.js +76 -0
- package/dist/extension/bmap.js.map +1 -1
- package/dist/extension/bmap.min.js +20 -0
- package/dist/extension/dataTool.js +95 -0
- package/dist/extension/dataTool.js.map +1 -1
- package/dist/extension/dataTool.min.js +20 -0
- package/echarts.all.js +19 -0
- package/echarts.blank.js +19 -0
- package/echarts.common.js +19 -0
- package/echarts.simple.js +19 -0
- package/extension/bmap/BMapCoordSys.js +19 -0
- package/extension/bmap/BMapModel.js +18 -0
- package/extension/bmap/BMapView.js +18 -0
- package/extension/bmap/bmap.js +19 -0
- package/extension/dataTool/gexf.js +18 -0
- package/extension/dataTool/index.js +19 -0
- package/extension/dataTool/prepareBoxplotData.js +19 -0
- package/extension/dataTool/quantile.js +19 -0
- package/extension/echarts.js +19 -0
- package/extension/webpack.config.js +19 -0
- package/extension-src/bmap/BMapCoordSys.js +19 -0
- package/extension-src/bmap/BMapModel.js +19 -0
- package/extension-src/bmap/BMapView.js +19 -0
- package/extension-src/bmap/bmap.js +19 -0
- package/extension-src/dataTool/gexf.js +19 -0
- package/extension-src/dataTool/index.js +19 -0
- package/extension-src/dataTool/prepareBoxplotData.js +19 -0
- package/extension-src/dataTool/quantile.js +19 -0
- package/index.common.js +19 -0
- package/index.js +19 -0
- package/index.simple.js +19 -0
- package/lib/CoordinateSystem.js +18 -0
- package/lib/ExtensionAPI.js +18 -0
- package/lib/action/createDataSelectAction.js +18 -0
- package/lib/action/geoRoam.js +19 -0
- package/lib/action/roamHelper.js +19 -0
- package/lib/chart/bar/BarSeries.js +42 -1
- package/lib/chart/bar/BarView.js +120 -15
- package/lib/chart/bar/BaseBarSeries.js +22 -0
- package/lib/chart/bar/PictorialBarSeries.js +18 -0
- package/lib/chart/bar/PictorialBarView.js +19 -0
- package/lib/chart/bar/barItemStyle.js +18 -0
- package/lib/chart/bar/helper.js +18 -0
- package/lib/chart/bar.js +28 -7
- package/lib/chart/boxplot/BoxplotSeries.js +35 -1
- package/lib/chart/boxplot/BoxplotView.js +128 -21
- package/lib/chart/boxplot/boxplotLayout.js +70 -63
- package/lib/chart/boxplot/boxplotVisual.js +18 -0
- package/lib/chart/boxplot.js +18 -0
- package/lib/chart/candlestick/CandlestickSeries.js +38 -4
- package/lib/chart/candlestick/CandlestickView.js +236 -22
- package/lib/chart/candlestick/candlestickLayout.js +143 -83
- package/lib/chart/candlestick/candlestickVisual.js +59 -14
- package/lib/chart/candlestick/preprocessor.js +18 -0
- package/lib/chart/candlestick.js +18 -0
- package/lib/chart/chord/ChordSeries.js +18 -0
- package/lib/chart/chord/ChordView.js +18 -0
- package/lib/chart/chord/Ribbon.js +18 -0
- package/lib/chart/chord/chordCircularLayout.js +19 -0
- package/lib/chart/chord.js +18 -0
- package/lib/chart/custom.js +20 -2
- package/lib/chart/effectScatter/EffectScatterSeries.js +18 -0
- package/lib/chart/effectScatter/EffectScatterView.js +18 -0
- package/lib/chart/effectScatter.js +18 -0
- package/lib/chart/funnel/FunnelSeries.js +19 -0
- package/lib/chart/funnel/FunnelView.js +19 -0
- package/lib/chart/funnel/funnelLayout.js +18 -0
- package/lib/chart/funnel.js +18 -0
- package/lib/chart/gauge/GaugeSeries.js +18 -0
- package/lib/chart/gauge/GaugeView.js +18 -0
- package/lib/chart/gauge/PointerPath.js +18 -0
- package/lib/chart/graph/GraphSeries.js +25 -1
- package/lib/chart/graph/GraphView.js +18 -0
- package/lib/chart/graph/adjustEdge.js +18 -0
- package/lib/chart/graph/backwardCompat.js +18 -0
- package/lib/chart/graph/categoryFilter.js +18 -0
- package/lib/chart/graph/categoryVisual.js +18 -0
- package/lib/chart/graph/circularLayout.js +18 -0
- package/lib/chart/graph/circularLayoutHelper.js +18 -0
- package/lib/chart/graph/createView.js +18 -0
- package/lib/chart/graph/edgeVisual.js +18 -0
- package/lib/chart/graph/forceHelper.js +18 -0
- package/lib/chart/graph/forceLayout.js +18 -0
- package/lib/chart/graph/graphAction.js +19 -0
- package/lib/chart/graph/simpleLayout.js +18 -0
- package/lib/chart/graph/simpleLayoutHelper.js +18 -0
- package/lib/chart/graph.js +18 -0
- package/lib/chart/heatmap/HeatmapLayer.js +19 -0
- package/lib/chart/heatmap/HeatmapSeries.js +21 -1
- package/lib/chart/heatmap/HeatmapView.js +18 -0
- package/lib/chart/helper/EffectLine.js +19 -0
- package/lib/chart/helper/EffectPolyline.js +19 -0
- package/lib/chart/helper/EffectSymbol.js +19 -0
- package/lib/chart/helper/LargeLineDraw.js +18 -0
- package/lib/chart/helper/LargeSymbolDraw.js +18 -0
- package/lib/chart/helper/Line.js +31 -13
- package/lib/chart/helper/LineDraw.js +26 -1
- package/lib/chart/helper/LinePath.js +19 -0
- package/lib/chart/helper/Polyline.js +19 -0
- package/lib/chart/helper/Symbol.js +63 -12
- package/lib/chart/helper/SymbolDraw.js +65 -18
- package/lib/chart/helper/createGraphFromNodeEdge.js +27 -3
- package/lib/chart/helper/createGraphFromNodeMatrix.js +19 -0
- package/lib/chart/helper/createListFromArray.js +33 -8
- package/lib/chart/helper/createListSimply.js +19 -0
- package/lib/chart/helper/createRenderPlanner.js +22 -3
- package/lib/chart/helper/labelHelper.js +19 -0
- package/lib/chart/helper/treeHelper.js +18 -0
- package/lib/chart/helper/whiskerBoxCommon.js +20 -21
- package/lib/chart/line/LineSeries.js +32 -11
- package/lib/chart/line/LineView.js +165 -102
- package/lib/chart/line/helper.js +117 -0
- package/lib/chart/line/lineAnimationDiff.js +31 -32
- package/lib/chart/line/poly.js +136 -0
- package/lib/chart/line.js +18 -0
- package/lib/chart/lines/LinesSeries.js +25 -6
- package/lib/chart/lines/LinesView.js +20 -1
- package/lib/chart/lines/linesLayout.js +19 -1
- package/lib/chart/lines/linesVisual.js +18 -0
- package/lib/chart/lines.js +18 -0
- package/lib/chart/map/MapSeries.js +45 -8
- package/lib/chart/map/MapView.js +18 -0
- package/lib/chart/map/backwardCompat.js +18 -0
- package/lib/chart/map/mapDataStatistic.js +18 -0
- package/lib/chart/map/mapSymbolLayout.js +18 -0
- package/lib/chart/map/mapVisual.js +18 -0
- package/lib/chart/map.js +18 -0
- package/lib/chart/parallel/ParallelSeries.js +20 -7
- package/lib/chart/parallel/ParallelView.js +86 -55
- package/lib/chart/parallel/parallelVisual.js +38 -15
- package/lib/chart/parallel.js +18 -0
- package/lib/chart/pictorialBar.js +18 -0
- package/lib/chart/pie/PieSeries.js +39 -2
- package/lib/chart/pie/PieView.js +19 -0
- package/lib/chart/pie/labelLayout.js +18 -0
- package/lib/chart/pie/pieLayout.js +19 -1
- package/lib/chart/pie.js +18 -0
- package/lib/chart/radar/RadarSeries.js +21 -2
- package/lib/chart/radar/RadarView.js +18 -0
- package/lib/chart/radar/backwardCompat.js +18 -0
- package/lib/chart/radar/radarLayout.js +19 -1
- package/lib/chart/radar.js +18 -0
- package/lib/chart/sankey/SankeySeries.js +26 -0
- package/lib/chart/sankey/SankeyView.js +62 -10
- package/lib/chart/sankey/sankeyAction.js +34 -0
- package/lib/chart/sankey/sankeyLayout.js +68 -19
- package/lib/chart/sankey/sankeyVisual.js +49 -19
- package/lib/chart/sankey.js +20 -0
- package/lib/chart/scatter/ScatterSeries.js +20 -2
- package/lib/chart/scatter/ScatterView.js +18 -0
- package/lib/chart/scatter.js +18 -0
- package/lib/chart/sunburst/SunburstPiece.js +70 -19
- package/lib/chart/sunburst/SunburstSeries.js +18 -0
- package/lib/chart/sunburst/SunburstView.js +39 -20
- package/lib/chart/sunburst/sunburstAction.js +19 -0
- package/lib/chart/sunburst/sunburstLayout.js +18 -0
- package/lib/chart/sunburst.js +18 -0
- package/lib/chart/themeRiver/ThemeRiverSeries.js +19 -1
- package/lib/chart/themeRiver/ThemeRiverView.js +19 -0
- package/lib/chart/themeRiver/themeRiverLayout.js +19 -0
- package/lib/chart/themeRiver/themeRiverVisual.js +19 -0
- package/lib/chart/themeRiver.js +18 -0
- package/lib/chart/tree/TreeSeries.js +40 -3
- package/lib/chart/tree/TreeView.js +32 -6
- package/lib/chart/tree/layoutHelper.js +19 -0
- package/lib/chart/tree/traversalHelper.js +19 -0
- package/lib/chart/tree/treeAction.js +18 -0
- package/lib/chart/tree/treeLayout.js +137 -0
- package/lib/chart/tree.js +20 -5
- package/lib/chart/treemap/Breadcrumb.js +19 -0
- package/lib/chart/treemap/TreemapSeries.js +18 -0
- package/lib/chart/treemap/TreemapView.js +18 -0
- package/lib/chart/treemap/helper.js +18 -0
- package/lib/chart/treemap/treemapAction.js +19 -0
- package/lib/chart/treemap/treemapLayout.js +18 -0
- package/lib/chart/treemap/treemapVisual.js +18 -0
- package/lib/chart/treemap.js +18 -0
- package/lib/component/axis/AngleAxisView.js +59 -27
- package/lib/component/axis/AxisBuilder.js +59 -73
- package/lib/component/axis/AxisView.js +19 -0
- package/lib/component/axis/CartesianAxisView.js +71 -39
- package/lib/component/axis/ParallelAxisView.js +18 -0
- package/lib/component/axis/RadiusAxisView.js +26 -4
- package/lib/component/axis/SingleAxisView.js +25 -14
- package/lib/component/axis/parallelAxisAction.js +19 -0
- package/lib/component/axisPointer/AxisPointerModel.js +18 -0
- package/lib/component/axisPointer/AxisPointerView.js +18 -0
- package/lib/component/axisPointer/BaseAxisPointer.js +19 -0
- package/lib/component/axisPointer/CartesianAxisPointer.js +20 -2
- package/lib/component/axisPointer/PolarAxisPointer.js +19 -1
- package/lib/component/axisPointer/SingleAxisPointer.js +19 -1
- package/lib/component/axisPointer/axisTrigger.js +20 -1
- package/lib/component/axisPointer/findPointFromSeries.js +19 -0
- package/lib/component/axisPointer/globalListener.js +19 -0
- package/lib/component/axisPointer/modelHelper.js +20 -1
- package/lib/component/axisPointer/viewHelper.js +20 -0
- package/lib/component/axisPointer.js +18 -0
- package/lib/component/brush/BrushModel.js +25 -1
- package/lib/component/brush/BrushView.js +23 -0
- package/lib/component/brush/brushAction.js +19 -0
- package/lib/component/brush/preprocessor.js +18 -0
- package/lib/component/brush/selector.js +18 -0
- package/lib/component/brush/visualEncoding.js +18 -0
- package/lib/component/brush.js +19 -0
- package/lib/component/calendar/CalendarView.js +18 -0
- package/lib/component/dataZoom/AxisProxy.js +42 -23
- package/lib/component/dataZoom/DataZoomModel.js +18 -0
- package/lib/component/dataZoom/DataZoomView.js +18 -0
- package/lib/component/dataZoom/InsideZoomModel.js +18 -0
- package/lib/component/dataZoom/InsideZoomView.js +36 -13
- package/lib/component/dataZoom/SelectZoomModel.js +18 -0
- package/lib/component/dataZoom/SelectZoomView.js +18 -0
- package/lib/component/dataZoom/SliderZoomModel.js +18 -0
- package/lib/component/dataZoom/SliderZoomView.js +29 -6
- package/lib/component/dataZoom/dataZoomAction.js +18 -0
- package/lib/component/dataZoom/dataZoomProcessor.js +23 -1
- package/lib/component/dataZoom/helper.js +18 -0
- package/lib/component/dataZoom/history.js +18 -0
- package/lib/component/dataZoom/roams.js +19 -18
- package/lib/component/dataZoom/typeDefaulter.js +18 -0
- package/lib/component/dataset.js +56 -3
- package/lib/component/geo/GeoView.js +18 -0
- package/lib/component/geo.js +18 -0
- package/lib/component/graphic.js +18 -0
- package/lib/component/gridSimple.js +18 -0
- package/lib/component/helper/BrushController.js +18 -0
- package/lib/component/helper/BrushTargetManager.js +18 -0
- package/lib/component/helper/MapDraw.js +18 -0
- package/lib/component/helper/RoamController.js +19 -0
- package/lib/component/helper/brushHelper.js +18 -0
- package/lib/component/helper/cursorHelper.js +18 -0
- package/lib/component/helper/interactionMutex.js +18 -0
- package/lib/component/helper/listComponent.js +19 -0
- package/lib/component/helper/roamHelper.js +19 -0
- package/lib/component/helper/selectableMixin.js +21 -16
- package/lib/component/helper/sliderMove.js +19 -0
- package/lib/component/legend/LegendModel.js +25 -6
- package/lib/component/legend/LegendView.js +41 -12
- package/lib/component/legend/ScrollableLegendModel.js +19 -0
- package/lib/component/legend/ScrollableLegendView.js +19 -0
- package/lib/component/legend/legendAction.js +18 -0
- package/lib/component/legend/legendFilter.js +18 -0
- package/lib/component/legend/scrollableLegendAction.js +19 -0
- package/lib/component/legend.js +18 -0
- package/lib/component/markArea.js +18 -0
- package/lib/component/markLine.js +18 -0
- package/lib/component/markPoint.js +18 -0
- package/lib/component/marker/MarkAreaModel.js +18 -0
- package/lib/component/marker/MarkAreaView.js +20 -2
- package/lib/component/marker/MarkLineModel.js +18 -0
- package/lib/component/marker/MarkLineView.js +20 -2
- package/lib/component/marker/MarkPointModel.js +18 -0
- package/lib/component/marker/MarkPointView.js +20 -4
- package/lib/component/marker/MarkerModel.js +19 -1
- package/lib/component/marker/MarkerView.js +18 -0
- package/lib/component/marker/markerHelper.js +58 -17
- package/lib/component/parallel.js +18 -0
- package/lib/component/polar.js +18 -0
- package/lib/component/radar/RadarView.js +22 -4
- package/lib/component/singleAxis.js +18 -0
- package/lib/component/timeline/SliderTimelineModel.js +18 -0
- package/lib/component/timeline/SliderTimelineView.js +42 -33
- package/lib/component/timeline/TimelineAxis.js +24 -35
- package/lib/component/timeline/TimelineModel.js +18 -0
- package/lib/component/timeline/TimelineView.js +18 -0
- package/lib/component/timeline/preprocessor.js +18 -0
- package/lib/component/timeline/timelineAction.js +18 -0
- package/lib/component/timeline/typeDefaulter.js +18 -0
- package/lib/component/timeline.js +19 -0
- package/lib/component/title.js +19 -0
- package/lib/component/toolbox/ToolboxModel.js +20 -2
- package/lib/component/toolbox/ToolboxView.js +18 -0
- package/lib/component/toolbox/feature/Brush.js +18 -0
- package/lib/component/toolbox/feature/DataView.js +18 -0
- package/lib/component/toolbox/feature/DataZoom.js +22 -1
- package/lib/component/toolbox/feature/MagicType.js +18 -0
- package/lib/component/toolbox/feature/Restore.js +18 -0
- package/lib/component/toolbox/feature/SaveAsImage.js +18 -0
- package/lib/component/toolbox/featureManager.js +18 -0
- package/lib/component/tooltip/TooltipContent.js +18 -0
- package/lib/component/tooltip/TooltipModel.js +18 -0
- package/lib/component/tooltip/TooltipView.js +19 -1
- package/lib/component/tooltip.js +18 -0
- package/lib/component/visualMap/ContinuousModel.js +19 -1
- package/lib/component/visualMap/ContinuousView.js +18 -0
- package/lib/component/visualMap/PiecewiseModel.js +20 -1
- package/lib/component/visualMap/PiecewiseView.js +18 -0
- package/lib/component/visualMap/VisualMapModel.js +32 -1
- package/lib/component/visualMap/VisualMapView.js +18 -0
- package/lib/component/visualMap/helper.js +19 -0
- package/lib/component/visualMap/preprocessor.js +18 -0
- package/lib/component/visualMap/typeDefaulter.js +18 -0
- package/lib/component/visualMap/visualEncoding.js +21 -1
- package/lib/component/visualMap/visualMapAction.js +18 -0
- package/lib/component/visualMapContinuous.js +19 -0
- package/lib/component/visualMapPiecewise.js +19 -0
- package/lib/config.js +18 -0
- package/lib/coord/Axis.js +166 -87
- package/lib/coord/View.js +19 -0
- package/lib/coord/axisDefault.js +52 -42
- package/lib/coord/axisHelper.js +136 -89
- package/lib/coord/axisModelCommonMixin.js +18 -8
- package/lib/coord/axisModelCreator.js +26 -3
- package/lib/coord/axisTickLabelBuilder.js +350 -0
- package/lib/coord/calendar/Calendar.js +20 -2
- package/lib/coord/calendar/CalendarModel.js +19 -0
- package/lib/coord/calendar/prepareCustom.js +18 -0
- package/lib/coord/cartesian/Axis2D.js +24 -16
- package/lib/coord/cartesian/AxisModel.js +18 -0
- package/lib/coord/cartesian/Cartesian.js +19 -0
- package/lib/coord/cartesian/Cartesian2D.js +26 -4
- package/lib/coord/cartesian/Grid.js +71 -79
- package/lib/coord/cartesian/GridModel.js +18 -0
- package/lib/{component/axis → coord/cartesian}/cartesianAxisHelper.js +29 -9
- package/lib/coord/cartesian/prepareCustom.js +18 -0
- package/lib/coord/geo/Geo.js +18 -0
- package/lib/coord/geo/GeoModel.js +18 -0
- package/lib/coord/geo/Region.js +19 -0
- package/lib/coord/geo/fix/diaoyuIsland.js +18 -0
- package/lib/coord/geo/fix/geoCoord.js +18 -0
- package/lib/coord/geo/fix/nanhai.js +18 -0
- package/lib/coord/geo/fix/textCoord.js +18 -0
- package/lib/coord/geo/geoCreator.js +19 -0
- package/lib/coord/geo/parseGeoJson.js +19 -0
- package/lib/coord/geo/prepareCustom.js +23 -3
- package/lib/coord/parallel/AxisModel.js +31 -4
- package/lib/coord/parallel/Parallel.js +35 -12
- package/lib/coord/parallel/ParallelAxis.js +19 -0
- package/lib/coord/parallel/ParallelModel.js +18 -0
- package/lib/coord/parallel/parallelCreator.js +19 -0
- package/lib/coord/parallel/parallelPreprocessor.js +18 -0
- package/lib/coord/polar/AngleAxis.js +18 -0
- package/lib/coord/polar/AxisModel.js +18 -0
- package/lib/coord/polar/Polar.js +19 -0
- package/lib/coord/polar/PolarModel.js +18 -0
- package/lib/coord/polar/RadiusAxis.js +18 -0
- package/lib/coord/polar/polarCreator.js +24 -3
- package/lib/coord/polar/prepareCustom.js +18 -0
- package/lib/coord/radar/IndicatorAxis.js +18 -0
- package/lib/coord/radar/Radar.js +18 -0
- package/lib/coord/radar/RadarModel.js +18 -0
- package/lib/coord/single/AxisModel.js +18 -0
- package/lib/coord/single/Single.js +19 -0
- package/lib/coord/single/SingleAxis.js +19 -5
- package/lib/coord/single/prepareCustom.js +18 -0
- package/lib/{component/axis → coord/single}/singleAxisHelper.js +20 -2
- package/lib/coord/single/singleCreator.js +19 -0
- package/lib/data/DataDiffer.js +18 -0
- package/lib/data/Graph.js +19 -0
- package/lib/data/List.js +413 -201
- package/lib/data/OrdinalMeta.js +19 -0
- package/lib/data/Source.js +19 -0
- package/lib/data/Tree.js +19 -0
- package/lib/data/helper/completeDimensions.js +63 -22
- package/lib/data/helper/createDimensions.js +23 -4
- package/lib/data/helper/dataProvider.js +63 -6
- package/lib/data/helper/dataStackHelper.js +162 -0
- package/lib/data/helper/dimensionHelper.js +46 -10
- package/lib/data/helper/linkList.js +19 -0
- package/lib/data/helper/sourceHelper.js +19 -0
- package/lib/data/helper/sourceType.js +18 -0
- package/lib/echarts.js +128 -118
- package/lib/export.js +19 -0
- package/lib/helper.js +41 -0
- package/lib/lang.js +18 -0
- package/lib/langEN.js +18 -0
- package/lib/langFI.js +18 -0
- package/lib/langTH.js +18 -0
- package/lib/layout/barGrid.js +178 -53
- package/lib/layout/barPolar.js +88 -71
- package/lib/layout/points.js +39 -4
- package/lib/loading/default.js +18 -0
- package/lib/model/Component.js +19 -0
- package/lib/model/Global.js +30 -2
- package/lib/model/Model.js +19 -0
- package/lib/model/OptionManager.js +19 -0
- package/lib/model/Series.js +23 -5
- package/lib/model/globalDefault.js +21 -5
- package/lib/model/mixin/areaStyle.js +18 -0
- package/lib/model/mixin/boxLayout.js +18 -0
- package/lib/model/mixin/colorPalette.js +27 -0
- package/lib/model/mixin/dataFormat.js +20 -1
- package/lib/model/mixin/itemStyle.js +18 -0
- package/lib/model/mixin/lineStyle.js +18 -0
- package/lib/model/mixin/makeStyleMapper.js +18 -0
- package/lib/model/mixin/textStyle.js +18 -0
- package/lib/model/referHelper.js +19 -0
- package/lib/preprocessor/backwardCompat.js +18 -0
- package/lib/preprocessor/helper/compatStyle.js +42 -15
- package/lib/processor/dataFilter.js +19 -1
- package/lib/processor/dataSample.js +27 -5
- package/lib/processor/dataStack.js +118 -0
- package/lib/scale/Interval.js +19 -14
- package/lib/scale/Log.js +22 -3
- package/lib/scale/Ordinal.js +27 -2
- package/lib/scale/Scale.js +27 -16
- package/lib/scale/Time.js +18 -0
- package/lib/scale/helper.js +19 -0
- package/lib/stream/Scheduler.js +123 -37
- package/lib/stream/task.js +165 -14
- package/lib/theme/dark.js +18 -0
- package/lib/theme/light.js +18 -0
- package/lib/util/KDTree.js +19 -0
- package/lib/util/animation.js +19 -0
- package/lib/util/array/nest.js +19 -0
- package/lib/util/clazz.js +18 -0
- package/lib/util/component.js +19 -0
- package/lib/util/format.js +36 -11
- package/lib/util/graphic.js +19 -0
- package/lib/util/layout.js +18 -0
- package/lib/util/model.js +33 -6
- package/lib/util/number.js +18 -0
- package/lib/util/quickSelect.js +19 -0
- package/lib/util/symbol.js +18 -0
- package/lib/util/throttle.js +26 -1
- package/lib/view/Chart.js +44 -7
- package/lib/view/Component.js +18 -0
- package/lib/visual/VisualMapping.js +28 -0
- package/lib/visual/aria.js +18 -0
- package/lib/visual/dataColor.js +19 -1
- package/lib/visual/seriesColor.js +19 -1
- package/lib/visual/symbol.js +28 -2
- package/lib/visual/visualDefault.js +19 -0
- package/lib/visual/visualSolution.js +24 -3
- package/licenses/LICENSE-d3 +27 -0
- package/licenses/LICENSE-zrender +29 -0
- package/map/js/china-contour.js +19 -0
- package/map/js/china.js +19 -0
- package/map/js/province/anhui.js +19 -0
- package/map/js/province/aomen.js +19 -0
- package/map/js/province/beijing.js +19 -0
- package/map/js/province/chongqing.js +19 -0
- package/map/js/province/fujian.js +19 -0
- package/map/js/province/gansu.js +19 -0
- package/map/js/province/guangdong.js +19 -0
- package/map/js/province/guangxi.js +19 -0
- package/map/js/province/guizhou.js +19 -0
- package/map/js/province/hainan.js +19 -0
- package/map/js/province/hebei.js +19 -0
- package/map/js/province/heilongjiang.js +19 -0
- package/map/js/province/henan.js +19 -0
- package/map/js/province/hubei.js +19 -0
- package/map/js/province/hunan.js +19 -0
- package/map/js/province/jiangsu.js +19 -0
- package/map/js/province/jiangxi.js +19 -0
- package/map/js/province/jilin.js +19 -0
- package/map/js/province/liaoning.js +19 -0
- package/map/js/province/neimenggu.js +19 -0
- package/map/js/province/ningxia.js +19 -0
- package/map/js/province/qinghai.js +19 -0
- package/map/js/province/shandong.js +19 -0
- package/map/js/province/shanghai.js +19 -0
- package/map/js/province/shanxi.js +19 -0
- package/map/js/province/shanxi1.js +19 -0
- package/map/js/province/sichuan.js +19 -0
- package/map/js/province/taiwan.js +19 -0
- package/map/js/province/tianjin.js +19 -0
- package/map/js/province/xianggang.js +19 -0
- package/map/js/province/xinjiang.js +19 -0
- package/map/js/province/xizang.js +19 -0
- package/map/js/province/yunnan.js +19 -0
- package/map/js/province/zhejiang.js +19 -0
- package/map/js/world.js +19 -0
- package/package.json +3 -3
- package/src/CoordinateSystem.js +19 -0
- package/src/ExtensionAPI.js +19 -0
- package/src/action/createDataSelectAction.js +19 -0
- package/src/action/geoRoam.js +19 -0
- package/src/action/roamHelper.js +19 -0
- package/src/chart/bar/BarSeries.js +44 -1
- package/src/chart/bar/BarView.js +128 -17
- package/src/chart/bar/BaseBarSeries.js +24 -0
- package/src/chart/bar/PictorialBarSeries.js +19 -0
- package/src/chart/bar/PictorialBarView.js +19 -0
- package/src/chart/bar/barItemStyle.js +19 -0
- package/src/chart/bar/helper.js +20 -1
- package/src/chart/bar.js +28 -7
- package/src/chart/boxplot/BoxplotSeries.js +26 -1
- package/src/chart/boxplot/BoxplotView.js +152 -21
- package/src/chart/boxplot/boxplotLayout.js +75 -71
- package/src/chart/boxplot/boxplotVisual.js +19 -0
- package/src/chart/boxplot.js +19 -0
- package/src/chart/candlestick/CandlestickSeries.js +35 -4
- package/src/chart/candlestick/CandlestickView.js +272 -24
- package/src/chart/candlestick/candlestickLayout.js +151 -97
- package/src/chart/candlestick/candlestickVisual.js +66 -17
- package/src/chart/candlestick/preprocessor.js +19 -0
- package/src/chart/candlestick.js +19 -0
- package/src/chart/chord/ChordSeries.js +19 -0
- package/src/chart/chord/ChordView.js +19 -0
- package/src/chart/chord/Ribbon.js +19 -0
- package/src/chart/chord/chordCircularLayout.js +19 -0
- package/src/chart/chord.js +19 -0
- package/src/chart/custom.js +23 -6
- package/src/chart/effectScatter/EffectScatterSeries.js +19 -0
- package/src/chart/effectScatter/EffectScatterView.js +19 -0
- package/src/chart/effectScatter.js +19 -0
- package/src/chart/funnel/FunnelSeries.js +19 -0
- package/src/chart/funnel/FunnelView.js +19 -0
- package/src/chart/funnel/funnelLayout.js +19 -0
- package/src/chart/funnel.js +19 -0
- package/src/chart/gauge/GaugeSeries.js +19 -0
- package/src/chart/gauge/GaugeView.js +19 -0
- package/src/chart/gauge/PointerPath.js +19 -0
- package/src/chart/gauge.js +19 -0
- package/src/chart/graph/GraphSeries.js +27 -0
- package/src/chart/graph/GraphView.js +19 -0
- package/src/chart/graph/adjustEdge.js +19 -0
- package/src/chart/graph/backwardCompat.js +19 -0
- package/src/chart/graph/categoryFilter.js +19 -0
- package/src/chart/graph/categoryVisual.js +19 -0
- package/src/chart/graph/circularLayout.js +19 -0
- package/src/chart/graph/circularLayoutHelper.js +19 -0
- package/src/chart/graph/createView.js +19 -0
- package/src/chart/graph/edgeVisual.js +19 -0
- package/src/chart/graph/forceHelper.js +19 -0
- package/src/chart/graph/forceLayout.js +19 -0
- package/src/chart/graph/graphAction.js +19 -0
- package/src/chart/graph/simpleLayout.js +19 -0
- package/src/chart/graph/simpleLayoutHelper.js +19 -0
- package/src/chart/graph.js +19 -0
- package/src/chart/heatmap/HeatmapLayer.js +19 -0
- package/src/chart/heatmap/HeatmapSeries.js +22 -1
- package/src/chart/heatmap/HeatmapView.js +19 -0
- package/src/chart/heatmap.js +19 -0
- package/src/chart/helper/EffectLine.js +19 -0
- package/src/chart/helper/EffectPolyline.js +19 -0
- package/src/chart/helper/EffectSymbol.js +19 -0
- package/src/chart/helper/LargeLineDraw.js +20 -0
- package/src/chart/helper/LargeSymbolDraw.js +19 -0
- package/src/chart/helper/Line.js +38 -16
- package/src/chart/helper/LineDraw.js +27 -0
- package/src/chart/helper/LinePath.js +19 -0
- package/src/chart/helper/Polyline.js +19 -0
- package/src/chart/helper/Symbol.js +68 -15
- package/src/chart/helper/SymbolDraw.js +61 -18
- package/src/chart/helper/createGraphFromNodeEdge.js +29 -6
- package/src/chart/helper/createGraphFromNodeMatrix.js +19 -0
- package/src/chart/helper/createListFromArray.js +32 -7
- package/src/chart/helper/createListSimply.js +19 -0
- package/src/chart/helper/createRenderPlanner.js +22 -3
- package/src/chart/helper/labelHelper.js +19 -0
- package/src/chart/helper/treeHelper.js +19 -0
- package/src/chart/helper/whiskerBoxCommon.js +19 -24
- package/src/chart/line/LineSeries.js +35 -11
- package/src/chart/line/LineView.js +174 -105
- package/src/chart/line/helper.js +106 -0
- package/src/chart/line/lineAnimationDiff.js +32 -39
- package/src/chart/line/poly.js +149 -0
- package/src/chart/line.js +19 -0
- package/src/chart/lines/LinesSeries.js +27 -7
- package/src/chart/lines/LinesView.js +21 -1
- package/src/chart/lines/linesLayout.js +20 -1
- package/src/chart/lines/linesVisual.js +19 -0
- package/src/chart/lines.js +19 -0
- package/src/chart/map/MapSeries.js +42 -5
- package/src/chart/map/MapView.js +19 -0
- package/src/chart/map/backwardCompat.js +19 -0
- package/src/chart/map/mapDataStatistic.js +19 -0
- package/src/chart/map/mapSymbolLayout.js +19 -0
- package/src/chart/map/mapVisual.js +19 -0
- package/src/chart/map.js +19 -0
- package/src/chart/parallel/ParallelSeries.js +21 -7
- package/src/chart/parallel/ParallelView.js +90 -58
- package/src/chart/parallel/parallelVisual.js +39 -14
- package/src/chart/parallel.js +19 -0
- package/src/chart/pictorialBar.js +19 -0
- package/src/chart/pie/PieSeries.js +37 -2
- package/src/chart/pie/PieView.js +19 -0
- package/src/chart/pie/labelLayout.js +19 -0
- package/src/chart/pie/pieLayout.js +20 -1
- package/src/chart/pie.js +19 -0
- package/src/chart/radar/RadarSeries.js +21 -2
- package/src/chart/radar/RadarView.js +19 -0
- package/src/chart/radar/backwardCompat.js +19 -0
- package/src/chart/radar/radarLayout.js +20 -1
- package/src/chart/radar.js +19 -0
- package/src/chart/sankey/SankeySeries.js +28 -0
- package/src/chart/sankey/SankeyView.js +62 -11
- package/src/chart/sankey/sankeyAction.js +31 -0
- package/src/chart/sankey/sankeyLayout.js +71 -17
- package/src/chart/sankey/sankeyVisual.js +49 -25
- package/src/chart/sankey.js +20 -0
- package/src/chart/scatter/ScatterSeries.js +21 -2
- package/src/chart/scatter/ScatterView.js +19 -0
- package/src/chart/scatter.js +19 -0
- package/src/chart/sunburst/SunburstPiece.js +72 -20
- package/src/chart/sunburst/SunburstSeries.js +19 -0
- package/src/chart/sunburst/SunburstView.js +39 -17
- package/src/chart/sunburst/sunburstAction.js +19 -0
- package/src/chart/sunburst/sunburstLayout.js +19 -0
- package/src/chart/sunburst.js +19 -0
- package/src/chart/themeRiver/ThemeRiverSeries.js +19 -1
- package/src/chart/themeRiver/ThemeRiverView.js +19 -0
- package/src/chart/themeRiver/themeRiverLayout.js +19 -0
- package/src/chart/themeRiver/themeRiverVisual.js +19 -0
- package/src/chart/themeRiver.js +19 -0
- package/src/chart/tree/TreeSeries.js +38 -2
- package/src/chart/tree/TreeView.js +31 -5
- package/src/chart/tree/layoutHelper.js +19 -0
- package/src/chart/tree/traversalHelper.js +19 -0
- package/src/chart/tree/treeAction.js +19 -0
- package/src/chart/tree/treeLayout.js +128 -0
- package/src/chart/tree.js +21 -4
- package/src/chart/treemap/Breadcrumb.js +19 -0
- package/src/chart/treemap/TreemapSeries.js +19 -0
- package/src/chart/treemap/TreemapView.js +19 -0
- package/src/chart/treemap/helper.js +19 -0
- package/src/chart/treemap/treemapAction.js +19 -0
- package/src/chart/treemap/treemapLayout.js +19 -0
- package/src/chart/treemap/treemapVisual.js +19 -0
- package/src/chart/treemap.js +19 -0
- package/src/component/angleAxis.js +19 -0
- package/src/component/axis/AngleAxisView.js +62 -25
- package/src/component/axis/AxisBuilder.js +68 -94
- package/src/component/axis/AxisView.js +19 -0
- package/src/component/axis/CartesianAxisView.js +69 -54
- package/src/component/axis/ParallelAxisView.js +19 -0
- package/src/component/axis/RadiusAxisView.js +26 -4
- package/src/component/axis/SingleAxisView.js +26 -18
- package/src/component/axis/parallelAxisAction.js +19 -0
- package/src/component/axis.js +19 -0
- package/src/component/axisPointer/AxisPointerModel.js +19 -0
- package/src/component/axisPointer/AxisPointerView.js +19 -0
- package/src/component/axisPointer/BaseAxisPointer.js +19 -0
- package/src/component/axisPointer/CartesianAxisPointer.js +21 -2
- package/src/component/axisPointer/PolarAxisPointer.js +20 -1
- package/src/component/axisPointer/SingleAxisPointer.js +20 -1
- package/src/component/axisPointer/axisTrigger.js +21 -1
- package/src/component/axisPointer/findPointFromSeries.js +19 -0
- package/src/component/axisPointer/globalListener.js +19 -0
- package/src/component/axisPointer/modelHelper.js +21 -1
- package/src/component/axisPointer/viewHelper.js +20 -0
- package/src/component/axisPointer.js +19 -0
- package/src/component/brush/BrushModel.js +26 -1
- package/src/component/brush/BrushView.js +24 -0
- package/src/component/brush/brushAction.js +19 -0
- package/src/component/brush/preprocessor.js +19 -0
- package/src/component/brush/selector.js +19 -0
- package/src/component/brush/visualEncoding.js +19 -0
- package/src/component/brush.js +19 -0
- package/src/component/calendar/CalendarView.js +19 -0
- package/src/component/calendar.js +19 -0
- package/src/component/dataZoom/AxisProxy.js +42 -20
- package/src/component/dataZoom/DataZoomModel.js +19 -0
- package/src/component/dataZoom/DataZoomView.js +19 -0
- package/src/component/dataZoom/InsideZoomModel.js +19 -0
- package/src/component/dataZoom/InsideZoomView.js +37 -10
- package/src/component/dataZoom/SelectZoomModel.js +19 -0
- package/src/component/dataZoom/SelectZoomView.js +19 -0
- package/src/component/dataZoom/SliderZoomModel.js +19 -0
- package/src/component/dataZoom/SliderZoomView.js +30 -5
- package/src/component/dataZoom/dataZoomAction.js +19 -0
- package/src/component/dataZoom/dataZoomProcessor.js +24 -1
- package/src/component/dataZoom/helper.js +19 -0
- package/src/component/dataZoom/history.js +19 -0
- package/src/component/dataZoom/roams.js +20 -15
- package/src/component/dataZoom/typeDefaulter.js +19 -0
- package/src/component/dataZoom.js +19 -0
- package/src/component/dataZoomInside.js +19 -0
- package/src/component/dataZoomSelect.js +19 -0
- package/src/component/dataset.js +63 -3
- package/src/component/geo/GeoView.js +19 -0
- package/src/component/geo.js +19 -0
- package/src/component/graphic.js +19 -0
- package/src/component/grid.js +19 -0
- package/src/component/gridSimple.js +19 -0
- package/src/component/helper/BrushController.js +19 -0
- package/src/component/helper/BrushTargetManager.js +19 -0
- package/src/component/helper/MapDraw.js +19 -0
- package/src/component/helper/RoamController.js +19 -0
- package/src/component/helper/brushHelper.js +19 -0
- package/src/component/helper/cursorHelper.js +19 -0
- package/src/component/helper/interactionMutex.js +19 -0
- package/src/component/helper/listComponent.js +19 -0
- package/src/component/helper/roamHelper.js +19 -0
- package/src/component/helper/selectableMixin.js +22 -12
- package/src/component/helper/sliderMove.js +19 -0
- package/src/component/legend/LegendModel.js +25 -6
- package/src/component/legend/LegendView.js +51 -13
- package/src/component/legend/ScrollableLegendModel.js +19 -0
- package/src/component/legend/ScrollableLegendView.js +19 -0
- package/src/component/legend/legendAction.js +19 -0
- package/src/component/legend/legendFilter.js +19 -0
- package/src/component/legend/scrollableLegendAction.js +19 -0
- package/src/component/legend.js +19 -0
- package/src/component/legendScroll.js +19 -0
- package/src/component/markArea.js +19 -0
- package/src/component/markLine.js +19 -0
- package/src/component/markPoint.js +19 -0
- package/src/component/marker/MarkAreaModel.js +19 -0
- package/src/component/marker/MarkAreaView.js +22 -3
- package/src/component/marker/MarkLineModel.js +19 -0
- package/src/component/marker/MarkLineView.js +22 -3
- package/src/component/marker/MarkPointModel.js +19 -0
- package/src/component/marker/MarkPointView.js +21 -3
- package/src/component/marker/MarkerModel.js +20 -1
- package/src/component/marker/MarkerView.js +19 -0
- package/src/component/marker/markerHelper.js +60 -20
- package/src/component/parallel.js +19 -0
- package/src/component/parallelAxis.js +19 -0
- package/src/component/polar.js +19 -0
- package/src/component/radar/RadarView.js +23 -4
- package/src/component/radar.js +19 -0
- package/src/component/radiusAxis.js +19 -0
- package/src/component/singleAxis.js +19 -0
- package/src/component/timeline/SliderTimelineModel.js +19 -0
- package/src/component/timeline/SliderTimelineView.js +41 -33
- package/src/component/timeline/TimelineAxis.js +25 -43
- package/src/component/timeline/TimelineModel.js +19 -0
- package/src/component/timeline/TimelineView.js +19 -0
- package/src/component/timeline/preprocessor.js +19 -0
- package/src/component/timeline/timelineAction.js +19 -0
- package/src/component/timeline/typeDefaulter.js +19 -0
- package/src/component/timeline.js +19 -0
- package/src/component/title.js +19 -0
- package/src/component/toolbox/ToolboxModel.js +21 -2
- package/src/component/toolbox/ToolboxView.js +19 -0
- package/src/component/toolbox/feature/Brush.js +19 -0
- package/src/component/toolbox/feature/DataView.js +19 -0
- package/src/component/toolbox/feature/DataZoom.js +22 -0
- package/src/component/toolbox/feature/MagicType.js +19 -0
- package/src/component/toolbox/feature/Restore.js +19 -0
- package/src/component/toolbox/feature/SaveAsImage.js +19 -0
- package/src/component/toolbox/featureManager.js +19 -0
- package/src/component/toolbox.js +19 -0
- package/src/component/tooltip/TooltipContent.js +19 -0
- package/src/component/tooltip/TooltipModel.js +19 -0
- package/src/component/tooltip/TooltipView.js +20 -1
- package/src/component/tooltip.js +19 -0
- package/src/component/visualMap/ContinuousModel.js +20 -1
- package/src/component/visualMap/ContinuousView.js +19 -0
- package/src/component/visualMap/PiecewiseModel.js +20 -1
- package/src/component/visualMap/PiecewiseView.js +19 -0
- package/src/component/visualMap/VisualMapModel.js +31 -3
- package/src/component/visualMap/VisualMapView.js +19 -0
- package/src/component/visualMap/helper.js +19 -0
- package/src/component/visualMap/preprocessor.js +19 -0
- package/src/component/visualMap/typeDefaulter.js +19 -0
- package/src/component/visualMap/visualEncoding.js +23 -1
- package/src/component/visualMap/visualMapAction.js +19 -0
- package/src/component/visualMap.js +19 -0
- package/src/component/visualMapContinuous.js +19 -0
- package/src/component/visualMapPiecewise.js +19 -0
- package/src/config.js +19 -0
- package/src/coord/Axis.js +159 -100
- package/src/coord/View.js +19 -0
- package/src/coord/axisDefault.js +68 -41
- package/src/coord/axisHelper.js +142 -93
- package/src/coord/axisModelCommonMixin.js +19 -11
- package/src/coord/axisModelCreator.js +25 -2
- package/src/coord/axisTickLabelBuilder.js +369 -0
- package/src/coord/calendar/Calendar.js +24 -2
- package/src/coord/calendar/CalendarModel.js +19 -0
- package/src/coord/calendar/prepareCustom.js +20 -1
- package/src/coord/cartesian/Axis2D.js +25 -18
- package/src/coord/cartesian/AxisModel.js +19 -0
- package/src/coord/cartesian/Cartesian.js +19 -0
- package/src/coord/cartesian/Cartesian2D.js +27 -4
- package/src/coord/cartesian/Grid.js +65 -76
- package/src/coord/cartesian/GridModel.js +19 -0
- package/src/{component/axis → coord/cartesian}/cartesianAxisHelper.js +28 -9
- package/src/coord/cartesian/prepareCustom.js +19 -0
- package/src/coord/geo/Geo.js +19 -0
- package/src/coord/geo/GeoModel.js +19 -0
- package/src/coord/geo/Region.js +19 -0
- package/src/coord/geo/fix/diaoyuIsland.js +19 -0
- package/src/coord/geo/fix/geoCoord.js +19 -0
- package/src/coord/geo/fix/nanhai.js +19 -0
- package/src/coord/geo/fix/textCoord.js +19 -0
- package/src/coord/geo/geoCreator.js +19 -0
- package/src/coord/geo/parseGeoJson.js +19 -0
- package/src/coord/geo/prepareCustom.js +24 -3
- package/src/coord/parallel/AxisModel.js +32 -3
- package/src/coord/parallel/Parallel.js +38 -12
- package/src/coord/parallel/ParallelAxis.js +19 -0
- package/src/coord/parallel/ParallelModel.js +19 -0
- package/src/coord/parallel/parallelCreator.js +19 -0
- package/src/coord/parallel/parallelPreprocessor.js +19 -0
- package/src/coord/polar/AngleAxis.js +19 -0
- package/src/coord/polar/AxisModel.js +19 -0
- package/src/coord/polar/Polar.js +19 -0
- package/src/coord/polar/PolarModel.js +19 -0
- package/src/coord/polar/RadiusAxis.js +19 -0
- package/src/coord/polar/polarCreator.js +26 -3
- package/src/coord/polar/prepareCustom.js +19 -0
- package/src/coord/radar/IndicatorAxis.js +19 -0
- package/src/coord/radar/Radar.js +19 -0
- package/src/coord/radar/RadarModel.js +19 -0
- package/src/coord/single/AxisModel.js +19 -0
- package/src/coord/single/Single.js +19 -0
- package/src/coord/single/SingleAxis.js +19 -5
- package/src/coord/single/prepareCustom.js +19 -0
- package/src/{component/axis → coord/single}/singleAxisHelper.js +21 -4
- package/src/coord/single/singleCreator.js +19 -0
- package/src/data/DataDiffer.js +19 -0
- package/src/data/Graph.js +20 -1
- package/src/data/List.js +412 -207
- package/src/data/OrdinalMeta.js +19 -0
- package/src/data/Source.js +19 -0
- package/src/data/Tree.js +19 -0
- package/src/data/helper/completeDimensions.js +62 -29
- package/src/data/helper/createDimensions.js +23 -4
- package/src/data/helper/dataProvider.js +61 -6
- package/src/data/helper/dataStackHelper.js +162 -0
- package/src/data/helper/dimensionHelper.js +49 -10
- package/src/data/helper/linkList.js +19 -0
- package/src/data/helper/sourceHelper.js +19 -0
- package/src/data/helper/sourceType.js +19 -0
- package/src/echarts.js +127 -114
- package/src/export.js +19 -0
- package/src/helper.js +30 -1
- package/src/lang.js +19 -0
- package/src/langEN.js +19 -0
- package/src/langFI.js +19 -0
- package/src/langTH.js +19 -0
- package/src/layout/barGrid.js +174 -64
- package/src/layout/barPolar.js +81 -66
- package/src/layout/points.js +32 -4
- package/src/loading/default.js +19 -0
- package/src/model/Component.js +19 -0
- package/src/model/Global.js +29 -2
- package/src/model/Model.js +19 -0
- package/src/model/OptionManager.js +19 -0
- package/src/model/Series.js +23 -5
- package/src/model/globalDefault.js +23 -5
- package/src/model/mixin/areaStyle.js +19 -0
- package/src/model/mixin/boxLayout.js +19 -0
- package/src/model/mixin/colorPalette.js +26 -0
- package/src/model/mixin/dataFormat.js +20 -1
- package/src/model/mixin/itemStyle.js +19 -0
- package/src/model/mixin/lineStyle.js +19 -0
- package/src/model/mixin/makeStyleMapper.js +19 -0
- package/src/model/mixin/textStyle.js +19 -0
- package/src/model/referHelper.js +19 -0
- package/src/preprocessor/backwardCompat.js +19 -0
- package/src/preprocessor/helper/compatStyle.js +45 -15
- package/src/processor/dataFilter.js +20 -1
- package/src/processor/dataSample.js +29 -3
- package/src/processor/dataStack.js +129 -0
- package/src/scale/Interval.js +19 -12
- package/src/scale/Log.js +22 -3
- package/src/scale/Ordinal.js +28 -2
- package/src/scale/Scale.js +27 -13
- package/src/scale/Time.js +19 -0
- package/src/scale/helper.js +19 -0
- package/src/stream/Scheduler.js +124 -32
- package/src/stream/task.js +166 -16
- package/src/theme/dark.js +19 -0
- package/src/theme/light.js +19 -0
- package/src/util/KDTree.js +19 -0
- package/src/util/animation.js +19 -0
- package/src/util/array/nest.js +19 -0
- package/src/util/clazz.js +19 -0
- package/src/util/component.js +19 -0
- package/src/util/format.js +47 -20
- package/src/util/graphic.js +19 -0
- package/src/util/layout.js +19 -0
- package/src/util/model.js +33 -5
- package/src/util/number.js +19 -0
- package/src/util/quickSelect.js +19 -0
- package/src/util/symbol.js +19 -0
- package/src/util/throttle.js +27 -0
- package/src/view/Chart.js +48 -10
- package/src/view/Component.js +19 -0
- package/src/visual/VisualMapping.js +29 -0
- package/src/visual/aria.js +19 -0
- package/src/visual/dataColor.js +21 -1
- package/src/visual/seriesColor.js +20 -1
- package/src/visual/symbol.js +34 -2
- package/src/visual/visualDefault.js +19 -0
- package/src/visual/visualSolution.js +23 -3
- package/theme/dark.js +19 -0
- package/theme/infographic.js +19 -0
- package/theme/macarons.js +19 -0
- package/theme/roma.js +19 -0
- package/theme/shine.js +19 -0
- package/theme/vintage.js +19 -0
- package/build/rollup-plugin-ec-dev.js +0 -38
- package/lib/chart/helper/WhiskerBoxDraw.js +0 -201
- package/lib/chart/tree/commonLayout.js +0 -108
- package/lib/chart/tree/orthogonalLayout.js +0 -9
- package/lib/chart/tree/radialLayout.js +0 -9
- package/lib/component/dataset/DatasetModel.js +0 -29
- package/src/chart/helper/WhiskerBoxDraw.js +0 -213
- package/src/chart/tree/commonLayout.js +0 -96
- package/src/chart/tree/orthogonalLayout.js +0 -7
- package/src/chart/tree/radialLayout.js +0 -7
- package/src/component/dataset/DatasetModel.js +0 -31
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
1
20
|
// FIXME step not support polar
|
|
2
21
|
|
|
3
22
|
import {__DEV__} from '../../config';
|
|
@@ -9,6 +28,8 @@ import * as graphic from '../../util/graphic';
|
|
|
9
28
|
import * as modelUtil from '../../util/model';
|
|
10
29
|
import {Polyline, Polygon} from './poly';
|
|
11
30
|
import ChartView from '../../view/Chart';
|
|
31
|
+
import {round} from '../../util/number';
|
|
32
|
+
import {prepareDataCoordInfo, getStackedOnPoint} from './helper';
|
|
12
33
|
|
|
13
34
|
function isPointsSame(points1, points2) {
|
|
14
35
|
if (points1.length !== points2.length) {
|
|
@@ -25,7 +46,7 @@ function isPointsSame(points1, points2) {
|
|
|
25
46
|
}
|
|
26
47
|
|
|
27
48
|
function getSmooth(smooth) {
|
|
28
|
-
return typeof (smooth) === 'number' ? smooth : (smooth ? 0.
|
|
49
|
+
return typeof (smooth) === 'number' ? smooth : (smooth ? 0.5 : 0);
|
|
29
50
|
}
|
|
30
51
|
|
|
31
52
|
function getAxisExtentWithGap(axis) {
|
|
@@ -40,71 +61,26 @@ function getAxisExtentWithGap(axis) {
|
|
|
40
61
|
return extent;
|
|
41
62
|
}
|
|
42
63
|
|
|
43
|
-
function sign(val) {
|
|
44
|
-
return val >= 0 ? 1 : -1;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
64
|
/**
|
|
48
65
|
* @param {module:echarts/coord/cartesian/Cartesian2D|module:echarts/coord/polar/Polar} coordSys
|
|
49
66
|
* @param {module:echarts/data/List} data
|
|
67
|
+
* @param {Object} dataCoordInfo
|
|
50
68
|
* @param {Array.<Array.<number>>} points
|
|
51
|
-
* @param {string} origin origin of areaStyle. Valid values: 'auto', 'start',
|
|
52
|
-
* 'end'.
|
|
53
|
-
* auto: from axisLine to data
|
|
54
|
-
* start: from min to data
|
|
55
|
-
* end: from data to max
|
|
56
|
-
* @private
|
|
57
69
|
*/
|
|
58
|
-
function getStackedOnPoints(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
var valueStart = 0;
|
|
63
|
-
var extent = valueAxis.scale.getExtent();
|
|
64
|
-
if (origin === 'start') {
|
|
65
|
-
valueStart = extent[0];
|
|
66
|
-
}
|
|
67
|
-
else if (origin === 'end') {
|
|
68
|
-
valueStart = extent[1];
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
// auto
|
|
72
|
-
var extent = valueAxis.scale.getExtent();
|
|
73
|
-
if (extent[0] > 0) {
|
|
74
|
-
// Both positive
|
|
75
|
-
valueStart = extent[0];
|
|
76
|
-
}
|
|
77
|
-
else if (extent[1] < 0) {
|
|
78
|
-
// Both negative
|
|
79
|
-
valueStart = extent[1];
|
|
80
|
-
}
|
|
81
|
-
// If is one positive, and one negative, onZero shall be true
|
|
70
|
+
function getStackedOnPoints(coordSys, data, dataCoordInfo) {
|
|
71
|
+
if (!dataCoordInfo.valueDim) {
|
|
72
|
+
return [];
|
|
82
73
|
}
|
|
83
74
|
|
|
84
|
-
var
|
|
85
|
-
var
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return data.mapArray(valueDim ? [valueDim] : [], function (val, idx) {
|
|
89
|
-
var stackedOnSameSign;
|
|
90
|
-
var stackedOn = data.stackedOn;
|
|
91
|
-
// Find first stacked value with same sign
|
|
92
|
-
while (stackedOn &&
|
|
93
|
-
sign(stackedOn.get(valueDim, idx)) === sign(val)
|
|
94
|
-
) {
|
|
95
|
-
stackedOnSameSign = stackedOn;
|
|
96
|
-
break;
|
|
97
|
-
}
|
|
98
|
-
var stackedData = [];
|
|
99
|
-
stackedData[baseDataOffset] = data.get(baseAxis.dim, idx);
|
|
100
|
-
stackedData[1 - baseDataOffset] = stackedOnSameSign
|
|
101
|
-
? stackedOnSameSign.get(valueDim, idx, true) : valueStart;
|
|
75
|
+
var points = [];
|
|
76
|
+
for (var idx = 0, len = data.count(); idx < len; idx++) {
|
|
77
|
+
points.push(getStackedOnPoint(dataCoordInfo, coordSys, data, idx));
|
|
78
|
+
}
|
|
102
79
|
|
|
103
|
-
|
|
104
|
-
}, true);
|
|
80
|
+
return points;
|
|
105
81
|
}
|
|
106
82
|
|
|
107
|
-
function createGridClipShape(cartesian, hasAnimation, seriesModel) {
|
|
83
|
+
function createGridClipShape(cartesian, hasAnimation, forSymbol, seriesModel) {
|
|
108
84
|
var xExtent = getAxisExtentWithGap(cartesian.getAxis('x'));
|
|
109
85
|
var yExtent = getAxisExtentWithGap(cartesian.getAxis('y'));
|
|
110
86
|
var isHorizontal = cartesian.getBaseAxis().isHorizontal();
|
|
@@ -113,16 +89,27 @@ function createGridClipShape(cartesian, hasAnimation, seriesModel) {
|
|
|
113
89
|
var y = Math.min(yExtent[0], yExtent[1]);
|
|
114
90
|
var width = Math.max(xExtent[0], xExtent[1]) - x;
|
|
115
91
|
var height = Math.max(yExtent[0], yExtent[1]) - y;
|
|
116
|
-
|
|
117
|
-
//
|
|
118
|
-
|
|
119
|
-
if (
|
|
120
|
-
|
|
121
|
-
|
|
92
|
+
|
|
93
|
+
// Avoid float number rounding error for symbol on the edge of axis extent.
|
|
94
|
+
// See #7913 and `test/dataZoom-clip.html`.
|
|
95
|
+
if (forSymbol) {
|
|
96
|
+
x -= 0.5;
|
|
97
|
+
width += 0.5;
|
|
98
|
+
y -= 0.5;
|
|
99
|
+
height += 0.5;
|
|
122
100
|
}
|
|
123
101
|
else {
|
|
124
|
-
|
|
125
|
-
|
|
102
|
+
var lineWidth = seriesModel.get('lineStyle.width') || 2;
|
|
103
|
+
// Expand clip shape to avoid clipping when line value exceeds axis
|
|
104
|
+
var expandSize = seriesModel.get('clipOverflow') ? lineWidth / 2 : Math.max(width, height);
|
|
105
|
+
if (isHorizontal) {
|
|
106
|
+
y -= expandSize;
|
|
107
|
+
height += expandSize * 2;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
x -= expandSize;
|
|
111
|
+
width += expandSize * 2;
|
|
112
|
+
}
|
|
126
113
|
}
|
|
127
114
|
|
|
128
115
|
var clipPath = new graphic.Rect({
|
|
@@ -147,21 +134,28 @@ function createGridClipShape(cartesian, hasAnimation, seriesModel) {
|
|
|
147
134
|
return clipPath;
|
|
148
135
|
}
|
|
149
136
|
|
|
150
|
-
function createPolarClipShape(polar, hasAnimation, seriesModel) {
|
|
137
|
+
function createPolarClipShape(polar, hasAnimation, forSymbol, seriesModel) {
|
|
151
138
|
var angleAxis = polar.getAngleAxis();
|
|
152
139
|
var radiusAxis = polar.getRadiusAxis();
|
|
153
140
|
|
|
154
|
-
var radiusExtent = radiusAxis.getExtent();
|
|
141
|
+
var radiusExtent = radiusAxis.getExtent().slice();
|
|
142
|
+
radiusExtent[0] > radiusExtent[1] && radiusExtent.reverse();
|
|
155
143
|
var angleExtent = angleAxis.getExtent();
|
|
156
144
|
|
|
157
145
|
var RADIAN = Math.PI / 180;
|
|
158
146
|
|
|
147
|
+
// Avoid float number rounding error for symbol on the edge of axis extent.
|
|
148
|
+
if (forSymbol) {
|
|
149
|
+
radiusExtent[0] -= 0.5;
|
|
150
|
+
radiusExtent[1] += 0.5;
|
|
151
|
+
}
|
|
152
|
+
|
|
159
153
|
var clipPath = new graphic.Sector({
|
|
160
154
|
shape: {
|
|
161
|
-
cx: polar.cx,
|
|
162
|
-
cy: polar.cy,
|
|
163
|
-
r0: radiusExtent[0],
|
|
164
|
-
r: radiusExtent[1],
|
|
155
|
+
cx: round(polar.cx, 1),
|
|
156
|
+
cy: round(polar.cy, 1),
|
|
157
|
+
r0: round(radiusExtent[0], 1),
|
|
158
|
+
r: round(radiusExtent[1], 1),
|
|
165
159
|
startAngle: -angleExtent[0] * RADIAN,
|
|
166
160
|
endAngle: -angleExtent[1] * RADIAN,
|
|
167
161
|
clockwise: angleAxis.inverse
|
|
@@ -180,10 +174,10 @@ function createPolarClipShape(polar, hasAnimation, seriesModel) {
|
|
|
180
174
|
return clipPath;
|
|
181
175
|
}
|
|
182
176
|
|
|
183
|
-
function createClipShape(coordSys, hasAnimation, seriesModel) {
|
|
177
|
+
function createClipShape(coordSys, hasAnimation, forSymbol, seriesModel) {
|
|
184
178
|
return coordSys.type === 'polar'
|
|
185
|
-
? createPolarClipShape(coordSys, hasAnimation, seriesModel)
|
|
186
|
-
: createGridClipShape(coordSys, hasAnimation, seriesModel);
|
|
179
|
+
? createPolarClipShape(coordSys, hasAnimation, forSymbol, seriesModel)
|
|
180
|
+
: createGridClipShape(coordSys, hasAnimation, forSymbol, seriesModel);
|
|
187
181
|
}
|
|
188
182
|
|
|
189
183
|
function turnPointsIntoStep(points, coordSys, stepTurnAt) {
|
|
@@ -233,15 +227,29 @@ function getVisualGradient(data, coordSys) {
|
|
|
233
227
|
return;
|
|
234
228
|
}
|
|
235
229
|
|
|
230
|
+
if (coordSys.type !== 'cartesian2d') {
|
|
231
|
+
if (__DEV__) {
|
|
232
|
+
console.warn('Visual map on line style is only supported on cartesian2d.');
|
|
233
|
+
}
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
var coordDim;
|
|
236
238
|
var visualMeta;
|
|
239
|
+
|
|
237
240
|
for (var i = visualMetaList.length - 1; i >= 0; i--) {
|
|
241
|
+
var dimIndex = visualMetaList[i].dimension;
|
|
242
|
+
var dimName = data.dimensions[dimIndex];
|
|
243
|
+
var dimInfo = data.getDimensionInfo(dimName);
|
|
244
|
+
coordDim = dimInfo && dimInfo.coordDim;
|
|
238
245
|
// Can only be x or y
|
|
239
|
-
if (
|
|
246
|
+
if (coordDim === 'x' || coordDim === 'y') {
|
|
240
247
|
visualMeta = visualMetaList[i];
|
|
241
248
|
break;
|
|
242
249
|
}
|
|
243
250
|
}
|
|
244
|
-
|
|
251
|
+
|
|
252
|
+
if (!visualMeta) {
|
|
245
253
|
if (__DEV__) {
|
|
246
254
|
console.warn('Visual map on line style only support x or y dimension.');
|
|
247
255
|
}
|
|
@@ -255,9 +263,7 @@ function getVisualGradient(data, coordSys) {
|
|
|
255
263
|
// LinearGradient. So we can only infinitesimally extend area defined in
|
|
256
264
|
// LinearGradient to render `outerColors`.
|
|
257
265
|
|
|
258
|
-
var
|
|
259
|
-
var dimName = data.dimensions[dimension];
|
|
260
|
-
var axis = coordSys.getAxis(dimName);
|
|
266
|
+
var axis = coordSys.getAxis(coordDim);
|
|
261
267
|
|
|
262
268
|
// dataToCoor mapping may not be linear, but must be monotonic.
|
|
263
269
|
var colorStops = zrUtil.map(visualMeta.stops, function (stop) {
|
|
@@ -301,12 +307,75 @@ function getVisualGradient(data, coordSys) {
|
|
|
301
307
|
// });
|
|
302
308
|
|
|
303
309
|
var gradient = new graphic.LinearGradient(0, 0, 0, 0, colorStops, true);
|
|
304
|
-
gradient[
|
|
305
|
-
gradient[
|
|
310
|
+
gradient[coordDim] = minCoord;
|
|
311
|
+
gradient[coordDim + '2'] = maxCoord;
|
|
306
312
|
|
|
307
313
|
return gradient;
|
|
308
314
|
}
|
|
309
315
|
|
|
316
|
+
function getIsIgnoreFunc(seriesModel, data, coordSys) {
|
|
317
|
+
var showAllSymbol = seriesModel.get('showAllSymbol');
|
|
318
|
+
var isAuto = showAllSymbol === 'auto';
|
|
319
|
+
|
|
320
|
+
if (showAllSymbol && !isAuto) {
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
var categoryAxis = coordSys.getAxesByScale('ordinal')[0];
|
|
325
|
+
if (!categoryAxis) {
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// Note that category label interval strategy might bring some weird effect
|
|
330
|
+
// in some scenario: users may wonder why some of the symbols are not
|
|
331
|
+
// displayed. So we show all symbols as possible as we can.
|
|
332
|
+
if (isAuto
|
|
333
|
+
// Simplify the logic, do not determine label overlap here.
|
|
334
|
+
&& canShowAllSymbolForCategory(categoryAxis, data)
|
|
335
|
+
) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// Otherwise follow the label interval strategy on category axis.
|
|
340
|
+
var categoryDataDim = data.mapDimension(categoryAxis.dim);
|
|
341
|
+
var labelMap = {};
|
|
342
|
+
|
|
343
|
+
zrUtil.each(categoryAxis.getViewLabels(), function (labelItem) {
|
|
344
|
+
labelMap[labelItem.tickValue] = 1;
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
return function (dataIndex) {
|
|
348
|
+
return !labelMap.hasOwnProperty(data.get(categoryDataDim, dataIndex));
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
function canShowAllSymbolForCategory(categoryAxis, data) {
|
|
353
|
+
// In mose cases, line is monotonous on category axis, and the label size
|
|
354
|
+
// is close with each other. So we check the symbol size and some of the
|
|
355
|
+
// label size alone with the category axis to estimate whether all symbol
|
|
356
|
+
// can be shown without overlap.
|
|
357
|
+
var axisExtent = categoryAxis.getExtent();
|
|
358
|
+
var availSize = Math.abs(axisExtent[1] - axisExtent[0]) / categoryAxis.scale.count();
|
|
359
|
+
isNaN(availSize) && (availSize = 0); // 0/0 is NaN.
|
|
360
|
+
|
|
361
|
+
// Sampling some points, max 5.
|
|
362
|
+
var dataLen = data.count();
|
|
363
|
+
var step = Math.max(1, Math.round(dataLen / 5));
|
|
364
|
+
for (var dataIndex = 0; dataIndex < dataLen; dataIndex += step) {
|
|
365
|
+
if (SymbolClz.getSymbolSize(
|
|
366
|
+
data, dataIndex
|
|
367
|
+
// Only for cartesian, where `isHorizontal` exists.
|
|
368
|
+
)[categoryAxis.isHorizontal() ? 1 : 0]
|
|
369
|
+
// Empirical number
|
|
370
|
+
* 1.5 > availSize
|
|
371
|
+
) {
|
|
372
|
+
return false;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return true;
|
|
377
|
+
}
|
|
378
|
+
|
|
310
379
|
export default ChartView.extend({
|
|
311
380
|
|
|
312
381
|
type: 'line',
|
|
@@ -328,7 +397,7 @@ export default ChartView.extend({
|
|
|
328
397
|
var lineStyleModel = seriesModel.getModel('lineStyle');
|
|
329
398
|
var areaStyleModel = seriesModel.getModel('areaStyle');
|
|
330
399
|
|
|
331
|
-
var points = data.mapArray(data.getItemLayout
|
|
400
|
+
var points = data.mapArray(data.getItemLayout);
|
|
332
401
|
|
|
333
402
|
var isCoordSysPolar = coordSys.type === 'polar';
|
|
334
403
|
var prevCoordSys = this._coordSys;
|
|
@@ -342,13 +411,16 @@ export default ChartView.extend({
|
|
|
342
411
|
var hasAnimation = seriesModel.get('animation');
|
|
343
412
|
|
|
344
413
|
var isAreaChart = !areaStyleModel.isEmpty();
|
|
345
|
-
|
|
346
|
-
var
|
|
414
|
+
|
|
415
|
+
var valueOrigin = areaStyleModel.get('origin');
|
|
416
|
+
var dataCoordInfo = prepareDataCoordInfo(coordSys, data, valueOrigin);
|
|
417
|
+
|
|
418
|
+
var stackedOnPoints = getStackedOnPoints(coordSys, data, dataCoordInfo);
|
|
347
419
|
|
|
348
420
|
var showSymbol = seriesModel.get('showSymbol');
|
|
349
421
|
|
|
350
|
-
var
|
|
351
|
-
&&
|
|
422
|
+
var isIgnoreFunc = showSymbol && !isCoordSysPolar
|
|
423
|
+
&& getIsIgnoreFunc(seriesModel, data, coordSys);
|
|
352
424
|
|
|
353
425
|
// Remove temporary symbols
|
|
354
426
|
var oldData = this._data;
|
|
@@ -372,7 +444,10 @@ export default ChartView.extend({
|
|
|
372
444
|
if (
|
|
373
445
|
!(polyline && prevCoordSys.type === coordSys.type && step === this._step)
|
|
374
446
|
) {
|
|
375
|
-
showSymbol && symbolDraw.updateData(data,
|
|
447
|
+
showSymbol && symbolDraw.updateData(data, {
|
|
448
|
+
isIgnore: isIgnoreFunc,
|
|
449
|
+
clipShape: createClipShape(coordSys, false, true, seriesModel)
|
|
450
|
+
});
|
|
376
451
|
|
|
377
452
|
if (step) {
|
|
378
453
|
// TODO If stacked series is not step
|
|
@@ -387,7 +462,7 @@ export default ChartView.extend({
|
|
|
387
462
|
coordSys, hasAnimation
|
|
388
463
|
);
|
|
389
464
|
}
|
|
390
|
-
lineGroup.setClipPath(createClipShape(coordSys, true, seriesModel));
|
|
465
|
+
lineGroup.setClipPath(createClipShape(coordSys, true, false, seriesModel));
|
|
391
466
|
}
|
|
392
467
|
else {
|
|
393
468
|
if (isAreaChart && !polygon) {
|
|
@@ -404,11 +479,14 @@ export default ChartView.extend({
|
|
|
404
479
|
}
|
|
405
480
|
|
|
406
481
|
// Update clipPath
|
|
407
|
-
lineGroup.setClipPath(createClipShape(coordSys, false, seriesModel));
|
|
482
|
+
lineGroup.setClipPath(createClipShape(coordSys, false, false, seriesModel));
|
|
408
483
|
|
|
409
484
|
// Always update, or it is wrong in the case turning on legend
|
|
410
485
|
// because points are not changed
|
|
411
|
-
showSymbol && symbolDraw.updateData(data,
|
|
486
|
+
showSymbol && symbolDraw.updateData(data, {
|
|
487
|
+
isIgnore: isIgnoreFunc,
|
|
488
|
+
clipShape: createClipShape(coordSys, false, true, seriesModel)
|
|
489
|
+
});
|
|
412
490
|
|
|
413
491
|
// Stop symbol animation and sync with line points
|
|
414
492
|
// FIXME performance?
|
|
@@ -423,7 +501,7 @@ export default ChartView.extend({
|
|
|
423
501
|
) {
|
|
424
502
|
if (hasAnimation) {
|
|
425
503
|
this._updateAnimation(
|
|
426
|
-
data, stackedOnPoints, coordSys, api, step
|
|
504
|
+
data, stackedOnPoints, coordSys, api, step, valueOrigin
|
|
427
505
|
);
|
|
428
506
|
}
|
|
429
507
|
else {
|
|
@@ -466,7 +544,7 @@ export default ChartView.extend({
|
|
|
466
544
|
});
|
|
467
545
|
|
|
468
546
|
if (polygon) {
|
|
469
|
-
var
|
|
547
|
+
var stackedOnSeries = data.getCalculationInfo('stackedOnSeries');
|
|
470
548
|
var stackedOnSmooth = 0;
|
|
471
549
|
|
|
472
550
|
polygon.useStyle(zrUtil.defaults(
|
|
@@ -478,8 +556,7 @@ export default ChartView.extend({
|
|
|
478
556
|
}
|
|
479
557
|
));
|
|
480
558
|
|
|
481
|
-
if (
|
|
482
|
-
var stackedOnSeries = stackedOn.hostModel;
|
|
559
|
+
if (stackedOnSeries) {
|
|
483
560
|
stackedOnSmooth = getSmooth(stackedOnSeries.get('smooth'));
|
|
484
561
|
}
|
|
485
562
|
|
|
@@ -497,6 +574,7 @@ export default ChartView.extend({
|
|
|
497
574
|
this._stackedOnPoints = stackedOnPoints;
|
|
498
575
|
this._points = points;
|
|
499
576
|
this._step = step;
|
|
577
|
+
this._valueOrigin = valueOrigin;
|
|
500
578
|
},
|
|
501
579
|
|
|
502
580
|
dispose: function () {},
|
|
@@ -617,22 +695,12 @@ export default ChartView.extend({
|
|
|
617
695
|
this._polygon = polygon;
|
|
618
696
|
return polygon;
|
|
619
697
|
},
|
|
620
|
-
/**
|
|
621
|
-
* @private
|
|
622
|
-
*/
|
|
623
|
-
_getSymbolIgnoreFunc: function (data, coordSys) {
|
|
624
|
-
var categoryAxis = coordSys.getAxesByScale('ordinal')[0];
|
|
625
|
-
// `getLabelInterval` is provided by echarts/component/axis
|
|
626
|
-
if (categoryAxis && categoryAxis.isLabelIgnored) {
|
|
627
|
-
return zrUtil.bind(categoryAxis.isLabelIgnored, categoryAxis);
|
|
628
|
-
}
|
|
629
|
-
},
|
|
630
698
|
|
|
631
699
|
/**
|
|
632
700
|
* @private
|
|
633
701
|
*/
|
|
634
702
|
// FIXME Two value axis
|
|
635
|
-
_updateAnimation: function (data, stackedOnPoints, coordSys, api, step) {
|
|
703
|
+
_updateAnimation: function (data, stackedOnPoints, coordSys, api, step, valueOrigin) {
|
|
636
704
|
var polyline = this._polyline;
|
|
637
705
|
var polygon = this._polygon;
|
|
638
706
|
var seriesModel = data.hostModel;
|
|
@@ -640,7 +708,8 @@ export default ChartView.extend({
|
|
|
640
708
|
var diff = lineAnimationDiff(
|
|
641
709
|
this._data, data,
|
|
642
710
|
this._stackedOnPoints, stackedOnPoints,
|
|
643
|
-
this._coordSys, coordSys
|
|
711
|
+
this._coordSys, coordSys,
|
|
712
|
+
this._valueOrigin, valueOrigin
|
|
644
713
|
);
|
|
645
714
|
|
|
646
715
|
var current = diff.current;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import {isDimensionStacked} from '../../data/helper/dataStackHelper';
|
|
21
|
+
import {map} from 'zrender/src/core/util';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @param {Object} coordSys
|
|
25
|
+
* @param {module:echarts/data/List} data
|
|
26
|
+
* @param {string} valueOrigin lineSeries.option.areaStyle.origin
|
|
27
|
+
*/
|
|
28
|
+
export function prepareDataCoordInfo(coordSys, data, valueOrigin) {
|
|
29
|
+
var baseAxis = coordSys.getBaseAxis();
|
|
30
|
+
var valueAxis = coordSys.getOtherAxis(baseAxis);
|
|
31
|
+
var valueStart = getValueStart(valueAxis, valueOrigin);
|
|
32
|
+
|
|
33
|
+
var baseAxisDim = baseAxis.dim;
|
|
34
|
+
var valueAxisDim = valueAxis.dim;
|
|
35
|
+
var valueDim = data.mapDimension(valueAxisDim);
|
|
36
|
+
var baseDim = data.mapDimension(baseAxisDim);
|
|
37
|
+
var baseDataOffset = valueAxisDim === 'x' || valueAxisDim === 'radius' ? 1 : 0;
|
|
38
|
+
|
|
39
|
+
var dims = map(coordSys.dimensions, function (coordDim) {
|
|
40
|
+
return data.mapDimension(coordDim);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
var stacked;
|
|
44
|
+
var stackResultDim = data.getCalculationInfo('stackResultDimension');
|
|
45
|
+
if (stacked |= isDimensionStacked(data, dims[0] /*, dims[1]*/)) { // jshint ignore:line
|
|
46
|
+
dims[0] = stackResultDim;
|
|
47
|
+
}
|
|
48
|
+
if (stacked |= isDimensionStacked(data, dims[1] /*, dims[0]*/)) { // jshint ignore:line
|
|
49
|
+
dims[1] = stackResultDim;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return {
|
|
53
|
+
dataDimsForPoint: dims,
|
|
54
|
+
valueStart: valueStart,
|
|
55
|
+
valueAxisDim: valueAxisDim,
|
|
56
|
+
baseAxisDim: baseAxisDim,
|
|
57
|
+
stacked: !!stacked,
|
|
58
|
+
valueDim: valueDim,
|
|
59
|
+
baseDim: baseDim,
|
|
60
|
+
baseDataOffset: baseDataOffset,
|
|
61
|
+
stackedOverDimension: data.getCalculationInfo('stackedOverDimension')
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function getValueStart(valueAxis, valueOrigin) {
|
|
66
|
+
var valueStart = 0;
|
|
67
|
+
var extent = valueAxis.scale.getExtent();
|
|
68
|
+
|
|
69
|
+
if (valueOrigin === 'start') {
|
|
70
|
+
valueStart = extent[0];
|
|
71
|
+
}
|
|
72
|
+
else if (valueOrigin === 'end') {
|
|
73
|
+
valueStart = extent[1];
|
|
74
|
+
}
|
|
75
|
+
// auto
|
|
76
|
+
else {
|
|
77
|
+
// Both positive
|
|
78
|
+
if (extent[0] > 0) {
|
|
79
|
+
valueStart = extent[0];
|
|
80
|
+
}
|
|
81
|
+
// Both negative
|
|
82
|
+
else if (extent[1] < 0) {
|
|
83
|
+
valueStart = extent[1];
|
|
84
|
+
}
|
|
85
|
+
// If is one positive, and one negative, onZero shall be true
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return valueStart;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function getStackedOnPoint(dataCoordInfo, coordSys, data, idx) {
|
|
92
|
+
var value = NaN;
|
|
93
|
+
if (dataCoordInfo.stacked) {
|
|
94
|
+
value = data.get(data.getCalculationInfo('stackedOverDimension'), idx);
|
|
95
|
+
}
|
|
96
|
+
if (isNaN(value)) {
|
|
97
|
+
value = dataCoordInfo.valueStart;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
var baseDataOffset = dataCoordInfo.baseDataOffset;
|
|
101
|
+
var stackedData = [];
|
|
102
|
+
stackedData[baseDataOffset] = data.get(dataCoordInfo.baseDim, idx);
|
|
103
|
+
stackedData[1 - baseDataOffset] = value;
|
|
104
|
+
|
|
105
|
+
return coordSys.dataToPoint(stackedData);
|
|
106
|
+
}
|
|
@@ -1,39 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import {prepareDataCoordInfo, getStackedOnPoint} from './helper';
|
|
1
21
|
|
|
2
22
|
// var arrayDiff = require('zrender/src/core/arrayDiff');
|
|
3
23
|
// 'zrender/src/core/arrayDiff' has been used before, but it did
|
|
4
24
|
// not do well in performance when roam with fixed dataZoom window.
|
|
5
25
|
|
|
6
|
-
function sign(val) {
|
|
7
|
-
return val >= 0 ? 1 : -1;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function getStackedOnPoint(coordSys, data, idx) {
|
|
11
|
-
var baseAxis = coordSys.getBaseAxis();
|
|
12
|
-
var valueAxis = coordSys.getOtherAxis(baseAxis);
|
|
13
|
-
var valueStart = baseAxis.onZero
|
|
14
|
-
? 0 : valueAxis.scale.getExtent()[0];
|
|
15
|
-
|
|
16
|
-
var valueDim = valueAxis.dim;
|
|
17
|
-
var baseDataOffset = valueDim === 'x' || valueDim === 'radius' ? 1 : 0;
|
|
18
|
-
|
|
19
|
-
var stackedOnSameSign;
|
|
20
|
-
var stackedOn = data.stackedOn;
|
|
21
|
-
var val = data.get(valueDim, idx);
|
|
22
|
-
// Find first stacked value with same sign
|
|
23
|
-
while (stackedOn &&
|
|
24
|
-
sign(stackedOn.get(valueDim, idx)) === sign(val)
|
|
25
|
-
) {
|
|
26
|
-
stackedOnSameSign = stackedOn;
|
|
27
|
-
break;
|
|
28
|
-
}
|
|
29
|
-
var stackedData = [];
|
|
30
|
-
stackedData[baseDataOffset] = data.get(baseAxis.dim, idx);
|
|
31
|
-
stackedData[1 - baseDataOffset] = stackedOnSameSign
|
|
32
|
-
? stackedOnSameSign.get(valueDim, idx, true) : valueStart;
|
|
33
|
-
|
|
34
|
-
return coordSys.dataToPoint(stackedData);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
26
|
// function convertToIntId(newIdList, oldIdList) {
|
|
38
27
|
// // Generate int id instead of string id.
|
|
39
28
|
// // Compare string maybe slow in score function of arrDiff
|
|
@@ -78,7 +67,8 @@ function diffData(oldData, newData) {
|
|
|
78
67
|
export default function (
|
|
79
68
|
oldData, newData,
|
|
80
69
|
oldStackedOnPoints, newStackedOnPoints,
|
|
81
|
-
oldCoordSys, newCoordSys
|
|
70
|
+
oldCoordSys, newCoordSys,
|
|
71
|
+
oldValueOrigin, newValueOrigin
|
|
82
72
|
) {
|
|
83
73
|
var diff = diffData(oldData, newData);
|
|
84
74
|
|
|
@@ -99,7 +89,10 @@ export default function (
|
|
|
99
89
|
var status = [];
|
|
100
90
|
var sortedIndices = [];
|
|
101
91
|
var rawIndices = [];
|
|
102
|
-
|
|
92
|
+
|
|
93
|
+
var newDataOldCoordInfo = prepareDataCoordInfo(oldCoordSys, newData, oldValueOrigin);
|
|
94
|
+
var oldDataNewCoordInfo = prepareDataCoordInfo(newCoordSys, oldData, newValueOrigin);
|
|
95
|
+
|
|
103
96
|
for (var i = 0; i < diff.length; i++) {
|
|
104
97
|
var diffItem = diff[i];
|
|
105
98
|
var pointAdded = true;
|
|
@@ -126,14 +119,15 @@ export default function (
|
|
|
126
119
|
var idx = diffItem.idx;
|
|
127
120
|
currPoints.push(
|
|
128
121
|
oldCoordSys.dataToPoint([
|
|
129
|
-
newData.get(
|
|
122
|
+
newData.get(newDataOldCoordInfo.dataDimsForPoint[0], idx),
|
|
123
|
+
newData.get(newDataOldCoordInfo.dataDimsForPoint[1], idx)
|
|
130
124
|
])
|
|
131
125
|
);
|
|
132
126
|
|
|
133
127
|
nextPoints.push(newData.getItemLayout(idx).slice());
|
|
134
128
|
|
|
135
129
|
currStackedPoints.push(
|
|
136
|
-
getStackedOnPoint(oldCoordSys, newData, idx)
|
|
130
|
+
getStackedOnPoint(newDataOldCoordInfo, oldCoordSys, newData, idx)
|
|
137
131
|
);
|
|
138
132
|
nextStackedPoints.push(newStackedOnPoints[idx]);
|
|
139
133
|
|
|
@@ -147,14 +141,13 @@ export default function (
|
|
|
147
141
|
if (rawIndex !== idx) {
|
|
148
142
|
currPoints.push(oldData.getItemLayout(idx));
|
|
149
143
|
nextPoints.push(newCoordSys.dataToPoint([
|
|
150
|
-
oldData.get(
|
|
144
|
+
oldData.get(oldDataNewCoordInfo.dataDimsForPoint[0], idx),
|
|
145
|
+
oldData.get(oldDataNewCoordInfo.dataDimsForPoint[1], idx)
|
|
151
146
|
]));
|
|
152
147
|
|
|
153
148
|
currStackedPoints.push(oldStackedOnPoints[idx]);
|
|
154
149
|
nextStackedPoints.push(
|
|
155
|
-
getStackedOnPoint(
|
|
156
|
-
newCoordSys, oldData, idx
|
|
157
|
-
)
|
|
150
|
+
getStackedOnPoint(oldDataNewCoordInfo, newCoordSys, oldData, idx)
|
|
158
151
|
);
|
|
159
152
|
|
|
160
153
|
rawIndices.push(rawIndex);
|