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
|
@@ -6,6 +6,24 @@ var Model = require("../../model/Model");
|
|
|
6
6
|
|
|
7
7
|
var AxisView = require("./AxisView");
|
|
8
8
|
|
|
9
|
+
/*
|
|
10
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
11
|
+
* or more contributor license agreements. See the NOTICE file
|
|
12
|
+
* distributed with this work for additional information
|
|
13
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
14
|
+
* to you under the Apache License, Version 2.0 (the
|
|
15
|
+
* "License"); you may not use this file except in compliance
|
|
16
|
+
* with the License. You may obtain a copy of the License at
|
|
17
|
+
*
|
|
18
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
19
|
+
*
|
|
20
|
+
* Unless required by applicable law or agreed to in writing,
|
|
21
|
+
* software distributed under the License is distributed on an
|
|
22
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
23
|
+
* KIND, either express or implied. See the License for the
|
|
24
|
+
* specific language governing permissions and limitations
|
|
25
|
+
* under the License.
|
|
26
|
+
*/
|
|
9
27
|
var elementList = ['axisLine', 'axisLabel', 'axisTick', 'splitLine', 'splitArea'];
|
|
10
28
|
|
|
11
29
|
function getAxisLineShape(polar, rExtent, angle) {
|
|
@@ -23,6 +41,16 @@ function getAxisLineShape(polar, rExtent, angle) {
|
|
|
23
41
|
function getRadiusIdx(polar) {
|
|
24
42
|
var radiusAxis = polar.getRadiusAxis();
|
|
25
43
|
return radiusAxis.inverse ? 0 : 1;
|
|
44
|
+
} // Remove the last tick which will overlap the first tick
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
function fixAngleOverlap(list) {
|
|
48
|
+
var firstItem = list[0];
|
|
49
|
+
var lastItem = list[list.length - 1];
|
|
50
|
+
|
|
51
|
+
if (firstItem && lastItem && Math.abs(Math.abs(firstItem.coord - lastItem.coord) - 360) < 1e-4) {
|
|
52
|
+
list.pop();
|
|
53
|
+
}
|
|
26
54
|
}
|
|
27
55
|
|
|
28
56
|
var _default = AxisView.extend({
|
|
@@ -39,15 +67,16 @@ var _default = AxisView.extend({
|
|
|
39
67
|
var polar = angleAxis.polar;
|
|
40
68
|
var radiusExtent = polar.getRadiusAxis().getExtent();
|
|
41
69
|
var ticksAngles = angleAxis.getTicksCoords();
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
70
|
+
var labels = zrUtil.map(angleAxis.getViewLabels(), function (labelItem) {
|
|
71
|
+
var labelItem = zrUtil.clone(labelItem);
|
|
72
|
+
labelItem.coord = angleAxis.dataToCoord(labelItem.tickValue);
|
|
73
|
+
return labelItem;
|
|
74
|
+
});
|
|
75
|
+
fixAngleOverlap(labels);
|
|
76
|
+
fixAngleOverlap(ticksAngles);
|
|
48
77
|
zrUtil.each(elementList, function (name) {
|
|
49
78
|
if (angleAxisModel.get(name + '.show') && (!angleAxis.scale.isBlank() || name === 'axisLine')) {
|
|
50
|
-
this['_' + name](angleAxisModel, polar, ticksAngles, radiusExtent);
|
|
79
|
+
this['_' + name](angleAxisModel, polar, ticksAngles, radiusExtent, labels);
|
|
51
80
|
}
|
|
52
81
|
}, this);
|
|
53
82
|
},
|
|
@@ -78,9 +107,9 @@ var _default = AxisView.extend({
|
|
|
78
107
|
var tickModel = angleAxisModel.getModel('axisTick');
|
|
79
108
|
var tickLen = (tickModel.get('inside') ? -1 : 1) * tickModel.get('length');
|
|
80
109
|
var radius = radiusExtent[getRadiusIdx(polar)];
|
|
81
|
-
var lines = zrUtil.map(ticksAngles, function (
|
|
110
|
+
var lines = zrUtil.map(ticksAngles, function (tickAngleItem) {
|
|
82
111
|
return new graphic.Line({
|
|
83
|
-
shape: getAxisLineShape(polar, [radius, radius + tickLen],
|
|
112
|
+
shape: getAxisLineShape(polar, [radius, radius + tickLen], tickAngleItem.coord)
|
|
84
113
|
});
|
|
85
114
|
});
|
|
86
115
|
this.group.add(graphic.mergePath(lines, {
|
|
@@ -93,24 +122,23 @@ var _default = AxisView.extend({
|
|
|
93
122
|
/**
|
|
94
123
|
* @private
|
|
95
124
|
*/
|
|
96
|
-
_axisLabel: function (angleAxisModel, polar, ticksAngles, radiusExtent) {
|
|
97
|
-
var
|
|
98
|
-
var
|
|
99
|
-
var
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
for (var i = 0; i < ticksAngles.length; i++) {
|
|
125
|
+
_axisLabel: function (angleAxisModel, polar, ticksAngles, radiusExtent, labels) {
|
|
126
|
+
var rawCategoryData = angleAxisModel.getCategories(true);
|
|
127
|
+
var commonLabelModel = angleAxisModel.getModel('axisLabel');
|
|
128
|
+
var labelMargin = commonLabelModel.get('margin'); // Use length of ticksAngles because it may remove the last tick to avoid overlapping
|
|
129
|
+
|
|
130
|
+
zrUtil.each(labels, function (labelItem, idx) {
|
|
131
|
+
var labelModel = commonLabelModel;
|
|
132
|
+
var tickValue = labelItem.tickValue;
|
|
105
133
|
var r = radiusExtent[getRadiusIdx(polar)];
|
|
106
|
-
var p = polar.coordToPoint([r + labelMargin,
|
|
134
|
+
var p = polar.coordToPoint([r + labelMargin, labelItem.coord]);
|
|
107
135
|
var cx = polar.cx;
|
|
108
136
|
var cy = polar.cy;
|
|
109
137
|
var labelTextAlign = Math.abs(p[0] - cx) / r < 0.3 ? 'center' : p[0] > cx ? 'left' : 'right';
|
|
110
138
|
var labelTextVerticalAlign = Math.abs(p[1] - cy) / r < 0.3 ? 'middle' : p[1] > cy ? 'top' : 'bottom';
|
|
111
139
|
|
|
112
|
-
if (
|
|
113
|
-
labelModel = new Model(
|
|
140
|
+
if (rawCategoryData && rawCategoryData[tickValue] && rawCategoryData[tickValue].textStyle) {
|
|
141
|
+
labelModel = new Model(rawCategoryData[tickValue].textStyle, commonLabelModel, commonLabelModel.ecModel);
|
|
114
142
|
}
|
|
115
143
|
|
|
116
144
|
var textEl = new graphic.Text({
|
|
@@ -121,11 +149,11 @@ var _default = AxisView.extend({
|
|
|
121
149
|
x: p[0],
|
|
122
150
|
y: p[1],
|
|
123
151
|
textFill: labelModel.getTextColor() || angleAxisModel.get('axisLine.lineStyle.color'),
|
|
124
|
-
text:
|
|
152
|
+
text: labelItem.formattedLabel,
|
|
125
153
|
textAlign: labelTextAlign,
|
|
126
154
|
textVerticalAlign: labelTextVerticalAlign
|
|
127
155
|
});
|
|
128
|
-
}
|
|
156
|
+
}, this);
|
|
129
157
|
},
|
|
130
158
|
|
|
131
159
|
/**
|
|
@@ -143,7 +171,7 @@ var _default = AxisView.extend({
|
|
|
143
171
|
var colorIndex = lineCount++ % lineColors.length;
|
|
144
172
|
splitLines[colorIndex] = splitLines[colorIndex] || [];
|
|
145
173
|
splitLines[colorIndex].push(new graphic.Line({
|
|
146
|
-
shape: getAxisLineShape(polar, radiusExtent, ticksAngles[i])
|
|
174
|
+
shape: getAxisLineShape(polar, radiusExtent, ticksAngles[i].coord)
|
|
147
175
|
}));
|
|
148
176
|
} // Simple optimization
|
|
149
177
|
// Batching the lines if color are the same
|
|
@@ -164,6 +192,10 @@ var _default = AxisView.extend({
|
|
|
164
192
|
* @private
|
|
165
193
|
*/
|
|
166
194
|
_splitArea: function (angleAxisModel, polar, ticksAngles, radiusExtent) {
|
|
195
|
+
if (!ticksAngles.length) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
|
|
167
199
|
var splitAreaModel = angleAxisModel.getModel('splitArea');
|
|
168
200
|
var areaStyleModel = splitAreaModel.getModel('areaStyle');
|
|
169
201
|
var areaColors = areaStyleModel.get('color');
|
|
@@ -171,7 +203,7 @@ var _default = AxisView.extend({
|
|
|
171
203
|
areaColors = areaColors instanceof Array ? areaColors : [areaColors];
|
|
172
204
|
var splitAreas = [];
|
|
173
205
|
var RADIAN = Math.PI / 180;
|
|
174
|
-
var prevAngle = -ticksAngles[0] * RADIAN;
|
|
206
|
+
var prevAngle = -ticksAngles[0].coord * RADIAN;
|
|
175
207
|
var r0 = Math.min(radiusExtent[0], radiusExtent[1]);
|
|
176
208
|
var r1 = Math.max(radiusExtent[0], radiusExtent[1]);
|
|
177
209
|
var clockwise = angleAxisModel.get('clockwise');
|
|
@@ -186,12 +218,12 @@ var _default = AxisView.extend({
|
|
|
186
218
|
r0: r0,
|
|
187
219
|
r: r1,
|
|
188
220
|
startAngle: prevAngle,
|
|
189
|
-
endAngle: -ticksAngles[i] * RADIAN,
|
|
221
|
+
endAngle: -ticksAngles[i].coord * RADIAN,
|
|
190
222
|
clockwise: clockwise
|
|
191
223
|
},
|
|
192
224
|
silent: true
|
|
193
225
|
}));
|
|
194
|
-
prevAngle = -ticksAngles[i] * RADIAN;
|
|
226
|
+
prevAngle = -ticksAngles[i].coord * RADIAN;
|
|
195
227
|
} // Simple optimization
|
|
196
228
|
// Batching the lines if color are the same
|
|
197
229
|
|
|
@@ -25,6 +25,25 @@ var matrixUtil = require("zrender/lib/core/matrix");
|
|
|
25
25
|
var _vector = require("zrender/lib/core/vector");
|
|
26
26
|
|
|
27
27
|
var v2ApplyTransform = _vector.applyTransform;
|
|
28
|
+
|
|
29
|
+
/*
|
|
30
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
31
|
+
* or more contributor license agreements. See the NOTICE file
|
|
32
|
+
* distributed with this work for additional information
|
|
33
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
34
|
+
* to you under the Apache License, Version 2.0 (the
|
|
35
|
+
* "License"); you may not use this file except in compliance
|
|
36
|
+
* with the License. You may obtain a copy of the License at
|
|
37
|
+
*
|
|
38
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
39
|
+
*
|
|
40
|
+
* Unless required by applicable law or agreed to in writing,
|
|
41
|
+
* software distributed under the License is distributed on an
|
|
42
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
43
|
+
* KIND, either express or implied. See the License for the
|
|
44
|
+
* specific language governing permissions and limitations
|
|
45
|
+
* under the License.
|
|
46
|
+
*/
|
|
28
47
|
var PI = Math.PI;
|
|
29
48
|
|
|
30
49
|
function makeAxisEventDataBase(axisModel) {
|
|
@@ -69,8 +88,6 @@ function makeAxisEventDataBase(axisModel) {
|
|
|
69
88
|
* @param {string} [opt.axisName] default get from axisModel.
|
|
70
89
|
* @param {number} [opt.axisNameAvailableWidth]
|
|
71
90
|
* @param {number} [opt.labelRotate] by degree, default get from axisModel.
|
|
72
|
-
* @param {number} [opt.labelInterval] Default label interval when label
|
|
73
|
-
* interval from model is null or 'auto'.
|
|
74
91
|
* @param {number} [opt.strokeContainThreshold] Default label interval when label
|
|
75
92
|
* @param {number} [opt.nameTruncateMaxWidth]
|
|
76
93
|
*/
|
|
@@ -164,6 +181,11 @@ var builders = {
|
|
|
164
181
|
})));
|
|
165
182
|
var arrows = axisModel.get('axisLine.symbol');
|
|
166
183
|
var arrowSize = axisModel.get('axisLine.symbolSize');
|
|
184
|
+
var arrowOffset = axisModel.get('axisLine.symbolOffset') || 0;
|
|
185
|
+
|
|
186
|
+
if (typeof arrowOffset === 'number') {
|
|
187
|
+
arrowOffset = [arrowOffset, arrowOffset];
|
|
188
|
+
}
|
|
167
189
|
|
|
168
190
|
if (arrows != null) {
|
|
169
191
|
if (typeof arrows === 'string') {
|
|
@@ -178,12 +200,23 @@ var builders = {
|
|
|
178
200
|
|
|
179
201
|
var symbolWidth = arrowSize[0];
|
|
180
202
|
var symbolHeight = arrowSize[1];
|
|
181
|
-
each([
|
|
203
|
+
each([{
|
|
204
|
+
rotate: opt.rotation + Math.PI / 2,
|
|
205
|
+
offset: arrowOffset[0],
|
|
206
|
+
r: 0
|
|
207
|
+
}, {
|
|
208
|
+
rotate: opt.rotation - Math.PI / 2,
|
|
209
|
+
offset: arrowOffset[1],
|
|
210
|
+
r: Math.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1]))
|
|
211
|
+
}], function (point, index) {
|
|
182
212
|
if (arrows[index] !== 'none' && arrows[index] != null) {
|
|
183
|
-
var symbol = createSymbol(arrows[index], -symbolWidth / 2, -symbolHeight / 2, symbolWidth, symbolHeight, lineStyle.stroke, true);
|
|
213
|
+
var symbol = createSymbol(arrows[index], -symbolWidth / 2, -symbolHeight / 2, symbolWidth, symbolHeight, lineStyle.stroke, true); // Calculate arrow position with offset
|
|
214
|
+
|
|
215
|
+
var r = point.r + point.offset;
|
|
216
|
+
var pos = [pt1[0] + r * Math.cos(opt.rotation), pt1[1] - r * Math.sin(opt.rotation)];
|
|
184
217
|
symbol.attr({
|
|
185
|
-
rotation:
|
|
186
|
-
position:
|
|
218
|
+
rotation: point.rotate,
|
|
219
|
+
position: pos,
|
|
187
220
|
silent: true
|
|
188
221
|
});
|
|
189
222
|
this.group.add(symbol);
|
|
@@ -454,36 +487,6 @@ function isTwoLabelOverlapped(current, next, labelLayout) {
|
|
|
454
487
|
function isNameLocationCenter(nameLocation) {
|
|
455
488
|
return nameLocation === 'middle' || nameLocation === 'center';
|
|
456
489
|
}
|
|
457
|
-
/**
|
|
458
|
-
* @static
|
|
459
|
-
*/
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
var ifIgnoreOnTick = AxisBuilder.ifIgnoreOnTick = function (axis, i, interval, ticksCnt, showMinLabel, showMaxLabel) {
|
|
463
|
-
if (i === 0 && showMinLabel || i === ticksCnt - 1 && showMaxLabel) {
|
|
464
|
-
return false;
|
|
465
|
-
} // FIXME
|
|
466
|
-
// Have not consider label overlap (if label is too long) yet.
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
var rawTick;
|
|
470
|
-
var scale = axis.scale;
|
|
471
|
-
return scale.type === 'ordinal' && (typeof interval === 'function' ? (rawTick = scale.getTicks()[i], !interval(rawTick, scale.getLabel(rawTick))) : i % (interval + 1));
|
|
472
|
-
};
|
|
473
|
-
/**
|
|
474
|
-
* @static
|
|
475
|
-
*/
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
var getInterval = AxisBuilder.getInterval = function (model, labelInterval) {
|
|
479
|
-
var interval = model.get('interval');
|
|
480
|
-
|
|
481
|
-
if (interval == null || interval == 'auto') {
|
|
482
|
-
interval = labelInterval;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
return interval;
|
|
486
|
-
};
|
|
487
490
|
|
|
488
491
|
function buildAxisTick(axisBuilder, axisModel, opt) {
|
|
489
492
|
var axis = axisModel.axis;
|
|
@@ -495,26 +498,14 @@ function buildAxisTick(axisBuilder, axisModel, opt) {
|
|
|
495
498
|
var tickModel = axisModel.getModel('axisTick');
|
|
496
499
|
var lineStyleModel = tickModel.getModel('lineStyle');
|
|
497
500
|
var tickLen = tickModel.get('length');
|
|
498
|
-
var
|
|
499
|
-
var ticksCoords = axis.getTicksCoords(tickModel.get('alignWithLabel')); // FIXME
|
|
500
|
-
// Corresponds to ticksCoords ?
|
|
501
|
-
|
|
502
|
-
var ticks = axis.scale.getTicks();
|
|
503
|
-
var showMinLabel = axisModel.get('axisLabel.showMinLabel');
|
|
504
|
-
var showMaxLabel = axisModel.get('axisLabel.showMaxLabel');
|
|
501
|
+
var ticksCoords = axis.getTicksCoords();
|
|
505
502
|
var pt1 = [];
|
|
506
503
|
var pt2 = [];
|
|
507
504
|
var matrix = axisBuilder._transform;
|
|
508
505
|
var tickEls = [];
|
|
509
|
-
var ticksCnt = ticksCoords.length;
|
|
510
|
-
|
|
511
|
-
for (var i = 0; i < ticksCnt; i++) {
|
|
512
|
-
// Only ordinal scale support tick interval
|
|
513
|
-
if (ifIgnoreOnTick(axis, i, tickInterval, ticksCnt, showMinLabel, showMaxLabel)) {
|
|
514
|
-
continue;
|
|
515
|
-
}
|
|
516
506
|
|
|
517
|
-
|
|
507
|
+
for (var i = 0; i < ticksCoords.length; i++) {
|
|
508
|
+
var tickCoord = ticksCoords[i].coord;
|
|
518
509
|
pt1[0] = tickCoord;
|
|
519
510
|
pt1[1] = 0;
|
|
520
511
|
pt2[0] = tickCoord;
|
|
@@ -528,7 +519,7 @@ function buildAxisTick(axisBuilder, axisModel, opt) {
|
|
|
528
519
|
|
|
529
520
|
var tickEl = new graphic.Line(graphic.subPixelOptimizeLine({
|
|
530
521
|
// Id for animation
|
|
531
|
-
anid: 'tick_' +
|
|
522
|
+
anid: 'tick_' + ticksCoords[i].tickValue,
|
|
532
523
|
shape: {
|
|
533
524
|
x1: pt1[0],
|
|
534
525
|
y1: pt1[1],
|
|
@@ -558,58 +549,53 @@ function buildAxisLabel(axisBuilder, axisModel, opt) {
|
|
|
558
549
|
|
|
559
550
|
var labelModel = axisModel.getModel('axisLabel');
|
|
560
551
|
var labelMargin = labelModel.get('margin');
|
|
561
|
-
var
|
|
562
|
-
var labels = axisModel.getFormattedLabels(); // Special label rotate.
|
|
552
|
+
var labels = axis.getViewLabels(); // Special label rotate.
|
|
563
553
|
|
|
564
554
|
var labelRotation = (retrieve(opt.labelRotate, labelModel.get('rotate')) || 0) * PI / 180;
|
|
565
555
|
var labelLayout = innerTextLayout(opt.rotation, labelRotation, opt.labelDirection);
|
|
566
|
-
var
|
|
556
|
+
var rawCategoryData = axisModel.getCategories(true);
|
|
567
557
|
var labelEls = [];
|
|
568
558
|
var silent = isSilent(axisModel);
|
|
569
559
|
var triggerEvent = axisModel.get('triggerEvent');
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
return;
|
|
575
|
-
}
|
|
576
|
-
|
|
560
|
+
each(labels, function (labelItem, index) {
|
|
561
|
+
var tickValue = labelItem.tickValue;
|
|
562
|
+
var formattedLabel = labelItem.formattedLabel;
|
|
563
|
+
var rawLabel = labelItem.rawLabel;
|
|
577
564
|
var itemLabelModel = labelModel;
|
|
578
565
|
|
|
579
|
-
if (
|
|
580
|
-
itemLabelModel = new Model(
|
|
566
|
+
if (rawCategoryData && rawCategoryData[tickValue] && rawCategoryData[tickValue].textStyle) {
|
|
567
|
+
itemLabelModel = new Model(rawCategoryData[tickValue].textStyle, labelModel, axisModel.ecModel);
|
|
581
568
|
}
|
|
582
569
|
|
|
583
570
|
var textColor = itemLabelModel.getTextColor() || axisModel.get('axisLine.lineStyle.color');
|
|
584
|
-
var tickCoord = axis.dataToCoord(
|
|
571
|
+
var tickCoord = axis.dataToCoord(tickValue);
|
|
585
572
|
var pos = [tickCoord, opt.labelOffset + opt.labelDirection * labelMargin];
|
|
586
|
-
var labelStr = axis.scale.getLabel(tickVal);
|
|
587
573
|
var textEl = new graphic.Text({
|
|
588
574
|
// Id for animation
|
|
589
|
-
anid: 'label_' +
|
|
575
|
+
anid: 'label_' + tickValue,
|
|
590
576
|
position: pos,
|
|
591
577
|
rotation: labelLayout.rotation,
|
|
592
578
|
silent: silent,
|
|
593
579
|
z2: 10
|
|
594
580
|
});
|
|
595
581
|
graphic.setTextStyle(textEl.style, itemLabelModel, {
|
|
596
|
-
text:
|
|
582
|
+
text: formattedLabel,
|
|
597
583
|
textAlign: itemLabelModel.getShallow('align', true) || labelLayout.textAlign,
|
|
598
584
|
textVerticalAlign: itemLabelModel.getShallow('verticalAlign', true) || itemLabelModel.getShallow('baseline', true) || labelLayout.textVerticalAlign,
|
|
599
585
|
textFill: typeof textColor === 'function' ? textColor( // (1) In category axis with data zoom, tick is not the original
|
|
600
586
|
// index of axis.data. So tick should not be exposed to user
|
|
601
587
|
// in category axis.
|
|
602
|
-
// (2) Compatible with previous version, which always
|
|
603
|
-
// But in interval scale
|
|
604
|
-
// user repalce ','. So we modify it to return original val but remain
|
|
588
|
+
// (2) Compatible with previous version, which always use formatted label as
|
|
589
|
+
// input. But in interval scale the formatted label is like '223,445', which
|
|
590
|
+
// maked user repalce ','. So we modify it to return original val but remain
|
|
605
591
|
// it as 'string' to avoid error in replacing.
|
|
606
|
-
axis.type === 'category' ?
|
|
592
|
+
axis.type === 'category' ? rawLabel : axis.type === 'value' ? tickValue + '' : tickValue, index) : textColor
|
|
607
593
|
}); // Pack data for mouse event
|
|
608
594
|
|
|
609
595
|
if (triggerEvent) {
|
|
610
596
|
textEl.eventData = makeAxisEventDataBase(axisModel);
|
|
611
597
|
textEl.eventData.targetType = 'axisLabel';
|
|
612
|
-
textEl.eventData.value =
|
|
598
|
+
textEl.eventData.value = rawLabel;
|
|
613
599
|
} // FIXME
|
|
614
600
|
|
|
615
601
|
|
|
@@ -6,6 +6,25 @@ var echarts = require("../../echarts");
|
|
|
6
6
|
|
|
7
7
|
var axisPointerModelHelper = require("../axisPointer/modelHelper");
|
|
8
8
|
|
|
9
|
+
/*
|
|
10
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
11
|
+
* or more contributor license agreements. See the NOTICE file
|
|
12
|
+
* distributed with this work for additional information
|
|
13
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
14
|
+
* to you under the Apache License, Version 2.0 (the
|
|
15
|
+
* "License"); you may not use this file except in compliance
|
|
16
|
+
* with the License. You may obtain a copy of the License at
|
|
17
|
+
*
|
|
18
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
19
|
+
*
|
|
20
|
+
* Unless required by applicable law or agreed to in writing,
|
|
21
|
+
* software distributed under the License is distributed on an
|
|
22
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
23
|
+
* KIND, either express or implied. See the License for the
|
|
24
|
+
* specific language governing permissions and limitations
|
|
25
|
+
* under the License.
|
|
26
|
+
*/
|
|
27
|
+
|
|
9
28
|
/**
|
|
10
29
|
* Base class of AxisView.
|
|
11
30
|
*/
|
|
@@ -6,10 +6,26 @@ var AxisBuilder = require("./AxisBuilder");
|
|
|
6
6
|
|
|
7
7
|
var AxisView = require("./AxisView");
|
|
8
8
|
|
|
9
|
-
var cartesianAxisHelper = require("
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
var cartesianAxisHelper = require("../../coord/cartesian/cartesianAxisHelper");
|
|
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
|
+
*/
|
|
13
29
|
var axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];
|
|
14
30
|
var selfBuilderAttrs = ['splitArea', 'splitLine']; // function getAlignWithLabel(model, axisModel) {
|
|
15
31
|
// var alignWithLabel = model.get('alignWithLabel');
|
|
@@ -45,20 +61,22 @@ var CartesianAxisView = AxisView.extend({
|
|
|
45
61
|
|
|
46
62
|
zrUtil.each(selfBuilderAttrs, function (name) {
|
|
47
63
|
if (axisModel.get(name + '.show')) {
|
|
48
|
-
this['_' + name](axisModel, gridModel
|
|
64
|
+
this['_' + name](axisModel, gridModel);
|
|
49
65
|
}
|
|
50
66
|
}, this);
|
|
51
67
|
graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);
|
|
52
68
|
CartesianAxisView.superCall(this, 'render', axisModel, ecModel, api, payload);
|
|
53
69
|
},
|
|
70
|
+
remove: function () {
|
|
71
|
+
this._splitAreaColors = null;
|
|
72
|
+
},
|
|
54
73
|
|
|
55
74
|
/**
|
|
56
75
|
* @param {module:echarts/coord/cartesian/AxisModel} axisModel
|
|
57
76
|
* @param {module:echarts/coord/cartesian/GridModel} gridModel
|
|
58
|
-
* @param {number|Function} labelInterval
|
|
59
77
|
* @private
|
|
60
78
|
*/
|
|
61
|
-
_splitLine: function (axisModel, gridModel
|
|
79
|
+
_splitLine: function (axisModel, gridModel) {
|
|
62
80
|
var axis = axisModel.axis;
|
|
63
81
|
|
|
64
82
|
if (axis.scale.isBlank()) {
|
|
@@ -68,15 +86,13 @@ var CartesianAxisView = AxisView.extend({
|
|
|
68
86
|
var splitLineModel = axisModel.getModel('splitLine');
|
|
69
87
|
var lineStyleModel = splitLineModel.getModel('lineStyle');
|
|
70
88
|
var lineColors = lineStyleModel.get('color');
|
|
71
|
-
var lineInterval = getInterval(splitLineModel, labelInterval);
|
|
72
89
|
lineColors = zrUtil.isArray(lineColors) ? lineColors : [lineColors];
|
|
73
90
|
var gridRect = gridModel.coordinateSystem.getRect();
|
|
74
91
|
var isHorizontal = axis.isHorizontal();
|
|
75
92
|
var lineCount = 0;
|
|
76
|
-
var ticksCoords = axis.getTicksCoords(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
var showMaxLabel = axisModel.get('axisLabel.showMaxLabel');
|
|
93
|
+
var ticksCoords = axis.getTicksCoords({
|
|
94
|
+
tickModel: splitLineModel
|
|
95
|
+
});
|
|
80
96
|
var p1 = [];
|
|
81
97
|
var p2 = []; // Simple optimization
|
|
82
98
|
// Batching the lines if color are the same
|
|
@@ -84,11 +100,7 @@ var CartesianAxisView = AxisView.extend({
|
|
|
84
100
|
var lineStyle = lineStyleModel.getLineStyle();
|
|
85
101
|
|
|
86
102
|
for (var i = 0; i < ticksCoords.length; i++) {
|
|
87
|
-
|
|
88
|
-
continue;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
var tickCoord = axis.toGlobalCoord(ticksCoords[i]);
|
|
103
|
+
var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);
|
|
92
104
|
|
|
93
105
|
if (isHorizontal) {
|
|
94
106
|
p1[0] = tickCoord;
|
|
@@ -103,9 +115,10 @@ var CartesianAxisView = AxisView.extend({
|
|
|
103
115
|
}
|
|
104
116
|
|
|
105
117
|
var colorIndex = lineCount++ % lineColors.length;
|
|
118
|
+
var tickValue = ticksCoords[i].tickValue;
|
|
106
119
|
|
|
107
120
|
this._axisGroup.add(new graphic.Line(graphic.subPixelOptimizeLine({
|
|
108
|
-
anid: 'line_' +
|
|
121
|
+
anid: tickValue != null ? 'line_' + ticksCoords[i].tickValue : null,
|
|
109
122
|
shape: {
|
|
110
123
|
x1: p1[0],
|
|
111
124
|
y1: p1[1],
|
|
@@ -123,10 +136,9 @@ var CartesianAxisView = AxisView.extend({
|
|
|
123
136
|
/**
|
|
124
137
|
* @param {module:echarts/coord/cartesian/AxisModel} axisModel
|
|
125
138
|
* @param {module:echarts/coord/cartesian/GridModel} gridModel
|
|
126
|
-
* @param {number|Function} labelInterval
|
|
127
139
|
* @private
|
|
128
140
|
*/
|
|
129
|
-
_splitArea: function (axisModel, gridModel
|
|
141
|
+
_splitArea: function (axisModel, gridModel) {
|
|
130
142
|
var axis = axisModel.axis;
|
|
131
143
|
|
|
132
144
|
if (axis.scale.isBlank()) {
|
|
@@ -137,44 +149,63 @@ var CartesianAxisView = AxisView.extend({
|
|
|
137
149
|
var areaStyleModel = splitAreaModel.getModel('areaStyle');
|
|
138
150
|
var areaColors = areaStyleModel.get('color');
|
|
139
151
|
var gridRect = gridModel.coordinateSystem.getRect();
|
|
140
|
-
var ticksCoords = axis.getTicksCoords(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
152
|
+
var ticksCoords = axis.getTicksCoords({
|
|
153
|
+
tickModel: splitAreaModel,
|
|
154
|
+
clamp: true
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
if (!ticksCoords.length) {
|
|
158
|
+
return;
|
|
159
|
+
} // For Making appropriate splitArea animation, the color and anid
|
|
160
|
+
// should be corresponding to previous one if possible.
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
var areaColorsLen = areaColors.length;
|
|
164
|
+
var lastSplitAreaColors = this._splitAreaColors;
|
|
165
|
+
var newSplitAreaColors = zrUtil.createHashMap();
|
|
166
|
+
var colorIndex = 0;
|
|
167
|
+
|
|
168
|
+
if (lastSplitAreaColors) {
|
|
169
|
+
for (var i = 0; i < ticksCoords.length; i++) {
|
|
170
|
+
var cIndex = lastSplitAreaColors.get(ticksCoords[i].tickValue);
|
|
171
|
+
|
|
172
|
+
if (cIndex != null) {
|
|
173
|
+
colorIndex = (cIndex + (areaColorsLen - 1) * i) % areaColorsLen;
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
var prev = axis.toGlobalCoord(ticksCoords[0].coord);
|
|
146
180
|
var areaStyle = areaStyleModel.getAreaStyle();
|
|
147
181
|
areaColors = zrUtil.isArray(areaColors) ? areaColors : [areaColors];
|
|
148
|
-
var showMinLabel = axisModel.get('axisLabel.showMinLabel');
|
|
149
|
-
var showMaxLabel = axisModel.get('axisLabel.showMaxLabel');
|
|
150
182
|
|
|
151
183
|
for (var i = 1; i < ticksCoords.length; i++) {
|
|
152
|
-
|
|
153
|
-
continue;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
var tickCoord = axis.toGlobalCoord(ticksCoords[i]);
|
|
184
|
+
var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);
|
|
157
185
|
var x;
|
|
158
186
|
var y;
|
|
159
187
|
var width;
|
|
160
188
|
var height;
|
|
161
189
|
|
|
162
190
|
if (axis.isHorizontal()) {
|
|
163
|
-
x =
|
|
191
|
+
x = prev;
|
|
164
192
|
y = gridRect.y;
|
|
165
193
|
width = tickCoord - x;
|
|
166
194
|
height = gridRect.height;
|
|
195
|
+
prev = x + width;
|
|
167
196
|
} else {
|
|
168
197
|
x = gridRect.x;
|
|
169
|
-
y =
|
|
198
|
+
y = prev;
|
|
170
199
|
width = gridRect.width;
|
|
171
200
|
height = tickCoord - y;
|
|
201
|
+
prev = y + height;
|
|
172
202
|
}
|
|
173
203
|
|
|
174
|
-
var
|
|
204
|
+
var tickValue = ticksCoords[i - 1].tickValue;
|
|
205
|
+
tickValue != null && newSplitAreaColors.set(tickValue, colorIndex);
|
|
175
206
|
|
|
176
207
|
this._axisGroup.add(new graphic.Rect({
|
|
177
|
-
anid: 'area_' +
|
|
208
|
+
anid: tickValue != null ? 'area_' + tickValue : null,
|
|
178
209
|
shape: {
|
|
179
210
|
x: x,
|
|
180
211
|
y: y,
|
|
@@ -187,9 +218,10 @@ var CartesianAxisView = AxisView.extend({
|
|
|
187
218
|
silent: true
|
|
188
219
|
}));
|
|
189
220
|
|
|
190
|
-
|
|
191
|
-
prevY = y + height;
|
|
221
|
+
colorIndex = (colorIndex + 1) % areaColorsLen;
|
|
192
222
|
}
|
|
223
|
+
|
|
224
|
+
this._splitAreaColors = newSplitAreaColors;
|
|
193
225
|
}
|
|
194
226
|
});
|
|
195
227
|
CartesianAxisView.extend({
|
|
@@ -10,6 +10,24 @@ var brushHelper = require("../helper/brushHelper");
|
|
|
10
10
|
|
|
11
11
|
var graphic = require("../../util/graphic");
|
|
12
12
|
|
|
13
|
+
/*
|
|
14
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
15
|
+
* or more contributor license agreements. See the NOTICE file
|
|
16
|
+
* distributed with this work for additional information
|
|
17
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
18
|
+
* to you under the Apache License, Version 2.0 (the
|
|
19
|
+
* "License"); you may not use this file except in compliance
|
|
20
|
+
* with the License. You may obtain a copy of the License at
|
|
21
|
+
*
|
|
22
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
+
*
|
|
24
|
+
* Unless required by applicable law or agreed to in writing,
|
|
25
|
+
* software distributed under the License is distributed on an
|
|
26
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
27
|
+
* KIND, either express or implied. See the License for the
|
|
28
|
+
* specific language governing permissions and limitations
|
|
29
|
+
* under the License.
|
|
30
|
+
*/
|
|
13
31
|
var elementList = ['axisLine', 'axisTickLabel', 'axisName'];
|
|
14
32
|
var AxisView = echarts.extendComponentView({
|
|
15
33
|
type: 'parallelAxis',
|