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
|
@@ -5,6 +5,25 @@ var SeriesModel = require("../../model/Series");
|
|
|
5
5
|
var _whiskerBoxCommon = require("../helper/whiskerBoxCommon");
|
|
6
6
|
|
|
7
7
|
var seriesModelMixin = _whiskerBoxCommon.seriesModelMixin;
|
|
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
|
+
*/
|
|
8
27
|
var CandlestickSeries = SeriesModel.extend({
|
|
9
28
|
type: 'series.candlestick',
|
|
10
29
|
dependencies: ['xAxis', 'yAxis', 'grid'],
|
|
@@ -12,7 +31,19 @@ var CandlestickSeries = SeriesModel.extend({
|
|
|
12
31
|
/**
|
|
13
32
|
* @readOnly
|
|
14
33
|
*/
|
|
15
|
-
defaultValueDimensions: [
|
|
34
|
+
defaultValueDimensions: [{
|
|
35
|
+
name: 'open',
|
|
36
|
+
defaultTooltip: true
|
|
37
|
+
}, {
|
|
38
|
+
name: 'close',
|
|
39
|
+
defaultTooltip: true
|
|
40
|
+
}, {
|
|
41
|
+
name: 'lowest',
|
|
42
|
+
defaultTooltip: true
|
|
43
|
+
}, {
|
|
44
|
+
name: 'highest',
|
|
45
|
+
defaultTooltip: true
|
|
46
|
+
}],
|
|
16
47
|
|
|
17
48
|
/**
|
|
18
49
|
* @type {Array.<string>}
|
|
@@ -25,9 +56,7 @@ var CandlestickSeries = SeriesModel.extend({
|
|
|
25
56
|
*/
|
|
26
57
|
defaultOption: {
|
|
27
58
|
zlevel: 0,
|
|
28
|
-
// 一级层叠
|
|
29
59
|
z: 2,
|
|
30
|
-
// 二级层叠
|
|
31
60
|
coordinateSystem: 'cartesian2d',
|
|
32
61
|
legendHoverLink: true,
|
|
33
62
|
hoverAnimation: true,
|
|
@@ -54,6 +83,11 @@ var CandlestickSeries = SeriesModel.extend({
|
|
|
54
83
|
barMaxWidth: null,
|
|
55
84
|
barMinWidth: null,
|
|
56
85
|
barWidth: null,
|
|
86
|
+
large: true,
|
|
87
|
+
largeThreshold: 600,
|
|
88
|
+
progressive: 5e3,
|
|
89
|
+
progressiveThreshold: 1e4,
|
|
90
|
+
progressiveChunkMode: 'mod',
|
|
57
91
|
animationUpdate: false,
|
|
58
92
|
animationEasing: 'linear',
|
|
59
93
|
animationDuration: 300
|
|
@@ -68,7 +102,7 @@ var CandlestickSeries = SeriesModel.extend({
|
|
|
68
102
|
},
|
|
69
103
|
brushSelector: function (dataIndex, data, selectors) {
|
|
70
104
|
var itemLayout = data.getItemLayout(dataIndex);
|
|
71
|
-
return selectors.rect(itemLayout.brushRect);
|
|
105
|
+
return itemLayout && selectors.rect(itemLayout.brushRect);
|
|
72
106
|
}
|
|
73
107
|
});
|
|
74
108
|
zrUtil.mixin(CandlestickSeries, seriesModelMixin, true);
|
|
@@ -4,38 +4,252 @@ var ChartView = require("../../view/Chart");
|
|
|
4
4
|
|
|
5
5
|
var graphic = require("../../util/graphic");
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var Path = require("zrender/lib/graphic/Path");
|
|
8
8
|
|
|
9
|
-
|
|
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
|
+
var NORMAL_ITEM_STYLE_PATH = ['itemStyle'];
|
|
28
|
+
var EMPHASIS_ITEM_STYLE_PATH = ['emphasis', 'itemStyle'];
|
|
29
|
+
var SKIP_PROPS = ['color', 'color0', 'borderColor', 'borderColor0'];
|
|
10
30
|
var CandlestickView = ChartView.extend({
|
|
11
31
|
type: 'candlestick',
|
|
12
|
-
|
|
13
|
-
|
|
32
|
+
render: function (seriesModel, ecModel, api) {
|
|
33
|
+
this._updateDrawMode(seriesModel);
|
|
34
|
+
|
|
35
|
+
this._isLargeDraw ? this._renderLarge(seriesModel) : this._renderNormal(seriesModel);
|
|
36
|
+
},
|
|
37
|
+
incrementalPrepareRender: function (seriesModel, ecModel, api) {
|
|
38
|
+
this._clear();
|
|
39
|
+
|
|
40
|
+
this._updateDrawMode(seriesModel);
|
|
41
|
+
},
|
|
42
|
+
incrementalRender: function (params, seriesModel, ecModel, api) {
|
|
43
|
+
this._isLargeDraw ? this._incrementalRenderLarge(params, seriesModel) : this._incrementalRenderNormal(params, seriesModel);
|
|
44
|
+
},
|
|
45
|
+
_updateDrawMode: function (seriesModel) {
|
|
46
|
+
var isLargeDraw = seriesModel.pipelineContext.large;
|
|
47
|
+
|
|
48
|
+
if (this._isLargeDraw == null || isLargeDraw ^ this._isLargeDraw) {
|
|
49
|
+
this._isLargeDraw = isLargeDraw;
|
|
50
|
+
|
|
51
|
+
this._clear();
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
_renderNormal: function (seriesModel) {
|
|
55
|
+
var data = seriesModel.getData();
|
|
56
|
+
var oldData = this._data;
|
|
57
|
+
var group = this.group;
|
|
58
|
+
var isSimpleBox = data.getLayout('isSimpleBox'); // There is no old data only when first rendering or switching from
|
|
59
|
+
// stream mode to normal mode, where previous elements should be removed.
|
|
60
|
+
|
|
61
|
+
if (!this._data) {
|
|
62
|
+
group.removeAll();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
data.diff(oldData).add(function (newIdx) {
|
|
66
|
+
if (data.hasValue(newIdx)) {
|
|
67
|
+
var el;
|
|
68
|
+
var itemLayout = data.getItemLayout(newIdx);
|
|
69
|
+
el = createNormalBox(itemLayout, newIdx, true);
|
|
70
|
+
graphic.initProps(el, {
|
|
71
|
+
shape: {
|
|
72
|
+
points: itemLayout.ends
|
|
73
|
+
}
|
|
74
|
+
}, seriesModel, newIdx);
|
|
75
|
+
setBoxCommon(el, data, newIdx, isSimpleBox);
|
|
76
|
+
group.add(el);
|
|
77
|
+
data.setItemGraphicEl(newIdx, el);
|
|
78
|
+
}
|
|
79
|
+
}).update(function (newIdx, oldIdx) {
|
|
80
|
+
var el = oldData.getItemGraphicEl(oldIdx); // Empty data
|
|
81
|
+
|
|
82
|
+
if (!data.hasValue(newIdx)) {
|
|
83
|
+
group.remove(el);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
var itemLayout = data.getItemLayout(newIdx);
|
|
88
|
+
|
|
89
|
+
if (!el) {
|
|
90
|
+
el = createNormalBox(itemLayout, newIdx);
|
|
91
|
+
} else {
|
|
92
|
+
graphic.updateProps(el, {
|
|
93
|
+
shape: {
|
|
94
|
+
points: itemLayout.ends
|
|
95
|
+
}
|
|
96
|
+
}, seriesModel, newIdx);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
setBoxCommon(el, data, newIdx, isSimpleBox);
|
|
100
|
+
group.add(el);
|
|
101
|
+
data.setItemGraphicEl(newIdx, el);
|
|
102
|
+
}).remove(function (oldIdx) {
|
|
103
|
+
var el = oldData.getItemGraphicEl(oldIdx);
|
|
104
|
+
el && group.remove(el);
|
|
105
|
+
}).execute();
|
|
106
|
+
this._data = data;
|
|
107
|
+
},
|
|
108
|
+
_renderLarge: function (seriesModel) {
|
|
109
|
+
this._clear();
|
|
110
|
+
|
|
111
|
+
createLarge(seriesModel, this.group);
|
|
112
|
+
},
|
|
113
|
+
_incrementalRenderNormal: function (params, seriesModel) {
|
|
114
|
+
var data = seriesModel.getData();
|
|
115
|
+
var isSimpleBox = data.getLayout('isSimpleBox');
|
|
116
|
+
var dataIndex;
|
|
117
|
+
|
|
118
|
+
while ((dataIndex = params.next()) != null) {
|
|
119
|
+
var el;
|
|
120
|
+
var itemLayout = data.getItemLayout(dataIndex);
|
|
121
|
+
el = createNormalBox(itemLayout, dataIndex);
|
|
122
|
+
setBoxCommon(el, data, dataIndex, isSimpleBox);
|
|
123
|
+
el.incremental = true;
|
|
124
|
+
this.group.add(el);
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
_incrementalRenderLarge: function (params, seriesModel) {
|
|
128
|
+
createLarge(seriesModel, this.group, true);
|
|
129
|
+
},
|
|
130
|
+
remove: function (ecModel) {
|
|
131
|
+
this._clear();
|
|
132
|
+
},
|
|
133
|
+
_clear: function () {
|
|
134
|
+
this.group.removeAll();
|
|
135
|
+
this._data = null;
|
|
14
136
|
},
|
|
15
137
|
dispose: zrUtil.noop
|
|
16
138
|
});
|
|
17
|
-
|
|
139
|
+
var NormalBoxPath = Path.extend({
|
|
140
|
+
type: 'normalCandlestickBox',
|
|
141
|
+
shape: {},
|
|
142
|
+
buildPath: function (ctx, shape) {
|
|
143
|
+
var ends = shape.points;
|
|
144
|
+
|
|
145
|
+
if (this.__simpleBox) {
|
|
146
|
+
ctx.moveTo(ends[4][0], ends[4][1]);
|
|
147
|
+
ctx.lineTo(ends[6][0], ends[6][1]);
|
|
148
|
+
} else {
|
|
149
|
+
ctx.moveTo(ends[0][0], ends[0][1]);
|
|
150
|
+
ctx.lineTo(ends[1][0], ends[1][1]);
|
|
151
|
+
ctx.lineTo(ends[2][0], ends[2][1]);
|
|
152
|
+
ctx.lineTo(ends[3][0], ends[3][1]);
|
|
153
|
+
ctx.closePath();
|
|
154
|
+
ctx.moveTo(ends[4][0], ends[4][1]);
|
|
155
|
+
ctx.lineTo(ends[5][0], ends[5][1]);
|
|
156
|
+
ctx.moveTo(ends[6][0], ends[6][1]);
|
|
157
|
+
ctx.lineTo(ends[7][0], ends[7][1]);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
function createNormalBox(itemLayout, dataIndex, isInit) {
|
|
163
|
+
var ends = itemLayout.ends;
|
|
164
|
+
return new NormalBoxPath({
|
|
165
|
+
shape: {
|
|
166
|
+
points: isInit ? transInit(ends, itemLayout) : ends
|
|
167
|
+
},
|
|
168
|
+
z2: 100
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function setBoxCommon(el, data, dataIndex, isSimpleBox) {
|
|
173
|
+
var itemModel = data.getItemModel(dataIndex);
|
|
174
|
+
var normalItemStyleModel = itemModel.getModel(NORMAL_ITEM_STYLE_PATH);
|
|
175
|
+
var color = data.getItemVisual(dataIndex, 'color');
|
|
176
|
+
var borderColor = data.getItemVisual(dataIndex, 'borderColor') || color; // Color must be excluded.
|
|
177
|
+
// Because symbol provide setColor individually to set fill and stroke
|
|
178
|
+
|
|
179
|
+
var itemStyle = normalItemStyleModel.getItemStyle(SKIP_PROPS);
|
|
180
|
+
el.useStyle(itemStyle);
|
|
181
|
+
el.style.strokeNoScale = true;
|
|
182
|
+
el.style.fill = color;
|
|
183
|
+
el.style.stroke = borderColor;
|
|
184
|
+
el.__simpleBox = isSimpleBox;
|
|
185
|
+
var hoverStyle = itemModel.getModel(EMPHASIS_ITEM_STYLE_PATH).getItemStyle();
|
|
186
|
+
graphic.setHoverStyle(el, hoverStyle);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function transInit(points, itemLayout) {
|
|
190
|
+
return zrUtil.map(points, function (point) {
|
|
191
|
+
point = point.slice();
|
|
192
|
+
point[1] = itemLayout.initBaseline;
|
|
193
|
+
return point;
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
var LargeBoxPath = Path.extend({
|
|
198
|
+
type: 'largeCandlestickBox',
|
|
199
|
+
shape: {},
|
|
200
|
+
buildPath: function (ctx, shape) {
|
|
201
|
+
// Drawing lines is more efficient than drawing
|
|
202
|
+
// a whole line or drawing rects.
|
|
203
|
+
var points = shape.points;
|
|
204
|
+
|
|
205
|
+
for (var i = 0; i < points.length;) {
|
|
206
|
+
if (this.__sign === points[i++]) {
|
|
207
|
+
var x = points[i++];
|
|
208
|
+
ctx.moveTo(x, points[i++]);
|
|
209
|
+
ctx.lineTo(x, points[i++]);
|
|
210
|
+
} else {
|
|
211
|
+
i += 3;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
});
|
|
18
216
|
|
|
19
|
-
|
|
20
|
-
var
|
|
217
|
+
function createLarge(seriesModel, group, incremental) {
|
|
218
|
+
var data = seriesModel.getData();
|
|
219
|
+
var largePoints = data.getLayout('largePoints');
|
|
220
|
+
var elP = new LargeBoxPath({
|
|
221
|
+
shape: {
|
|
222
|
+
points: largePoints
|
|
223
|
+
},
|
|
224
|
+
__sign: 1
|
|
225
|
+
});
|
|
226
|
+
group.add(elP);
|
|
227
|
+
var elN = new LargeBoxPath({
|
|
228
|
+
shape: {
|
|
229
|
+
points: largePoints
|
|
230
|
+
},
|
|
231
|
+
__sign: -1
|
|
232
|
+
});
|
|
233
|
+
group.add(elN);
|
|
234
|
+
setLargeStyle(1, elP, seriesModel, data);
|
|
235
|
+
setLargeStyle(-1, elN, seriesModel, data);
|
|
236
|
+
|
|
237
|
+
if (incremental) {
|
|
238
|
+
elP.incremental = true;
|
|
239
|
+
elN.incremental = true;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
21
242
|
|
|
22
|
-
function
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var color = data.getItemVisual(idx, 'color');
|
|
26
|
-
var borderColor = data.getItemVisual(idx, 'borderColor') || color; // Color must be excluded.
|
|
243
|
+
function setLargeStyle(sign, el, seriesModel, data) {
|
|
244
|
+
var suffix = sign > 0 ? 'P' : 'N';
|
|
245
|
+
var borderColor = data.getVisual('borderColor' + suffix) || data.getVisual('color' + suffix); // Color must be excluded.
|
|
27
246
|
// Because symbol provide setColor individually to set fill and stroke
|
|
28
247
|
|
|
29
|
-
var itemStyle =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
bodyEl.useStyle(itemStyle);
|
|
35
|
-
bodyEl.style.fill = color;
|
|
36
|
-
bodyEl.style.stroke = borderColor;
|
|
37
|
-
var hoverStyle = itemModel.getModel(emphasisStyleAccessPath).getItemStyle();
|
|
38
|
-
graphic.setHoverStyle(itemGroup, hoverStyle);
|
|
248
|
+
var itemStyle = seriesModel.getModel(NORMAL_ITEM_STYLE_PATH).getItemStyle(SKIP_PROPS);
|
|
249
|
+
el.useStyle(itemStyle);
|
|
250
|
+
el.style.fill = null;
|
|
251
|
+
el.style.stroke = borderColor; // No different
|
|
252
|
+
// el.style.lineWidth = .5;
|
|
39
253
|
}
|
|
40
254
|
|
|
41
255
|
var _default = CandlestickView;
|
|
@@ -1,120 +1,180 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _graphic = require("../../util/graphic");
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var subPixelOptimize = _graphic.subPixelOptimize;
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var createRenderPlanner = require("../helper/createRenderPlanner");
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _number = require("../../util/number");
|
|
8
8
|
|
|
9
|
-
var
|
|
10
|
-
var retrieve2 = zrUtil.retrieve2;
|
|
9
|
+
var parsePercent = _number.parsePercent;
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
var _util = require("zrender/lib/core/util");
|
|
12
|
+
|
|
13
|
+
var retrieve2 = _util.retrieve2;
|
|
14
|
+
|
|
15
|
+
/*
|
|
16
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
17
|
+
* or more contributor license agreements. See the NOTICE file
|
|
18
|
+
* distributed with this work for additional information
|
|
19
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
20
|
+
* to you under the Apache License, Version 2.0 (the
|
|
21
|
+
* "License"); you may not use this file except in compliance
|
|
22
|
+
* with the License. You may obtain a copy of the License at
|
|
23
|
+
*
|
|
24
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
+
*
|
|
26
|
+
* Unless required by applicable law or agreed to in writing,
|
|
27
|
+
* software distributed under the License is distributed on an
|
|
28
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
29
|
+
* KIND, either express or implied. See the License for the
|
|
30
|
+
* specific language governing permissions and limitations
|
|
31
|
+
* under the License.
|
|
32
|
+
*/
|
|
33
|
+
var LargeArr = typeof Float32Array !== 'undefined' ? Float32Array : Array;
|
|
34
|
+
var _default = {
|
|
35
|
+
seriesType: 'candlestick',
|
|
36
|
+
plan: createRenderPlanner(),
|
|
37
|
+
reset: function (seriesModel) {
|
|
14
38
|
var coordSys = seriesModel.coordinateSystem;
|
|
15
39
|
var data = seriesModel.getData();
|
|
16
40
|
var candleWidth = calculateCandleWidth(seriesModel, data);
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var constDim = 1 - variableDim;
|
|
41
|
+
var cDimIdx = 0;
|
|
42
|
+
var vDimIdx = 1;
|
|
20
43
|
var coordDims = ['x', 'y'];
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
44
|
+
var cDim = data.mapDimension(coordDims[cDimIdx]);
|
|
45
|
+
var vDims = data.mapDimension(coordDims[vDimIdx], true);
|
|
46
|
+
var openDim = vDims[0];
|
|
47
|
+
var closeDim = vDims[1];
|
|
48
|
+
var lowestDim = vDims[2];
|
|
49
|
+
var highestDim = vDims[3];
|
|
50
|
+
data.setLayout({
|
|
51
|
+
candleWidth: candleWidth,
|
|
52
|
+
// The value is experimented visually.
|
|
53
|
+
isSimpleBox: candleWidth <= 1.3
|
|
32
54
|
});
|
|
33
55
|
|
|
34
56
|
if (cDim == null || vDims.length < 4) {
|
|
35
57
|
return;
|
|
36
58
|
}
|
|
37
59
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
// No record of previous, set to be positive
|
|
69
|
-
sign = 1;
|
|
70
|
-
}
|
|
60
|
+
return {
|
|
61
|
+
progress: seriesModel.pipelineContext.large ? largeProgress : normalProgress
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
function normalProgress(params, data) {
|
|
65
|
+
var dataIndex;
|
|
66
|
+
|
|
67
|
+
while ((dataIndex = params.next()) != null) {
|
|
68
|
+
var axisDimVal = data.get(cDim, dataIndex);
|
|
69
|
+
var openVal = data.get(openDim, dataIndex);
|
|
70
|
+
var closeVal = data.get(closeDim, dataIndex);
|
|
71
|
+
var lowestVal = data.get(lowestDim, dataIndex);
|
|
72
|
+
var highestVal = data.get(highestDim, dataIndex);
|
|
73
|
+
var ocLow = Math.min(openVal, closeVal);
|
|
74
|
+
var ocHigh = Math.max(openVal, closeVal);
|
|
75
|
+
var ocLowPoint = getPoint(ocLow, axisDimVal);
|
|
76
|
+
var ocHighPoint = getPoint(ocHigh, axisDimVal);
|
|
77
|
+
var lowestPoint = getPoint(lowestVal, axisDimVal);
|
|
78
|
+
var highestPoint = getPoint(highestVal, axisDimVal);
|
|
79
|
+
var ends = [];
|
|
80
|
+
addBodyEnd(ends, ocHighPoint, 0);
|
|
81
|
+
addBodyEnd(ends, ocLowPoint, 1);
|
|
82
|
+
ends.push(subPixelOptimizePoint(highestPoint), subPixelOptimizePoint(ocHighPoint), subPixelOptimizePoint(lowestPoint), subPixelOptimizePoint(ocLowPoint));
|
|
83
|
+
data.setItemLayout(dataIndex, {
|
|
84
|
+
sign: getSign(data, dataIndex, openVal, closeVal, closeDim),
|
|
85
|
+
initBaseline: openVal > closeVal ? ocHighPoint[vDimIdx] : ocLowPoint[vDimIdx],
|
|
86
|
+
// open point.
|
|
87
|
+
ends: ends,
|
|
88
|
+
brushRect: makeBrushRect(lowestVal, highestVal, axisDimVal)
|
|
89
|
+
});
|
|
71
90
|
}
|
|
72
91
|
|
|
73
|
-
|
|
74
|
-
chartLayout: chartLayout,
|
|
75
|
-
sign: sign,
|
|
76
|
-
initBaseline: openVal > closeVal ? ocHighPoint[constDim] : ocLowPoint[constDim],
|
|
77
|
-
// open point.
|
|
78
|
-
bodyEnds: bodyEnds,
|
|
79
|
-
whiskerEnds: whiskerEnds,
|
|
80
|
-
brushRect: makeBrushRect()
|
|
81
|
-
});
|
|
82
|
-
++dataIndex;
|
|
83
|
-
|
|
84
|
-
function getPoint(val) {
|
|
92
|
+
function getPoint(val, axisDimVal) {
|
|
85
93
|
var p = [];
|
|
86
|
-
p[
|
|
87
|
-
p[
|
|
94
|
+
p[cDimIdx] = axisDimVal;
|
|
95
|
+
p[vDimIdx] = val;
|
|
88
96
|
return isNaN(axisDimVal) || isNaN(val) ? [NaN, NaN] : coordSys.dataToPoint(p);
|
|
89
97
|
}
|
|
90
98
|
|
|
91
|
-
function addBodyEnd(point, start) {
|
|
99
|
+
function addBodyEnd(ends, point, start) {
|
|
92
100
|
var point1 = point.slice();
|
|
93
101
|
var point2 = point.slice();
|
|
94
|
-
point1[
|
|
95
|
-
point2[
|
|
96
|
-
start ?
|
|
102
|
+
point1[cDimIdx] = subPixelOptimize(point1[cDimIdx] + candleWidth / 2, 1, false);
|
|
103
|
+
point2[cDimIdx] = subPixelOptimize(point2[cDimIdx] - candleWidth / 2, 1, true);
|
|
104
|
+
start ? ends.push(point1, point2) : ends.push(point2, point1);
|
|
97
105
|
}
|
|
98
106
|
|
|
99
|
-
function makeBrushRect() {
|
|
100
|
-
var pmin = getPoint(
|
|
101
|
-
var pmax = getPoint(
|
|
102
|
-
pmin[
|
|
103
|
-
pmax[
|
|
107
|
+
function makeBrushRect(lowestVal, highestVal, axisDimVal) {
|
|
108
|
+
var pmin = getPoint(lowestVal, axisDimVal);
|
|
109
|
+
var pmax = getPoint(highestVal, axisDimVal);
|
|
110
|
+
pmin[cDimIdx] -= candleWidth / 2;
|
|
111
|
+
pmax[cDimIdx] -= candleWidth / 2;
|
|
104
112
|
return {
|
|
105
113
|
x: pmin[0],
|
|
106
114
|
y: pmin[1],
|
|
107
|
-
width:
|
|
108
|
-
height:
|
|
115
|
+
width: vDimIdx ? candleWidth : pmax[0] - pmin[0],
|
|
116
|
+
height: vDimIdx ? pmax[1] - pmin[1] : candleWidth
|
|
109
117
|
};
|
|
110
118
|
}
|
|
111
119
|
|
|
112
120
|
function subPixelOptimizePoint(point) {
|
|
113
|
-
point[
|
|
121
|
+
point[cDimIdx] = subPixelOptimize(point[cDimIdx], 1);
|
|
114
122
|
return point;
|
|
115
123
|
}
|
|
116
|
-
}
|
|
117
|
-
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function largeProgress(params, data) {
|
|
127
|
+
// Structure: [sign, x, yhigh, ylow, sign, x, yhigh, ylow, ...]
|
|
128
|
+
var points = new LargeArr(params.count * 5);
|
|
129
|
+
var offset = 0;
|
|
130
|
+
var point;
|
|
131
|
+
var tmpIn = [];
|
|
132
|
+
var tmpOut = [];
|
|
133
|
+
var dataIndex;
|
|
134
|
+
|
|
135
|
+
while ((dataIndex = params.next()) != null) {
|
|
136
|
+
var axisDimVal = data.get(cDim, dataIndex);
|
|
137
|
+
var openVal = data.get(openDim, dataIndex);
|
|
138
|
+
var closeVal = data.get(closeDim, dataIndex);
|
|
139
|
+
var lowestVal = data.get(lowestDim, dataIndex);
|
|
140
|
+
var highestVal = data.get(highestDim, dataIndex);
|
|
141
|
+
|
|
142
|
+
if (isNaN(axisDimVal) || isNaN(lowestVal) || isNaN(highestVal)) {
|
|
143
|
+
points[offset++] = NaN;
|
|
144
|
+
offset += 4;
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
points[offset++] = getSign(data, dataIndex, openVal, closeVal, closeDim);
|
|
149
|
+
tmpIn[cDimIdx] = axisDimVal;
|
|
150
|
+
tmpIn[vDimIdx] = lowestVal;
|
|
151
|
+
point = coordSys.dataToPoint(tmpIn, null, tmpOut);
|
|
152
|
+
points[offset++] = point ? point[0] : NaN;
|
|
153
|
+
points[offset++] = point ? point[1] : NaN;
|
|
154
|
+
tmpIn[vDimIdx] = highestVal;
|
|
155
|
+
point = coordSys.dataToPoint(tmpIn, null, tmpOut);
|
|
156
|
+
points[offset++] = point ? point[1] : NaN;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
data.setLayout('largePoints', points);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
function getSign(data, dataIndex, openVal, closeVal, closeDim) {
|
|
165
|
+
var sign;
|
|
166
|
+
|
|
167
|
+
if (openVal > closeVal) {
|
|
168
|
+
sign = -1;
|
|
169
|
+
} else if (openVal < closeVal) {
|
|
170
|
+
sign = 1;
|
|
171
|
+
} else {
|
|
172
|
+
sign = dataIndex > 0 // If close === open, compare with close of last record
|
|
173
|
+
? data.get(closeDim, dataIndex - 1) <= closeVal ? 1 : -1 : // No record of previous, set to be positive
|
|
174
|
+
1;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return sign;
|
|
118
178
|
}
|
|
119
179
|
|
|
120
180
|
function calculateCandleWidth(seriesModel, data) {
|