echarts 4.0.4 → 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 +1 -1
- package/KEYS +74 -0
- package/LICENSE +223 -29
- package/NOTICE +5 -0
- package/README.md +8 -1
- 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 +5624 -1049
- package/dist/echarts-en.common.min.js +21 -1
- package/dist/echarts-en.js +10720 -1979
- package/dist/echarts-en.js.map +1 -1
- package/dist/echarts-en.min.js +21 -1
- package/dist/echarts-en.simple.js +3835 -869
- package/dist/echarts-en.simple.min.js +21 -1
- package/dist/echarts.common.js +5624 -1049
- package/dist/echarts.common.min.js +21 -1
- package/dist/echarts.js +10720 -1979
- package/dist/echarts.js.map +1 -1
- package/dist/echarts.min.js +21 -1
- package/dist/echarts.simple.js +3835 -869
- 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 +112 -14
- 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 +18 -0
- 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 +18 -0
- 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 +53 -12
- package/lib/chart/helper/SymbolDraw.js +22 -2
- package/lib/chart/helper/createGraphFromNodeEdge.js +27 -3
- package/lib/chart/helper/createGraphFromNodeMatrix.js +19 -0
- package/lib/chart/helper/createListFromArray.js +19 -0
- package/lib/chart/helper/createListSimply.js +19 -0
- package/lib/chart/helper/createRenderPlanner.js +21 -2
- package/lib/chart/helper/labelHelper.js +19 -0
- package/lib/chart/helper/treeHelper.js +18 -0
- package/lib/chart/helper/whiskerBoxCommon.js +20 -27
- package/lib/chart/line/LineSeries.js +25 -10
- package/lib/chart/line/LineView.js +122 -41
- package/lib/chart/line/helper.js +39 -4
- package/lib/chart/line/lineAnimationDiff.js +18 -0
- package/lib/chart/line/poly.js +62 -36
- package/lib/chart/line.js +18 -0
- package/lib/chart/lines/LinesSeries.js +25 -4
- 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 +18 -0
- 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 +19 -0
- package/lib/chart/pie/PieView.js +19 -0
- package/lib/chart/pie/labelLayout.js +18 -0
- package/lib/chart/pie/pieLayout.js +18 -0
- package/lib/chart/pie.js +18 -0
- package/lib/chart/radar/RadarSeries.js +19 -0
- 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 +24 -0
- package/lib/chart/sunburst/SunburstSeries.js +18 -0
- package/lib/chart/sunburst/SunburstView.js +27 -9
- 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 +39 -69
- 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 +18 -0
- package/lib/component/axisPointer/findPointFromSeries.js +19 -0
- package/lib/component/axisPointer/globalListener.js +19 -0
- package/lib/component/axisPointer/modelHelper.js +18 -0
- 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 +18 -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 +18 -0
- 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 +19 -0
- package/lib/component/helper/sliderMove.js +19 -0
- package/lib/component/legend/LegendModel.js +19 -0
- 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 +18 -0
- package/lib/component/marker/MarkerModel.js +19 -1
- package/lib/component/marker/MarkerView.js +18 -0
- package/lib/component/marker/markerHelper.js +25 -1
- 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 +41 -31
- 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 +18 -0
- package/lib/component/visualMap/ContinuousView.js +18 -0
- package/lib/component/visualMap/PiecewiseModel.js +19 -0
- package/lib/component/visualMap/PiecewiseView.js +18 -0
- package/lib/component/visualMap/VisualMapModel.js +18 -0
- 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 +164 -85
- package/lib/coord/View.js +19 -0
- package/lib/coord/axisDefault.js +52 -42
- package/lib/coord/axisHelper.js +120 -85
- 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 +19 -1
- 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 +18 -0
- 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 +184 -121
- 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 +26 -2
- package/lib/data/helper/createDimensions.js +19 -0
- package/lib/data/helper/dataProvider.js +22 -4
- package/lib/data/helper/dataStackHelper.js +50 -5
- package/lib/data/helper/dimensionHelper.js +26 -1
- 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 +38 -16
- package/lib/export.js +19 -0
- package/lib/helper.js +21 -1
- 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 +139 -22
- package/lib/layout/barPolar.js +21 -1
- package/lib/layout/points.js +30 -7
- package/lib/loading/default.js +18 -0
- package/lib/model/Component.js +19 -0
- package/lib/model/Global.js +19 -1
- package/lib/model/Model.js +19 -0
- package/lib/model/OptionManager.js +19 -0
- package/lib/model/Series.js +21 -2
- package/lib/model/globalDefault.js +18 -0
- package/lib/model/mixin/areaStyle.js +18 -0
- package/lib/model/mixin/boxLayout.js +18 -0
- package/lib/model/mixin/colorPalette.js +19 -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 +20 -0
- package/lib/processor/dataFilter.js +18 -0
- package/lib/processor/dataSample.js +27 -5
- package/lib/processor/dataStack.js +18 -0
- package/lib/scale/Interval.js +19 -14
- package/lib/scale/Log.js +19 -0
- package/lib/scale/Ordinal.js +26 -1
- package/lib/scale/Scale.js +26 -15
- package/lib/scale/Time.js +18 -0
- package/lib/scale/helper.js +19 -0
- package/lib/stream/Scheduler.js +110 -37
- package/lib/stream/task.js +104 -11
- 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 +30 -1
- package/lib/util/graphic.js +19 -0
- package/lib/util/layout.js +18 -0
- package/lib/util/model.js +19 -0
- 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 +20 -2
- 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 +18 -0
- package/lib/visual/seriesColor.js +18 -0
- package/lib/visual/symbol.js +28 -2
- package/lib/visual/visualDefault.js +19 -0
- package/lib/visual/visualSolution.js +22 -1
- 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 +120 -16
- 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 +19 -0
- 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 +19 -0
- 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 +60 -14
- package/src/chart/helper/SymbolDraw.js +23 -2
- package/src/chart/helper/createGraphFromNodeEdge.js +29 -6
- package/src/chart/helper/createGraphFromNodeMatrix.js +19 -0
- package/src/chart/helper/createListFromArray.js +19 -0
- package/src/chart/helper/createListSimply.js +19 -0
- package/src/chart/helper/createRenderPlanner.js +21 -2
- package/src/chart/helper/labelHelper.js +19 -0
- package/src/chart/helper/treeHelper.js +19 -0
- package/src/chart/helper/whiskerBoxCommon.js +19 -32
- package/src/chart/line/LineSeries.js +28 -10
- package/src/chart/line/LineView.js +127 -38
- package/src/chart/line/helper.js +31 -5
- package/src/chart/line/lineAnimationDiff.js +19 -0
- package/src/chart/line/poly.js +64 -39
- package/src/chart/line.js +19 -0
- package/src/chart/lines/LinesSeries.js +27 -4
- 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 +19 -0
- 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 +19 -0
- package/src/chart/pie/PieView.js +19 -0
- package/src/chart/pie/labelLayout.js +19 -0
- package/src/chart/pie/pieLayout.js +19 -0
- package/src/chart/pie.js +19 -0
- package/src/chart/radar/RadarSeries.js +19 -0
- 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 +24 -0
- package/src/chart/sunburst/SunburstSeries.js +19 -0
- package/src/chart/sunburst/SunburstView.js +28 -9
- 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 +43 -88
- 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 +19 -0
- package/src/component/axisPointer/findPointFromSeries.js +19 -0
- package/src/component/axisPointer/globalListener.js +19 -0
- package/src/component/axisPointer/modelHelper.js +19 -0
- 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 +19 -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 +19 -0
- 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 +19 -0
- package/src/component/helper/sliderMove.js +19 -0
- package/src/component/legend/LegendModel.js +19 -0
- 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 +19 -0
- package/src/component/marker/MarkerModel.js +20 -1
- package/src/component/marker/MarkerView.js +19 -0
- package/src/component/marker/markerHelper.js +24 -1
- 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 +40 -31
- 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 +19 -0
- package/src/component/visualMap/ContinuousView.js +19 -0
- package/src/component/visualMap/PiecewiseModel.js +19 -0
- package/src/component/visualMap/PiecewiseView.js +19 -0
- package/src/component/visualMap/VisualMapModel.js +19 -0
- 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 +157 -98
- package/src/coord/View.js +19 -0
- package/src/coord/axisDefault.js +68 -41
- package/src/coord/axisHelper.js +127 -86
- 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 +23 -1
- package/src/coord/calendar/CalendarModel.js +19 -0
- package/src/coord/calendar/prepareCustom.js +19 -0
- 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 +19 -0
- 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 +163 -87
- 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 +24 -2
- package/src/data/helper/createDimensions.js +19 -0
- package/src/data/helper/dataProvider.js +23 -4
- package/src/data/helper/dataStackHelper.js +46 -9
- package/src/data/helper/dimensionHelper.js +26 -1
- 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 +37 -20
- package/src/export.js +19 -0
- package/src/helper.js +26 -2
- 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 +135 -23
- package/src/layout/barPolar.js +20 -1
- package/src/layout/points.js +27 -7
- package/src/loading/default.js +19 -0
- package/src/model/Component.js +19 -0
- package/src/model/Global.js +19 -2
- package/src/model/Model.js +19 -0
- package/src/model/OptionManager.js +19 -0
- package/src/model/Series.js +21 -2
- package/src/model/globalDefault.js +19 -0
- package/src/model/mixin/areaStyle.js +19 -0
- package/src/model/mixin/boxLayout.js +19 -0
- package/src/model/mixin/colorPalette.js +19 -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 +22 -0
- package/src/processor/dataFilter.js +19 -0
- package/src/processor/dataSample.js +29 -3
- package/src/processor/dataStack.js +19 -0
- package/src/scale/Interval.js +19 -12
- package/src/scale/Log.js +19 -0
- package/src/scale/Ordinal.js +27 -1
- package/src/scale/Scale.js +26 -12
- package/src/scale/Time.js +19 -0
- package/src/scale/helper.js +19 -0
- package/src/stream/Scheduler.js +110 -34
- package/src/stream/task.js +105 -11
- 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 +34 -6
- package/src/util/graphic.js +19 -0
- package/src/util/layout.js +19 -0
- package/src/util/model.js +20 -0
- 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 +21 -2
- 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 +19 -0
- package/src/visual/seriesColor.js +19 -0
- package/src/visual/symbol.js +34 -2
- package/src/visual/visualDefault.js +19 -0
- package/src/visual/visualSolution.js +21 -1
- 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 -222
- 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 -233
- 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,222 +0,0 @@
|
|
|
1
|
-
var zrUtil = require("zrender/lib/core/util");
|
|
2
|
-
|
|
3
|
-
var graphic = require("../../util/graphic");
|
|
4
|
-
|
|
5
|
-
var Path = require("zrender/lib/graphic/Path");
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @module echarts/chart/helper/Symbol
|
|
9
|
-
*/
|
|
10
|
-
var WhiskerPath = Path.extend({
|
|
11
|
-
type: 'whiskerInBox',
|
|
12
|
-
shape: {},
|
|
13
|
-
buildPath: function (ctx, shape) {
|
|
14
|
-
for (var i in shape) {
|
|
15
|
-
if (shape.hasOwnProperty(i) && i.indexOf('ends') === 0) {
|
|
16
|
-
var pts = shape[i];
|
|
17
|
-
ctx.moveTo(pts[0][0], pts[0][1]);
|
|
18
|
-
ctx.lineTo(pts[1][0], pts[1][1]);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
/**
|
|
24
|
-
* @constructor
|
|
25
|
-
* @alias {module:echarts/chart/helper/WhiskerBox}
|
|
26
|
-
* @param {module:echarts/data/List} data
|
|
27
|
-
* @param {number} idx
|
|
28
|
-
* @param {Function} styleUpdater
|
|
29
|
-
* @param {boolean} isInit
|
|
30
|
-
* @extends {module:zrender/graphic/Group}
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
function WhiskerBox(data, idx, styleUpdater, isInit) {
|
|
34
|
-
graphic.Group.call(this);
|
|
35
|
-
/**
|
|
36
|
-
* @type {number}
|
|
37
|
-
* @readOnly
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
this.bodyIndex;
|
|
41
|
-
/**
|
|
42
|
-
* @type {number}
|
|
43
|
-
* @readOnly
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
this.whiskerIndex;
|
|
47
|
-
/**
|
|
48
|
-
* @type {Function}
|
|
49
|
-
*/
|
|
50
|
-
|
|
51
|
-
this.styleUpdater = styleUpdater;
|
|
52
|
-
|
|
53
|
-
this._createContent(data, idx, isInit);
|
|
54
|
-
|
|
55
|
-
this.updateData(data, idx, isInit);
|
|
56
|
-
/**
|
|
57
|
-
* Last series model.
|
|
58
|
-
* @type {module:echarts/model/Series}
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
this._seriesModel;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
var whiskerBoxProto = WhiskerBox.prototype;
|
|
65
|
-
|
|
66
|
-
whiskerBoxProto._createContent = function (data, idx, isInit) {
|
|
67
|
-
var itemLayout = data.getItemLayout(idx);
|
|
68
|
-
var constDim = itemLayout.chartLayout === 'horizontal' ? 1 : 0;
|
|
69
|
-
var count = 0; // Whisker element.
|
|
70
|
-
|
|
71
|
-
this.add(new graphic.Polygon({
|
|
72
|
-
shape: {
|
|
73
|
-
points: isInit ? transInit(itemLayout.bodyEnds, constDim, itemLayout) : itemLayout.bodyEnds
|
|
74
|
-
},
|
|
75
|
-
style: {
|
|
76
|
-
strokeNoScale: true
|
|
77
|
-
},
|
|
78
|
-
z2: 100
|
|
79
|
-
}));
|
|
80
|
-
this.bodyIndex = count++; // Box element.
|
|
81
|
-
|
|
82
|
-
var whiskerEnds = zrUtil.map(itemLayout.whiskerEnds, function (ends) {
|
|
83
|
-
return isInit ? transInit(ends, constDim, itemLayout) : ends;
|
|
84
|
-
});
|
|
85
|
-
this.add(new WhiskerPath({
|
|
86
|
-
shape: makeWhiskerEndsShape(whiskerEnds),
|
|
87
|
-
style: {
|
|
88
|
-
strokeNoScale: true
|
|
89
|
-
},
|
|
90
|
-
z2: 100
|
|
91
|
-
}));
|
|
92
|
-
this.whiskerIndex = count++;
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
function transInit(points, dim, itemLayout) {
|
|
96
|
-
return zrUtil.map(points, function (point) {
|
|
97
|
-
point = point.slice();
|
|
98
|
-
point[dim] = itemLayout.initBaseline;
|
|
99
|
-
return point;
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function makeWhiskerEndsShape(whiskerEnds) {
|
|
104
|
-
// zr animation only support 2-dim array.
|
|
105
|
-
var shape = {};
|
|
106
|
-
zrUtil.each(whiskerEnds, function (ends, i) {
|
|
107
|
-
shape['ends' + i] = ends;
|
|
108
|
-
});
|
|
109
|
-
return shape;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Update symbol properties
|
|
113
|
-
* @param {module:echarts/data/List} data
|
|
114
|
-
* @param {number} idx
|
|
115
|
-
*/
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
whiskerBoxProto.updateData = function (data, idx, isInit) {
|
|
119
|
-
var seriesModel = this._seriesModel = data.hostModel;
|
|
120
|
-
var itemLayout = data.getItemLayout(idx);
|
|
121
|
-
var updateMethod = graphic[isInit ? 'initProps' : 'updateProps']; // this.childAt(this.bodyIndex).stopAnimation(true);
|
|
122
|
-
// this.childAt(this.whiskerIndex).stopAnimation(true);
|
|
123
|
-
|
|
124
|
-
updateMethod(this.childAt(this.bodyIndex), {
|
|
125
|
-
shape: {
|
|
126
|
-
points: itemLayout.bodyEnds
|
|
127
|
-
}
|
|
128
|
-
}, seriesModel, idx);
|
|
129
|
-
updateMethod(this.childAt(this.whiskerIndex), {
|
|
130
|
-
shape: makeWhiskerEndsShape(itemLayout.whiskerEnds)
|
|
131
|
-
}, seriesModel, idx);
|
|
132
|
-
this.styleUpdater.call(null, this, data, idx);
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
zrUtil.inherits(WhiskerBox, graphic.Group);
|
|
136
|
-
/**
|
|
137
|
-
* @constructor
|
|
138
|
-
* @alias module:echarts/chart/helper/WhiskerBoxDraw
|
|
139
|
-
*/
|
|
140
|
-
|
|
141
|
-
function WhiskerBoxDraw(styleUpdater) {
|
|
142
|
-
this.group = new graphic.Group();
|
|
143
|
-
this.styleUpdater = styleUpdater;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
var whiskerBoxDrawProto = WhiskerBoxDraw.prototype;
|
|
147
|
-
/**
|
|
148
|
-
* Update symbols draw by new data
|
|
149
|
-
* @param {module:echarts/data/List} data
|
|
150
|
-
*/
|
|
151
|
-
|
|
152
|
-
whiskerBoxDrawProto.updateData = function (data) {
|
|
153
|
-
var group = this.group;
|
|
154
|
-
var oldData = this._data;
|
|
155
|
-
var styleUpdater = this.styleUpdater; // There is no old data only when first rendering or switching from
|
|
156
|
-
// stream mode to normal mode, where previous elements should be removed.
|
|
157
|
-
|
|
158
|
-
if (!this._data) {
|
|
159
|
-
group.removeAll();
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
data.diff(oldData).add(function (newIdx) {
|
|
163
|
-
if (data.hasValue(newIdx)) {
|
|
164
|
-
var symbolEl = new WhiskerBox(data, newIdx, styleUpdater, true);
|
|
165
|
-
data.setItemGraphicEl(newIdx, symbolEl);
|
|
166
|
-
group.add(symbolEl);
|
|
167
|
-
}
|
|
168
|
-
}).update(function (newIdx, oldIdx) {
|
|
169
|
-
var symbolEl = oldData.getItemGraphicEl(oldIdx); // Empty data
|
|
170
|
-
|
|
171
|
-
if (!data.hasValue(newIdx)) {
|
|
172
|
-
group.remove(symbolEl);
|
|
173
|
-
return;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
if (!symbolEl) {
|
|
177
|
-
symbolEl = new WhiskerBox(data, newIdx, styleUpdater);
|
|
178
|
-
} else {
|
|
179
|
-
symbolEl.updateData(data, newIdx);
|
|
180
|
-
} // Add back
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
group.add(symbolEl);
|
|
184
|
-
data.setItemGraphicEl(newIdx, symbolEl);
|
|
185
|
-
}).remove(function (oldIdx) {
|
|
186
|
-
var el = oldData.getItemGraphicEl(oldIdx);
|
|
187
|
-
el && group.remove(el);
|
|
188
|
-
}).execute();
|
|
189
|
-
this._data = data;
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
whiskerBoxDrawProto.incrementalPrepareUpdate = function (seriesModel, ecModel, api) {
|
|
193
|
-
this.group.removeAll();
|
|
194
|
-
this._data = null;
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
whiskerBoxDrawProto.incrementalUpdate = function (params, seriesModel, ecModel, api) {
|
|
198
|
-
var data = seriesModel.getData();
|
|
199
|
-
|
|
200
|
-
for (var idx = params.start; idx < params.end; idx++) {
|
|
201
|
-
var symbolEl = new WhiskerBox(data, idx, this.styleUpdater, true);
|
|
202
|
-
symbolEl.incremental = true;
|
|
203
|
-
this.group.add(symbolEl);
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
/**
|
|
207
|
-
* Remove symbols.
|
|
208
|
-
* @param {module:echarts/data/List} data
|
|
209
|
-
*/
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
whiskerBoxDrawProto.remove = function () {
|
|
213
|
-
var group = this.group;
|
|
214
|
-
var data = this._data;
|
|
215
|
-
this._data = null;
|
|
216
|
-
data && data.eachItemGraphicEl(function (el) {
|
|
217
|
-
el && group.remove(el);
|
|
218
|
-
});
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
var _default = WhiskerBoxDraw;
|
|
222
|
-
module.exports = _default;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
var _traversalHelper = require("./traversalHelper");
|
|
2
|
-
|
|
3
|
-
var eachAfter = _traversalHelper.eachAfter;
|
|
4
|
-
var eachBefore = _traversalHelper.eachBefore;
|
|
5
|
-
|
|
6
|
-
var _layoutHelper = require("./layoutHelper");
|
|
7
|
-
|
|
8
|
-
var init = _layoutHelper.init;
|
|
9
|
-
var firstWalk = _layoutHelper.firstWalk;
|
|
10
|
-
var secondWalk = _layoutHelper.secondWalk;
|
|
11
|
-
var sep = _layoutHelper.separation;
|
|
12
|
-
var radialCoordinate = _layoutHelper.radialCoordinate;
|
|
13
|
-
var getViewRect = _layoutHelper.getViewRect;
|
|
14
|
-
|
|
15
|
-
function _default(seriesModel, api) {
|
|
16
|
-
var layoutInfo = getViewRect(seriesModel, api);
|
|
17
|
-
seriesModel.layoutInfo = layoutInfo;
|
|
18
|
-
var layout = seriesModel.get('layout');
|
|
19
|
-
var width = 0;
|
|
20
|
-
var height = 0;
|
|
21
|
-
var separation = null;
|
|
22
|
-
|
|
23
|
-
if (layout === 'radial') {
|
|
24
|
-
width = 2 * Math.PI;
|
|
25
|
-
height = Math.min(layoutInfo.height, layoutInfo.width) / 2;
|
|
26
|
-
separation = sep(function (node1, node2) {
|
|
27
|
-
return (node1.parentNode === node2.parentNode ? 1 : 2) / node1.depth;
|
|
28
|
-
});
|
|
29
|
-
} else {
|
|
30
|
-
width = layoutInfo.width;
|
|
31
|
-
height = layoutInfo.height;
|
|
32
|
-
separation = sep();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
var virtualRoot = seriesModel.getData().tree.root;
|
|
36
|
-
var realRoot = virtualRoot.children[0];
|
|
37
|
-
init(virtualRoot);
|
|
38
|
-
eachAfter(realRoot, firstWalk, separation);
|
|
39
|
-
virtualRoot.hierNode.modifier = -realRoot.hierNode.prelim;
|
|
40
|
-
eachBefore(realRoot, secondWalk);
|
|
41
|
-
var left = realRoot;
|
|
42
|
-
var right = realRoot;
|
|
43
|
-
var bottom = realRoot;
|
|
44
|
-
eachBefore(realRoot, function (node) {
|
|
45
|
-
var x = node.getLayout().x;
|
|
46
|
-
|
|
47
|
-
if (x < left.getLayout().x) {
|
|
48
|
-
left = node;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (x > right.getLayout().x) {
|
|
52
|
-
right = node;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
if (node.depth > bottom.depth) {
|
|
56
|
-
bottom = node;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
var delta = left === right ? 1 : separation(left, right) / 2;
|
|
60
|
-
var tx = delta - left.getLayout().x;
|
|
61
|
-
var kx = 0;
|
|
62
|
-
var ky = 0;
|
|
63
|
-
var coorX = 0;
|
|
64
|
-
var coorY = 0;
|
|
65
|
-
|
|
66
|
-
if (layout === 'radial') {
|
|
67
|
-
kx = width / (right.getLayout().x + delta + tx); // here we use (node.depth - 1), bucause the real root's depth is 1
|
|
68
|
-
|
|
69
|
-
ky = height / (bottom.depth - 1 || 1);
|
|
70
|
-
eachBefore(realRoot, function (node) {
|
|
71
|
-
coorX = (node.getLayout().x + tx) * kx;
|
|
72
|
-
coorY = (node.depth - 1) * ky;
|
|
73
|
-
var finalCoor = radialCoordinate(coorX, coorY);
|
|
74
|
-
node.setLayout({
|
|
75
|
-
x: finalCoor.x,
|
|
76
|
-
y: finalCoor.y,
|
|
77
|
-
rawX: coorX,
|
|
78
|
-
rawY: coorY
|
|
79
|
-
}, true);
|
|
80
|
-
});
|
|
81
|
-
} else {
|
|
82
|
-
if (seriesModel.get('orient') === 'horizontal') {
|
|
83
|
-
ky = height / (right.getLayout().x + delta + tx);
|
|
84
|
-
kx = width / (bottom.depth - 1 || 1);
|
|
85
|
-
eachBefore(realRoot, function (node) {
|
|
86
|
-
coorY = (node.getLayout().x + tx) * ky;
|
|
87
|
-
coorX = (node.depth - 1) * kx;
|
|
88
|
-
node.setLayout({
|
|
89
|
-
x: coorX,
|
|
90
|
-
y: coorY
|
|
91
|
-
}, true);
|
|
92
|
-
});
|
|
93
|
-
} else {
|
|
94
|
-
kx = width / (right.getLayout().x + delta + tx);
|
|
95
|
-
ky = height / (bottom.depth - 1 || 1);
|
|
96
|
-
eachBefore(realRoot, function (node) {
|
|
97
|
-
coorX = (node.getLayout().x + tx) * kx;
|
|
98
|
-
coorY = (node.depth - 1) * ky;
|
|
99
|
-
node.setLayout({
|
|
100
|
-
x: coorX,
|
|
101
|
-
y: coorY
|
|
102
|
-
}, true);
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
module.exports = _default;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var echarts = require("../../echarts");
|
|
2
|
-
|
|
3
|
-
var _sourceHelper = require("../../data/helper/sourceHelper");
|
|
4
|
-
|
|
5
|
-
var detectSourceFormat = _sourceHelper.detectSourceFormat;
|
|
6
|
-
|
|
7
|
-
var _sourceType = require("../../data/helper/sourceType");
|
|
8
|
-
|
|
9
|
-
var SERIES_LAYOUT_BY_COLUMN = _sourceType.SERIES_LAYOUT_BY_COLUMN;
|
|
10
|
-
var DatasetModel = echarts.extendComponentModel({
|
|
11
|
-
type: 'dataset',
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @protected
|
|
15
|
-
*/
|
|
16
|
-
defaultOption: {
|
|
17
|
-
// 'row', 'column'
|
|
18
|
-
seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN,
|
|
19
|
-
// null/'auto': auto detect header, see "module:echarts/data/helper/sourceHelper"
|
|
20
|
-
sourceHeader: null,
|
|
21
|
-
dimensions: null,
|
|
22
|
-
source: null
|
|
23
|
-
},
|
|
24
|
-
optionUpdated: function () {
|
|
25
|
-
detectSourceFormat(this);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
var _default = DatasetModel;
|
|
29
|
-
module.exports = _default;
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module echarts/chart/helper/Symbol
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as zrUtil from 'zrender/src/core/util';
|
|
6
|
-
import * as graphic from '../../util/graphic';
|
|
7
|
-
import Path from 'zrender/src/graphic/Path';
|
|
8
|
-
|
|
9
|
-
var WhiskerPath = Path.extend({
|
|
10
|
-
|
|
11
|
-
type: 'whiskerInBox',
|
|
12
|
-
|
|
13
|
-
shape: {},
|
|
14
|
-
|
|
15
|
-
buildPath: function (ctx, shape) {
|
|
16
|
-
for (var i in shape) {
|
|
17
|
-
if (shape.hasOwnProperty(i) && i.indexOf('ends') === 0) {
|
|
18
|
-
var pts = shape[i];
|
|
19
|
-
ctx.moveTo(pts[0][0], pts[0][1]);
|
|
20
|
-
ctx.lineTo(pts[1][0], pts[1][1]);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @constructor
|
|
28
|
-
* @alias {module:echarts/chart/helper/WhiskerBox}
|
|
29
|
-
* @param {module:echarts/data/List} data
|
|
30
|
-
* @param {number} idx
|
|
31
|
-
* @param {Function} styleUpdater
|
|
32
|
-
* @param {boolean} isInit
|
|
33
|
-
* @extends {module:zrender/graphic/Group}
|
|
34
|
-
*/
|
|
35
|
-
function WhiskerBox(data, idx, styleUpdater, isInit) {
|
|
36
|
-
graphic.Group.call(this);
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @type {number}
|
|
40
|
-
* @readOnly
|
|
41
|
-
*/
|
|
42
|
-
this.bodyIndex;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @type {number}
|
|
46
|
-
* @readOnly
|
|
47
|
-
*/
|
|
48
|
-
this.whiskerIndex;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @type {Function}
|
|
52
|
-
*/
|
|
53
|
-
this.styleUpdater = styleUpdater;
|
|
54
|
-
|
|
55
|
-
this._createContent(data, idx, isInit);
|
|
56
|
-
|
|
57
|
-
this.updateData(data, idx, isInit);
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Last series model.
|
|
61
|
-
* @type {module:echarts/model/Series}
|
|
62
|
-
*/
|
|
63
|
-
this._seriesModel;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
var whiskerBoxProto = WhiskerBox.prototype;
|
|
67
|
-
|
|
68
|
-
whiskerBoxProto._createContent = function (data, idx, isInit) {
|
|
69
|
-
var itemLayout = data.getItemLayout(idx);
|
|
70
|
-
var constDim = itemLayout.chartLayout === 'horizontal' ? 1 : 0;
|
|
71
|
-
var count = 0;
|
|
72
|
-
|
|
73
|
-
// Whisker element.
|
|
74
|
-
this.add(new graphic.Polygon({
|
|
75
|
-
shape: {
|
|
76
|
-
points: isInit
|
|
77
|
-
? transInit(itemLayout.bodyEnds, constDim, itemLayout)
|
|
78
|
-
: itemLayout.bodyEnds
|
|
79
|
-
},
|
|
80
|
-
style: {strokeNoScale: true},
|
|
81
|
-
z2: 100
|
|
82
|
-
}));
|
|
83
|
-
this.bodyIndex = count++;
|
|
84
|
-
|
|
85
|
-
// Box element.
|
|
86
|
-
var whiskerEnds = zrUtil.map(itemLayout.whiskerEnds, function (ends) {
|
|
87
|
-
return isInit ? transInit(ends, constDim, itemLayout) : ends;
|
|
88
|
-
});
|
|
89
|
-
this.add(new WhiskerPath({
|
|
90
|
-
shape: makeWhiskerEndsShape(whiskerEnds),
|
|
91
|
-
style: {strokeNoScale: true},
|
|
92
|
-
z2: 100
|
|
93
|
-
}));
|
|
94
|
-
this.whiskerIndex = count++;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
function transInit(points, dim, itemLayout) {
|
|
98
|
-
return zrUtil.map(points, function (point) {
|
|
99
|
-
point = point.slice();
|
|
100
|
-
point[dim] = itemLayout.initBaseline;
|
|
101
|
-
return point;
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function makeWhiskerEndsShape(whiskerEnds) {
|
|
106
|
-
// zr animation only support 2-dim array.
|
|
107
|
-
var shape = {};
|
|
108
|
-
zrUtil.each(whiskerEnds, function (ends, i) {
|
|
109
|
-
shape['ends' + i] = ends;
|
|
110
|
-
});
|
|
111
|
-
return shape;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Update symbol properties
|
|
116
|
-
* @param {module:echarts/data/List} data
|
|
117
|
-
* @param {number} idx
|
|
118
|
-
*/
|
|
119
|
-
whiskerBoxProto.updateData = function (data, idx, isInit) {
|
|
120
|
-
var seriesModel = this._seriesModel = data.hostModel;
|
|
121
|
-
var itemLayout = data.getItemLayout(idx);
|
|
122
|
-
var updateMethod = graphic[isInit ? 'initProps' : 'updateProps'];
|
|
123
|
-
// this.childAt(this.bodyIndex).stopAnimation(true);
|
|
124
|
-
// this.childAt(this.whiskerIndex).stopAnimation(true);
|
|
125
|
-
updateMethod(
|
|
126
|
-
this.childAt(this.bodyIndex),
|
|
127
|
-
{shape: {points: itemLayout.bodyEnds}},
|
|
128
|
-
seriesModel, idx
|
|
129
|
-
);
|
|
130
|
-
updateMethod(
|
|
131
|
-
this.childAt(this.whiskerIndex),
|
|
132
|
-
{shape: makeWhiskerEndsShape(itemLayout.whiskerEnds)},
|
|
133
|
-
seriesModel, idx
|
|
134
|
-
);
|
|
135
|
-
|
|
136
|
-
this.styleUpdater.call(null, this, data, idx);
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
zrUtil.inherits(WhiskerBox, graphic.Group);
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* @constructor
|
|
144
|
-
* @alias module:echarts/chart/helper/WhiskerBoxDraw
|
|
145
|
-
*/
|
|
146
|
-
function WhiskerBoxDraw(styleUpdater) {
|
|
147
|
-
this.group = new graphic.Group();
|
|
148
|
-
this.styleUpdater = styleUpdater;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
var whiskerBoxDrawProto = WhiskerBoxDraw.prototype;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Update symbols draw by new data
|
|
155
|
-
* @param {module:echarts/data/List} data
|
|
156
|
-
*/
|
|
157
|
-
whiskerBoxDrawProto.updateData = function (data) {
|
|
158
|
-
var group = this.group;
|
|
159
|
-
var oldData = this._data;
|
|
160
|
-
var styleUpdater = this.styleUpdater;
|
|
161
|
-
|
|
162
|
-
// There is no old data only when first rendering or switching from
|
|
163
|
-
// stream mode to normal mode, where previous elements should be removed.
|
|
164
|
-
if (!this._data) {
|
|
165
|
-
group.removeAll();
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
data.diff(oldData)
|
|
169
|
-
.add(function (newIdx) {
|
|
170
|
-
if (data.hasValue(newIdx)) {
|
|
171
|
-
var symbolEl = new WhiskerBox(data, newIdx, styleUpdater, true);
|
|
172
|
-
data.setItemGraphicEl(newIdx, symbolEl);
|
|
173
|
-
group.add(symbolEl);
|
|
174
|
-
}
|
|
175
|
-
})
|
|
176
|
-
.update(function (newIdx, oldIdx) {
|
|
177
|
-
var symbolEl = oldData.getItemGraphicEl(oldIdx);
|
|
178
|
-
|
|
179
|
-
// Empty data
|
|
180
|
-
if (!data.hasValue(newIdx)) {
|
|
181
|
-
group.remove(symbolEl);
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
if (!symbolEl) {
|
|
186
|
-
symbolEl = new WhiskerBox(data, newIdx, styleUpdater);
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
symbolEl.updateData(data, newIdx);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// Add back
|
|
193
|
-
group.add(symbolEl);
|
|
194
|
-
|
|
195
|
-
data.setItemGraphicEl(newIdx, symbolEl);
|
|
196
|
-
})
|
|
197
|
-
.remove(function (oldIdx) {
|
|
198
|
-
var el = oldData.getItemGraphicEl(oldIdx);
|
|
199
|
-
el && group.remove(el);
|
|
200
|
-
})
|
|
201
|
-
.execute();
|
|
202
|
-
|
|
203
|
-
this._data = data;
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
whiskerBoxDrawProto.incrementalPrepareUpdate = function (seriesModel, ecModel, api) {
|
|
207
|
-
this.group.removeAll();
|
|
208
|
-
this._data = null;
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
whiskerBoxDrawProto.incrementalUpdate = function (params, seriesModel, ecModel, api) {
|
|
212
|
-
var data = seriesModel.getData();
|
|
213
|
-
for (var idx = params.start; idx < params.end; idx++) {
|
|
214
|
-
var symbolEl = new WhiskerBox(data, idx, this.styleUpdater, true);
|
|
215
|
-
symbolEl.incremental = true;
|
|
216
|
-
this.group.add(symbolEl);
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Remove symbols.
|
|
222
|
-
* @param {module:echarts/data/List} data
|
|
223
|
-
*/
|
|
224
|
-
whiskerBoxDrawProto.remove = function () {
|
|
225
|
-
var group = this.group;
|
|
226
|
-
var data = this._data;
|
|
227
|
-
this._data = null;
|
|
228
|
-
data && data.eachItemGraphicEl(function (el) {
|
|
229
|
-
el && group.remove(el);
|
|
230
|
-
});
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
export default WhiskerBoxDraw;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
eachAfter,
|
|
3
|
-
eachBefore
|
|
4
|
-
} from './traversalHelper';
|
|
5
|
-
import {
|
|
6
|
-
init,
|
|
7
|
-
firstWalk,
|
|
8
|
-
secondWalk,
|
|
9
|
-
separation as sep,
|
|
10
|
-
radialCoordinate,
|
|
11
|
-
getViewRect
|
|
12
|
-
} from './layoutHelper';
|
|
13
|
-
|
|
14
|
-
export default function (seriesModel, api) {
|
|
15
|
-
|
|
16
|
-
var layoutInfo = getViewRect(seriesModel, api);
|
|
17
|
-
seriesModel.layoutInfo = layoutInfo;
|
|
18
|
-
|
|
19
|
-
var layout = seriesModel.get('layout');
|
|
20
|
-
var width = 0;
|
|
21
|
-
var height = 0;
|
|
22
|
-
var separation = null;
|
|
23
|
-
if (layout === 'radial') {
|
|
24
|
-
width = 2 * Math.PI;
|
|
25
|
-
height = Math.min(layoutInfo.height, layoutInfo.width) / 2;
|
|
26
|
-
separation = sep(function (node1, node2) {
|
|
27
|
-
return (node1.parentNode === node2.parentNode ? 1 : 2) / node1.depth;
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
width = layoutInfo.width;
|
|
32
|
-
height = layoutInfo.height;
|
|
33
|
-
separation = sep();
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
var virtualRoot = seriesModel.getData().tree.root;
|
|
37
|
-
var realRoot = virtualRoot.children[0];
|
|
38
|
-
init(virtualRoot);
|
|
39
|
-
eachAfter(realRoot, firstWalk, separation);
|
|
40
|
-
virtualRoot.hierNode.modifier = - realRoot.hierNode.prelim;
|
|
41
|
-
eachBefore(realRoot, secondWalk);
|
|
42
|
-
|
|
43
|
-
var left = realRoot;
|
|
44
|
-
var right = realRoot;
|
|
45
|
-
var bottom = realRoot;
|
|
46
|
-
eachBefore(realRoot, function (node) {
|
|
47
|
-
var x = node.getLayout().x;
|
|
48
|
-
if (x < left.getLayout().x) {
|
|
49
|
-
left = node;
|
|
50
|
-
}
|
|
51
|
-
if (x > right.getLayout().x) {
|
|
52
|
-
right = node;
|
|
53
|
-
}
|
|
54
|
-
if (node.depth > bottom.depth) {
|
|
55
|
-
bottom = node;
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
var delta = left === right ? 1 : separation(left, right) / 2;
|
|
60
|
-
var tx = delta - left.getLayout().x;
|
|
61
|
-
var kx = 0;
|
|
62
|
-
var ky = 0;
|
|
63
|
-
var coorX = 0;
|
|
64
|
-
var coorY = 0;
|
|
65
|
-
if (layout === 'radial') {
|
|
66
|
-
kx = width / (right.getLayout().x + delta + tx);
|
|
67
|
-
// here we use (node.depth - 1), bucause the real root's depth is 1
|
|
68
|
-
ky = height/ ((bottom.depth - 1) || 1);
|
|
69
|
-
eachBefore(realRoot, function (node) {
|
|
70
|
-
coorX = (node.getLayout().x + tx) * kx;
|
|
71
|
-
coorY = (node.depth - 1) * ky;
|
|
72
|
-
var finalCoor = radialCoordinate(coorX, coorY);
|
|
73
|
-
node.setLayout({x: finalCoor.x, y: finalCoor.y, rawX: coorX, rawY: coorY}, true);
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
if (seriesModel.get('orient') === 'horizontal') {
|
|
78
|
-
ky = height / (right.getLayout().x + delta + tx);
|
|
79
|
-
kx = width / ((bottom.depth - 1) || 1);
|
|
80
|
-
eachBefore(realRoot, function (node) {
|
|
81
|
-
coorY = (node.getLayout().x + tx) * ky;
|
|
82
|
-
coorX = (node.depth - 1) * kx;
|
|
83
|
-
node.setLayout({x: coorX, y: coorY}, true);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
kx = width / (right.getLayout().x + delta + tx);
|
|
88
|
-
ky = height / ((bottom.depth - 1) || 1);
|
|
89
|
-
eachBefore(realRoot, function (node) {
|
|
90
|
-
coorX = (node.getLayout().x + tx) * kx;
|
|
91
|
-
coorY = (node.depth - 1) * ky;
|
|
92
|
-
node.setLayout({x: coorX, y: coorY}, true);
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|