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.
Files changed (918) hide show
  1. package/.jshintrc-dist +70 -0
  2. package/KEYS +74 -0
  3. package/LICENSE +223 -29
  4. package/NOTICE +5 -0
  5. package/README.md +22 -8
  6. package/build/addHeader.js +113 -0
  7. package/build/amd2common.js +19 -0
  8. package/build/build.js +19 -0
  9. package/build/config.js +25 -1
  10. package/build/mangleString.js +19 -0
  11. package/build/optimize.js +19 -0
  12. package/build/pre-publish.js +26 -3
  13. package/build/preamble.js +20 -0
  14. package/build/rollup-plugin-ec-lang.js +20 -0
  15. package/build/rollup-plugin-ec-remove-dev.js +19 -0
  16. package/dist/echarts-en.common.js +7106 -1621
  17. package/dist/echarts-en.common.min.js +21 -1
  18. package/dist/echarts-en.js +13949 -4217
  19. package/dist/echarts-en.js.map +1 -1
  20. package/dist/echarts-en.min.js +21 -1
  21. package/dist/echarts-en.simple.js +5206 -1375
  22. package/dist/echarts-en.simple.min.js +21 -1
  23. package/dist/echarts.common.js +7106 -1621
  24. package/dist/echarts.common.min.js +21 -1
  25. package/dist/echarts.js +13949 -4217
  26. package/dist/echarts.js.map +1 -1
  27. package/dist/echarts.min.js +21 -1
  28. package/dist/echarts.simple.js +5206 -1375
  29. package/dist/echarts.simple.min.js +21 -1
  30. package/dist/extension/bmap.js +76 -0
  31. package/dist/extension/bmap.js.map +1 -1
  32. package/dist/extension/bmap.min.js +20 -0
  33. package/dist/extension/dataTool.js +95 -0
  34. package/dist/extension/dataTool.js.map +1 -1
  35. package/dist/extension/dataTool.min.js +20 -0
  36. package/echarts.all.js +19 -0
  37. package/echarts.blank.js +19 -0
  38. package/echarts.common.js +19 -0
  39. package/echarts.simple.js +19 -0
  40. package/extension/bmap/BMapCoordSys.js +19 -0
  41. package/extension/bmap/BMapModel.js +18 -0
  42. package/extension/bmap/BMapView.js +18 -0
  43. package/extension/bmap/bmap.js +19 -0
  44. package/extension/dataTool/gexf.js +18 -0
  45. package/extension/dataTool/index.js +19 -0
  46. package/extension/dataTool/prepareBoxplotData.js +19 -0
  47. package/extension/dataTool/quantile.js +19 -0
  48. package/extension/echarts.js +19 -0
  49. package/extension/webpack.config.js +19 -0
  50. package/extension-src/bmap/BMapCoordSys.js +19 -0
  51. package/extension-src/bmap/BMapModel.js +19 -0
  52. package/extension-src/bmap/BMapView.js +19 -0
  53. package/extension-src/bmap/bmap.js +19 -0
  54. package/extension-src/dataTool/gexf.js +19 -0
  55. package/extension-src/dataTool/index.js +19 -0
  56. package/extension-src/dataTool/prepareBoxplotData.js +19 -0
  57. package/extension-src/dataTool/quantile.js +19 -0
  58. package/index.common.js +19 -0
  59. package/index.js +19 -0
  60. package/index.simple.js +19 -0
  61. package/lib/CoordinateSystem.js +18 -0
  62. package/lib/ExtensionAPI.js +18 -0
  63. package/lib/action/createDataSelectAction.js +18 -0
  64. package/lib/action/geoRoam.js +19 -0
  65. package/lib/action/roamHelper.js +19 -0
  66. package/lib/chart/bar/BarSeries.js +42 -1
  67. package/lib/chart/bar/BarView.js +120 -15
  68. package/lib/chart/bar/BaseBarSeries.js +22 -0
  69. package/lib/chart/bar/PictorialBarSeries.js +18 -0
  70. package/lib/chart/bar/PictorialBarView.js +19 -0
  71. package/lib/chart/bar/barItemStyle.js +18 -0
  72. package/lib/chart/bar/helper.js +18 -0
  73. package/lib/chart/bar.js +28 -7
  74. package/lib/chart/boxplot/BoxplotSeries.js +35 -1
  75. package/lib/chart/boxplot/BoxplotView.js +128 -21
  76. package/lib/chart/boxplot/boxplotLayout.js +70 -63
  77. package/lib/chart/boxplot/boxplotVisual.js +18 -0
  78. package/lib/chart/boxplot.js +18 -0
  79. package/lib/chart/candlestick/CandlestickSeries.js +38 -4
  80. package/lib/chart/candlestick/CandlestickView.js +236 -22
  81. package/lib/chart/candlestick/candlestickLayout.js +143 -83
  82. package/lib/chart/candlestick/candlestickVisual.js +59 -14
  83. package/lib/chart/candlestick/preprocessor.js +18 -0
  84. package/lib/chart/candlestick.js +18 -0
  85. package/lib/chart/chord/ChordSeries.js +18 -0
  86. package/lib/chart/chord/ChordView.js +18 -0
  87. package/lib/chart/chord/Ribbon.js +18 -0
  88. package/lib/chart/chord/chordCircularLayout.js +19 -0
  89. package/lib/chart/chord.js +18 -0
  90. package/lib/chart/custom.js +20 -2
  91. package/lib/chart/effectScatter/EffectScatterSeries.js +18 -0
  92. package/lib/chart/effectScatter/EffectScatterView.js +18 -0
  93. package/lib/chart/effectScatter.js +18 -0
  94. package/lib/chart/funnel/FunnelSeries.js +19 -0
  95. package/lib/chart/funnel/FunnelView.js +19 -0
  96. package/lib/chart/funnel/funnelLayout.js +18 -0
  97. package/lib/chart/funnel.js +18 -0
  98. package/lib/chart/gauge/GaugeSeries.js +18 -0
  99. package/lib/chart/gauge/GaugeView.js +18 -0
  100. package/lib/chart/gauge/PointerPath.js +18 -0
  101. package/lib/chart/graph/GraphSeries.js +25 -1
  102. package/lib/chart/graph/GraphView.js +18 -0
  103. package/lib/chart/graph/adjustEdge.js +18 -0
  104. package/lib/chart/graph/backwardCompat.js +18 -0
  105. package/lib/chart/graph/categoryFilter.js +18 -0
  106. package/lib/chart/graph/categoryVisual.js +18 -0
  107. package/lib/chart/graph/circularLayout.js +18 -0
  108. package/lib/chart/graph/circularLayoutHelper.js +18 -0
  109. package/lib/chart/graph/createView.js +18 -0
  110. package/lib/chart/graph/edgeVisual.js +18 -0
  111. package/lib/chart/graph/forceHelper.js +18 -0
  112. package/lib/chart/graph/forceLayout.js +18 -0
  113. package/lib/chart/graph/graphAction.js +19 -0
  114. package/lib/chart/graph/simpleLayout.js +18 -0
  115. package/lib/chart/graph/simpleLayoutHelper.js +18 -0
  116. package/lib/chart/graph.js +18 -0
  117. package/lib/chart/heatmap/HeatmapLayer.js +19 -0
  118. package/lib/chart/heatmap/HeatmapSeries.js +21 -1
  119. package/lib/chart/heatmap/HeatmapView.js +18 -0
  120. package/lib/chart/helper/EffectLine.js +19 -0
  121. package/lib/chart/helper/EffectPolyline.js +19 -0
  122. package/lib/chart/helper/EffectSymbol.js +19 -0
  123. package/lib/chart/helper/LargeLineDraw.js +18 -0
  124. package/lib/chart/helper/LargeSymbolDraw.js +18 -0
  125. package/lib/chart/helper/Line.js +31 -13
  126. package/lib/chart/helper/LineDraw.js +26 -1
  127. package/lib/chart/helper/LinePath.js +19 -0
  128. package/lib/chart/helper/Polyline.js +19 -0
  129. package/lib/chart/helper/Symbol.js +63 -12
  130. package/lib/chart/helper/SymbolDraw.js +65 -18
  131. package/lib/chart/helper/createGraphFromNodeEdge.js +27 -3
  132. package/lib/chart/helper/createGraphFromNodeMatrix.js +19 -0
  133. package/lib/chart/helper/createListFromArray.js +33 -8
  134. package/lib/chart/helper/createListSimply.js +19 -0
  135. package/lib/chart/helper/createRenderPlanner.js +22 -3
  136. package/lib/chart/helper/labelHelper.js +19 -0
  137. package/lib/chart/helper/treeHelper.js +18 -0
  138. package/lib/chart/helper/whiskerBoxCommon.js +20 -21
  139. package/lib/chart/line/LineSeries.js +32 -11
  140. package/lib/chart/line/LineView.js +165 -102
  141. package/lib/chart/line/helper.js +117 -0
  142. package/lib/chart/line/lineAnimationDiff.js +31 -32
  143. package/lib/chart/line/poly.js +136 -0
  144. package/lib/chart/line.js +18 -0
  145. package/lib/chart/lines/LinesSeries.js +25 -6
  146. package/lib/chart/lines/LinesView.js +20 -1
  147. package/lib/chart/lines/linesLayout.js +19 -1
  148. package/lib/chart/lines/linesVisual.js +18 -0
  149. package/lib/chart/lines.js +18 -0
  150. package/lib/chart/map/MapSeries.js +45 -8
  151. package/lib/chart/map/MapView.js +18 -0
  152. package/lib/chart/map/backwardCompat.js +18 -0
  153. package/lib/chart/map/mapDataStatistic.js +18 -0
  154. package/lib/chart/map/mapSymbolLayout.js +18 -0
  155. package/lib/chart/map/mapVisual.js +18 -0
  156. package/lib/chart/map.js +18 -0
  157. package/lib/chart/parallel/ParallelSeries.js +20 -7
  158. package/lib/chart/parallel/ParallelView.js +86 -55
  159. package/lib/chart/parallel/parallelVisual.js +38 -15
  160. package/lib/chart/parallel.js +18 -0
  161. package/lib/chart/pictorialBar.js +18 -0
  162. package/lib/chart/pie/PieSeries.js +39 -2
  163. package/lib/chart/pie/PieView.js +19 -0
  164. package/lib/chart/pie/labelLayout.js +18 -0
  165. package/lib/chart/pie/pieLayout.js +19 -1
  166. package/lib/chart/pie.js +18 -0
  167. package/lib/chart/radar/RadarSeries.js +21 -2
  168. package/lib/chart/radar/RadarView.js +18 -0
  169. package/lib/chart/radar/backwardCompat.js +18 -0
  170. package/lib/chart/radar/radarLayout.js +19 -1
  171. package/lib/chart/radar.js +18 -0
  172. package/lib/chart/sankey/SankeySeries.js +26 -0
  173. package/lib/chart/sankey/SankeyView.js +62 -10
  174. package/lib/chart/sankey/sankeyAction.js +34 -0
  175. package/lib/chart/sankey/sankeyLayout.js +68 -19
  176. package/lib/chart/sankey/sankeyVisual.js +49 -19
  177. package/lib/chart/sankey.js +20 -0
  178. package/lib/chart/scatter/ScatterSeries.js +20 -2
  179. package/lib/chart/scatter/ScatterView.js +18 -0
  180. package/lib/chart/scatter.js +18 -0
  181. package/lib/chart/sunburst/SunburstPiece.js +70 -19
  182. package/lib/chart/sunburst/SunburstSeries.js +18 -0
  183. package/lib/chart/sunburst/SunburstView.js +39 -20
  184. package/lib/chart/sunburst/sunburstAction.js +19 -0
  185. package/lib/chart/sunburst/sunburstLayout.js +18 -0
  186. package/lib/chart/sunburst.js +18 -0
  187. package/lib/chart/themeRiver/ThemeRiverSeries.js +19 -1
  188. package/lib/chart/themeRiver/ThemeRiverView.js +19 -0
  189. package/lib/chart/themeRiver/themeRiverLayout.js +19 -0
  190. package/lib/chart/themeRiver/themeRiverVisual.js +19 -0
  191. package/lib/chart/themeRiver.js +18 -0
  192. package/lib/chart/tree/TreeSeries.js +40 -3
  193. package/lib/chart/tree/TreeView.js +32 -6
  194. package/lib/chart/tree/layoutHelper.js +19 -0
  195. package/lib/chart/tree/traversalHelper.js +19 -0
  196. package/lib/chart/tree/treeAction.js +18 -0
  197. package/lib/chart/tree/treeLayout.js +137 -0
  198. package/lib/chart/tree.js +20 -5
  199. package/lib/chart/treemap/Breadcrumb.js +19 -0
  200. package/lib/chart/treemap/TreemapSeries.js +18 -0
  201. package/lib/chart/treemap/TreemapView.js +18 -0
  202. package/lib/chart/treemap/helper.js +18 -0
  203. package/lib/chart/treemap/treemapAction.js +19 -0
  204. package/lib/chart/treemap/treemapLayout.js +18 -0
  205. package/lib/chart/treemap/treemapVisual.js +18 -0
  206. package/lib/chart/treemap.js +18 -0
  207. package/lib/component/axis/AngleAxisView.js +59 -27
  208. package/lib/component/axis/AxisBuilder.js +59 -73
  209. package/lib/component/axis/AxisView.js +19 -0
  210. package/lib/component/axis/CartesianAxisView.js +71 -39
  211. package/lib/component/axis/ParallelAxisView.js +18 -0
  212. package/lib/component/axis/RadiusAxisView.js +26 -4
  213. package/lib/component/axis/SingleAxisView.js +25 -14
  214. package/lib/component/axis/parallelAxisAction.js +19 -0
  215. package/lib/component/axisPointer/AxisPointerModel.js +18 -0
  216. package/lib/component/axisPointer/AxisPointerView.js +18 -0
  217. package/lib/component/axisPointer/BaseAxisPointer.js +19 -0
  218. package/lib/component/axisPointer/CartesianAxisPointer.js +20 -2
  219. package/lib/component/axisPointer/PolarAxisPointer.js +19 -1
  220. package/lib/component/axisPointer/SingleAxisPointer.js +19 -1
  221. package/lib/component/axisPointer/axisTrigger.js +20 -1
  222. package/lib/component/axisPointer/findPointFromSeries.js +19 -0
  223. package/lib/component/axisPointer/globalListener.js +19 -0
  224. package/lib/component/axisPointer/modelHelper.js +20 -1
  225. package/lib/component/axisPointer/viewHelper.js +20 -0
  226. package/lib/component/axisPointer.js +18 -0
  227. package/lib/component/brush/BrushModel.js +25 -1
  228. package/lib/component/brush/BrushView.js +23 -0
  229. package/lib/component/brush/brushAction.js +19 -0
  230. package/lib/component/brush/preprocessor.js +18 -0
  231. package/lib/component/brush/selector.js +18 -0
  232. package/lib/component/brush/visualEncoding.js +18 -0
  233. package/lib/component/brush.js +19 -0
  234. package/lib/component/calendar/CalendarView.js +18 -0
  235. package/lib/component/dataZoom/AxisProxy.js +42 -23
  236. package/lib/component/dataZoom/DataZoomModel.js +18 -0
  237. package/lib/component/dataZoom/DataZoomView.js +18 -0
  238. package/lib/component/dataZoom/InsideZoomModel.js +18 -0
  239. package/lib/component/dataZoom/InsideZoomView.js +36 -13
  240. package/lib/component/dataZoom/SelectZoomModel.js +18 -0
  241. package/lib/component/dataZoom/SelectZoomView.js +18 -0
  242. package/lib/component/dataZoom/SliderZoomModel.js +18 -0
  243. package/lib/component/dataZoom/SliderZoomView.js +29 -6
  244. package/lib/component/dataZoom/dataZoomAction.js +18 -0
  245. package/lib/component/dataZoom/dataZoomProcessor.js +23 -1
  246. package/lib/component/dataZoom/helper.js +18 -0
  247. package/lib/component/dataZoom/history.js +18 -0
  248. package/lib/component/dataZoom/roams.js +19 -18
  249. package/lib/component/dataZoom/typeDefaulter.js +18 -0
  250. package/lib/component/dataset.js +56 -3
  251. package/lib/component/geo/GeoView.js +18 -0
  252. package/lib/component/geo.js +18 -0
  253. package/lib/component/graphic.js +18 -0
  254. package/lib/component/gridSimple.js +18 -0
  255. package/lib/component/helper/BrushController.js +18 -0
  256. package/lib/component/helper/BrushTargetManager.js +18 -0
  257. package/lib/component/helper/MapDraw.js +18 -0
  258. package/lib/component/helper/RoamController.js +19 -0
  259. package/lib/component/helper/brushHelper.js +18 -0
  260. package/lib/component/helper/cursorHelper.js +18 -0
  261. package/lib/component/helper/interactionMutex.js +18 -0
  262. package/lib/component/helper/listComponent.js +19 -0
  263. package/lib/component/helper/roamHelper.js +19 -0
  264. package/lib/component/helper/selectableMixin.js +21 -16
  265. package/lib/component/helper/sliderMove.js +19 -0
  266. package/lib/component/legend/LegendModel.js +25 -6
  267. package/lib/component/legend/LegendView.js +41 -12
  268. package/lib/component/legend/ScrollableLegendModel.js +19 -0
  269. package/lib/component/legend/ScrollableLegendView.js +19 -0
  270. package/lib/component/legend/legendAction.js +18 -0
  271. package/lib/component/legend/legendFilter.js +18 -0
  272. package/lib/component/legend/scrollableLegendAction.js +19 -0
  273. package/lib/component/legend.js +18 -0
  274. package/lib/component/markArea.js +18 -0
  275. package/lib/component/markLine.js +18 -0
  276. package/lib/component/markPoint.js +18 -0
  277. package/lib/component/marker/MarkAreaModel.js +18 -0
  278. package/lib/component/marker/MarkAreaView.js +20 -2
  279. package/lib/component/marker/MarkLineModel.js +18 -0
  280. package/lib/component/marker/MarkLineView.js +20 -2
  281. package/lib/component/marker/MarkPointModel.js +18 -0
  282. package/lib/component/marker/MarkPointView.js +20 -4
  283. package/lib/component/marker/MarkerModel.js +19 -1
  284. package/lib/component/marker/MarkerView.js +18 -0
  285. package/lib/component/marker/markerHelper.js +58 -17
  286. package/lib/component/parallel.js +18 -0
  287. package/lib/component/polar.js +18 -0
  288. package/lib/component/radar/RadarView.js +22 -4
  289. package/lib/component/singleAxis.js +18 -0
  290. package/lib/component/timeline/SliderTimelineModel.js +18 -0
  291. package/lib/component/timeline/SliderTimelineView.js +42 -33
  292. package/lib/component/timeline/TimelineAxis.js +24 -35
  293. package/lib/component/timeline/TimelineModel.js +18 -0
  294. package/lib/component/timeline/TimelineView.js +18 -0
  295. package/lib/component/timeline/preprocessor.js +18 -0
  296. package/lib/component/timeline/timelineAction.js +18 -0
  297. package/lib/component/timeline/typeDefaulter.js +18 -0
  298. package/lib/component/timeline.js +19 -0
  299. package/lib/component/title.js +19 -0
  300. package/lib/component/toolbox/ToolboxModel.js +20 -2
  301. package/lib/component/toolbox/ToolboxView.js +18 -0
  302. package/lib/component/toolbox/feature/Brush.js +18 -0
  303. package/lib/component/toolbox/feature/DataView.js +18 -0
  304. package/lib/component/toolbox/feature/DataZoom.js +22 -1
  305. package/lib/component/toolbox/feature/MagicType.js +18 -0
  306. package/lib/component/toolbox/feature/Restore.js +18 -0
  307. package/lib/component/toolbox/feature/SaveAsImage.js +18 -0
  308. package/lib/component/toolbox/featureManager.js +18 -0
  309. package/lib/component/tooltip/TooltipContent.js +18 -0
  310. package/lib/component/tooltip/TooltipModel.js +18 -0
  311. package/lib/component/tooltip/TooltipView.js +19 -1
  312. package/lib/component/tooltip.js +18 -0
  313. package/lib/component/visualMap/ContinuousModel.js +19 -1
  314. package/lib/component/visualMap/ContinuousView.js +18 -0
  315. package/lib/component/visualMap/PiecewiseModel.js +20 -1
  316. package/lib/component/visualMap/PiecewiseView.js +18 -0
  317. package/lib/component/visualMap/VisualMapModel.js +32 -1
  318. package/lib/component/visualMap/VisualMapView.js +18 -0
  319. package/lib/component/visualMap/helper.js +19 -0
  320. package/lib/component/visualMap/preprocessor.js +18 -0
  321. package/lib/component/visualMap/typeDefaulter.js +18 -0
  322. package/lib/component/visualMap/visualEncoding.js +21 -1
  323. package/lib/component/visualMap/visualMapAction.js +18 -0
  324. package/lib/component/visualMapContinuous.js +19 -0
  325. package/lib/component/visualMapPiecewise.js +19 -0
  326. package/lib/config.js +18 -0
  327. package/lib/coord/Axis.js +166 -87
  328. package/lib/coord/View.js +19 -0
  329. package/lib/coord/axisDefault.js +52 -42
  330. package/lib/coord/axisHelper.js +136 -89
  331. package/lib/coord/axisModelCommonMixin.js +18 -8
  332. package/lib/coord/axisModelCreator.js +26 -3
  333. package/lib/coord/axisTickLabelBuilder.js +350 -0
  334. package/lib/coord/calendar/Calendar.js +20 -2
  335. package/lib/coord/calendar/CalendarModel.js +19 -0
  336. package/lib/coord/calendar/prepareCustom.js +18 -0
  337. package/lib/coord/cartesian/Axis2D.js +24 -16
  338. package/lib/coord/cartesian/AxisModel.js +18 -0
  339. package/lib/coord/cartesian/Cartesian.js +19 -0
  340. package/lib/coord/cartesian/Cartesian2D.js +26 -4
  341. package/lib/coord/cartesian/Grid.js +71 -79
  342. package/lib/coord/cartesian/GridModel.js +18 -0
  343. package/lib/{component/axis → coord/cartesian}/cartesianAxisHelper.js +29 -9
  344. package/lib/coord/cartesian/prepareCustom.js +18 -0
  345. package/lib/coord/geo/Geo.js +18 -0
  346. package/lib/coord/geo/GeoModel.js +18 -0
  347. package/lib/coord/geo/Region.js +19 -0
  348. package/lib/coord/geo/fix/diaoyuIsland.js +18 -0
  349. package/lib/coord/geo/fix/geoCoord.js +18 -0
  350. package/lib/coord/geo/fix/nanhai.js +18 -0
  351. package/lib/coord/geo/fix/textCoord.js +18 -0
  352. package/lib/coord/geo/geoCreator.js +19 -0
  353. package/lib/coord/geo/parseGeoJson.js +19 -0
  354. package/lib/coord/geo/prepareCustom.js +23 -3
  355. package/lib/coord/parallel/AxisModel.js +31 -4
  356. package/lib/coord/parallel/Parallel.js +35 -12
  357. package/lib/coord/parallel/ParallelAxis.js +19 -0
  358. package/lib/coord/parallel/ParallelModel.js +18 -0
  359. package/lib/coord/parallel/parallelCreator.js +19 -0
  360. package/lib/coord/parallel/parallelPreprocessor.js +18 -0
  361. package/lib/coord/polar/AngleAxis.js +18 -0
  362. package/lib/coord/polar/AxisModel.js +18 -0
  363. package/lib/coord/polar/Polar.js +19 -0
  364. package/lib/coord/polar/PolarModel.js +18 -0
  365. package/lib/coord/polar/RadiusAxis.js +18 -0
  366. package/lib/coord/polar/polarCreator.js +24 -3
  367. package/lib/coord/polar/prepareCustom.js +18 -0
  368. package/lib/coord/radar/IndicatorAxis.js +18 -0
  369. package/lib/coord/radar/Radar.js +18 -0
  370. package/lib/coord/radar/RadarModel.js +18 -0
  371. package/lib/coord/single/AxisModel.js +18 -0
  372. package/lib/coord/single/Single.js +19 -0
  373. package/lib/coord/single/SingleAxis.js +19 -5
  374. package/lib/coord/single/prepareCustom.js +18 -0
  375. package/lib/{component/axis → coord/single}/singleAxisHelper.js +20 -2
  376. package/lib/coord/single/singleCreator.js +19 -0
  377. package/lib/data/DataDiffer.js +18 -0
  378. package/lib/data/Graph.js +19 -0
  379. package/lib/data/List.js +413 -201
  380. package/lib/data/OrdinalMeta.js +19 -0
  381. package/lib/data/Source.js +19 -0
  382. package/lib/data/Tree.js +19 -0
  383. package/lib/data/helper/completeDimensions.js +63 -22
  384. package/lib/data/helper/createDimensions.js +23 -4
  385. package/lib/data/helper/dataProvider.js +63 -6
  386. package/lib/data/helper/dataStackHelper.js +162 -0
  387. package/lib/data/helper/dimensionHelper.js +46 -10
  388. package/lib/data/helper/linkList.js +19 -0
  389. package/lib/data/helper/sourceHelper.js +19 -0
  390. package/lib/data/helper/sourceType.js +18 -0
  391. package/lib/echarts.js +128 -118
  392. package/lib/export.js +19 -0
  393. package/lib/helper.js +41 -0
  394. package/lib/lang.js +18 -0
  395. package/lib/langEN.js +18 -0
  396. package/lib/langFI.js +18 -0
  397. package/lib/langTH.js +18 -0
  398. package/lib/layout/barGrid.js +178 -53
  399. package/lib/layout/barPolar.js +88 -71
  400. package/lib/layout/points.js +39 -4
  401. package/lib/loading/default.js +18 -0
  402. package/lib/model/Component.js +19 -0
  403. package/lib/model/Global.js +30 -2
  404. package/lib/model/Model.js +19 -0
  405. package/lib/model/OptionManager.js +19 -0
  406. package/lib/model/Series.js +23 -5
  407. package/lib/model/globalDefault.js +21 -5
  408. package/lib/model/mixin/areaStyle.js +18 -0
  409. package/lib/model/mixin/boxLayout.js +18 -0
  410. package/lib/model/mixin/colorPalette.js +27 -0
  411. package/lib/model/mixin/dataFormat.js +20 -1
  412. package/lib/model/mixin/itemStyle.js +18 -0
  413. package/lib/model/mixin/lineStyle.js +18 -0
  414. package/lib/model/mixin/makeStyleMapper.js +18 -0
  415. package/lib/model/mixin/textStyle.js +18 -0
  416. package/lib/model/referHelper.js +19 -0
  417. package/lib/preprocessor/backwardCompat.js +18 -0
  418. package/lib/preprocessor/helper/compatStyle.js +42 -15
  419. package/lib/processor/dataFilter.js +19 -1
  420. package/lib/processor/dataSample.js +27 -5
  421. package/lib/processor/dataStack.js +118 -0
  422. package/lib/scale/Interval.js +19 -14
  423. package/lib/scale/Log.js +22 -3
  424. package/lib/scale/Ordinal.js +27 -2
  425. package/lib/scale/Scale.js +27 -16
  426. package/lib/scale/Time.js +18 -0
  427. package/lib/scale/helper.js +19 -0
  428. package/lib/stream/Scheduler.js +123 -37
  429. package/lib/stream/task.js +165 -14
  430. package/lib/theme/dark.js +18 -0
  431. package/lib/theme/light.js +18 -0
  432. package/lib/util/KDTree.js +19 -0
  433. package/lib/util/animation.js +19 -0
  434. package/lib/util/array/nest.js +19 -0
  435. package/lib/util/clazz.js +18 -0
  436. package/lib/util/component.js +19 -0
  437. package/lib/util/format.js +36 -11
  438. package/lib/util/graphic.js +19 -0
  439. package/lib/util/layout.js +18 -0
  440. package/lib/util/model.js +33 -6
  441. package/lib/util/number.js +18 -0
  442. package/lib/util/quickSelect.js +19 -0
  443. package/lib/util/symbol.js +18 -0
  444. package/lib/util/throttle.js +26 -1
  445. package/lib/view/Chart.js +44 -7
  446. package/lib/view/Component.js +18 -0
  447. package/lib/visual/VisualMapping.js +28 -0
  448. package/lib/visual/aria.js +18 -0
  449. package/lib/visual/dataColor.js +19 -1
  450. package/lib/visual/seriesColor.js +19 -1
  451. package/lib/visual/symbol.js +28 -2
  452. package/lib/visual/visualDefault.js +19 -0
  453. package/lib/visual/visualSolution.js +24 -3
  454. package/licenses/LICENSE-d3 +27 -0
  455. package/licenses/LICENSE-zrender +29 -0
  456. package/map/js/china-contour.js +19 -0
  457. package/map/js/china.js +19 -0
  458. package/map/js/province/anhui.js +19 -0
  459. package/map/js/province/aomen.js +19 -0
  460. package/map/js/province/beijing.js +19 -0
  461. package/map/js/province/chongqing.js +19 -0
  462. package/map/js/province/fujian.js +19 -0
  463. package/map/js/province/gansu.js +19 -0
  464. package/map/js/province/guangdong.js +19 -0
  465. package/map/js/province/guangxi.js +19 -0
  466. package/map/js/province/guizhou.js +19 -0
  467. package/map/js/province/hainan.js +19 -0
  468. package/map/js/province/hebei.js +19 -0
  469. package/map/js/province/heilongjiang.js +19 -0
  470. package/map/js/province/henan.js +19 -0
  471. package/map/js/province/hubei.js +19 -0
  472. package/map/js/province/hunan.js +19 -0
  473. package/map/js/province/jiangsu.js +19 -0
  474. package/map/js/province/jiangxi.js +19 -0
  475. package/map/js/province/jilin.js +19 -0
  476. package/map/js/province/liaoning.js +19 -0
  477. package/map/js/province/neimenggu.js +19 -0
  478. package/map/js/province/ningxia.js +19 -0
  479. package/map/js/province/qinghai.js +19 -0
  480. package/map/js/province/shandong.js +19 -0
  481. package/map/js/province/shanghai.js +19 -0
  482. package/map/js/province/shanxi.js +19 -0
  483. package/map/js/province/shanxi1.js +19 -0
  484. package/map/js/province/sichuan.js +19 -0
  485. package/map/js/province/taiwan.js +19 -0
  486. package/map/js/province/tianjin.js +19 -0
  487. package/map/js/province/xianggang.js +19 -0
  488. package/map/js/province/xinjiang.js +19 -0
  489. package/map/js/province/xizang.js +19 -0
  490. package/map/js/province/yunnan.js +19 -0
  491. package/map/js/province/zhejiang.js +19 -0
  492. package/map/js/world.js +19 -0
  493. package/package.json +3 -3
  494. package/src/CoordinateSystem.js +19 -0
  495. package/src/ExtensionAPI.js +19 -0
  496. package/src/action/createDataSelectAction.js +19 -0
  497. package/src/action/geoRoam.js +19 -0
  498. package/src/action/roamHelper.js +19 -0
  499. package/src/chart/bar/BarSeries.js +44 -1
  500. package/src/chart/bar/BarView.js +128 -17
  501. package/src/chart/bar/BaseBarSeries.js +24 -0
  502. package/src/chart/bar/PictorialBarSeries.js +19 -0
  503. package/src/chart/bar/PictorialBarView.js +19 -0
  504. package/src/chart/bar/barItemStyle.js +19 -0
  505. package/src/chart/bar/helper.js +20 -1
  506. package/src/chart/bar.js +28 -7
  507. package/src/chart/boxplot/BoxplotSeries.js +26 -1
  508. package/src/chart/boxplot/BoxplotView.js +152 -21
  509. package/src/chart/boxplot/boxplotLayout.js +75 -71
  510. package/src/chart/boxplot/boxplotVisual.js +19 -0
  511. package/src/chart/boxplot.js +19 -0
  512. package/src/chart/candlestick/CandlestickSeries.js +35 -4
  513. package/src/chart/candlestick/CandlestickView.js +272 -24
  514. package/src/chart/candlestick/candlestickLayout.js +151 -97
  515. package/src/chart/candlestick/candlestickVisual.js +66 -17
  516. package/src/chart/candlestick/preprocessor.js +19 -0
  517. package/src/chart/candlestick.js +19 -0
  518. package/src/chart/chord/ChordSeries.js +19 -0
  519. package/src/chart/chord/ChordView.js +19 -0
  520. package/src/chart/chord/Ribbon.js +19 -0
  521. package/src/chart/chord/chordCircularLayout.js +19 -0
  522. package/src/chart/chord.js +19 -0
  523. package/src/chart/custom.js +23 -6
  524. package/src/chart/effectScatter/EffectScatterSeries.js +19 -0
  525. package/src/chart/effectScatter/EffectScatterView.js +19 -0
  526. package/src/chart/effectScatter.js +19 -0
  527. package/src/chart/funnel/FunnelSeries.js +19 -0
  528. package/src/chart/funnel/FunnelView.js +19 -0
  529. package/src/chart/funnel/funnelLayout.js +19 -0
  530. package/src/chart/funnel.js +19 -0
  531. package/src/chart/gauge/GaugeSeries.js +19 -0
  532. package/src/chart/gauge/GaugeView.js +19 -0
  533. package/src/chart/gauge/PointerPath.js +19 -0
  534. package/src/chart/gauge.js +19 -0
  535. package/src/chart/graph/GraphSeries.js +27 -0
  536. package/src/chart/graph/GraphView.js +19 -0
  537. package/src/chart/graph/adjustEdge.js +19 -0
  538. package/src/chart/graph/backwardCompat.js +19 -0
  539. package/src/chart/graph/categoryFilter.js +19 -0
  540. package/src/chart/graph/categoryVisual.js +19 -0
  541. package/src/chart/graph/circularLayout.js +19 -0
  542. package/src/chart/graph/circularLayoutHelper.js +19 -0
  543. package/src/chart/graph/createView.js +19 -0
  544. package/src/chart/graph/edgeVisual.js +19 -0
  545. package/src/chart/graph/forceHelper.js +19 -0
  546. package/src/chart/graph/forceLayout.js +19 -0
  547. package/src/chart/graph/graphAction.js +19 -0
  548. package/src/chart/graph/simpleLayout.js +19 -0
  549. package/src/chart/graph/simpleLayoutHelper.js +19 -0
  550. package/src/chart/graph.js +19 -0
  551. package/src/chart/heatmap/HeatmapLayer.js +19 -0
  552. package/src/chart/heatmap/HeatmapSeries.js +22 -1
  553. package/src/chart/heatmap/HeatmapView.js +19 -0
  554. package/src/chart/heatmap.js +19 -0
  555. package/src/chart/helper/EffectLine.js +19 -0
  556. package/src/chart/helper/EffectPolyline.js +19 -0
  557. package/src/chart/helper/EffectSymbol.js +19 -0
  558. package/src/chart/helper/LargeLineDraw.js +20 -0
  559. package/src/chart/helper/LargeSymbolDraw.js +19 -0
  560. package/src/chart/helper/Line.js +38 -16
  561. package/src/chart/helper/LineDraw.js +27 -0
  562. package/src/chart/helper/LinePath.js +19 -0
  563. package/src/chart/helper/Polyline.js +19 -0
  564. package/src/chart/helper/Symbol.js +68 -15
  565. package/src/chart/helper/SymbolDraw.js +61 -18
  566. package/src/chart/helper/createGraphFromNodeEdge.js +29 -6
  567. package/src/chart/helper/createGraphFromNodeMatrix.js +19 -0
  568. package/src/chart/helper/createListFromArray.js +32 -7
  569. package/src/chart/helper/createListSimply.js +19 -0
  570. package/src/chart/helper/createRenderPlanner.js +22 -3
  571. package/src/chart/helper/labelHelper.js +19 -0
  572. package/src/chart/helper/treeHelper.js +19 -0
  573. package/src/chart/helper/whiskerBoxCommon.js +19 -24
  574. package/src/chart/line/LineSeries.js +35 -11
  575. package/src/chart/line/LineView.js +174 -105
  576. package/src/chart/line/helper.js +106 -0
  577. package/src/chart/line/lineAnimationDiff.js +32 -39
  578. package/src/chart/line/poly.js +149 -0
  579. package/src/chart/line.js +19 -0
  580. package/src/chart/lines/LinesSeries.js +27 -7
  581. package/src/chart/lines/LinesView.js +21 -1
  582. package/src/chart/lines/linesLayout.js +20 -1
  583. package/src/chart/lines/linesVisual.js +19 -0
  584. package/src/chart/lines.js +19 -0
  585. package/src/chart/map/MapSeries.js +42 -5
  586. package/src/chart/map/MapView.js +19 -0
  587. package/src/chart/map/backwardCompat.js +19 -0
  588. package/src/chart/map/mapDataStatistic.js +19 -0
  589. package/src/chart/map/mapSymbolLayout.js +19 -0
  590. package/src/chart/map/mapVisual.js +19 -0
  591. package/src/chart/map.js +19 -0
  592. package/src/chart/parallel/ParallelSeries.js +21 -7
  593. package/src/chart/parallel/ParallelView.js +90 -58
  594. package/src/chart/parallel/parallelVisual.js +39 -14
  595. package/src/chart/parallel.js +19 -0
  596. package/src/chart/pictorialBar.js +19 -0
  597. package/src/chart/pie/PieSeries.js +37 -2
  598. package/src/chart/pie/PieView.js +19 -0
  599. package/src/chart/pie/labelLayout.js +19 -0
  600. package/src/chart/pie/pieLayout.js +20 -1
  601. package/src/chart/pie.js +19 -0
  602. package/src/chart/radar/RadarSeries.js +21 -2
  603. package/src/chart/radar/RadarView.js +19 -0
  604. package/src/chart/radar/backwardCompat.js +19 -0
  605. package/src/chart/radar/radarLayout.js +20 -1
  606. package/src/chart/radar.js +19 -0
  607. package/src/chart/sankey/SankeySeries.js +28 -0
  608. package/src/chart/sankey/SankeyView.js +62 -11
  609. package/src/chart/sankey/sankeyAction.js +31 -0
  610. package/src/chart/sankey/sankeyLayout.js +71 -17
  611. package/src/chart/sankey/sankeyVisual.js +49 -25
  612. package/src/chart/sankey.js +20 -0
  613. package/src/chart/scatter/ScatterSeries.js +21 -2
  614. package/src/chart/scatter/ScatterView.js +19 -0
  615. package/src/chart/scatter.js +19 -0
  616. package/src/chart/sunburst/SunburstPiece.js +72 -20
  617. package/src/chart/sunburst/SunburstSeries.js +19 -0
  618. package/src/chart/sunburst/SunburstView.js +39 -17
  619. package/src/chart/sunburst/sunburstAction.js +19 -0
  620. package/src/chart/sunburst/sunburstLayout.js +19 -0
  621. package/src/chart/sunburst.js +19 -0
  622. package/src/chart/themeRiver/ThemeRiverSeries.js +19 -1
  623. package/src/chart/themeRiver/ThemeRiverView.js +19 -0
  624. package/src/chart/themeRiver/themeRiverLayout.js +19 -0
  625. package/src/chart/themeRiver/themeRiverVisual.js +19 -0
  626. package/src/chart/themeRiver.js +19 -0
  627. package/src/chart/tree/TreeSeries.js +38 -2
  628. package/src/chart/tree/TreeView.js +31 -5
  629. package/src/chart/tree/layoutHelper.js +19 -0
  630. package/src/chart/tree/traversalHelper.js +19 -0
  631. package/src/chart/tree/treeAction.js +19 -0
  632. package/src/chart/tree/treeLayout.js +128 -0
  633. package/src/chart/tree.js +21 -4
  634. package/src/chart/treemap/Breadcrumb.js +19 -0
  635. package/src/chart/treemap/TreemapSeries.js +19 -0
  636. package/src/chart/treemap/TreemapView.js +19 -0
  637. package/src/chart/treemap/helper.js +19 -0
  638. package/src/chart/treemap/treemapAction.js +19 -0
  639. package/src/chart/treemap/treemapLayout.js +19 -0
  640. package/src/chart/treemap/treemapVisual.js +19 -0
  641. package/src/chart/treemap.js +19 -0
  642. package/src/component/angleAxis.js +19 -0
  643. package/src/component/axis/AngleAxisView.js +62 -25
  644. package/src/component/axis/AxisBuilder.js +68 -94
  645. package/src/component/axis/AxisView.js +19 -0
  646. package/src/component/axis/CartesianAxisView.js +69 -54
  647. package/src/component/axis/ParallelAxisView.js +19 -0
  648. package/src/component/axis/RadiusAxisView.js +26 -4
  649. package/src/component/axis/SingleAxisView.js +26 -18
  650. package/src/component/axis/parallelAxisAction.js +19 -0
  651. package/src/component/axis.js +19 -0
  652. package/src/component/axisPointer/AxisPointerModel.js +19 -0
  653. package/src/component/axisPointer/AxisPointerView.js +19 -0
  654. package/src/component/axisPointer/BaseAxisPointer.js +19 -0
  655. package/src/component/axisPointer/CartesianAxisPointer.js +21 -2
  656. package/src/component/axisPointer/PolarAxisPointer.js +20 -1
  657. package/src/component/axisPointer/SingleAxisPointer.js +20 -1
  658. package/src/component/axisPointer/axisTrigger.js +21 -1
  659. package/src/component/axisPointer/findPointFromSeries.js +19 -0
  660. package/src/component/axisPointer/globalListener.js +19 -0
  661. package/src/component/axisPointer/modelHelper.js +21 -1
  662. package/src/component/axisPointer/viewHelper.js +20 -0
  663. package/src/component/axisPointer.js +19 -0
  664. package/src/component/brush/BrushModel.js +26 -1
  665. package/src/component/brush/BrushView.js +24 -0
  666. package/src/component/brush/brushAction.js +19 -0
  667. package/src/component/brush/preprocessor.js +19 -0
  668. package/src/component/brush/selector.js +19 -0
  669. package/src/component/brush/visualEncoding.js +19 -0
  670. package/src/component/brush.js +19 -0
  671. package/src/component/calendar/CalendarView.js +19 -0
  672. package/src/component/calendar.js +19 -0
  673. package/src/component/dataZoom/AxisProxy.js +42 -20
  674. package/src/component/dataZoom/DataZoomModel.js +19 -0
  675. package/src/component/dataZoom/DataZoomView.js +19 -0
  676. package/src/component/dataZoom/InsideZoomModel.js +19 -0
  677. package/src/component/dataZoom/InsideZoomView.js +37 -10
  678. package/src/component/dataZoom/SelectZoomModel.js +19 -0
  679. package/src/component/dataZoom/SelectZoomView.js +19 -0
  680. package/src/component/dataZoom/SliderZoomModel.js +19 -0
  681. package/src/component/dataZoom/SliderZoomView.js +30 -5
  682. package/src/component/dataZoom/dataZoomAction.js +19 -0
  683. package/src/component/dataZoom/dataZoomProcessor.js +24 -1
  684. package/src/component/dataZoom/helper.js +19 -0
  685. package/src/component/dataZoom/history.js +19 -0
  686. package/src/component/dataZoom/roams.js +20 -15
  687. package/src/component/dataZoom/typeDefaulter.js +19 -0
  688. package/src/component/dataZoom.js +19 -0
  689. package/src/component/dataZoomInside.js +19 -0
  690. package/src/component/dataZoomSelect.js +19 -0
  691. package/src/component/dataset.js +63 -3
  692. package/src/component/geo/GeoView.js +19 -0
  693. package/src/component/geo.js +19 -0
  694. package/src/component/graphic.js +19 -0
  695. package/src/component/grid.js +19 -0
  696. package/src/component/gridSimple.js +19 -0
  697. package/src/component/helper/BrushController.js +19 -0
  698. package/src/component/helper/BrushTargetManager.js +19 -0
  699. package/src/component/helper/MapDraw.js +19 -0
  700. package/src/component/helper/RoamController.js +19 -0
  701. package/src/component/helper/brushHelper.js +19 -0
  702. package/src/component/helper/cursorHelper.js +19 -0
  703. package/src/component/helper/interactionMutex.js +19 -0
  704. package/src/component/helper/listComponent.js +19 -0
  705. package/src/component/helper/roamHelper.js +19 -0
  706. package/src/component/helper/selectableMixin.js +22 -12
  707. package/src/component/helper/sliderMove.js +19 -0
  708. package/src/component/legend/LegendModel.js +25 -6
  709. package/src/component/legend/LegendView.js +51 -13
  710. package/src/component/legend/ScrollableLegendModel.js +19 -0
  711. package/src/component/legend/ScrollableLegendView.js +19 -0
  712. package/src/component/legend/legendAction.js +19 -0
  713. package/src/component/legend/legendFilter.js +19 -0
  714. package/src/component/legend/scrollableLegendAction.js +19 -0
  715. package/src/component/legend.js +19 -0
  716. package/src/component/legendScroll.js +19 -0
  717. package/src/component/markArea.js +19 -0
  718. package/src/component/markLine.js +19 -0
  719. package/src/component/markPoint.js +19 -0
  720. package/src/component/marker/MarkAreaModel.js +19 -0
  721. package/src/component/marker/MarkAreaView.js +22 -3
  722. package/src/component/marker/MarkLineModel.js +19 -0
  723. package/src/component/marker/MarkLineView.js +22 -3
  724. package/src/component/marker/MarkPointModel.js +19 -0
  725. package/src/component/marker/MarkPointView.js +21 -3
  726. package/src/component/marker/MarkerModel.js +20 -1
  727. package/src/component/marker/MarkerView.js +19 -0
  728. package/src/component/marker/markerHelper.js +60 -20
  729. package/src/component/parallel.js +19 -0
  730. package/src/component/parallelAxis.js +19 -0
  731. package/src/component/polar.js +19 -0
  732. package/src/component/radar/RadarView.js +23 -4
  733. package/src/component/radar.js +19 -0
  734. package/src/component/radiusAxis.js +19 -0
  735. package/src/component/singleAxis.js +19 -0
  736. package/src/component/timeline/SliderTimelineModel.js +19 -0
  737. package/src/component/timeline/SliderTimelineView.js +41 -33
  738. package/src/component/timeline/TimelineAxis.js +25 -43
  739. package/src/component/timeline/TimelineModel.js +19 -0
  740. package/src/component/timeline/TimelineView.js +19 -0
  741. package/src/component/timeline/preprocessor.js +19 -0
  742. package/src/component/timeline/timelineAction.js +19 -0
  743. package/src/component/timeline/typeDefaulter.js +19 -0
  744. package/src/component/timeline.js +19 -0
  745. package/src/component/title.js +19 -0
  746. package/src/component/toolbox/ToolboxModel.js +21 -2
  747. package/src/component/toolbox/ToolboxView.js +19 -0
  748. package/src/component/toolbox/feature/Brush.js +19 -0
  749. package/src/component/toolbox/feature/DataView.js +19 -0
  750. package/src/component/toolbox/feature/DataZoom.js +22 -0
  751. package/src/component/toolbox/feature/MagicType.js +19 -0
  752. package/src/component/toolbox/feature/Restore.js +19 -0
  753. package/src/component/toolbox/feature/SaveAsImage.js +19 -0
  754. package/src/component/toolbox/featureManager.js +19 -0
  755. package/src/component/toolbox.js +19 -0
  756. package/src/component/tooltip/TooltipContent.js +19 -0
  757. package/src/component/tooltip/TooltipModel.js +19 -0
  758. package/src/component/tooltip/TooltipView.js +20 -1
  759. package/src/component/tooltip.js +19 -0
  760. package/src/component/visualMap/ContinuousModel.js +20 -1
  761. package/src/component/visualMap/ContinuousView.js +19 -0
  762. package/src/component/visualMap/PiecewiseModel.js +20 -1
  763. package/src/component/visualMap/PiecewiseView.js +19 -0
  764. package/src/component/visualMap/VisualMapModel.js +31 -3
  765. package/src/component/visualMap/VisualMapView.js +19 -0
  766. package/src/component/visualMap/helper.js +19 -0
  767. package/src/component/visualMap/preprocessor.js +19 -0
  768. package/src/component/visualMap/typeDefaulter.js +19 -0
  769. package/src/component/visualMap/visualEncoding.js +23 -1
  770. package/src/component/visualMap/visualMapAction.js +19 -0
  771. package/src/component/visualMap.js +19 -0
  772. package/src/component/visualMapContinuous.js +19 -0
  773. package/src/component/visualMapPiecewise.js +19 -0
  774. package/src/config.js +19 -0
  775. package/src/coord/Axis.js +159 -100
  776. package/src/coord/View.js +19 -0
  777. package/src/coord/axisDefault.js +68 -41
  778. package/src/coord/axisHelper.js +142 -93
  779. package/src/coord/axisModelCommonMixin.js +19 -11
  780. package/src/coord/axisModelCreator.js +25 -2
  781. package/src/coord/axisTickLabelBuilder.js +369 -0
  782. package/src/coord/calendar/Calendar.js +24 -2
  783. package/src/coord/calendar/CalendarModel.js +19 -0
  784. package/src/coord/calendar/prepareCustom.js +20 -1
  785. package/src/coord/cartesian/Axis2D.js +25 -18
  786. package/src/coord/cartesian/AxisModel.js +19 -0
  787. package/src/coord/cartesian/Cartesian.js +19 -0
  788. package/src/coord/cartesian/Cartesian2D.js +27 -4
  789. package/src/coord/cartesian/Grid.js +65 -76
  790. package/src/coord/cartesian/GridModel.js +19 -0
  791. package/src/{component/axis → coord/cartesian}/cartesianAxisHelper.js +28 -9
  792. package/src/coord/cartesian/prepareCustom.js +19 -0
  793. package/src/coord/geo/Geo.js +19 -0
  794. package/src/coord/geo/GeoModel.js +19 -0
  795. package/src/coord/geo/Region.js +19 -0
  796. package/src/coord/geo/fix/diaoyuIsland.js +19 -0
  797. package/src/coord/geo/fix/geoCoord.js +19 -0
  798. package/src/coord/geo/fix/nanhai.js +19 -0
  799. package/src/coord/geo/fix/textCoord.js +19 -0
  800. package/src/coord/geo/geoCreator.js +19 -0
  801. package/src/coord/geo/parseGeoJson.js +19 -0
  802. package/src/coord/geo/prepareCustom.js +24 -3
  803. package/src/coord/parallel/AxisModel.js +32 -3
  804. package/src/coord/parallel/Parallel.js +38 -12
  805. package/src/coord/parallel/ParallelAxis.js +19 -0
  806. package/src/coord/parallel/ParallelModel.js +19 -0
  807. package/src/coord/parallel/parallelCreator.js +19 -0
  808. package/src/coord/parallel/parallelPreprocessor.js +19 -0
  809. package/src/coord/polar/AngleAxis.js +19 -0
  810. package/src/coord/polar/AxisModel.js +19 -0
  811. package/src/coord/polar/Polar.js +19 -0
  812. package/src/coord/polar/PolarModel.js +19 -0
  813. package/src/coord/polar/RadiusAxis.js +19 -0
  814. package/src/coord/polar/polarCreator.js +26 -3
  815. package/src/coord/polar/prepareCustom.js +19 -0
  816. package/src/coord/radar/IndicatorAxis.js +19 -0
  817. package/src/coord/radar/Radar.js +19 -0
  818. package/src/coord/radar/RadarModel.js +19 -0
  819. package/src/coord/single/AxisModel.js +19 -0
  820. package/src/coord/single/Single.js +19 -0
  821. package/src/coord/single/SingleAxis.js +19 -5
  822. package/src/coord/single/prepareCustom.js +19 -0
  823. package/src/{component/axis → coord/single}/singleAxisHelper.js +21 -4
  824. package/src/coord/single/singleCreator.js +19 -0
  825. package/src/data/DataDiffer.js +19 -0
  826. package/src/data/Graph.js +20 -1
  827. package/src/data/List.js +412 -207
  828. package/src/data/OrdinalMeta.js +19 -0
  829. package/src/data/Source.js +19 -0
  830. package/src/data/Tree.js +19 -0
  831. package/src/data/helper/completeDimensions.js +62 -29
  832. package/src/data/helper/createDimensions.js +23 -4
  833. package/src/data/helper/dataProvider.js +61 -6
  834. package/src/data/helper/dataStackHelper.js +162 -0
  835. package/src/data/helper/dimensionHelper.js +49 -10
  836. package/src/data/helper/linkList.js +19 -0
  837. package/src/data/helper/sourceHelper.js +19 -0
  838. package/src/data/helper/sourceType.js +19 -0
  839. package/src/echarts.js +127 -114
  840. package/src/export.js +19 -0
  841. package/src/helper.js +30 -1
  842. package/src/lang.js +19 -0
  843. package/src/langEN.js +19 -0
  844. package/src/langFI.js +19 -0
  845. package/src/langTH.js +19 -0
  846. package/src/layout/barGrid.js +174 -64
  847. package/src/layout/barPolar.js +81 -66
  848. package/src/layout/points.js +32 -4
  849. package/src/loading/default.js +19 -0
  850. package/src/model/Component.js +19 -0
  851. package/src/model/Global.js +29 -2
  852. package/src/model/Model.js +19 -0
  853. package/src/model/OptionManager.js +19 -0
  854. package/src/model/Series.js +23 -5
  855. package/src/model/globalDefault.js +23 -5
  856. package/src/model/mixin/areaStyle.js +19 -0
  857. package/src/model/mixin/boxLayout.js +19 -0
  858. package/src/model/mixin/colorPalette.js +26 -0
  859. package/src/model/mixin/dataFormat.js +20 -1
  860. package/src/model/mixin/itemStyle.js +19 -0
  861. package/src/model/mixin/lineStyle.js +19 -0
  862. package/src/model/mixin/makeStyleMapper.js +19 -0
  863. package/src/model/mixin/textStyle.js +19 -0
  864. package/src/model/referHelper.js +19 -0
  865. package/src/preprocessor/backwardCompat.js +19 -0
  866. package/src/preprocessor/helper/compatStyle.js +45 -15
  867. package/src/processor/dataFilter.js +20 -1
  868. package/src/processor/dataSample.js +29 -3
  869. package/src/processor/dataStack.js +129 -0
  870. package/src/scale/Interval.js +19 -12
  871. package/src/scale/Log.js +22 -3
  872. package/src/scale/Ordinal.js +28 -2
  873. package/src/scale/Scale.js +27 -13
  874. package/src/scale/Time.js +19 -0
  875. package/src/scale/helper.js +19 -0
  876. package/src/stream/Scheduler.js +124 -32
  877. package/src/stream/task.js +166 -16
  878. package/src/theme/dark.js +19 -0
  879. package/src/theme/light.js +19 -0
  880. package/src/util/KDTree.js +19 -0
  881. package/src/util/animation.js +19 -0
  882. package/src/util/array/nest.js +19 -0
  883. package/src/util/clazz.js +19 -0
  884. package/src/util/component.js +19 -0
  885. package/src/util/format.js +47 -20
  886. package/src/util/graphic.js +19 -0
  887. package/src/util/layout.js +19 -0
  888. package/src/util/model.js +33 -5
  889. package/src/util/number.js +19 -0
  890. package/src/util/quickSelect.js +19 -0
  891. package/src/util/symbol.js +19 -0
  892. package/src/util/throttle.js +27 -0
  893. package/src/view/Chart.js +48 -10
  894. package/src/view/Component.js +19 -0
  895. package/src/visual/VisualMapping.js +29 -0
  896. package/src/visual/aria.js +19 -0
  897. package/src/visual/dataColor.js +21 -1
  898. package/src/visual/seriesColor.js +20 -1
  899. package/src/visual/symbol.js +34 -2
  900. package/src/visual/visualDefault.js +19 -0
  901. package/src/visual/visualSolution.js +23 -3
  902. package/theme/dark.js +19 -0
  903. package/theme/infographic.js +19 -0
  904. package/theme/macarons.js +19 -0
  905. package/theme/roma.js +19 -0
  906. package/theme/shine.js +19 -0
  907. package/theme/vintage.js +19 -0
  908. package/build/rollup-plugin-ec-dev.js +0 -38
  909. package/lib/chart/helper/WhiskerBoxDraw.js +0 -201
  910. package/lib/chart/tree/commonLayout.js +0 -108
  911. package/lib/chart/tree/orthogonalLayout.js +0 -9
  912. package/lib/chart/tree/radialLayout.js +0 -9
  913. package/lib/component/dataset/DatasetModel.js +0 -29
  914. package/src/chart/helper/WhiskerBoxDraw.js +0 -213
  915. package/src/chart/tree/commonLayout.js +0 -96
  916. package/src/chart/tree/orthogonalLayout.js +0 -7
  917. package/src/chart/tree/radialLayout.js +0 -7
  918. package/src/component/dataset/DatasetModel.js +0 -31
package/lib/data/List.js CHANGED
@@ -19,29 +19,49 @@ var _dimensionHelper = require("./helper/dimensionHelper");
19
19
 
20
20
  var summarizeDimensions = _dimensionHelper.summarizeDimensions;
21
21
 
22
+ /*
23
+ * Licensed to the Apache Software Foundation (ASF) under one
24
+ * or more contributor license agreements. See the NOTICE file
25
+ * distributed with this work for additional information
26
+ * regarding copyright ownership. The ASF licenses this file
27
+ * to you under the Apache License, Version 2.0 (the
28
+ * "License"); you may not use this file except in compliance
29
+ * with the License. You may obtain a copy of the License at
30
+ *
31
+ * http://www.apache.org/licenses/LICENSE-2.0
32
+ *
33
+ * Unless required by applicable law or agreed to in writing,
34
+ * software distributed under the License is distributed on an
35
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
36
+ * KIND, either express or implied. See the License for the
37
+ * specific language governing permissions and limitations
38
+ * under the License.
39
+ */
40
+
22
41
  /**
23
42
  * List for data storage
24
43
  * @module echarts/data/List
25
44
  */
26
45
  var isObject = zrUtil.isObject;
27
- var UNDEFINED = 'undefined';
28
- var globalObj = typeof window === UNDEFINED ? global : window; // Use prefix to avoid index to be the same as otherIdList[idx],
46
+ var UNDEFINED = 'undefined'; // Use prefix to avoid index to be the same as otherIdList[idx],
29
47
  // which will cause weird udpate animation.
30
48
 
31
49
  var ID_PREFIX = 'e\0\0';
32
50
  var dataCtors = {
33
- 'float': typeof globalObj.Float64Array === UNDEFINED ? Array : globalObj.Float64Array,
34
- 'int': typeof globalObj.Int32Array === UNDEFINED ? Array : globalObj.Int32Array,
51
+ 'float': typeof Float64Array === UNDEFINED ? Array : Float64Array,
52
+ 'int': typeof Int32Array === UNDEFINED ? Array : Int32Array,
35
53
  // Ordinal data type can be string or int
36
54
  'ordinal': Array,
37
55
  'number': Array,
38
56
  'time': Array
39
- };
57
+ }; // Caution: MUST not use `new CtorUint32Array(arr, 0, len)`, because the Ctor of array is
58
+ // different from the Ctor of typed array.
40
59
 
41
- function getIndicesCtor(list) {
42
- var CtorUint32Array = typeof globalObj.Uint32Array === UNDEFINED ? Array : globalObj.Uint32Array;
43
- var CtorUint16Array = typeof globalObj.Uint16Array === UNDEFINED ? Array : globalObj.Uint16Array; // The possible max value in this._indicies is always this._rawCount despite of filtering.
60
+ var CtorUint32Array = typeof Uint32Array === UNDEFINED ? Array : Uint32Array;
61
+ var CtorUint16Array = typeof Uint16Array === UNDEFINED ? Array : Uint16Array;
44
62
 
63
+ function getIndicesCtor(list) {
64
+ // The possible max value in this._indicies is always this._rawCount despite of filtering.
45
65
  return list._rawCount > 65535 ? CtorUint32Array : CtorUint16Array;
46
66
  }
47
67
 
@@ -51,15 +71,20 @@ function cloneChunk(originalChunk) {
51
71
  return Ctor === Array ? originalChunk.slice() : new Ctor(originalChunk);
52
72
  }
53
73
 
54
- var TRANSFERABLE_PROPERTIES = ['stackedOn', 'hasItemOption', '_nameList', '_idList', '_rawData', '_rawExtent', '_chunkSize', '_chunkCount', '_dimValueGetter', '_count', '_rawCount', '_nameDimIdx', '_idDimIdx'];
74
+ var TRANSFERABLE_PROPERTIES = ['hasItemOption', '_nameList', '_idList', '_invertedIndicesMap', '_rawData', '_chunkSize', '_chunkCount', '_dimValueGetter', '_count', '_rawCount', '_nameDimIdx', '_idDimIdx'];
75
+ var CLONE_PROPERTIES = ['_extent', '_approximateExtent', '_rawExtent'];
55
76
 
56
- function transferProperties(a, b) {
57
- zrUtil.each(TRANSFERABLE_PROPERTIES.concat(b.__wrappedMethods || []), function (propName) {
58
- if (b.hasOwnProperty(propName)) {
59
- a[propName] = b[propName];
77
+ function transferProperties(target, source) {
78
+ zrUtil.each(TRANSFERABLE_PROPERTIES.concat(source.__wrappedMethods || []), function (propName) {
79
+ if (source.hasOwnProperty(propName)) {
80
+ target[propName] = source[propName];
60
81
  }
61
82
  });
62
- a.__wrappedMethods = b.__wrappedMethods;
83
+ target.__wrappedMethods = source.__wrappedMethods;
84
+ zrUtil.each(CLONE_PROPERTIES, function (propName) {
85
+ target[propName] = zrUtil.clone(source[propName]);
86
+ });
87
+ target._calculationInfo = zrUtil.extend(source._calculationInfo);
63
88
  }
64
89
  /**
65
90
  * @constructor
@@ -70,6 +95,7 @@ function transferProperties(a, b) {
70
95
  * Dimensions should be concrete names like x, y, z, lng, lat, angle, radius
71
96
  * Spetial fields: {
72
97
  * ordinalMeta: <module:echarts/data/OrdinalMeta>
98
+ * createInvertedIndices: <boolean>
73
99
  * }
74
100
  * @param {module:echarts/model/Model} hostModel
75
101
  */
@@ -79,37 +105,34 @@ var List = function (dimensions, hostModel) {
79
105
  dimensions = dimensions || ['x', 'y'];
80
106
  var dimensionInfos = {};
81
107
  var dimensionNames = [];
108
+ var invertedIndicesMap = {};
82
109
 
83
110
  for (var i = 0; i < dimensions.length; i++) {
84
- var dimensionName;
85
- var dimensionInfo = {};
111
+ // Use the original dimensions[i], where other flag props may exists.
112
+ var dimensionInfo = dimensions[i];
86
113
 
87
- if (typeof dimensions[i] === 'string') {
88
- dimensionName = dimensions[i];
114
+ if (zrUtil.isString(dimensionInfo)) {
89
115
  dimensionInfo = {
90
- name: dimensionName,
91
- coordDim: dimensionName,
92
- coordDimIndex: 0,
93
- stackable: false,
94
- // Type can be 'float', 'int', 'number'
95
- // Default is float64
96
- type: 'float'
116
+ name: dimensionInfo
97
117
  };
98
- } else {
99
- dimensionInfo = dimensions[i];
100
- dimensionName = dimensionInfo.name;
101
- dimensionInfo.type = dimensionInfo.type || 'float';
118
+ }
102
119
 
103
- if (!dimensionInfo.coordDim) {
104
- dimensionInfo.coordDim = dimensionName;
105
- dimensionInfo.coordDimIndex = 0;
106
- }
120
+ var dimensionName = dimensionInfo.name;
121
+ dimensionInfo.type = dimensionInfo.type || 'float';
122
+
123
+ if (!dimensionInfo.coordDim) {
124
+ dimensionInfo.coordDim = dimensionName;
125
+ dimensionInfo.coordDimIndex = 0;
107
126
  }
108
127
 
109
128
  dimensionInfo.otherDims = dimensionInfo.otherDims || {};
110
129
  dimensionNames.push(dimensionName);
111
130
  dimensionInfos[dimensionName] = dimensionInfo;
112
131
  dimensionInfo.index = i;
132
+
133
+ if (dimensionInfo.createInvertedIndices) {
134
+ invertedIndicesMap[dimensionName] = [];
135
+ }
113
136
  }
114
137
  /**
115
138
  * @readOnly
@@ -168,11 +191,6 @@ var List = function (dimensions, hostModel) {
168
191
  */
169
192
 
170
193
  this._optionModels = [];
171
- /**
172
- * @param {module:echarts/data/List}
173
- */
174
-
175
- this.stackedOn = null;
176
194
  /**
177
195
  * Global visual properties after visual coding
178
196
  * @type {Object}
@@ -265,6 +283,18 @@ var List = function (dimensions, hostModel) {
265
283
  */
266
284
 
267
285
  this._dimensionsSummary = summarizeDimensions(this);
286
+ /**
287
+ * @type {Object.<Array|TypedArray>}
288
+ * @private
289
+ */
290
+
291
+ this._invertedIndicesMap = invertedIndicesMap;
292
+ /**
293
+ * @type {Object}
294
+ * @private
295
+ */
296
+
297
+ this._calculationInfo = {};
268
298
  };
269
299
 
270
300
  var listProto = List.prototype;
@@ -291,7 +321,7 @@ listProto.getDimension = function (dim) {
291
321
  return dim;
292
322
  };
293
323
  /**
294
- * Get type and stackable info of particular dimension
324
+ * Get type and calculation info of particular dimension
295
325
  * @param {string|number} dim
296
326
  * Dimension can be concrete names like x, y, z, lng, lat, angle, radius
297
327
  * Or a ordinal number. For example getDimensionInfo(0) will return 'x' or 'lng' or 'radius'
@@ -312,17 +342,25 @@ listProto.getDimensionsOnCoord = function () {
312
342
  };
313
343
  /**
314
344
  * @param {string} coordDim
315
- * @param {number|Array} [idx=0] A coordDim may map to more than one data dim.
345
+ * @param {number} [idx] A coordDim may map to more than one data dim.
316
346
  * If idx is `true`, return a array of all mapped dims.
347
+ * If idx is not specified, return the first dim not extra.
317
348
  * @return {string|Array.<string>} concrete data dim.
318
349
  * If idx is number, and not found, return null/undefined.
319
- * If idx is `true`, and not found, return empty array.
350
+ * If idx is `true`, and not found, return empty array (always return array).
320
351
  */
321
352
 
322
353
 
323
354
  listProto.mapDimension = function (coordDim, idx) {
324
- var dims = this._dimensionsSummary.encode[coordDim];
325
- return idx === true ? dims && dims.slice() || [] : dims ? dims[idx || 0] : null;
355
+ var dimensionsSummary = this._dimensionsSummary;
356
+
357
+ if (idx == null) {
358
+ return dimensionsSummary.encodeFirstDimNotExtra[coordDim];
359
+ }
360
+
361
+ var dims = dimensionsSummary.encode[coordDim];
362
+ return idx === true // always return array if idx is `true`
363
+ ? (dims || []).slice() : dims && dims[idx];
326
364
  };
327
365
  /**
328
366
  * Initialize from data
@@ -400,6 +438,7 @@ listProto._initDataFromProvider = function (start, end) {
400
438
  var rawData = this._rawData;
401
439
  var storage = this._storage;
402
440
  var dimensions = this.dimensions;
441
+ var dimLen = dimensions.length;
403
442
  var dimensionInfoMap = this._dimensionInfos;
404
443
  var nameList = this._nameList;
405
444
  var idList = this._idList;
@@ -409,11 +448,11 @@ listProto._initDataFromProvider = function (start, end) {
409
448
  var chunkCount = this._chunkCount;
410
449
  var lastChunkIndex = chunkCount - 1;
411
450
 
412
- for (var i = 0; i < dimensions.length; i++) {
451
+ for (var i = 0; i < dimLen; i++) {
413
452
  var dim = dimensions[i];
414
453
 
415
454
  if (!rawExtent[dim]) {
416
- rawExtent[dim] = [Infinity, -Infinity];
455
+ rawExtent[dim] = getInitialExtent();
417
456
  }
418
457
 
419
458
  var dimInfo = dimensionInfoMap[dim];
@@ -453,9 +492,11 @@ listProto._initDataFromProvider = function (start, end) {
453
492
  this._chunkCount = storage[dim].length;
454
493
  }
455
494
 
495
+ var dataItem = new Array(dimLen);
496
+
456
497
  for (var idx = start; idx < end; idx++) {
457
498
  // NOTICE: Try not to write things into dataItem
458
- var dataItem = rawData.getItem(idx); // Each data item is value
499
+ dataItem = rawData.getItem(idx, dataItem); // Each data item is value
459
500
  // [1, 2]
460
501
  // 2
461
502
  // Bar chart, line chart which uses category axis
@@ -465,20 +506,21 @@ listProto._initDataFromProvider = function (start, end) {
465
506
  var chunkIndex = Math.floor(idx / chunkSize);
466
507
  var chunkOffset = idx % chunkSize; // Store the data by dimensions
467
508
 
468
- for (var k = 0; k < dimensions.length; k++) {
509
+ for (var k = 0; k < dimLen; k++) {
469
510
  var dim = dimensions[k];
470
511
  var dimStorage = storage[dim][chunkIndex]; // PENDING NULL is empty or zero
471
512
 
472
513
  var val = this._dimValueGetter(dataItem, dim, idx, k);
473
514
 
474
515
  dimStorage[chunkOffset] = val;
516
+ var dimRawExtent = rawExtent[dim];
475
517
 
476
- if (val < rawExtent[dim][0]) {
477
- rawExtent[dim][0] = val;
518
+ if (val < dimRawExtent[0]) {
519
+ dimRawExtent[0] = val;
478
520
  }
479
521
 
480
- if (val > rawExtent[dim][1]) {
481
- rawExtent[dim][1] = val;
522
+ if (val > dimRawExtent[1]) {
523
+ dimRawExtent[1] = val;
482
524
  }
483
525
  } // ??? FIXME not check by pure but sourceFormat?
484
526
  // TODO refactor these logic.
@@ -487,13 +529,25 @@ listProto._initDataFromProvider = function (start, end) {
487
529
  if (!rawData.pure) {
488
530
  var name = nameList[idx];
489
531
 
490
- if (dataItem && !name) {
491
- if (nameDimIdx != null) {
492
- name = this._getNameFromStore(idx);
493
- } else if (dataItem.name != null) {
532
+ if (dataItem && name == null) {
533
+ // If dataItem is {name: ...}, it has highest priority.
534
+ // That is appropriate for many common cases.
535
+ if (dataItem.name != null) {
494
536
  // There is no other place to persistent dataItem.name,
495
537
  // so save it to nameList.
496
538
  nameList[idx] = name = dataItem.name;
539
+ } else if (nameDimIdx != null) {
540
+ var nameDim = dimensions[nameDimIdx];
541
+ var nameDimChunk = storage[nameDim][chunkIndex];
542
+
543
+ if (nameDimChunk) {
544
+ name = nameDimChunk[chunkOffset];
545
+ var ordinalMeta = dimensionInfoMap[nameDim].ordinalMeta;
546
+
547
+ if (ordinalMeta && ordinalMeta.categories.length) {
548
+ name = ordinalMeta.categories[name];
549
+ }
550
+ }
497
551
  }
498
552
  } // Try using the id in option
499
553
  // id or name is used on dynamical data, mapping old and new items.
@@ -525,47 +579,54 @@ listProto._initDataFromProvider = function (start, end) {
525
579
  this._rawCount = this._count = end; // Reset data extent
526
580
 
527
581
  this._extent = {};
528
- }; // TODO refactor
529
-
582
+ prepareInvertedIndex(this);
583
+ };
530
584
 
531
- listProto._getNameFromStore = function (rawIndex) {
532
- var nameDimIdx = this._nameDimIdx;
585
+ function prepareInvertedIndex(list) {
586
+ var invertedIndicesMap = list._invertedIndicesMap;
587
+ zrUtil.each(invertedIndicesMap, function (invertedIndices, dim) {
588
+ var dimInfo = list._dimensionInfos[dim]; // Currently, only dimensions that has ordinalMeta can create inverted indices.
533
589
 
534
- if (nameDimIdx != null) {
535
- var chunkSize = this._chunkSize;
536
- var chunkIndex = Math.floor(rawIndex / chunkSize);
537
- var chunkOffset = rawIndex % chunkSize;
538
- var dim = this.dimensions[nameDimIdx];
539
- var ordinalMeta = this._dimensionInfos[dim].ordinalMeta;
590
+ var ordinalMeta = dimInfo.ordinalMeta;
540
591
 
541
592
  if (ordinalMeta) {
542
- return ordinalMeta.categories[rawIndex];
543
- } else {
544
- var chunk = this._storage[dim][chunkIndex];
545
- return chunk && chunk[chunkOffset];
546
- }
547
- }
548
- }; // TODO refactor
593
+ invertedIndices = invertedIndicesMap[dim] = new CtorUint32Array(ordinalMeta.categories.length); // The default value of TypedArray is 0. To avoid miss
594
+ // mapping to 0, we should set it as NaN.
549
595
 
596
+ for (var i = 0; i < invertedIndices.length; i++) {
597
+ invertedIndices[i] = NaN;
598
+ }
550
599
 
551
- listProto._getIdFromStore = function (rawIndex) {
552
- var idDimIdx = this._idDimIdx;
600
+ for (var i = 0; i < list._count; i++) {
601
+ // Only support the case that all values are distinct.
602
+ invertedIndices[list.get(dim, i)] = i;
603
+ }
604
+ }
605
+ });
606
+ }
553
607
 
554
- if (idDimIdx != null) {
555
- var chunkSize = this._chunkSize;
608
+ function getRawValueFromStore(list, dimIndex, rawIndex) {
609
+ var val;
610
+
611
+ if (dimIndex != null) {
612
+ var chunkSize = list._chunkSize;
556
613
  var chunkIndex = Math.floor(rawIndex / chunkSize);
557
614
  var chunkOffset = rawIndex % chunkSize;
558
- var dim = this.dimensions[idDimIdx];
559
- var ordinalMeta = this._dimensionInfos[dim].ordinalMeta;
615
+ var dim = list.dimensions[dimIndex];
616
+ var chunk = list._storage[dim][chunkIndex];
560
617
 
561
- if (ordinalMeta) {
562
- return ordinalMeta.categories[rawIndex];
563
- } else {
564
- var chunk = this._storage[dim][chunkIndex];
565
- return chunk && chunk[chunkOffset];
618
+ if (chunk) {
619
+ val = chunk[chunkOffset];
620
+ var ordinalMeta = list._dimensionInfos[dim].ordinalMeta;
621
+
622
+ if (ordinalMeta && ordinalMeta.categories.length) {
623
+ val = ordinalMeta.categories[val];
624
+ }
566
625
  }
567
626
  }
568
- };
627
+
628
+ return val;
629
+ }
569
630
  /**
570
631
  * @return {number}
571
632
  */
@@ -576,19 +637,32 @@ listProto.count = function () {
576
637
  };
577
638
 
578
639
  listProto.getIndices = function () {
579
- if (this._indices) {
580
- var Ctor = this._indices.constructor;
581
- return new Ctor(this._indices.buffer, 0, this._count);
582
- }
640
+ var newIndices;
641
+ var indices = this._indices;
583
642
 
584
- var Ctor = getIndicesCtor(this);
585
- var arr = new Ctor(this.count());
643
+ if (indices) {
644
+ var Ctor = indices.constructor;
645
+ var thisCount = this._count; // `new Array(a, b, c)` is different from `new Uint32Array(a, b, c)`.
646
+
647
+ if (Ctor === Array) {
648
+ newIndices = new Ctor(thisCount);
586
649
 
587
- for (var i = 0; i < arr.length; i++) {
588
- arr[i] = i;
650
+ for (var i = 0; i < thisCount; i++) {
651
+ newIndices[i] = indices[i];
652
+ }
653
+ } else {
654
+ newIndices = new Ctor(indices.buffer, 0, thisCount);
655
+ }
656
+ } else {
657
+ var Ctor = getIndicesCtor(this);
658
+ var newIndices = new Ctor(this.count());
659
+
660
+ for (var i = 0; i < newIndices.length; i++) {
661
+ newIndices[i] = i;
662
+ }
589
663
  }
590
664
 
591
- return arr;
665
+ return newIndices;
592
666
  };
593
667
  /**
594
668
  * Get value. Return NaN if idx is out of range.
@@ -599,7 +673,9 @@ listProto.getIndices = function () {
599
673
  */
600
674
 
601
675
 
602
- listProto.get = function (dim, idx, stack) {
676
+ listProto.get = function (dim, idx
677
+ /*, stack */
678
+ ) {
603
679
  if (!(idx >= 0 && idx < this._count)) {
604
680
  return NaN;
605
681
  }
@@ -616,31 +692,55 @@ listProto.get = function (dim, idx, stack) {
616
692
  var chunkOffset = idx % this._chunkSize;
617
693
  var chunkStore = storage[dim][chunkIndex];
618
694
  var value = chunkStore[chunkOffset]; // FIXME ordinal data type is not stackable
695
+ // if (stack) {
696
+ // var dimensionInfo = this._dimensionInfos[dim];
697
+ // if (dimensionInfo && dimensionInfo.stackable) {
698
+ // var stackedOn = this.stackedOn;
699
+ // while (stackedOn) {
700
+ // // Get no stacked data of stacked on
701
+ // var stackedValue = stackedOn.get(dim, idx);
702
+ // // Considering positive stack, negative stack and empty data
703
+ // if ((value >= 0 && stackedValue > 0) // Positive stack
704
+ // || (value <= 0 && stackedValue < 0) // Negative stack
705
+ // ) {
706
+ // value += stackedValue;
707
+ // }
708
+ // stackedOn = stackedOn.stackedOn;
709
+ // }
710
+ // }
711
+ // }
619
712
 
620
- if (stack) {
621
- var dimensionInfo = this._dimensionInfos[dim];
713
+ return value;
714
+ };
715
+ /**
716
+ * @param {string} dim concrete dim
717
+ * @param {number} rawIndex
718
+ * @return {number|string}
719
+ */
622
720
 
623
- if (dimensionInfo && dimensionInfo.stackable) {
624
- var stackedOn = this.stackedOn;
625
721
 
626
- while (stackedOn) {
627
- // Get no stacked data of stacked on
628
- var stackedValue = stackedOn.get(dim, idx); // Considering positive stack, negative stack and empty data
722
+ listProto.getByRawIndex = function (dim, rawIdx) {
723
+ if (!(rawIdx >= 0 && rawIdx < this._rawCount)) {
724
+ return NaN;
725
+ }
629
726
 
630
- if (value >= 0 && stackedValue > 0 || // Positive stack
631
- value <= 0 && stackedValue < 0 // Negative stack
632
- ) {
633
- value += stackedValue;
634
- }
727
+ var dimStore = this._storage[dim];
635
728
 
636
- stackedOn = stackedOn.stackedOn;
637
- }
638
- }
729
+ if (!dimStore) {
730
+ // TODO Warn ?
731
+ return NaN;
639
732
  }
640
733
 
641
- return value;
642
- }; // FIXME Use `get` on chrome maybe slow(in filterSelf and selectRange).
643
- // Hack a much simpler _getFast
734
+ var chunkIndex = Math.floor(rawIdx / this._chunkSize);
735
+ var chunkOffset = rawIdx % this._chunkSize;
736
+ var chunkStore = dimStore[chunkIndex];
737
+ return chunkStore[chunkOffset];
738
+ };
739
+ /**
740
+ * FIXME Use `get` on chrome maybe slow(in filterSelf and selectRange).
741
+ * Hack a much simpler _getFast
742
+ * @private
743
+ */
644
744
 
645
745
 
646
746
  listProto._getFast = function (dim, rawIdx) {
@@ -653,22 +753,25 @@ listProto._getFast = function (dim, rawIdx) {
653
753
  * Get value for multi dimensions.
654
754
  * @param {Array.<string>} [dimensions] If ignored, using all dimensions.
655
755
  * @param {number} idx
656
- * @param {boolean} stack
657
756
  * @return {number}
658
757
  */
659
758
 
660
759
 
661
- listProto.getValues = function (dimensions, idx, stack) {
760
+ listProto.getValues = function (dimensions, idx
761
+ /*, stack */
762
+ ) {
662
763
  var values = [];
663
764
 
664
765
  if (!zrUtil.isArray(dimensions)) {
665
- stack = idx;
766
+ // stack = idx;
666
767
  idx = dimensions;
667
768
  dimensions = this.dimensions;
668
769
  }
669
770
 
670
771
  for (var i = 0, len = dimensions.length; i < len; i++) {
671
- values.push(this.get(dimensions[i], idx, stack));
772
+ values.push(this.get(dimensions[i], idx
773
+ /*, stack */
774
+ ));
672
775
  }
673
776
 
674
777
  return values;
@@ -703,31 +806,34 @@ listProto.hasValue = function (idx) {
703
806
  */
704
807
 
705
808
 
706
- listProto.getDataExtent = function (dim, stack) {
809
+ listProto.getDataExtent = function (dim
810
+ /*, stack */
811
+ ) {
707
812
  // Make sure use concrete dim as cache name.
708
813
  dim = this.getDimension(dim);
709
814
  var dimData = this._storage[dim];
710
- var initialExtent = [Infinity, -Infinity];
711
- stack = (stack || false) && this.isStacked(dim);
815
+ var initialExtent = getInitialExtent(); // stack = !!((stack || false) && this.getCalculationInfo(dim));
712
816
 
713
817
  if (!dimData) {
714
818
  return initialExtent;
715
819
  } // Make more strict checkings to ensure hitting cache.
716
820
 
717
821
 
718
- var currEnd = this.count();
719
- var cacheName = [dim, !!stack].join('_'); // Consider the most cases when using data zoom, `getDataExtent`
822
+ var currEnd = this.count(); // var cacheName = [dim, !!stack].join('_');
823
+ // var cacheName = dim;
824
+ // Consider the most cases when using data zoom, `getDataExtent`
720
825
  // happened before filtering. We cache raw extent, which is not
721
826
  // necessary to be cleared and recalculated when restore data.
722
827
 
723
- var useRaw = !this._indices && !stack;
828
+ var useRaw = !this._indices; // && !stack;
829
+
724
830
  var dimExtent;
725
831
 
726
832
  if (useRaw) {
727
833
  return this._rawExtent[dim].slice();
728
834
  }
729
835
 
730
- dimExtent = this._extent[cacheName];
836
+ dimExtent = this._extent[dim];
731
837
 
732
838
  if (dimExtent) {
733
839
  return dimExtent.slice();
@@ -738,13 +844,15 @@ listProto.getDataExtent = function (dim, stack) {
738
844
  var max = dimExtent[1];
739
845
 
740
846
  for (var i = 0; i < currEnd; i++) {
741
- var value = stack ? this.get(dim, i, true) : this._getFast(dim, this.getRawIndex(i));
847
+ // var value = stack ? this.get(dim, i, true) : this._getFast(dim, this.getRawIndex(i));
848
+ var value = this._getFast(dim, this.getRawIndex(i));
849
+
742
850
  value < min && (min = value);
743
851
  value > max && (max = value);
744
852
  }
745
853
 
746
854
  dimExtent = [min, max];
747
- this._extent[cacheName] = dimExtent;
855
+ this._extent[dim] = dimExtent;
748
856
  return dimExtent;
749
857
  };
750
858
  /**
@@ -755,34 +863,56 @@ listProto.getDataExtent = function (dim, stack) {
755
863
  */
756
864
 
757
865
 
758
- listProto.getApproximateExtent = function (dim, stack) {
866
+ listProto.getApproximateExtent = function (dim
867
+ /*, stack */
868
+ ) {
759
869
  dim = this.getDimension(dim);
760
- return this._approximateExtent[dim] || this.getDataExtent(dim, stack);
870
+ return this._approximateExtent[dim] || this.getDataExtent(dim
871
+ /*, stack */
872
+ );
761
873
  };
762
874
 
763
- listProto.setApproximateExtent = function (extent, dim, stack) {
875
+ listProto.setApproximateExtent = function (extent, dim
876
+ /*, stack */
877
+ ) {
764
878
  dim = this.getDimension(dim);
765
879
  this._approximateExtent[dim] = extent.slice();
766
880
  };
881
+ /**
882
+ * @param {string} key
883
+ * @return {*}
884
+ */
885
+
886
+
887
+ listProto.getCalculationInfo = function (key) {
888
+ return this._calculationInfo[key];
889
+ };
890
+ /**
891
+ * @param {string|Object} key or k-v object
892
+ * @param {*} [value]
893
+ */
894
+
767
895
 
768
- listProto.isStacked = function (concreteDim) {
769
- var dimensionInfo = this._dimensionInfos[concreteDim];
770
- return dimensionInfo && dimensionInfo.stackable && this.stackedOn;
896
+ listProto.setCalculationInfo = function (key, value) {
897
+ isObject(key) ? zrUtil.extend(this._calculationInfo, key) : this._calculationInfo[key] = value;
771
898
  };
772
899
  /**
773
900
  * Get sum of data in one dimension
774
901
  * @param {string} dim
775
- * @param {boolean} stack
776
902
  */
777
903
 
778
904
 
779
- listProto.getSum = function (dim, stack) {
905
+ listProto.getSum = function (dim
906
+ /*, stack */
907
+ ) {
780
908
  var dimData = this._storage[dim];
781
909
  var sum = 0;
782
910
 
783
911
  if (dimData) {
784
912
  for (var i = 0, len = this.count(); i < len; i++) {
785
- var value = this.get(dim, i, stack);
913
+ var value = this.get(dim, i
914
+ /*, stack */
915
+ );
786
916
 
787
917
  if (!isNaN(value)) {
788
918
  sum += value;
@@ -793,31 +923,73 @@ listProto.getSum = function (dim, stack) {
793
923
  return sum;
794
924
  };
795
925
  /**
796
- * Retreive the index with given value
797
- * @param {number} idx
798
- * @param {number} value
799
- * @return {number}
926
+ * Get median of data in one dimension
927
+ * @param {string} dim
800
928
  */
929
+
930
+
931
+ listProto.getMedian = function (dim
932
+ /*, stack */
933
+ ) {
934
+ var dimDataArray = []; // map all data of one dimension
935
+
936
+ this.each(dim, function (val, idx) {
937
+ if (!isNaN(val)) {
938
+ dimDataArray.push(val);
939
+ }
940
+ }); // TODO
941
+ // Use quick select?
942
+ // immutability & sort
943
+
944
+ var sortedDimDataArray = [].concat(dimDataArray).sort(function (a, b) {
945
+ return a - b;
946
+ });
947
+ var len = this.count(); // calculate median
948
+
949
+ return len === 0 ? 0 : len % 2 === 1 ? sortedDimDataArray[(len - 1) / 2] : (sortedDimDataArray[len / 2] + sortedDimDataArray[len / 2 - 1]) / 2;
950
+ }; // /**
951
+ // * Retreive the index with given value
952
+ // * @param {string} dim Concrete dimension.
953
+ // * @param {number} value
954
+ // * @return {number}
955
+ // */
956
+ // Currently incorrect: should return dataIndex but not rawIndex.
957
+ // Do not fix it until this method is to be used somewhere.
801
958
  // FIXME Precision of float value
959
+ // listProto.indexOf = function (dim, value) {
960
+ // var storage = this._storage;
961
+ // var dimData = storage[dim];
962
+ // var chunkSize = this._chunkSize;
963
+ // if (dimData) {
964
+ // for (var i = 0, len = this.count(); i < len; i++) {
965
+ // var chunkIndex = Math.floor(i / chunkSize);
966
+ // var chunkOffset = i % chunkSize;
967
+ // if (dimData[chunkIndex][chunkOffset] === value) {
968
+ // return i;
969
+ // }
970
+ // }
971
+ // }
972
+ // return -1;
973
+ // };
802
974
 
975
+ /**
976
+ * Only support the dimension which inverted index created.
977
+ * Do not support other cases until required.
978
+ * @param {string} concrete dim
979
+ * @param {number|string} value
980
+ * @return {number} rawIndex
981
+ */
803
982
 
804
- listProto.indexOf = function (dim, value) {
805
- var storage = this._storage;
806
- var dimData = storage[dim];
807
- var chunkSize = this._chunkSize;
808
983
 
809
- if (dimData) {
810
- for (var i = 0, len = this.count(); i < len; i++) {
811
- var chunkIndex = Math.floor(i / chunkSize);
812
- var chunkOffset = i % chunkSize;
984
+ listProto.rawIndexOf = function (dim, value) {
985
+ var invertedIndices = dim && this._invertedIndicesMap[dim];
986
+ var rawIndex = invertedIndices[value];
813
987
 
814
- if (dimData[chunkIndex][chunkOffset] === value) {
815
- return i;
816
- }
817
- }
988
+ if (rawIndex == null || isNaN(rawIndex)) {
989
+ return -1;
818
990
  }
819
991
 
820
- return -1;
992
+ return rawIndex;
821
993
  };
822
994
  /**
823
995
  * Retreive the index with given name
@@ -883,13 +1055,12 @@ listProto.indexOfRawIndex = function (rawIndex) {
883
1055
  * Retreive the index of nearest value
884
1056
  * @param {string} dim
885
1057
  * @param {number} value
886
- * @param {boolean} stack If given value is after stacked
887
1058
  * @param {number} [maxDistance=Infinity]
888
1059
  * @return {Array.<number>} Considere multiple points has the same value.
889
1060
  */
890
1061
 
891
1062
 
892
- listProto.indicesOfNearest = function (dim, value, stack, maxDistance) {
1063
+ listProto.indicesOfNearest = function (dim, value, maxDistance) {
893
1064
  var storage = this._storage;
894
1065
  var dimData = storage[dim];
895
1066
  var nearestIndices = [];
@@ -906,7 +1077,9 @@ listProto.indicesOfNearest = function (dim, value, stack, maxDistance) {
906
1077
  var minDiff = -1;
907
1078
 
908
1079
  for (var i = 0, len = this.count(); i < len; i++) {
909
- var diff = value - this.get(dim, i, stack);
1080
+ var diff = value - this.get(dim, i
1081
+ /*, stack */
1082
+ );
910
1083
  var dist = Math.abs(diff);
911
1084
 
912
1085
  if (diff <= maxDistance && dist <= minDist) {
@@ -975,7 +1148,7 @@ listProto.getRawDataItem = function (idx) {
975
1148
 
976
1149
  listProto.getName = function (idx) {
977
1150
  var rawIndex = this.getRawIndex(idx);
978
- return this._nameList[rawIndex] || this._getNameFromStore(rawIndex) || '';
1151
+ return this._nameList[rawIndex] || getRawValueFromStore(this, this._nameDimIdx, rawIndex) || '';
979
1152
  };
980
1153
  /**
981
1154
  * @param {number} idx
@@ -992,7 +1165,7 @@ function getId(list, rawIndex) {
992
1165
  var id = list._idList[rawIndex];
993
1166
 
994
1167
  if (id == null) {
995
- id = list._getIdFromStore(rawIndex);
1168
+ id = getRawValueFromStore(list, list._idDimIdx, rawIndex);
996
1169
  }
997
1170
 
998
1171
  if (id == null) {
@@ -1024,7 +1197,6 @@ function validateDimensions(list, dims) {
1024
1197
  * Data iteration
1025
1198
  * @param {string|Array.<string>}
1026
1199
  * @param {Function} cb
1027
- * @param {boolean} [stack=false]
1028
1200
  * @param {*} [context=this]
1029
1201
  *
1030
1202
  * @example
@@ -1034,7 +1206,7 @@ function validateDimensions(list, dims) {
1034
1206
  */
1035
1207
 
1036
1208
 
1037
- listProto.each = function (dims, cb, stack, context) {
1209
+ listProto.each = function (dims, cb, context, contextCompat) {
1038
1210
  'use strict';
1039
1211
 
1040
1212
  if (!this._count) {
@@ -1042,15 +1214,16 @@ listProto.each = function (dims, cb, stack, context) {
1042
1214
  }
1043
1215
 
1044
1216
  if (typeof dims === 'function') {
1045
- context = stack;
1046
- stack = cb;
1217
+ contextCompat = context;
1218
+ context = cb;
1047
1219
  cb = dims;
1048
1220
  dims = [];
1049
- }
1221
+ } // contextCompat just for compat echarts3
1222
+
1050
1223
 
1224
+ context = context || contextCompat || this;
1051
1225
  dims = zrUtil.map(normalizeDimensions(dims), this.getDimension, this);
1052
1226
  var dimSize = dims.length;
1053
- context = context || this;
1054
1227
 
1055
1228
  for (var i = 0; i < this.count(); i++) {
1056
1229
  // Simple optimization
@@ -1060,11 +1233,11 @@ listProto.each = function (dims, cb, stack, context) {
1060
1233
  break;
1061
1234
 
1062
1235
  case 1:
1063
- cb.call(context, this.get(dims[0], i, stack), i);
1236
+ cb.call(context, this.get(dims[0], i), i);
1064
1237
  break;
1065
1238
 
1066
1239
  case 2:
1067
- cb.call(context, this.get(dims[0], i, stack), this.get(dims[1], i, stack), i);
1240
+ cb.call(context, this.get(dims[0], i), this.get(dims[1], i), i);
1068
1241
  break;
1069
1242
 
1070
1243
  default:
@@ -1072,7 +1245,7 @@ listProto.each = function (dims, cb, stack, context) {
1072
1245
  var value = [];
1073
1246
 
1074
1247
  for (; k < dimSize; k++) {
1075
- value[k] = this.get(dims[k], i, stack);
1248
+ value[k] = this.get(dims[k], i);
1076
1249
  } // Index
1077
1250
 
1078
1251
 
@@ -1085,12 +1258,11 @@ listProto.each = function (dims, cb, stack, context) {
1085
1258
  * Data filter
1086
1259
  * @param {string|Array.<string>}
1087
1260
  * @param {Function} cb
1088
- * @param {boolean} [stack=false]
1089
1261
  * @param {*} [context=this]
1090
1262
  */
1091
1263
 
1092
1264
 
1093
- listProto.filterSelf = function (dimensions, cb, stack, context) {
1265
+ listProto.filterSelf = function (dimensions, cb, context, contextCompat) {
1094
1266
  'use strict';
1095
1267
 
1096
1268
  if (!this._count) {
@@ -1098,14 +1270,14 @@ listProto.filterSelf = function (dimensions, cb, stack, context) {
1098
1270
  }
1099
1271
 
1100
1272
  if (typeof dimensions === 'function') {
1101
- context = stack;
1102
- stack = cb;
1273
+ contextCompat = context;
1274
+ context = cb;
1103
1275
  cb = dimensions;
1104
1276
  dimensions = [];
1105
- }
1277
+ } // contextCompat just for compat echarts3
1106
1278
 
1107
- stack = stack || false;
1108
- context = context || this;
1279
+
1280
+ context = context || contextCompat || this;
1109
1281
  dimensions = zrUtil.map(normalizeDimensions(dimensions), this.getDimension, this);
1110
1282
  var count = this.count();
1111
1283
  var Ctor = getIndicesCtor(this);
@@ -1122,11 +1294,12 @@ listProto.filterSelf = function (dimensions, cb, stack, context) {
1122
1294
  if (dimSize === 0) {
1123
1295
  keep = cb.call(context, i);
1124
1296
  } else if (dimSize === 1) {
1125
- var val = stack ? this.get(dim0, i, true) : this._getFast(dim0, rawIdx);
1297
+ var val = this._getFast(dim0, rawIdx);
1298
+
1126
1299
  keep = cb.call(context, val, i);
1127
1300
  } else {
1128
1301
  for (var k = 0; k < dimSize; k++) {
1129
- value[k] = stack ? this.get(dimensions[k], i, true) : this._getFast(dim0, rawIdx);
1302
+ value[k] = this._getFast(dim0, rawIdx);
1130
1303
  }
1131
1304
 
1132
1305
  value[k] = i;
@@ -1155,14 +1328,13 @@ listProto.filterSelf = function (dimensions, cb, stack, context) {
1155
1328
  */
1156
1329
 
1157
1330
 
1158
- listProto.selectRange = function (range, stack) {
1331
+ listProto.selectRange = function (range) {
1159
1332
  'use strict';
1160
1333
 
1161
1334
  if (!this._count) {
1162
1335
  return;
1163
1336
  }
1164
1337
 
1165
- stack = stack || false;
1166
1338
  var dimensions = [];
1167
1339
 
1168
1340
  for (var dim in range) {
@@ -1186,7 +1358,7 @@ listProto.selectRange = function (range, stack) {
1186
1358
  var max = range[dim0][1];
1187
1359
  var quickFinished = false;
1188
1360
 
1189
- if (!this._indices && !stack) {
1361
+ if (!this._indices) {
1190
1362
  // Extreme optimization for common case. About 2x faster in chrome.
1191
1363
  var idx = 0;
1192
1364
 
@@ -1198,9 +1370,13 @@ listProto.selectRange = function (range, stack) {
1198
1370
  var len = Math.min(this._count - k * this._chunkSize, this._chunkSize);
1199
1371
 
1200
1372
  for (var i = 0; i < len; i++) {
1201
- var val = chunkStorage[i];
1373
+ var val = chunkStorage[i]; // NaN will not be filtered. Consider the case, in line chart, empty
1374
+ // value indicates the line should be broken. But for the case like
1375
+ // scatter plot, a data item with empty value will not be rendered,
1376
+ // but the axis extent may be effected if some other dim of the data
1377
+ // item has value. Fortunately it is not a significant negative effect.
1202
1378
 
1203
- if (val >= min && val <= max) {
1379
+ if (val >= min && val <= max || isNaN(val)) {
1204
1380
  newIndices[offset++] = idx;
1205
1381
  }
1206
1382
 
@@ -1222,9 +1398,9 @@ listProto.selectRange = function (range, stack) {
1222
1398
 
1223
1399
  for (var i = 0; i < len; i++) {
1224
1400
  var val = chunkStorage[i];
1225
- var val2 = chunkStorage2[i];
1401
+ var val2 = chunkStorage2[i]; // Do not filter NaN, see comment above.
1226
1402
 
1227
- if (val >= min && val <= max && val2 >= min2 && val2 <= max2) {
1403
+ if ((val >= min && val <= max || isNaN(val)) && (val2 >= min2 && val2 <= max2 || isNaN(val2))) {
1228
1404
  newIndices[offset++] = idx;
1229
1405
  }
1230
1406
 
@@ -1238,13 +1414,13 @@ listProto.selectRange = function (range, stack) {
1238
1414
 
1239
1415
  if (!quickFinished) {
1240
1416
  if (dimSize === 1) {
1241
- stack = stack || this.isStacked(dim0);
1242
-
1243
1417
  for (var i = 0; i < originalCount; i++) {
1244
1418
  var rawIndex = this.getRawIndex(i);
1245
- var val = stack ? this.get(dim0, i, true) : this._getFast(dim0, rawIndex);
1246
1419
 
1247
- if (val >= min && val <= max) {
1420
+ var val = this._getFast(dim0, rawIndex); // Do not filter NaN, see comment above.
1421
+
1422
+
1423
+ if (val >= min && val <= max || isNaN(val)) {
1248
1424
  newIndices[offset++] = rawIndex;
1249
1425
  }
1250
1426
  }
@@ -1255,7 +1431,9 @@ listProto.selectRange = function (range, stack) {
1255
1431
 
1256
1432
  for (var k = 0; k < dimSize; k++) {
1257
1433
  var dimk = dimensions[k];
1258
- var val = stack ? this.get(dimk, i, true) : this._getFast(dim, rawIndex);
1434
+
1435
+ var val = this._getFast(dim, rawIndex); // Do not filter NaN, see comment above.
1436
+
1259
1437
 
1260
1438
  if (val < range[dimk][0] || val > range[dimk][1]) {
1261
1439
  keep = false;
@@ -1284,26 +1462,27 @@ listProto.selectRange = function (range, stack) {
1284
1462
  * Data mapping to a plain array
1285
1463
  * @param {string|Array.<string>} [dimensions]
1286
1464
  * @param {Function} cb
1287
- * @param {boolean} [stack=false]
1288
1465
  * @param {*} [context=this]
1289
1466
  * @return {Array}
1290
1467
  */
1291
1468
 
1292
1469
 
1293
- listProto.mapArray = function (dimensions, cb, stack, context) {
1470
+ listProto.mapArray = function (dimensions, cb, context, contextCompat) {
1294
1471
  'use strict';
1295
1472
 
1296
1473
  if (typeof dimensions === 'function') {
1297
- context = stack;
1298
- stack = cb;
1474
+ contextCompat = context;
1475
+ context = cb;
1299
1476
  cb = dimensions;
1300
1477
  dimensions = [];
1301
- }
1478
+ } // contextCompat just for compat echarts3
1479
+
1302
1480
 
1481
+ context = context || contextCompat || this;
1303
1482
  var result = [];
1304
1483
  this.each(dimensions, function () {
1305
1484
  result.push(cb && cb.apply(this, arguments));
1306
- }, stack, context);
1485
+ }, context);
1307
1486
  return result;
1308
1487
  }; // Data in excludeDimensions is copied, otherwise transfered.
1309
1488
 
@@ -1320,8 +1499,16 @@ function cloneListForMapAndSample(original, excludeDimensions) {
1320
1499
  var dim = allDimensions[i];
1321
1500
 
1322
1501
  if (originalStorage[dim]) {
1323
- storage[dim] = zrUtil.indexOf(excludeDimensions, dim) >= 0 ? cloneDimStore(originalStorage[dim]) // Direct reference for other dimensions
1324
- : originalStorage[dim];
1502
+ // Notice that we do not reset invertedIndicesMap here, becuase
1503
+ // there is no scenario of mapping or sampling ordinal dimension.
1504
+ if (zrUtil.indexOf(excludeDimensions, dim) >= 0) {
1505
+ storage[dim] = cloneDimStore(originalStorage[dim]);
1506
+ list._rawExtent[dim] = getInitialExtent();
1507
+ list._extent[dim] = null;
1508
+ } else {
1509
+ // Direct reference for other dimensions
1510
+ storage[dim] = originalStorage[dim];
1511
+ }
1325
1512
  }
1326
1513
  }
1327
1514
 
@@ -1337,19 +1524,23 @@ function cloneDimStore(originalDimStore) {
1337
1524
 
1338
1525
  return newDimStore;
1339
1526
  }
1527
+
1528
+ function getInitialExtent() {
1529
+ return [Infinity, -Infinity];
1530
+ }
1340
1531
  /**
1341
1532
  * Data mapping to a new List with given dimensions
1342
1533
  * @param {string|Array.<string>} dimensions
1343
1534
  * @param {Function} cb
1344
- * @param {boolean} [stack=false]
1345
1535
  * @param {*} [context=this]
1346
1536
  * @return {Array}
1347
1537
  */
1348
1538
 
1349
1539
 
1350
- listProto.map = function (dimensions, cb, stack, context) {
1351
- 'use strict';
1540
+ listProto.map = function (dimensions, cb, context, contextCompat) {
1541
+ 'use strict'; // contextCompat just for compat echarts3
1352
1542
 
1543
+ context = context || contextCompat || this;
1353
1544
  dimensions = zrUtil.map(normalizeDimensions(dimensions), this.getDimension, this);
1354
1545
  var list = cloneListForMapAndSample(this, dimensions); // Following properties are all immutable.
1355
1546
  // So we can reference to the same value
@@ -1362,10 +1553,13 @@ listProto.map = function (dimensions, cb, stack, context) {
1362
1553
  var dimSize = dimensions.length;
1363
1554
  var dataCount = this.count();
1364
1555
  var values = [];
1556
+ var rawExtent = list._rawExtent;
1365
1557
 
1366
1558
  for (var dataIndex = 0; dataIndex < dataCount; dataIndex++) {
1367
1559
  for (var dimIndex = 0; dimIndex < dimSize; dimIndex++) {
1368
- values[dimIndex] = this.get(dimensions[dimIndex], dataIndex, stack);
1560
+ values[dimIndex] = this.get(dimensions[dimIndex], dataIndex
1561
+ /*, stack */
1562
+ );
1369
1563
  }
1370
1564
 
1371
1565
  values[dimSize] = dataIndex;
@@ -1384,10 +1578,20 @@ listProto.map = function (dimensions, cb, stack, context) {
1384
1578
 
1385
1579
  for (var i = 0; i < retValue.length; i++) {
1386
1580
  var dim = dimensions[i];
1581
+ var val = retValue[i];
1582
+ var rawExtentOnDim = rawExtent[dim];
1387
1583
  var dimStore = storage[dim];
1388
1584
 
1389
1585
  if (dimStore) {
1390
- dimStore[chunkIndex][chunkOffset] = retValue[i];
1586
+ dimStore[chunkIndex][chunkOffset] = val;
1587
+ }
1588
+
1589
+ if (val < rawExtentOnDim[0]) {
1590
+ rawExtentOnDim[0] = val;
1591
+ }
1592
+
1593
+ if (val > rawExtentOnDim[1]) {
1594
+ rawExtentOnDim[1] = val;
1391
1595
  }
1392
1596
  }
1393
1597
  }
@@ -1412,6 +1616,7 @@ listProto.downSample = function (dimension, rate, sampleValue, sampleIndex) {
1412
1616
  var dimStore = targetStorage[dimension];
1413
1617
  var len = this.count();
1414
1618
  var chunkSize = this._chunkSize;
1619
+ var rawExtentOnDim = list._rawExtent[dimension];
1415
1620
  var newIndices = new (getIndicesCtor(this))(len);
1416
1621
  var offset = 0;
1417
1622
 
@@ -1435,6 +1640,15 @@ listProto.downSample = function (dimension, rate, sampleValue, sampleIndex) {
1435
1640
  var sampleChunkOffset = sampleFrameIdx % chunkSize; // Only write value on the filtered data
1436
1641
 
1437
1642
  dimStore[sampleChunkIndex][sampleChunkOffset] = value;
1643
+
1644
+ if (value < rawExtentOnDim[0]) {
1645
+ rawExtentOnDim[0] = value;
1646
+ }
1647
+
1648
+ if (value > rawExtentOnDim[1]) {
1649
+ rawExtentOnDim[1] = value;
1650
+ }
1651
+
1438
1652
  newIndices[offset++] = sampleFrameIdx;
1439
1653
  }
1440
1654
 
@@ -1704,8 +1918,6 @@ listProto.cloneShallow = function (list) {
1704
1918
  }
1705
1919
 
1706
1920
  list.getRawIndex = list._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices;
1707
- list._extent = zrUtil.clone(this._extent);
1708
- list._approximateExtent = zrUtil.clone(this._approximateExtent);
1709
1921
  return list;
1710
1922
  };
1711
1923
  /**