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
package/lib/data/OrdinalMeta.js
CHANGED
|
@@ -4,6 +4,25 @@ var createHashMap = _util.createHashMap;
|
|
|
4
4
|
var isObject = _util.isObject;
|
|
5
5
|
var map = _util.map;
|
|
6
6
|
|
|
7
|
+
/*
|
|
8
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
9
|
+
* or more contributor license agreements. See the NOTICE file
|
|
10
|
+
* distributed with this work for additional information
|
|
11
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
12
|
+
* to you under the Apache License, Version 2.0 (the
|
|
13
|
+
* "License"); you may not use this file except in compliance
|
|
14
|
+
* with the License. You may obtain a copy of the License at
|
|
15
|
+
*
|
|
16
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing,
|
|
19
|
+
* software distributed under the License is distributed on an
|
|
20
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
21
|
+
* KIND, either express or implied. See the License for the
|
|
22
|
+
* specific language governing permissions and limitations
|
|
23
|
+
* under the License.
|
|
24
|
+
*/
|
|
25
|
+
|
|
7
26
|
/**
|
|
8
27
|
* @constructor
|
|
9
28
|
* @param {Object} [opt]
|
package/lib/data/Source.js
CHANGED
|
@@ -15,6 +15,25 @@ var SOURCE_FORMAT_UNKNOWN = _sourceType.SOURCE_FORMAT_UNKNOWN;
|
|
|
15
15
|
var SOURCE_FORMAT_TYPED_ARRAY = _sourceType.SOURCE_FORMAT_TYPED_ARRAY;
|
|
16
16
|
var SOURCE_FORMAT_KEYED_COLUMNS = _sourceType.SOURCE_FORMAT_KEYED_COLUMNS;
|
|
17
17
|
|
|
18
|
+
/*
|
|
19
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
20
|
+
* or more contributor license agreements. See the NOTICE file
|
|
21
|
+
* distributed with this work for additional information
|
|
22
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
23
|
+
* to you under the Apache License, Version 2.0 (the
|
|
24
|
+
* "License"); you may not use this file except in compliance
|
|
25
|
+
* with the License. You may obtain a copy of the License at
|
|
26
|
+
*
|
|
27
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
28
|
+
*
|
|
29
|
+
* Unless required by applicable law or agreed to in writing,
|
|
30
|
+
* software distributed under the License is distributed on an
|
|
31
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
32
|
+
* KIND, either express or implied. See the License for the
|
|
33
|
+
* specific language governing permissions and limitations
|
|
34
|
+
* under the License.
|
|
35
|
+
*/
|
|
36
|
+
|
|
18
37
|
/**
|
|
19
38
|
* [sourceFormat]
|
|
20
39
|
*
|
package/lib/data/Tree.js
CHANGED
|
@@ -8,6 +8,25 @@ var List = require("./List");
|
|
|
8
8
|
|
|
9
9
|
var createDimensions = require("./helper/createDimensions");
|
|
10
10
|
|
|
11
|
+
/*
|
|
12
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
13
|
+
* or more contributor license agreements. See the NOTICE file
|
|
14
|
+
* distributed with this work for additional information
|
|
15
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
16
|
+
* to you under the Apache License, Version 2.0 (the
|
|
17
|
+
* "License"); you may not use this file except in compliance
|
|
18
|
+
* with the License. You may obtain a copy of the License at
|
|
19
|
+
*
|
|
20
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
21
|
+
*
|
|
22
|
+
* Unless required by applicable law or agreed to in writing,
|
|
23
|
+
* software distributed under the License is distributed on an
|
|
24
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
25
|
+
* KIND, either express or implied. See the License for the
|
|
26
|
+
* specific language governing permissions and limitations
|
|
27
|
+
* under the License.
|
|
28
|
+
*/
|
|
29
|
+
|
|
11
30
|
/**
|
|
12
31
|
* Tree data structure
|
|
13
32
|
*
|
|
@@ -22,6 +22,25 @@ var _dimensionHelper = require("./dimensionHelper");
|
|
|
22
22
|
|
|
23
23
|
var OTHER_DIMENSIONS = _dimensionHelper.OTHER_DIMENSIONS;
|
|
24
24
|
|
|
25
|
+
/*
|
|
26
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
27
|
+
* or more contributor license agreements. See the NOTICE file
|
|
28
|
+
* distributed with this work for additional information
|
|
29
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
30
|
+
* to you under the Apache License, Version 2.0 (the
|
|
31
|
+
* "License"); you may not use this file except in compliance
|
|
32
|
+
* with the License. You may obtain a copy of the License at
|
|
33
|
+
*
|
|
34
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
35
|
+
*
|
|
36
|
+
* Unless required by applicable law or agreed to in writing,
|
|
37
|
+
* software distributed under the License is distributed on an
|
|
38
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
39
|
+
* KIND, either express or implied. See the License for the
|
|
40
|
+
* specific language governing permissions and limitations
|
|
41
|
+
* under the License.
|
|
42
|
+
*/
|
|
43
|
+
|
|
25
44
|
/**
|
|
26
45
|
* @deprecated
|
|
27
46
|
* Use `echarts/data/helper/createDimensions` instead.
|
|
@@ -39,18 +58,21 @@ var OTHER_DIMENSIONS = _dimensionHelper.OTHER_DIMENSIONS;
|
|
|
39
58
|
* provides not only dim template, but also default order.
|
|
40
59
|
* properties: 'name', 'type', 'displayName'.
|
|
41
60
|
* `name` of each item provides default coord name.
|
|
42
|
-
* [{dimsDef: [string...]}, ...]
|
|
61
|
+
* [{dimsDef: [string|Object, ...]}, ...] dimsDef of sysDim item provides default dim name, and
|
|
62
|
+
* provide dims count that the sysDim required.
|
|
43
63
|
* [{ordinalMeta}] can be specified.
|
|
44
64
|
* @param {module:echarts/data/Source|Array|Object} source or data (for compatibal with pervious)
|
|
45
65
|
* @param {Object} [opt]
|
|
46
66
|
* @param {Array.<Object|string>} [opt.dimsDef] option.series.dimensions User defined dimensions
|
|
47
67
|
* For example: ['asdf', {name, type}, ...].
|
|
48
68
|
* @param {Object|HashMap} [opt.encodeDef] option.series.encode {x: 2, y: [3, 1], tooltip: [1, 2], label: 3}
|
|
49
|
-
* @param {string} [opt.
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
69
|
+
* @param {string} [opt.generateCoord] Generate coord dim with the given name.
|
|
70
|
+
* If not specified, extra dim names will be:
|
|
71
|
+
* 'value', 'value0', 'value1', ...
|
|
72
|
+
* @param {number} [opt.generateCoordCount] By default, the generated dim name is `generateCoord`.
|
|
73
|
+
* If `generateCoordCount` specified, the generated dim names will be:
|
|
74
|
+
* `generateCoord` + 0, `generateCoord` + 1, ...
|
|
75
|
+
* can be Infinity, indicate that use all of the remain columns.
|
|
54
76
|
* @param {number} [opt.dimCount] If not specified, guess by the first data item.
|
|
55
77
|
* @param {number} [opt.encodeDefaulter] If not specified, auto find the next available data dim.
|
|
56
78
|
* @return {Array.<Object>} [{
|
|
@@ -58,7 +80,6 @@ var OTHER_DIMENSIONS = _dimensionHelper.OTHER_DIMENSIONS;
|
|
|
58
80
|
* displayName: string, the origin name in dimsDef, see source helper.
|
|
59
81
|
* If displayName given, the tooltip will displayed vertically.
|
|
60
82
|
* coordDim: string mandatory,
|
|
61
|
-
* isSysCoord: boolean True if the coord is from sys dimension.
|
|
62
83
|
* coordDimIndex: number mandatory,
|
|
63
84
|
* type: string optional,
|
|
64
85
|
* otherDims: { never null/undefined
|
|
@@ -67,7 +88,8 @@ var OTHER_DIMENSIONS = _dimensionHelper.OTHER_DIMENSIONS;
|
|
|
67
88
|
* itemName: number optional,
|
|
68
89
|
* seriesName: number optional,
|
|
69
90
|
* },
|
|
70
|
-
* isExtraCoord: boolean true
|
|
91
|
+
* isExtraCoord: boolean true if coord is generated
|
|
92
|
+
* (not specified in encode and not series specified)
|
|
71
93
|
* other props ...
|
|
72
94
|
* }]
|
|
73
95
|
*/
|
|
@@ -162,10 +184,14 @@ function completeDimensions(sysDims, source, opt) {
|
|
|
162
184
|
applyDim(defaults(resultItem, sysDimItem), coordDim, coordDimIndex);
|
|
163
185
|
|
|
164
186
|
if (resultItem.name == null && sysDimItemDimsDef) {
|
|
165
|
-
|
|
166
|
-
|
|
187
|
+
var sysDimItemDimsDefItem = sysDimItemDimsDef[coordDimIndex];
|
|
188
|
+
!isObject(sysDimItemDimsDefItem) && (sysDimItemDimsDefItem = {
|
|
189
|
+
name: sysDimItemDimsDefItem
|
|
190
|
+
});
|
|
191
|
+
resultItem.name = resultItem.displayName = sysDimItemDimsDefItem.name;
|
|
192
|
+
resultItem.defaultTooltip = sysDimItemDimsDefItem.defaultTooltip;
|
|
193
|
+
} // FIXME refactor, currently only used in case: {otherDims: {tooltip: false}}
|
|
167
194
|
|
|
168
|
-
resultItem.isSysCoord = true; // FIXME refactor, currently only used in case: {otherDims: {tooltip: false}}
|
|
169
195
|
|
|
170
196
|
sysDimItemOtherDims && defaults(resultItem.otherDims, sysDimItemOtherDims);
|
|
171
197
|
});
|
|
@@ -182,12 +208,27 @@ function completeDimensions(sysDims, source, opt) {
|
|
|
182
208
|
} // Make sure the first extra dim is 'value'.
|
|
183
209
|
|
|
184
210
|
|
|
185
|
-
var
|
|
211
|
+
var generateCoord = opt.generateCoord;
|
|
212
|
+
var generateCoordCount = opt.generateCoordCount;
|
|
213
|
+
var fromZero = generateCoordCount != null;
|
|
214
|
+
generateCoordCount = generateCoord ? generateCoordCount || 1 : 0;
|
|
215
|
+
var extra = generateCoord || 'value'; // Set dim `name` and other `coordDim` and other props.
|
|
186
216
|
|
|
187
217
|
for (var resultDimIdx = 0; resultDimIdx < dimCount; resultDimIdx++) {
|
|
188
218
|
var resultItem = result[resultDimIdx] = result[resultDimIdx] || {};
|
|
189
219
|
var coordDim = resultItem.coordDim;
|
|
190
|
-
|
|
220
|
+
|
|
221
|
+
if (coordDim == null) {
|
|
222
|
+
resultItem.coordDim = genName(extra, coordDimNameMap, fromZero);
|
|
223
|
+
resultItem.coordDimIndex = 0;
|
|
224
|
+
|
|
225
|
+
if (!generateCoord || generateCoordCount <= 0) {
|
|
226
|
+
resultItem.isExtraCoord = true;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
generateCoordCount--;
|
|
230
|
+
}
|
|
231
|
+
|
|
191
232
|
resultItem.name == null && (resultItem.name = genName(resultItem.coordDim, dataDimNameMap));
|
|
192
233
|
|
|
193
234
|
if (resultItem.type == null && guessOrdinal(source, resultDimIdx, resultItem.name)) {
|
|
@@ -205,17 +246,17 @@ function completeDimensions(sysDims, source, opt) {
|
|
|
205
246
|
// may be visited.
|
|
206
247
|
// (2) sometimes user need to calcualte bubble size or use visualMap
|
|
207
248
|
// on other dimensions besides coordSys needed.
|
|
249
|
+
// So, dims that is not used by system, should be shared in storage?
|
|
208
250
|
|
|
209
251
|
|
|
210
|
-
function getDimCount(source, sysDims, dimsDef,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
|
|
252
|
+
function getDimCount(source, sysDims, dimsDef, optDimCount) {
|
|
253
|
+
// Note that the result dimCount should not small than columns count
|
|
254
|
+
// of data, otherwise `dataDimNameMap` checking will be incorrect.
|
|
255
|
+
var dimCount = Math.max(source.dimensionsDetectCount || 1, sysDims.length, dimsDef.length, optDimCount || 0);
|
|
256
|
+
each(sysDims, function (sysDimItem) {
|
|
257
|
+
var sysDimItemDimsDef = sysDimItem.dimsDef;
|
|
258
|
+
sysDimItemDimsDef && (dimCount = Math.max(dimCount, sysDimItemDimsDef.length));
|
|
259
|
+
});
|
|
219
260
|
return dimCount;
|
|
220
261
|
}
|
|
221
262
|
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
var completeDimensions = require("./completeDimensions");
|
|
2
2
|
|
|
3
|
+
/*
|
|
4
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
5
|
+
* or more contributor license agreements. See the NOTICE file
|
|
6
|
+
* distributed with this work for additional information
|
|
7
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
8
|
+
* to you under the Apache License, Version 2.0 (the
|
|
9
|
+
* "License"); you may not use this file except in compliance
|
|
10
|
+
* with the License. You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing,
|
|
15
|
+
* software distributed under the License is distributed on an
|
|
16
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
17
|
+
* KIND, either express or implied. See the License for the
|
|
18
|
+
* specific language governing permissions and limitations
|
|
19
|
+
* under the License.
|
|
20
|
+
*/
|
|
21
|
+
|
|
3
22
|
/**
|
|
4
23
|
* Substitute `completeDimensions`.
|
|
5
24
|
* `completeDimensions` is to be deprecated.
|
|
@@ -10,8 +29,8 @@ var completeDimensions = require("./completeDimensions");
|
|
|
10
29
|
* @param {Object|Array} [opt]
|
|
11
30
|
* @param {Array.<string|Object>} [opt.coordDimensions=[]]
|
|
12
31
|
* @param {number} [opt.dimensionsCount]
|
|
13
|
-
* @param {string} [opt.
|
|
14
|
-
* @param {
|
|
32
|
+
* @param {string} [opt.generateCoord]
|
|
33
|
+
* @param {string} [opt.generateCoordCount]
|
|
15
34
|
* @param {Array.<string|Object>} [opt.dimensionsDefine=source.dimensionsDefine] Overwrite source define.
|
|
16
35
|
* @param {Object|HashMap} [opt.encodeDefine=source.encodeDefine] Overwrite source define.
|
|
17
36
|
* @return {Array.<Object>} dimensionsInfo
|
|
@@ -22,8 +41,8 @@ function _default(source, opt) {
|
|
|
22
41
|
dimsDef: opt.dimensionsDefine || source.dimensionsDefine,
|
|
23
42
|
encodeDef: opt.encodeDefine || source.encodeDefine,
|
|
24
43
|
dimCount: opt.dimensionsCount,
|
|
25
|
-
|
|
26
|
-
|
|
44
|
+
generateCoord: opt.generateCoord,
|
|
45
|
+
generateCoordCount: opt.generateCoordCount
|
|
27
46
|
});
|
|
28
47
|
}
|
|
29
48
|
|
|
@@ -8,6 +8,7 @@ var isTypedArray = _util.isTypedArray;
|
|
|
8
8
|
var extend = _util.extend;
|
|
9
9
|
var assert = _util.assert;
|
|
10
10
|
var each = _util.each;
|
|
11
|
+
var isObject = _util.isObject;
|
|
11
12
|
|
|
12
13
|
var _model = require("../../util/model");
|
|
13
14
|
|
|
@@ -24,7 +25,27 @@ var _sourceType = require("./sourceType");
|
|
|
24
25
|
|
|
25
26
|
var SOURCE_FORMAT_TYPED_ARRAY = _sourceType.SOURCE_FORMAT_TYPED_ARRAY;
|
|
26
27
|
var SOURCE_FORMAT_ARRAY_ROWS = _sourceType.SOURCE_FORMAT_ARRAY_ROWS;
|
|
27
|
-
|
|
28
|
+
var SOURCE_FORMAT_ORIGINAL = _sourceType.SOURCE_FORMAT_ORIGINAL;
|
|
29
|
+
var SOURCE_FORMAT_OBJECT_ROWS = _sourceType.SOURCE_FORMAT_OBJECT_ROWS;
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
33
|
+
* or more contributor license agreements. See the NOTICE file
|
|
34
|
+
* distributed with this work for additional information
|
|
35
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
36
|
+
* to you under the Apache License, Version 2.0 (the
|
|
37
|
+
* "License"); you may not use this file except in compliance
|
|
38
|
+
* with the License. You may obtain a copy of the License at
|
|
39
|
+
*
|
|
40
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
41
|
+
*
|
|
42
|
+
* Unless required by applicable law or agreed to in writing,
|
|
43
|
+
* software distributed under the License is distributed on an
|
|
44
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
45
|
+
* KIND, either express or implied. See the License for the
|
|
46
|
+
* specific language governing permissions and limitations
|
|
47
|
+
* under the License.
|
|
48
|
+
*/
|
|
28
49
|
// TODO
|
|
29
50
|
// ??? refactor? check the outer usage of data provider.
|
|
30
51
|
// merge with defaultDimValueGetter?
|
|
@@ -141,16 +162,16 @@ var providerMethods = {
|
|
|
141
162
|
count: function () {
|
|
142
163
|
return this._data ? this._data.length / this._dimSize : 0;
|
|
143
164
|
},
|
|
144
|
-
getItem: function (idx) {
|
|
165
|
+
getItem: function (idx, out) {
|
|
145
166
|
idx = idx - this._offset;
|
|
146
|
-
|
|
167
|
+
out = out || [];
|
|
147
168
|
var offset = this._dimSize * idx;
|
|
148
169
|
|
|
149
170
|
for (var i = 0; i < this._dimSize; i++) {
|
|
150
|
-
|
|
171
|
+
out[i] = this._data[offset + i];
|
|
151
172
|
}
|
|
152
173
|
|
|
153
|
-
return
|
|
174
|
+
return out;
|
|
154
175
|
},
|
|
155
176
|
appendData: function (newData) {
|
|
156
177
|
this._data = newData;
|
|
@@ -295,7 +316,43 @@ function retrieveRawValue(data, dataIndex, dim) {
|
|
|
295
316
|
|
|
296
317
|
return rawValueGetters[sourceFormat](dataItem, dataIndex, dimIndex, dimName);
|
|
297
318
|
}
|
|
319
|
+
/**
|
|
320
|
+
* Compatible with some cases (in pie, map) like:
|
|
321
|
+
* data: [{name: 'xx', value: 5, selected: true}, ...]
|
|
322
|
+
* where only sourceFormat is 'original' and 'objectRows' supported.
|
|
323
|
+
*
|
|
324
|
+
* ??? TODO
|
|
325
|
+
* Supported detail options in data item when using 'arrayRows'.
|
|
326
|
+
*
|
|
327
|
+
* @param {module:echarts/data/List} data
|
|
328
|
+
* @param {number} dataIndex
|
|
329
|
+
* @param {string} attr like 'selected'
|
|
330
|
+
*/
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
function retrieveRawAttr(data, dataIndex, attr) {
|
|
334
|
+
if (!data) {
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
var sourceFormat = data.getProvider().getSource().sourceFormat;
|
|
339
|
+
|
|
340
|
+
if (sourceFormat !== SOURCE_FORMAT_ORIGINAL && sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS) {
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
var dataItem = data.getRawDataItem(dataIndex);
|
|
345
|
+
|
|
346
|
+
if (sourceFormat === SOURCE_FORMAT_ORIGINAL && !isObject(dataItem)) {
|
|
347
|
+
dataItem = null;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
if (dataItem) {
|
|
351
|
+
return dataItem[attr];
|
|
352
|
+
}
|
|
353
|
+
}
|
|
298
354
|
|
|
299
355
|
exports.DefaultDataProvider = DefaultDataProvider;
|
|
300
356
|
exports.defaultDimValueGetters = defaultDimValueGetters;
|
|
301
|
-
exports.retrieveRawValue = retrieveRawValue;
|
|
357
|
+
exports.retrieveRawValue = retrieveRawValue;
|
|
358
|
+
exports.retrieveRawAttr = retrieveRawAttr;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
var _util = require("zrender/lib/core/util");
|
|
2
|
+
|
|
3
|
+
var each = _util.each;
|
|
4
|
+
var isString = _util.isString;
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
8
|
+
* or more contributor license agreements. See the NOTICE file
|
|
9
|
+
* distributed with this work for additional information
|
|
10
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
11
|
+
* to you under the Apache License, Version 2.0 (the
|
|
12
|
+
* "License"); you may not use this file except in compliance
|
|
13
|
+
* with the License. You may obtain a copy of the License at
|
|
14
|
+
*
|
|
15
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
*
|
|
17
|
+
* Unless required by applicable law or agreed to in writing,
|
|
18
|
+
* software distributed under the License is distributed on an
|
|
19
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
20
|
+
* KIND, either express or implied. See the License for the
|
|
21
|
+
* specific language governing permissions and limitations
|
|
22
|
+
* under the License.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Note that it is too complicated to support 3d stack by value
|
|
27
|
+
* (have to create two-dimension inverted index), so in 3d case
|
|
28
|
+
* we just support that stacked by index.
|
|
29
|
+
*
|
|
30
|
+
* @param {module:echarts/model/Series} seriesModel
|
|
31
|
+
* @param {Array.<string|Object>} dimensionInfoList The same as the input of <module:echarts/data/List>.
|
|
32
|
+
* The input dimensionInfoList will be modified.
|
|
33
|
+
* @param {Object} [opt]
|
|
34
|
+
* @param {boolean} [opt.stackedCoordDimension=''] Specify a coord dimension if needed.
|
|
35
|
+
* @param {boolean} [opt.byIndex=false]
|
|
36
|
+
* @return {Object} calculationInfo
|
|
37
|
+
* {
|
|
38
|
+
* stackedDimension: string
|
|
39
|
+
* stackedByDimension: string
|
|
40
|
+
* isStackedByIndex: boolean
|
|
41
|
+
* stackedOverDimension: string
|
|
42
|
+
* stackResultDimension: string
|
|
43
|
+
* }
|
|
44
|
+
*/
|
|
45
|
+
function enableDataStack(seriesModel, dimensionInfoList, opt) {
|
|
46
|
+
opt = opt || {};
|
|
47
|
+
var byIndex = opt.byIndex;
|
|
48
|
+
var stackedCoordDimension = opt.stackedCoordDimension; // Compatibal: when `stack` is set as '', do not stack.
|
|
49
|
+
|
|
50
|
+
var mayStack = !!(seriesModel && seriesModel.get('stack'));
|
|
51
|
+
var stackedByDimInfo;
|
|
52
|
+
var stackedDimInfo;
|
|
53
|
+
var stackResultDimension;
|
|
54
|
+
var stackedOverDimension;
|
|
55
|
+
each(dimensionInfoList, function (dimensionInfo, index) {
|
|
56
|
+
if (isString(dimensionInfo)) {
|
|
57
|
+
dimensionInfoList[index] = dimensionInfo = {
|
|
58
|
+
name: dimensionInfo
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (mayStack && !dimensionInfo.isExtraCoord) {
|
|
63
|
+
// Find the first ordinal dimension as the stackedByDimInfo.
|
|
64
|
+
if (!byIndex && !stackedByDimInfo && dimensionInfo.ordinalMeta) {
|
|
65
|
+
stackedByDimInfo = dimensionInfo;
|
|
66
|
+
} // Find the first stackable dimension as the stackedDimInfo.
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
if (!stackedDimInfo && dimensionInfo.type !== 'ordinal' && dimensionInfo.type !== 'time' && (!stackedCoordDimension || stackedCoordDimension === dimensionInfo.coordDim)) {
|
|
70
|
+
stackedDimInfo = dimensionInfo;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
if (stackedDimInfo && !byIndex && !stackedByDimInfo) {
|
|
76
|
+
// Compatible with previous design, value axis (time axis) only stack by index.
|
|
77
|
+
// It may make sense if the user provides elaborately constructed data.
|
|
78
|
+
byIndex = true;
|
|
79
|
+
} // Add stack dimension, they can be both calculated by coordinate system in `unionExtent`.
|
|
80
|
+
// That put stack logic in List is for using conveniently in echarts extensions, but it
|
|
81
|
+
// might not be a good way.
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
if (stackedDimInfo) {
|
|
85
|
+
// Use a weird name that not duplicated with other names.
|
|
86
|
+
stackResultDimension = '__\0ecstackresult';
|
|
87
|
+
stackedOverDimension = '__\0ecstackedover'; // Create inverted index to fast query index by value.
|
|
88
|
+
|
|
89
|
+
if (stackedByDimInfo) {
|
|
90
|
+
stackedByDimInfo.createInvertedIndices = true;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
var stackedDimCoordDim = stackedDimInfo.coordDim;
|
|
94
|
+
var stackedDimType = stackedDimInfo.type;
|
|
95
|
+
var stackedDimCoordIndex = 0;
|
|
96
|
+
each(dimensionInfoList, function (dimensionInfo) {
|
|
97
|
+
if (dimensionInfo.coordDim === stackedDimCoordDim) {
|
|
98
|
+
stackedDimCoordIndex++;
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
dimensionInfoList.push({
|
|
102
|
+
name: stackResultDimension,
|
|
103
|
+
coordDim: stackedDimCoordDim,
|
|
104
|
+
coordDimIndex: stackedDimCoordIndex,
|
|
105
|
+
type: stackedDimType,
|
|
106
|
+
isExtraCoord: true,
|
|
107
|
+
isCalculationCoord: true
|
|
108
|
+
});
|
|
109
|
+
stackedDimCoordIndex++;
|
|
110
|
+
dimensionInfoList.push({
|
|
111
|
+
name: stackedOverDimension,
|
|
112
|
+
// This dimension contains stack base (generally, 0), so do not set it as
|
|
113
|
+
// `stackedDimCoordDim` to avoid extent calculation, consider log scale.
|
|
114
|
+
coordDim: stackedOverDimension,
|
|
115
|
+
coordDimIndex: stackedDimCoordIndex,
|
|
116
|
+
type: stackedDimType,
|
|
117
|
+
isExtraCoord: true,
|
|
118
|
+
isCalculationCoord: true
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return {
|
|
123
|
+
stackedDimension: stackedDimInfo && stackedDimInfo.name,
|
|
124
|
+
stackedByDimension: stackedByDimInfo && stackedByDimInfo.name,
|
|
125
|
+
isStackedByIndex: byIndex,
|
|
126
|
+
stackedOverDimension: stackedOverDimension,
|
|
127
|
+
stackResultDimension: stackResultDimension
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* @param {module:echarts/data/List} data
|
|
132
|
+
* @param {string} stackedDim
|
|
133
|
+
*/
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
function isDimensionStacked(data, stackedDim
|
|
137
|
+
/*, stackedByDim*/
|
|
138
|
+
) {
|
|
139
|
+
// Each single series only maps to one pair of axis. So we do not need to
|
|
140
|
+
// check stackByDim, whatever stacked by a dimension or stacked by index.
|
|
141
|
+
return !!stackedDim && stackedDim === data.getCalculationInfo('stackedDimension'); // && (
|
|
142
|
+
// stackedByDim != null
|
|
143
|
+
// ? stackedByDim === data.getCalculationInfo('stackedByDimension')
|
|
144
|
+
// : data.getCalculationInfo('isStackedByIndex')
|
|
145
|
+
// );
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* @param {module:echarts/data/List} data
|
|
149
|
+
* @param {string} targetDim
|
|
150
|
+
* @param {string} [stackedByDim] If not input this parameter, check whether
|
|
151
|
+
* stacked by index.
|
|
152
|
+
* @return {string} dimension
|
|
153
|
+
*/
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
function getStackedDimension(data, targetDim) {
|
|
157
|
+
return isDimensionStacked(data, targetDim) ? data.getCalculationInfo('stackResultDimension') : targetDim;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
exports.enableDataStack = enableDataStack;
|
|
161
|
+
exports.isDimensionStacked = isDimensionStacked;
|
|
162
|
+
exports.getStackedDimension = getStackedDimension;
|
|
@@ -7,13 +7,33 @@ var assert = _util.assert;
|
|
|
7
7
|
var _config = require("../../config");
|
|
8
8
|
|
|
9
9
|
var __DEV__ = _config.__DEV__;
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
13
|
+
* or more contributor license agreements. See the NOTICE file
|
|
14
|
+
* distributed with this work for additional information
|
|
15
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
16
|
+
* to you under the Apache License, Version 2.0 (the
|
|
17
|
+
* "License"); you may not use this file except in compliance
|
|
18
|
+
* with the License. You may obtain a copy of the License at
|
|
19
|
+
*
|
|
20
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
21
|
+
*
|
|
22
|
+
* Unless required by applicable law or agreed to in writing,
|
|
23
|
+
* software distributed under the License is distributed on an
|
|
24
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
25
|
+
* KIND, either express or implied. See the License for the
|
|
26
|
+
* specific language governing permissions and limitations
|
|
27
|
+
* under the License.
|
|
28
|
+
*/
|
|
10
29
|
var OTHER_DIMENSIONS = createHashMap(['tooltip', 'label', 'itemName', 'itemId', 'seriesName']);
|
|
11
30
|
|
|
12
31
|
function summarizeDimensions(data) {
|
|
13
32
|
var summary = {};
|
|
14
33
|
var encode = summary.encode = {};
|
|
15
|
-
var
|
|
34
|
+
var notExtraCoordDimMap = createHashMap();
|
|
16
35
|
var defaultedLabel = [];
|
|
36
|
+
var defaultedTooltip = [];
|
|
17
37
|
each(data.dimensions, function (dimName) {
|
|
18
38
|
var dimItem = data.getDimensionInfo(dimName);
|
|
19
39
|
var coordDim = dimItem.coordDim;
|
|
@@ -27,14 +47,20 @@ function summarizeDimensions(data) {
|
|
|
27
47
|
|
|
28
48
|
coordDimArr[dimItem.coordDimIndex] = dimName;
|
|
29
49
|
|
|
30
|
-
if (dimItem.
|
|
31
|
-
// Use the last coord dim (and label friendly) as default label,
|
|
32
|
-
// because
|
|
33
|
-
// y
|
|
34
|
-
|
|
50
|
+
if (!dimItem.isExtraCoord) {
|
|
51
|
+
notExtraCoordDimMap.set(coordDim, 1); // Use the last coord dim (and label friendly) as default label,
|
|
52
|
+
// because when dataset is used, it is hard to guess which dimension
|
|
53
|
+
// can be value dimension. If both show x, y on label is not look good,
|
|
54
|
+
// and conventionally y axis is focused more.
|
|
55
|
+
|
|
56
|
+
if (mayLabelDimType(dimItem.type)) {
|
|
57
|
+
defaultedLabel[0] = dimName;
|
|
58
|
+
}
|
|
35
59
|
}
|
|
36
60
|
|
|
37
|
-
|
|
61
|
+
if (dimItem.defaultTooltip) {
|
|
62
|
+
defaultedTooltip.push(dimName);
|
|
63
|
+
}
|
|
38
64
|
}
|
|
39
65
|
|
|
40
66
|
OTHER_DIMENSIONS.each(function (v, otherDim) {
|
|
@@ -52,10 +78,19 @@ function summarizeDimensions(data) {
|
|
|
52
78
|
});
|
|
53
79
|
});
|
|
54
80
|
var dataDimsOnCoord = [];
|
|
55
|
-
|
|
56
|
-
|
|
81
|
+
var encodeFirstDimNotExtra = {};
|
|
82
|
+
notExtraCoordDimMap.each(function (v, coordDim) {
|
|
83
|
+
var dimArr = encode[coordDim]; // ??? FIXME extra coord should not be set in dataDimsOnCoord.
|
|
84
|
+
// But should fix the case that radar axes: simplify the logic
|
|
85
|
+
// of `completeDimension`, remove `extraPrefix`.
|
|
86
|
+
|
|
87
|
+
encodeFirstDimNotExtra[coordDim] = dimArr[0]; // Not necessary to remove duplicate, because a data
|
|
88
|
+
// dim canot on more than one coordDim.
|
|
89
|
+
|
|
90
|
+
dataDimsOnCoord = dataDimsOnCoord.concat(dimArr);
|
|
57
91
|
});
|
|
58
92
|
summary.dataDimsOnCoord = dataDimsOnCoord;
|
|
93
|
+
summary.encodeFirstDimNotExtra = encodeFirstDimNotExtra;
|
|
59
94
|
var encodeLabel = encode.label; // FIXME `encode.label` is not recommanded, because formatter can not be set
|
|
60
95
|
// in this way. Use label.formatter instead. May be remove this approach someday.
|
|
61
96
|
|
|
@@ -63,11 +98,12 @@ function summarizeDimensions(data) {
|
|
|
63
98
|
defaultedLabel = encodeLabel.slice();
|
|
64
99
|
}
|
|
65
100
|
|
|
66
|
-
var defaultedTooltip = defaultedLabel.slice();
|
|
67
101
|
var encodeTooltip = encode.tooltip;
|
|
68
102
|
|
|
69
103
|
if (encodeTooltip && encodeTooltip.length) {
|
|
70
104
|
defaultedTooltip = encodeTooltip.slice();
|
|
105
|
+
} else if (!defaultedTooltip.length) {
|
|
106
|
+
defaultedTooltip = defaultedLabel.slice();
|
|
71
107
|
}
|
|
72
108
|
|
|
73
109
|
encode.defaultedLabel = defaultedLabel;
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
var zrUtil = require("zrender/lib/core/util");
|
|
2
2
|
|
|
3
|
+
/*
|
|
4
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
5
|
+
* or more contributor license agreements. See the NOTICE file
|
|
6
|
+
* distributed with this work for additional information
|
|
7
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
8
|
+
* to you under the Apache License, Version 2.0 (the
|
|
9
|
+
* "License"); you may not use this file except in compliance
|
|
10
|
+
* with the License. You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing,
|
|
15
|
+
* software distributed under the License is distributed on an
|
|
16
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
17
|
+
* KIND, either express or implied. See the License for the
|
|
18
|
+
* specific language governing permissions and limitations
|
|
19
|
+
* under the License.
|
|
20
|
+
*/
|
|
21
|
+
|
|
3
22
|
/**
|
|
4
23
|
* Link lists and struct (graph or tree)
|
|
5
24
|
*/
|