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/coord/axisDefault.js
CHANGED
|
@@ -1,97 +1,98 @@
|
|
|
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
|
+
*/
|
|
3
21
|
var defaultOption = {
|
|
4
22
|
show: true,
|
|
5
23
|
zlevel: 0,
|
|
6
|
-
// 一级层叠
|
|
7
24
|
z: 0,
|
|
8
|
-
//
|
|
9
|
-
// 反向坐标轴
|
|
25
|
+
// Inverse the axis.
|
|
10
26
|
inverse: false,
|
|
11
|
-
//
|
|
27
|
+
// Axis name displayed.
|
|
12
28
|
name: '',
|
|
13
|
-
//
|
|
29
|
+
// 'start' | 'middle' | 'end'
|
|
14
30
|
nameLocation: 'end',
|
|
15
|
-
//
|
|
31
|
+
// By degree. By defualt auto rotate by nameLocation.
|
|
16
32
|
nameRotate: null,
|
|
17
|
-
// Adapt to axis rotate, when nameLocation is 'middle'.
|
|
18
33
|
nameTruncate: {
|
|
19
34
|
maxWidth: null,
|
|
20
35
|
ellipsis: '...',
|
|
21
36
|
placeholder: '.'
|
|
22
37
|
},
|
|
23
|
-
//
|
|
38
|
+
// Use global text style by default.
|
|
24
39
|
nameTextStyle: {},
|
|
25
|
-
//
|
|
40
|
+
// The gap between axisName and axisLine.
|
|
26
41
|
nameGap: 15,
|
|
42
|
+
// Default `false` to support tooltip.
|
|
27
43
|
silent: false,
|
|
28
|
-
// Default false to
|
|
44
|
+
// Default `false` to avoid legacy user event listener fail.
|
|
29
45
|
triggerEvent: false,
|
|
30
|
-
// Default false to avoid legacy user event listener fail.
|
|
31
46
|
tooltip: {
|
|
32
47
|
show: false
|
|
33
48
|
},
|
|
34
49
|
axisPointer: {},
|
|
35
|
-
// 坐标轴线
|
|
36
50
|
axisLine: {
|
|
37
|
-
// 默认显示,属性show控制显示与否
|
|
38
51
|
show: true,
|
|
39
52
|
onZero: true,
|
|
40
53
|
onZeroAxisIndex: null,
|
|
41
|
-
// 属性lineStyle控制线条样式
|
|
42
54
|
lineStyle: {
|
|
43
55
|
color: '#333',
|
|
44
56
|
width: 1,
|
|
45
57
|
type: 'solid'
|
|
46
58
|
},
|
|
47
|
-
//
|
|
59
|
+
// The arrow at both ends the the axis.
|
|
48
60
|
symbol: ['none', 'none'],
|
|
49
61
|
symbolSize: [10, 15]
|
|
50
62
|
},
|
|
51
|
-
// 坐标轴小标记
|
|
52
63
|
axisTick: {
|
|
53
|
-
// 属性show控制显示与否,默认显示
|
|
54
64
|
show: true,
|
|
55
|
-
//
|
|
65
|
+
// Whether axisTick is inside the grid or outside the grid.
|
|
56
66
|
inside: false,
|
|
57
|
-
//
|
|
67
|
+
// The length of axisTick.
|
|
58
68
|
length: 5,
|
|
59
|
-
// 属性lineStyle控制线条样式
|
|
60
69
|
lineStyle: {
|
|
61
70
|
width: 1
|
|
62
71
|
}
|
|
63
72
|
},
|
|
64
|
-
// 坐标轴文本标签,详见axis.axisLabel
|
|
65
73
|
axisLabel: {
|
|
66
74
|
show: true,
|
|
67
|
-
//
|
|
75
|
+
// Whether axisLabel is inside the grid or outside the grid.
|
|
68
76
|
inside: false,
|
|
69
77
|
rotate: 0,
|
|
78
|
+
// true | false | null/undefined (auto)
|
|
70
79
|
showMinLabel: null,
|
|
71
|
-
// true | false | null (auto)
|
|
80
|
+
// true | false | null/undefined (auto)
|
|
72
81
|
showMaxLabel: null,
|
|
73
|
-
// true | false | null (auto)
|
|
74
82
|
margin: 8,
|
|
75
83
|
// formatter: null,
|
|
76
|
-
// 其余属性默认使用全局文本样式,详见TEXTSTYLE
|
|
77
84
|
fontSize: 12
|
|
78
85
|
},
|
|
79
|
-
// 分隔线
|
|
80
86
|
splitLine: {
|
|
81
|
-
// 默认显示,属性show控制显示与否
|
|
82
87
|
show: true,
|
|
83
|
-
// 属性lineStyle(详见lineStyle)控制线条样式
|
|
84
88
|
lineStyle: {
|
|
85
89
|
color: ['#ccc'],
|
|
86
90
|
width: 1,
|
|
87
91
|
type: 'solid'
|
|
88
92
|
}
|
|
89
93
|
},
|
|
90
|
-
// 分隔区域
|
|
91
94
|
splitArea: {
|
|
92
|
-
// 默认不显示,属性show控制显示与否
|
|
93
95
|
show: false,
|
|
94
|
-
// 属性areaStyle(详见areaStyle)控制区域样式
|
|
95
96
|
areaStyle: {
|
|
96
97
|
color: ['rgba(250,250,250,0.3)', 'rgba(200,200,200,0.3)']
|
|
97
98
|
}
|
|
@@ -99,7 +100,7 @@ var defaultOption = {
|
|
|
99
100
|
};
|
|
100
101
|
var axisDefault = {};
|
|
101
102
|
axisDefault.categoryAxis = zrUtil.merge({
|
|
102
|
-
//
|
|
103
|
+
// The gap at both ends of the axis. For categoryAxis, boolean.
|
|
103
104
|
boundaryGap: true,
|
|
104
105
|
// Set false to faster category collection.
|
|
105
106
|
// Only usefull in the case like: category is
|
|
@@ -115,39 +116,48 @@ axisDefault.categoryAxis = zrUtil.merge({
|
|
|
115
116
|
splitLine: {
|
|
116
117
|
show: false
|
|
117
118
|
},
|
|
118
|
-
// 坐标轴小标记
|
|
119
119
|
axisTick: {
|
|
120
120
|
// If tick is align with label when boundaryGap is true
|
|
121
121
|
alignWithLabel: false,
|
|
122
122
|
interval: 'auto'
|
|
123
123
|
},
|
|
124
|
-
// 坐标轴文本标签,详见axis.axisLabel
|
|
125
124
|
axisLabel: {
|
|
126
125
|
interval: 'auto'
|
|
127
126
|
}
|
|
128
127
|
}, defaultOption);
|
|
129
128
|
axisDefault.valueAxis = zrUtil.merge({
|
|
130
|
-
//
|
|
129
|
+
// The gap at both ends of the axis. For value axis, [GAP, GAP], where
|
|
130
|
+
// `GAP` can be an absolute pixel number (like `35`), or percent (like `'30%'`)
|
|
131
131
|
boundaryGap: [0, 0],
|
|
132
132
|
// TODO
|
|
133
133
|
// min/max: [30, datamin, 60] or [20, datamin] or [datamin, 60]
|
|
134
|
-
//
|
|
134
|
+
// Min value of the axis. can be:
|
|
135
|
+
// + a number
|
|
136
|
+
// + 'dataMin': use the min value in data.
|
|
137
|
+
// + null/undefined: auto decide min value (consider pretty look and boundaryGap).
|
|
135
138
|
// min: null,
|
|
136
|
-
//
|
|
139
|
+
// Max value of the axis. can be:
|
|
140
|
+
// + a number
|
|
141
|
+
// + 'dataMax': use the max value in data.
|
|
142
|
+
// + null/undefined: auto decide max value (consider pretty look and boundaryGap).
|
|
137
143
|
// max: null,
|
|
138
144
|
// Readonly prop, specifies start value of the range when using data zoom.
|
|
139
145
|
// rangeStart: null
|
|
140
146
|
// Readonly prop, specifies end value of the range when using data zoom.
|
|
141
147
|
// rangeEnd: null
|
|
142
|
-
//
|
|
148
|
+
// Optional value can be:
|
|
149
|
+
// + `false`: always include value 0.
|
|
150
|
+
// + `true`: the extent do not consider value 0.
|
|
143
151
|
// scale: false,
|
|
144
|
-
//
|
|
145
|
-
splitNumber: 5 //
|
|
152
|
+
// AxisTick and axisLabel and splitLine are caculated based on splitNumber.
|
|
153
|
+
splitNumber: 5 // Interval specifies the span of the ticks is mandatorily.
|
|
154
|
+
// interval: null
|
|
155
|
+
// Specify min interval when auto calculate tick interval.
|
|
146
156
|
// minInterval: null
|
|
157
|
+
// Specify max interval when auto calculate tick interval.
|
|
147
158
|
// maxInterval: null
|
|
148
159
|
|
|
149
|
-
}, defaultOption);
|
|
150
|
-
|
|
160
|
+
}, defaultOption);
|
|
151
161
|
axisDefault.timeAxis = zrUtil.defaults({
|
|
152
162
|
scale: true,
|
|
153
163
|
min: 'dataMin',
|
package/lib/coord/axisHelper.js
CHANGED
|
@@ -4,8 +4,6 @@ var __DEV__ = _config.__DEV__;
|
|
|
4
4
|
|
|
5
5
|
var zrUtil = require("zrender/lib/core/util");
|
|
6
6
|
|
|
7
|
-
var textContain = require("zrender/lib/contain/text");
|
|
8
|
-
|
|
9
7
|
var OrdinalScale = require("../scale/Ordinal");
|
|
10
8
|
|
|
11
9
|
var IntervalScale = require("../scale/Interval");
|
|
@@ -16,12 +14,35 @@ var numberUtil = require("../util/number");
|
|
|
16
14
|
|
|
17
15
|
var _barGrid = require("../layout/barGrid");
|
|
18
16
|
|
|
19
|
-
var
|
|
17
|
+
var prepareLayoutBarSeries = _barGrid.prepareLayoutBarSeries;
|
|
18
|
+
var makeColumnLayout = _barGrid.makeColumnLayout;
|
|
19
|
+
var retrieveColumnLayout = _barGrid.retrieveColumnLayout;
|
|
20
|
+
|
|
21
|
+
var BoundingRect = require("zrender/lib/core/BoundingRect");
|
|
20
22
|
|
|
21
23
|
require("../scale/Time");
|
|
22
24
|
|
|
23
25
|
require("../scale/Log");
|
|
24
26
|
|
|
27
|
+
/*
|
|
28
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
29
|
+
* or more contributor license agreements. See the NOTICE file
|
|
30
|
+
* distributed with this work for additional information
|
|
31
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
32
|
+
* to you under the Apache License, Version 2.0 (the
|
|
33
|
+
* "License"); you may not use this file except in compliance
|
|
34
|
+
* with the License. You may obtain a copy of the License at
|
|
35
|
+
*
|
|
36
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
37
|
+
*
|
|
38
|
+
* Unless required by applicable law or agreed to in writing,
|
|
39
|
+
* software distributed under the License is distributed on an
|
|
40
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
41
|
+
* KIND, either express or implied. See the License for the
|
|
42
|
+
* specific language governing permissions and limitations
|
|
43
|
+
* under the License.
|
|
44
|
+
*/
|
|
45
|
+
|
|
25
46
|
/**
|
|
26
47
|
* Get axis scale extent before niced.
|
|
27
48
|
* Item of returned array can only be number (including Infinity and NaN).
|
|
@@ -96,7 +117,7 @@ function getScaleExtent(scale, model) {
|
|
|
96
117
|
|
|
97
118
|
(min == null || !isFinite(min)) && (min = NaN);
|
|
98
119
|
(max == null || !isFinite(max)) && (max = NaN);
|
|
99
|
-
scale.setBlank(zrUtil.eqNaN(min) || zrUtil.eqNaN(max)); // Evaluate if axis needs cross zero
|
|
120
|
+
scale.setBlank(zrUtil.eqNaN(min) || zrUtil.eqNaN(max) || scaleType === 'ordinal' && !scale.getOrdinalMeta().categories.length); // Evaluate if axis needs cross zero
|
|
100
121
|
|
|
101
122
|
if (model.getNeedCrossZero()) {
|
|
102
123
|
// Axis is over zero and min is not set
|
|
@@ -110,18 +131,31 @@ function getScaleExtent(scale, model) {
|
|
|
110
131
|
}
|
|
111
132
|
} // If bars are placed on a base axis of type time or interval account for axis boundary overflow and current axis
|
|
112
133
|
// is base axis
|
|
134
|
+
// FIXME
|
|
135
|
+
// (1) Consider support value axis, where below zero and axis `onZero` should be handled properly.
|
|
136
|
+
// (2) Refactor the logic with `barGrid`. Is it not need to `makeBarWidthAndOffsetInfo` twice with different extent?
|
|
137
|
+
// Should not depend on series type `bar`?
|
|
138
|
+
// (3) Fix that might overlap when using dataZoom.
|
|
139
|
+
// (4) Consider other chart types using `barGrid`?
|
|
140
|
+
// See #6728, #4862, `test/bar-overflow-time-plot.html`
|
|
113
141
|
|
|
114
142
|
|
|
115
143
|
var ecModel = model.ecModel;
|
|
116
144
|
|
|
117
|
-
if (ecModel
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
145
|
+
if (ecModel && scaleType === 'time'
|
|
146
|
+
/*|| scaleType === 'interval' */
|
|
147
|
+
) {
|
|
148
|
+
var barSeriesModels = prepareLayoutBarSeries('bar', ecModel);
|
|
149
|
+
var isBaseAxisAndHasBarSeries;
|
|
150
|
+
zrUtil.each(barSeriesModels, function (seriesModel) {
|
|
151
|
+
isBaseAxisAndHasBarSeries |= seriesModel.getBaseAxis() === model.axis;
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
if (isBaseAxisAndHasBarSeries) {
|
|
155
|
+
// Calculate placement of bars on axis
|
|
156
|
+
var barWidthAndOffset = makeColumnLayout(barSeriesModels); // Adjust axis min and max to account for overflow
|
|
121
157
|
|
|
122
|
-
|
|
123
|
-
// Adjust axis min and max to account for overflow
|
|
124
|
-
var adjustedScale = adjustScaleForOverflow(min, max, model);
|
|
158
|
+
var adjustedScale = adjustScaleForOverflow(min, max, model, barWidthAndOffset);
|
|
125
159
|
min = adjustedScale.min;
|
|
126
160
|
max = adjustedScale.max;
|
|
127
161
|
}
|
|
@@ -130,18 +164,12 @@ function getScaleExtent(scale, model) {
|
|
|
130
164
|
return [min, max];
|
|
131
165
|
}
|
|
132
166
|
|
|
133
|
-
function adjustScaleForOverflow(min, max, model) {
|
|
134
|
-
|
|
135
|
-
|
|
167
|
+
function adjustScaleForOverflow(min, max, model, barWidthAndOffset) {
|
|
168
|
+
// Get Axis Length
|
|
136
169
|
var axisExtent = model.axis.getExtent();
|
|
137
|
-
var axisLength = axisExtent[1] - axisExtent[0]; //
|
|
138
|
-
|
|
139
|
-
var barWidthAndOffset = calBarWidthAndOffset(zrUtil.filter(ecModel.getSeriesByType('bar'), function (seriesModel) {
|
|
140
|
-
return !ecModel.isSeriesFiltered(seriesModel) && seriesModel.coordinateSystem && seriesModel.coordinateSystem.type === 'cartesian2d';
|
|
141
|
-
})); // Get bars on current base axis and calculate min and max overflow
|
|
170
|
+
var axisLength = axisExtent[1] - axisExtent[0]; // Get bars on current base axis and calculate min and max overflow
|
|
142
171
|
|
|
143
|
-
var
|
|
144
|
-
var barsOnCurrentAxis = barWidthAndOffset[baseAxisKey];
|
|
172
|
+
var barsOnCurrentAxis = retrieveColumnLayout(barWidthAndOffset, model.axis);
|
|
145
173
|
|
|
146
174
|
if (barsOnCurrentAxis === undefined) {
|
|
147
175
|
return {
|
|
@@ -158,7 +186,9 @@ function adjustScaleForOverflow(min, max, model) {
|
|
|
158
186
|
zrUtil.each(barsOnCurrentAxis, function (item) {
|
|
159
187
|
maxOverflow = Math.max(item.offset + item.width, maxOverflow);
|
|
160
188
|
});
|
|
161
|
-
|
|
189
|
+
minOverflow = Math.abs(minOverflow);
|
|
190
|
+
maxOverflow = Math.abs(maxOverflow);
|
|
191
|
+
var totalOverFlow = minOverflow + maxOverflow; // Calulate required buffer based on old range and overflow
|
|
162
192
|
|
|
163
193
|
var oldRange = max - min;
|
|
164
194
|
var oldRangePercentOfNew = 1 - (minOverflow + maxOverflow) / axisLength;
|
|
@@ -238,99 +268,116 @@ function ifAxisCrossZero(axis) {
|
|
|
238
268
|
return !(min > 0 && max > 0 || min < 0 && max < 0);
|
|
239
269
|
}
|
|
240
270
|
/**
|
|
241
|
-
* @param {
|
|
242
|
-
* @
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
271
|
+
* @param {module:echarts/coord/Axis} axis
|
|
272
|
+
* @return {Function} Label formatter function.
|
|
273
|
+
* param: {number} tickValue,
|
|
274
|
+
* param: {number} idx, the index in all ticks.
|
|
275
|
+
* If category axis, this param is not requied.
|
|
276
|
+
* return: {string} label string.
|
|
247
277
|
*/
|
|
248
278
|
|
|
249
279
|
|
|
250
|
-
function
|
|
251
|
-
var
|
|
252
|
-
var
|
|
253
|
-
var accumulatedLabelInterval = 0;
|
|
254
|
-
var rotation = (axisRotate - labelRotate) / 180 * Math.PI;
|
|
255
|
-
var step = 1;
|
|
256
|
-
|
|
257
|
-
if (labels.length > 40) {
|
|
258
|
-
// Simple optimization for large amount of labels
|
|
259
|
-
step = Math.floor(labels.length / 40);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
for (var i = 0; i < tickCoords.length; i += step) {
|
|
263
|
-
var tickCoord = tickCoords[i]; // Not precise, do not consider align and vertical align
|
|
264
|
-
// and each distance from axis line yet.
|
|
265
|
-
|
|
266
|
-
var rect = textContain.getBoundingRect(labels[i], font, 'center', 'top');
|
|
267
|
-
rect.x += tickCoord * Math.cos(rotation);
|
|
268
|
-
rect.y += tickCoord * Math.sin(rotation); // Magic number
|
|
280
|
+
function makeLabelFormatter(axis) {
|
|
281
|
+
var labelFormatter = axis.getLabelModel().get('formatter');
|
|
282
|
+
var categoryTickStart = axis.type === 'category' ? axis.scale.getExtent()[0] : null;
|
|
269
283
|
|
|
270
|
-
|
|
271
|
-
|
|
284
|
+
if (typeof labelFormatter === 'string') {
|
|
285
|
+
labelFormatter = function (tpl) {
|
|
286
|
+
return function (val) {
|
|
287
|
+
return tpl.replace('{value}', val != null ? val : '');
|
|
288
|
+
};
|
|
289
|
+
}(labelFormatter); // Consider empty array
|
|
272
290
|
|
|
273
|
-
if (!textSpaceTakenRect) {
|
|
274
|
-
textSpaceTakenRect = rect.clone();
|
|
275
|
-
} // There is no space for current label;
|
|
276
|
-
else if (textSpaceTakenRect.intersect(rect)) {
|
|
277
|
-
accumulatedLabelInterval++;
|
|
278
|
-
autoLabelInterval = Math.max(autoLabelInterval, accumulatedLabelInterval);
|
|
279
|
-
} else {
|
|
280
|
-
textSpaceTakenRect.union(rect); // Reset
|
|
281
291
|
|
|
282
|
-
|
|
292
|
+
return labelFormatter;
|
|
293
|
+
} else if (typeof labelFormatter === 'function') {
|
|
294
|
+
return function (tickValue, idx) {
|
|
295
|
+
// The original intention of `idx` is "the index of the tick in all ticks".
|
|
296
|
+
// But the previous implementation of category axis do not consider the
|
|
297
|
+
// `axisLabel.interval`, which cause that, for example, the `interval` is
|
|
298
|
+
// `1`, then the ticks "name5", "name7", "name9" are displayed, where the
|
|
299
|
+
// corresponding `idx` are `0`, `2`, `4`, but not `0`, `1`, `2`. So we keep
|
|
300
|
+
// the definition here for back compatibility.
|
|
301
|
+
if (categoryTickStart != null) {
|
|
302
|
+
idx = tickValue - categoryTickStart;
|
|
283
303
|
}
|
|
284
|
-
}
|
|
285
304
|
|
|
286
|
-
|
|
287
|
-
|
|
305
|
+
return labelFormatter(getAxisRawValue(axis, tickValue), idx);
|
|
306
|
+
};
|
|
307
|
+
} else {
|
|
308
|
+
return function (tick) {
|
|
309
|
+
return axis.scale.getLabel(tick);
|
|
310
|
+
};
|
|
288
311
|
}
|
|
312
|
+
}
|
|
289
313
|
|
|
290
|
-
|
|
314
|
+
function getAxisRawValue(axis, value) {
|
|
315
|
+
// In category axis with data zoom, tick is not the original
|
|
316
|
+
// index of axis.data. So tick should not be exposed to user
|
|
317
|
+
// in category axis.
|
|
318
|
+
return axis.type === 'category' ? axis.scale.getLabel(value) : value;
|
|
291
319
|
}
|
|
292
320
|
/**
|
|
293
|
-
* @param {
|
|
294
|
-
* @
|
|
295
|
-
* @return {Array.<string>}
|
|
321
|
+
* @param {module:echarts/coord/Axis} axis
|
|
322
|
+
* @return {module:zrender/core/BoundingRect} Be null/undefined if no labels.
|
|
296
323
|
*/
|
|
297
324
|
|
|
298
325
|
|
|
299
|
-
function
|
|
326
|
+
function estimateLabelUnionRect(axis) {
|
|
327
|
+
var axisModel = axis.model;
|
|
300
328
|
var scale = axis.scale;
|
|
301
|
-
var labels = scale.getTicksLabels();
|
|
302
|
-
var ticks = scale.getTicks();
|
|
303
329
|
|
|
304
|
-
if (
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
return tpl.replace('{value}', val != null ? val : '');
|
|
308
|
-
};
|
|
309
|
-
}(labelFormatter); // Consider empty array
|
|
330
|
+
if (!axisModel.get('axisLabel.show') || scale.isBlank()) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
310
333
|
|
|
334
|
+
var isCategory = axis.type === 'category';
|
|
335
|
+
var realNumberScaleTicks;
|
|
336
|
+
var tickCount;
|
|
337
|
+
var categoryScaleExtent = scale.getExtent(); // Optimize for large category data, avoid call `getTicks()`.
|
|
311
338
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
return zrUtil.map(ticks, function (tick, idx) {
|
|
315
|
-
return labelFormatter(getAxisRawValue(axis, tick), idx);
|
|
316
|
-
}, this);
|
|
339
|
+
if (isCategory) {
|
|
340
|
+
tickCount = scale.count();
|
|
317
341
|
} else {
|
|
318
|
-
|
|
342
|
+
realNumberScaleTicks = scale.getTicks();
|
|
343
|
+
tickCount = realNumberScaleTicks.length;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
var axisLabelModel = axis.getLabelModel();
|
|
347
|
+
var labelFormatter = makeLabelFormatter(axis);
|
|
348
|
+
var rect;
|
|
349
|
+
var step = 1; // Simple optimization for large amount of labels
|
|
350
|
+
|
|
351
|
+
if (tickCount > 40) {
|
|
352
|
+
step = Math.ceil(tickCount / 40);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
for (var i = 0; i < tickCount; i += step) {
|
|
356
|
+
var tickValue = realNumberScaleTicks ? realNumberScaleTicks[i] : categoryScaleExtent[0] + i;
|
|
357
|
+
var label = labelFormatter(tickValue);
|
|
358
|
+
var unrotatedSingleRect = axisLabelModel.getTextRect(label);
|
|
359
|
+
var singleRect = rotateTextRect(unrotatedSingleRect, axisLabelModel.get('rotate') || 0);
|
|
360
|
+
rect ? rect.union(singleRect) : rect = singleRect;
|
|
319
361
|
}
|
|
362
|
+
|
|
363
|
+
return rect;
|
|
320
364
|
}
|
|
321
365
|
|
|
322
|
-
function
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
366
|
+
function rotateTextRect(textRect, rotate) {
|
|
367
|
+
var rotateRadians = rotate * Math.PI / 180;
|
|
368
|
+
var boundingBox = textRect.plain();
|
|
369
|
+
var beforeWidth = boundingBox.width;
|
|
370
|
+
var beforeHeight = boundingBox.height;
|
|
371
|
+
var afterWidth = beforeWidth * Math.cos(rotateRadians) + beforeHeight * Math.sin(rotateRadians);
|
|
372
|
+
var afterHeight = beforeWidth * Math.sin(rotateRadians) + beforeHeight * Math.cos(rotateRadians);
|
|
373
|
+
var rotatedRect = new BoundingRect(boundingBox.x, boundingBox.y, afterWidth, afterHeight);
|
|
374
|
+
return rotatedRect;
|
|
327
375
|
}
|
|
328
376
|
|
|
329
377
|
exports.getScaleExtent = getScaleExtent;
|
|
330
|
-
exports.adjustScaleForOverflow = adjustScaleForOverflow;
|
|
331
378
|
exports.niceScaleExtent = niceScaleExtent;
|
|
332
379
|
exports.createScaleByModel = createScaleByModel;
|
|
333
380
|
exports.ifAxisCrossZero = ifAxisCrossZero;
|
|
334
|
-
exports.
|
|
335
|
-
exports.
|
|
336
|
-
exports.
|
|
381
|
+
exports.makeLabelFormatter = makeLabelFormatter;
|
|
382
|
+
exports.getAxisRawValue = getAxisRawValue;
|
|
383
|
+
exports.estimateLabelUnionRect = estimateLabelUnionRect;
|
|
@@ -2,15 +2,25 @@ var zrUtil = require("zrender/lib/core/util");
|
|
|
2
2
|
|
|
3
3
|
var axisHelper = require("./axisHelper");
|
|
4
4
|
|
|
5
|
+
/*
|
|
6
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
7
|
+
* or more contributor license agreements. See the NOTICE file
|
|
8
|
+
* distributed with this work for additional information
|
|
9
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
10
|
+
* to you under the Apache License, Version 2.0 (the
|
|
11
|
+
* "License"); you may not use this file except in compliance
|
|
12
|
+
* with the License. You may obtain a copy of the License at
|
|
13
|
+
*
|
|
14
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
+
*
|
|
16
|
+
* Unless required by applicable law or agreed to in writing,
|
|
17
|
+
* software distributed under the License is distributed on an
|
|
18
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
19
|
+
* KIND, either express or implied. See the License for the
|
|
20
|
+
* specific language governing permissions and limitations
|
|
21
|
+
* under the License.
|
|
22
|
+
*/
|
|
5
23
|
var _default = {
|
|
6
|
-
/**
|
|
7
|
-
* Format labels
|
|
8
|
-
* @return {Array.<string>}
|
|
9
|
-
*/
|
|
10
|
-
getFormattedLabels: function () {
|
|
11
|
-
return axisHelper.getFormattedLabels(this.axis, this.get('axisLabel.formatter'));
|
|
12
|
-
},
|
|
13
|
-
|
|
14
24
|
/**
|
|
15
25
|
* @param {boolean} origin
|
|
16
26
|
* @return {number|string} min value or 'dataMin' or null/undefined (means auto) or NaN
|
|
@@ -11,6 +11,24 @@ var mergeLayoutParam = _layout.mergeLayoutParam;
|
|
|
11
11
|
|
|
12
12
|
var OrdinalMeta = require("../data/OrdinalMeta");
|
|
13
13
|
|
|
14
|
+
/*
|
|
15
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
16
|
+
* or more contributor license agreements. See the NOTICE file
|
|
17
|
+
* distributed with this work for additional information
|
|
18
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
19
|
+
* to you under the Apache License, Version 2.0 (the
|
|
20
|
+
* "License"); you may not use this file except in compliance
|
|
21
|
+
* with the License. You may obtain a copy of the License at
|
|
22
|
+
*
|
|
23
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
24
|
+
*
|
|
25
|
+
* Unless required by applicable law or agreed to in writing,
|
|
26
|
+
* software distributed under the License is distributed on an
|
|
27
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
28
|
+
* KIND, either express or implied. See the License for the
|
|
29
|
+
* specific language governing permissions and limitations
|
|
30
|
+
* under the License.
|
|
31
|
+
*/
|
|
14
32
|
// FIXME axisType is fixed ?
|
|
15
33
|
var AXIS_TYPES = ['value', 'category', 'time', 'log'];
|
|
16
34
|
/**
|
|
@@ -56,10 +74,15 @@ function _default(axisName, BaseAxisModelClass, axisTypeDefaulter, extraDefaultO
|
|
|
56
74
|
* Should not be called before all of 'getInitailData' finished.
|
|
57
75
|
* Because categories are collected during initializing data.
|
|
58
76
|
*/
|
|
59
|
-
getCategories: function () {
|
|
60
|
-
// FIXME
|
|
77
|
+
getCategories: function (rawData) {
|
|
78
|
+
var option = this.option; // FIXME
|
|
61
79
|
// warning if called before all of 'getInitailData' finished.
|
|
62
|
-
|
|
80
|
+
|
|
81
|
+
if (option.type === 'category') {
|
|
82
|
+
if (rawData) {
|
|
83
|
+
return option.data;
|
|
84
|
+
}
|
|
85
|
+
|
|
63
86
|
return this.__ordinalMeta.categories;
|
|
64
87
|
}
|
|
65
88
|
},
|