@vtx/ol-map 1.0.140 → 1.0.141

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 (379) hide show
  1. package/README.md +205 -205
  2. package/lib/_util/EventEmitter.js +11 -13
  3. package/lib/_util/EventEmitter.js.map +1 -1
  4. package/lib/_util/StyleCache.js +8 -10
  5. package/lib/_util/StyleCache.js.map +1 -1
  6. package/lib/_util/encryptParams.js +17 -22
  7. package/lib/_util/encryptParams.js.map +1 -1
  8. package/lib/_util/filterSpecialCharacters.js +12 -12
  9. package/lib/_util/filterSpecialCharacters.js.map +1 -1
  10. package/lib/_util/getComponentProps.js +1 -1
  11. package/lib/_util/getComponentProps.js.map +1 -1
  12. package/lib/_util/getCookie.js +5 -6
  13. package/lib/_util/getCookie.js.map +1 -1
  14. package/lib/_util/getDefaultMapInfo.js +7 -8
  15. package/lib/_util/getDefaultMapInfo.js.map +1 -1
  16. package/lib/_util/getSystemInfo.js +7 -8
  17. package/lib/_util/getSystemInfo.js.map +1 -1
  18. package/lib/_util/getToken.js +2 -4
  19. package/lib/_util/getToken.js.map +1 -1
  20. package/lib/_util/getUrlParam.js +2 -3
  21. package/lib/_util/getUrlParam.js.map +1 -1
  22. package/lib/_util/http.js +30 -32
  23. package/lib/_util/http.js.map +1 -1
  24. package/lib/_util/isFunction.js.map +1 -1
  25. package/lib/_util/isObject.js.map +1 -1
  26. package/lib/_util/layer.js +33 -37
  27. package/lib/_util/layer.js.map +1 -1
  28. package/lib/_util/mapTool.js +36 -37
  29. package/lib/_util/mapTool.js.map +1 -1
  30. package/lib/_util/projzh/datum/bd-09.js +2 -3
  31. package/lib/_util/projzh/datum/bd-09.js.map +1 -1
  32. package/lib/_util/projzh/datum/gcj-02.js +1 -2
  33. package/lib/_util/projzh/datum/gcj-02.js.map +1 -1
  34. package/lib/_util/projzh/datum/index.js +2 -3
  35. package/lib/_util/projzh/datum/index.js.map +1 -1
  36. package/lib/_util/projzh/index.js +2 -3
  37. package/lib/_util/projzh/index.js.map +1 -1
  38. package/lib/_util/projzh/projection/baidu-mercator.js +1 -2
  39. package/lib/_util/projzh/projection/baidu-mercator.js.map +1 -1
  40. package/lib/_util/projzh/projection/index.js +2 -3
  41. package/lib/_util/projzh/projection/index.js.map +1 -1
  42. package/lib/_util/projzh/projection/spherical-mercator.js +1 -2
  43. package/lib/_util/projzh/projection/spherical-mercator.js.map +1 -1
  44. package/lib/_util/projzh/util.js +1 -2
  45. package/lib/_util/projzh/util.js.map +1 -1
  46. package/lib/_util/search.js +13 -16
  47. package/lib/_util/search.js.map +1 -1
  48. package/lib/_util/setCookie.js +5 -6
  49. package/lib/_util/setCookie.js.map +1 -1
  50. package/lib/_util/stringToFun.js +5 -5
  51. package/lib/_util/stringToFun.js.map +1 -1
  52. package/lib/_util/transform.js +9 -10
  53. package/lib/_util/transform.js.map +1 -1
  54. package/lib/_util/useColSize.js +2 -3
  55. package/lib/_util/useColSize.js.map +1 -1
  56. package/lib/_util/useInterval.js.map +1 -1
  57. package/lib/_util/useSet.js +12 -13
  58. package/lib/_util/useSet.js.map +1 -1
  59. package/lib/analysis-layer/index.js +44 -50
  60. package/lib/analysis-layer/index.js.map +1 -1
  61. package/lib/analysis-layer/style/css.js.map +1 -1
  62. package/lib/analysis-layer/style/index.js.map +1 -1
  63. package/lib/buffer-draw/BufferDraw.js +11 -13
  64. package/lib/buffer-draw/BufferDraw.js.map +1 -1
  65. package/lib/buffer-draw/index.js +10 -10
  66. package/lib/buffer-draw/index.js.map +1 -1
  67. package/lib/buffer-draw/style/css.js.map +1 -1
  68. package/lib/buffer-draw/style/index.js.map +1 -1
  69. package/lib/circle/Circle.js +22 -24
  70. package/lib/circle/Circle.js.map +1 -1
  71. package/lib/circle/index.js +4 -4
  72. package/lib/circle/index.js.map +1 -1
  73. package/lib/circle/style/css.js.map +1 -1
  74. package/lib/circle/style/index.js.map +1 -1
  75. package/lib/config.js +1 -2
  76. package/lib/config.js.map +1 -1
  77. package/lib/convertCamelToCSS.js +1 -2
  78. package/lib/convertCamelToCSS.js.map +1 -1
  79. package/lib/dom/Dom.js +19 -21
  80. package/lib/dom/Dom.js.map +1 -1
  81. package/lib/dom/index.js +11 -11
  82. package/lib/dom/index.js.map +1 -1
  83. package/lib/dom/style/css.js.map +1 -1
  84. package/lib/dom/style/index.js.map +1 -1
  85. package/lib/events/index.js +2 -4
  86. package/lib/events/index.js.map +1 -1
  87. package/lib/feature-draw/FeatureDraw.js +40 -46
  88. package/lib/feature-draw/FeatureDraw.js.map +1 -1
  89. package/lib/feature-draw/index.js +11 -11
  90. package/lib/feature-draw/index.js.map +1 -1
  91. package/lib/feature-draw/style/css.js.map +1 -1
  92. package/lib/feature-draw/style/index.js.map +1 -1
  93. package/lib/feature-layer/FeatureLayer.js +52 -53
  94. package/lib/feature-layer/FeatureLayer.js.map +1 -1
  95. package/lib/feature-layer/MyCluster.js +28 -31
  96. package/lib/feature-layer/MyCluster.js.map +1 -1
  97. package/lib/feature-layer/createFeatureCollection.js +39 -47
  98. package/lib/feature-layer/createFeatureCollection.js.map +1 -1
  99. package/lib/feature-layer/index.js +16 -16
  100. package/lib/feature-layer/index.js.map +1 -1
  101. package/lib/feature-layer/style/css.js.map +1 -1
  102. package/lib/feature-layer/style/index.js.map +1 -1
  103. package/lib/flow-line-layer/FlowLineLayer.js +22 -25
  104. package/lib/flow-line-layer/FlowLineLayer.js.map +1 -1
  105. package/lib/flow-line-layer/index.js +16 -16
  106. package/lib/flow-line-layer/index.js.map +1 -1
  107. package/lib/flow-line-layer/style/css.js.map +1 -1
  108. package/lib/flow-line-layer/style/index.js.map +1 -1
  109. package/lib/fly-line-layer/FlyLineLayer.js +12 -14
  110. package/lib/fly-line-layer/FlyLineLayer.js.map +1 -1
  111. package/lib/fly-line-layer/index.js +9 -9
  112. package/lib/fly-line-layer/index.js.map +1 -1
  113. package/lib/fly-line-layer/style/css.js.map +1 -1
  114. package/lib/fly-line-layer/style/index.js.map +1 -1
  115. package/lib/group-layer/GroupLayer.js +10 -12
  116. package/lib/group-layer/GroupLayer.js.map +1 -1
  117. package/lib/group-layer/index.js +9 -9
  118. package/lib/group-layer/index.js.map +1 -1
  119. package/lib/group-layer/style/css.js.map +1 -1
  120. package/lib/group-layer/style/index.js.map +1 -1
  121. package/lib/heatmap-layer/HeatmapLayer.js +29 -30
  122. package/lib/heatmap-layer/HeatmapLayer.js.map +1 -1
  123. package/lib/heatmap-layer/index.js +9 -9
  124. package/lib/heatmap-layer/index.js.map +1 -1
  125. package/lib/heatmap-layer/style/css.js.map +1 -1
  126. package/lib/heatmap-layer/style/index.js.map +1 -1
  127. package/lib/high-layer/HighLayer.js +13 -15
  128. package/lib/high-layer/HighLayer.js.map +1 -1
  129. package/lib/high-layer/index.js +12 -13
  130. package/lib/high-layer/index.js.map +1 -1
  131. package/lib/high-layer/style/css.js.map +1 -1
  132. package/lib/high-layer/style/index.js.map +1 -1
  133. package/lib/image-layer/ImageLayer.js +31 -33
  134. package/lib/image-layer/ImageLayer.js.map +1 -1
  135. package/lib/image-layer/ImageTileLayer.js +31 -33
  136. package/lib/image-layer/ImageTileLayer.js.map +1 -1
  137. package/lib/image-layer/index.js +11 -11
  138. package/lib/image-layer/index.js.map +1 -1
  139. package/lib/image-layer/style/css.js.map +1 -1
  140. package/lib/image-layer/style/index.js.map +1 -1
  141. package/lib/index.js +1 -1
  142. package/lib/index.js.map +1 -1
  143. package/lib/legend/index.js +21 -23
  144. package/lib/legend/index.js.map +1 -1
  145. package/lib/legend/style/css.js.map +1 -1
  146. package/lib/legend/style/index.js.map +1 -1
  147. package/lib/legend/style/index.less +73 -73
  148. package/lib/map/Analysis.js +24 -27
  149. package/lib/map/Analysis.js.map +1 -1
  150. package/lib/map/Layers.js +24 -28
  151. package/lib/map/Layers.js.map +1 -1
  152. package/lib/map/Popup.js +23 -24
  153. package/lib/map/Popup.js.map +1 -1
  154. package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js +1 -2
  155. package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js.map +1 -1
  156. package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js +2 -3
  157. package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js.map +1 -1
  158. package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js +8 -10
  159. package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js.map +1 -1
  160. package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js +7 -9
  161. package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js.map +1 -1
  162. package/lib/map/getBaseLayers/index.js +11 -13
  163. package/lib/map/getBaseLayers/index.js.map +1 -1
  164. package/lib/map/index.js +40 -41
  165. package/lib/map/index.js.map +1 -1
  166. package/lib/map/style/css.js.map +1 -1
  167. package/lib/map/style/index.js.map +1 -1
  168. package/lib/map/style/index.less +152 -152
  169. package/lib/map-icon/svg/index.js +2 -3
  170. package/lib/map-icon/svg/index.js.map +1 -1
  171. package/lib/map-icon/svg/tuceng.svg.js.map +1 -1
  172. package/lib/marker/Marker.js +23 -26
  173. package/lib/marker/Marker.js.map +1 -1
  174. package/lib/marker/index.js +4 -4
  175. package/lib/marker/index.js.map +1 -1
  176. package/lib/marker/style/css.js.map +1 -1
  177. package/lib/marker/style/index.js.map +1 -1
  178. package/lib/path-line-layer/PathLineLayer.js +21 -23
  179. package/lib/path-line-layer/PathLineLayer.js.map +1 -1
  180. package/lib/path-line-layer/getPathLineStyles.js +8 -9
  181. package/lib/path-line-layer/getPathLineStyles.js.map +1 -1
  182. package/lib/path-line-layer/index.js +16 -16
  183. package/lib/path-line-layer/index.js.map +1 -1
  184. package/lib/path-line-layer/style/css.js.map +1 -1
  185. package/lib/path-line-layer/style/index.js.map +1 -1
  186. package/lib/path-play-back/PathPlayBack.js +31 -25
  187. package/lib/path-play-back/PathPlayBack.js.map +1 -1
  188. package/lib/path-play-back/index.js +11 -9
  189. package/lib/path-play-back/index.js.map +1 -1
  190. package/lib/path-play-back/style/css.js.map +1 -1
  191. package/lib/path-play-back/style/index.js.map +1 -1
  192. package/lib/poi-search/Location.js +8 -8
  193. package/lib/poi-search/Location.js.map +1 -1
  194. package/lib/poi-search/PoiList.js +10 -10
  195. package/lib/poi-search/PoiList.js.map +1 -1
  196. package/lib/poi-search/Search.js +21 -21
  197. package/lib/poi-search/Search.js.map +1 -1
  198. package/lib/poi-search/index.js +10 -11
  199. package/lib/poi-search/index.js.map +1 -1
  200. package/lib/poi-search/style/css.js.map +1 -1
  201. package/lib/poi-search/style/index.js.map +1 -1
  202. package/lib/poi-search/style/index.less +97 -97
  203. package/lib/point/Point.js +22 -24
  204. package/lib/point/Point.js.map +1 -1
  205. package/lib/point/index.js +4 -4
  206. package/lib/point/index.js.map +1 -1
  207. package/lib/point/style/css.js.map +1 -1
  208. package/lib/point/style/index.js.map +1 -1
  209. package/lib/polygon/Polygon.js +22 -24
  210. package/lib/polygon/Polygon.js.map +1 -1
  211. package/lib/polygon/index.js +4 -4
  212. package/lib/polygon/index.js.map +1 -1
  213. package/lib/polygon/style/css.js.map +1 -1
  214. package/lib/polygon/style/index.js.map +1 -1
  215. package/lib/polyline/Polyline.js +22 -24
  216. package/lib/polyline/Polyline.js.map +1 -1
  217. package/lib/polyline/index.js +4 -4
  218. package/lib/polyline/index.js.map +1 -1
  219. package/lib/polyline/style/css.js.map +1 -1
  220. package/lib/polyline/style/index.js.map +1 -1
  221. package/lib/popup/index.js +15 -16
  222. package/lib/popup/index.js.map +1 -1
  223. package/lib/popup/style/css.js.map +1 -1
  224. package/lib/popup/style/index.js.map +1 -1
  225. package/lib/popup/style/index.less +129 -129
  226. package/lib/provider/index.js +3 -5
  227. package/lib/provider/index.js.map +1 -1
  228. package/lib/provider/style/css.js.map +1 -1
  229. package/lib/provider/style/index.js.map +1 -1
  230. package/lib/renderer/Fill.js +17 -19
  231. package/lib/renderer/Fill.js.map +1 -1
  232. package/lib/renderer/Stroke.js +17 -19
  233. package/lib/renderer/Stroke.js.map +1 -1
  234. package/lib/renderer/index.js +13 -15
  235. package/lib/renderer/index.js.map +1 -1
  236. package/lib/renderer/style/css.js.map +1 -1
  237. package/lib/renderer/style/index.js.map +1 -1
  238. package/lib/renderer/transformRgb.js +1 -2
  239. package/lib/renderer/transformRgb.js.map +1 -1
  240. package/lib/search-map/VtxModal.js +22 -25
  241. package/lib/search-map/VtxModal.js.map +1 -1
  242. package/lib/search-map/index.js +10 -11
  243. package/lib/search-map/index.js.map +1 -1
  244. package/lib/search-map/style/css.js.map +1 -1
  245. package/lib/search-map/style/index.js.map +1 -1
  246. package/lib/search-map/style/index.less +82 -82
  247. package/lib/search-map/style/modal.less +58 -58
  248. package/lib/style/index.less +2 -2
  249. package/lib/style/themes/compact.less +1 -1
  250. package/lib/style/themes/dark.less +9 -9
  251. package/lib/style/themes/default.less +7 -7
  252. package/lib/style/themes/index.less +1 -1
  253. package/lib/style/themes/variable.less +5 -5
  254. package/lib/tile-layer/TileLayer.js +20 -22
  255. package/lib/tile-layer/TileLayer.js.map +1 -1
  256. package/lib/tile-layer/index.js +4 -4
  257. package/lib/tile-layer/index.js.map +1 -1
  258. package/lib/tile-layer/style/css.js.map +1 -1
  259. package/lib/tile-layer/style/index.js.map +1 -1
  260. package/lib/tools/Layer/LayerService.js +8 -9
  261. package/lib/tools/Layer/LayerService.js.map +1 -1
  262. package/lib/tools/Layer/LayersCheckService.js +32 -39
  263. package/lib/tools/Layer/LayersCheckService.js.map +1 -1
  264. package/lib/tools/Layer/index.js +15 -15
  265. package/lib/tools/Layer/index.js.map +1 -1
  266. package/lib/tools/Layer/index.less +43 -43
  267. package/lib/tools/Search/index.js +19 -21
  268. package/lib/tools/Search/index.js.map +1 -1
  269. package/lib/tools/Toolbox/BoxSelect/index.js +5 -6
  270. package/lib/tools/Toolbox/BoxSelect/index.js.map +1 -1
  271. package/lib/tools/Toolbox/CircleSelect/index.js +5 -6
  272. package/lib/tools/Toolbox/CircleSelect/index.js.map +1 -1
  273. package/lib/tools/Toolbox/EagleEye/index.js +10 -11
  274. package/lib/tools/Toolbox/EagleEye/index.js.map +1 -1
  275. package/lib/tools/Toolbox/MapBookmark/Bookmark.js +37 -37
  276. package/lib/tools/Toolbox/MapBookmark/Bookmark.js.map +1 -1
  277. package/lib/tools/Toolbox/MapBookmark/index.js +23 -24
  278. package/lib/tools/Toolbox/MapBookmark/index.js.map +1 -1
  279. package/lib/tools/Toolbox/MapBookmark/index.less +20 -20
  280. package/lib/tools/Toolbox/MapDownload/index.js +2 -2
  281. package/lib/tools/Toolbox/MapDownload/index.js.map +1 -1
  282. package/lib/tools/Toolbox/MapPrint/index.js +19 -20
  283. package/lib/tools/Toolbox/MapPrint/index.js.map +1 -1
  284. package/lib/tools/Toolbox/MapPrint/index.less +4 -4
  285. package/lib/tools/Toolbox/Measure/Area/index.js +3 -4
  286. package/lib/tools/Toolbox/Measure/Area/index.js.map +1 -1
  287. package/lib/tools/Toolbox/Measure/Distance/index.js +3 -4
  288. package/lib/tools/Toolbox/Measure/Distance/index.js.map +1 -1
  289. package/lib/tools/Toolbox/Measure/Measure.js +8 -10
  290. package/lib/tools/Toolbox/Measure/Measure.js.map +1 -1
  291. package/lib/tools/Toolbox/Measure/index.js +13 -14
  292. package/lib/tools/Toolbox/Measure/index.js.map +1 -1
  293. package/lib/tools/Toolbox/PolygonSelect/index.js +5 -6
  294. package/lib/tools/Toolbox/PolygonSelect/index.js.map +1 -1
  295. package/lib/tools/Toolbox/ScaleLine/index.js +10 -11
  296. package/lib/tools/Toolbox/ScaleLine/index.js.map +1 -1
  297. package/lib/tools/Toolbox/SelectTools/index.js +41 -43
  298. package/lib/tools/Toolbox/SelectTools/index.js.map +1 -1
  299. package/lib/tools/Toolbox/SelectTools/index.less +87 -87
  300. package/lib/tools/Toolbox/SpaceQuery/index.js +13 -13
  301. package/lib/tools/Toolbox/SpaceQuery/index.js.map +1 -1
  302. package/lib/tools/Toolbox/SpaceQuery/index.less +16 -16
  303. package/lib/tools/Toolbox/ZoomInput/index.js +10 -11
  304. package/lib/tools/Toolbox/ZoomInput/index.js.map +1 -1
  305. package/lib/tools/Toolbox/ZoomInput/index.less +5 -5
  306. package/lib/tools/Toolbox/index.js +8 -10
  307. package/lib/tools/Toolbox/index.js.map +1 -1
  308. package/lib/tools/Toolbox/index.less +2 -2
  309. package/lib/tools/Utils/CreateOverlay.js +10 -11
  310. package/lib/tools/Utils/CreateOverlay.js.map +1 -1
  311. package/lib/tools/Utils/Draw.js +16 -19
  312. package/lib/tools/Utils/Draw.js.map +1 -1
  313. package/lib/tools/Utils/HighLayer.js +14 -16
  314. package/lib/tools/Utils/HighLayer.js.map +1 -1
  315. package/lib/tools/Utils/measure.js +6 -7
  316. package/lib/tools/Utils/measure.js.map +1 -1
  317. package/lib/tools/Utils/utils.js +36 -45
  318. package/lib/tools/Utils/utils.js.map +1 -1
  319. package/lib/tools/View/index.js +15 -16
  320. package/lib/tools/View/index.js.map +1 -1
  321. package/lib/tools/View/index.less +28 -28
  322. package/lib/tools/analysis-tool/index.js +19 -20
  323. package/lib/tools/analysis-tool/index.js.map +1 -1
  324. package/lib/tools/base-map-switch/index.js +15 -16
  325. package/lib/tools/base-map-switch/index.js.map +1 -1
  326. package/lib/tools/components/Chart/index.js +120 -130
  327. package/lib/tools/components/Chart/index.js.map +1 -1
  328. package/lib/tools/components/Icon/index.js +2 -3
  329. package/lib/tools/components/Icon/index.js.map +1 -1
  330. package/lib/tools/components/Info/index.js +2 -3
  331. package/lib/tools/components/Info/index.js.map +1 -1
  332. package/lib/tools/components/Info/index.less +26 -26
  333. package/lib/tools/components/ItemWrap/index.js +10 -11
  334. package/lib/tools/components/ItemWrap/index.js.map +1 -1
  335. package/lib/tools/components/ItemWrap/index.less +41 -41
  336. package/lib/tools/components/Modal/index.js +10 -11
  337. package/lib/tools/components/Modal/index.js.map +1 -1
  338. package/lib/tools/components/Modal/index.less +33 -33
  339. package/lib/tools/components/MyTabs/index.js +1 -1
  340. package/lib/tools/components/MyTabs/index.js.map +1 -1
  341. package/lib/tools/components/RequiredLabel/index.js +7 -7
  342. package/lib/tools/components/RequiredLabel/index.js.map +1 -1
  343. package/lib/tools/components/RequiredLabel/index.less +5 -5
  344. package/lib/tools/components/Select/index.js +2 -3
  345. package/lib/tools/components/Select/index.js.map +1 -1
  346. package/lib/tools/components/Table/index.js +16 -17
  347. package/lib/tools/components/Table/index.js.map +1 -1
  348. package/lib/tools/components/Table/index.less +13 -13
  349. package/lib/tools/components/ToolItem/index.js +2 -3
  350. package/lib/tools/components/ToolItem/index.js.map +1 -1
  351. package/lib/tools/components/ToolItem/index.less +27 -27
  352. package/lib/tools/components/ToolsSelect/index.js +2 -3
  353. package/lib/tools/components/ToolsSelect/index.js.map +1 -1
  354. package/lib/tools/components/ToolsSelect/index.less +10 -10
  355. package/lib/tools/full-screen/index.js +11 -12
  356. package/lib/tools/full-screen/index.js.map +1 -1
  357. package/lib/tools/index.js +11 -11
  358. package/lib/tools/index.js.map +1 -1
  359. package/lib/tools/layer-control/index.js +23 -26
  360. package/lib/tools/layer-control/index.js.map +1 -1
  361. package/lib/tools/refresh/index.js +11 -12
  362. package/lib/tools/refresh/index.js.map +1 -1
  363. package/lib/tools/style/css.js.map +1 -1
  364. package/lib/tools/style/index.js.map +1 -1
  365. package/lib/tools/style/index.less +154 -154
  366. package/lib/tools-item/index.js +10 -11
  367. package/lib/tools-item/index.js.map +1 -1
  368. package/lib/use-props/index.js +1 -2
  369. package/lib/use-props/index.js.map +1 -1
  370. package/lib/use-props/style/css.js.map +1 -1
  371. package/lib/use-props/style/index.js.map +1 -1
  372. package/lib/wms-layer/WmsLayer.js +31 -33
  373. package/lib/wms-layer/WmsLayer.js.map +1 -1
  374. package/lib/wms-layer/index.js +11 -11
  375. package/lib/wms-layer/index.js.map +1 -1
  376. package/lib/wms-layer/style/css.js.map +1 -1
  377. package/lib/wms-layer/style/index.js.map +1 -1
  378. package/package.json +1 -1
  379. package/CHANGELOG.md +0 -217
@@ -17,37 +17,37 @@ var _excluded = ["data"],
17
17
  _excluded8 = ["name", "data"],
18
18
  _excluded9 = ["name", "data"],
19
19
  _excluded10 = ["data", "onEvents", "color", "legend", "unit", "tooltip", "grid", "xAxis", "yAxis", "height", "series", "loading", "title", "dataZoom", "noDataText", "style", "imgStyle", "noDataStyle"];
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
22
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
20
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
21
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
23
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
24
24
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
25
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
26
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
27
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
28
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
29
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
30
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
31
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
32
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
33
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
34
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
35
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
25
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
26
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
27
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
28
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
29
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
30
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
31
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
32
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
33
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
34
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
35
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
36
36
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
37
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
38
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
39
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
40
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
38
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
39
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
40
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
41
41
  var color = '#86909C';
42
42
  var fontSize = '12px';
43
43
 
44
- /**
45
- * 小数处理,默认2位
46
- * @param value
47
- * @param len
48
- * @returns {number|*}
44
+ /**
45
+ * 小数处理,默认2位
46
+ * @param value
47
+ * @param len
48
+ * @returns {number|*}
49
49
  */
50
- var convertDecimal = function convertDecimal(value) {
50
+ var convertDecimal = exports.convertDecimal = function convertDecimal(value) {
51
51
  var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
52
52
  if (value && String(value).indexOf('.') !== -1) {
53
53
  var _String$split = String(value).split('.'),
@@ -62,13 +62,12 @@ var convertDecimal = function convertDecimal(value) {
62
62
  return value;
63
63
  };
64
64
 
65
- /**
66
- * 转换饼图数据,处理占比截取为默认2位小数
67
- * @param data
68
- * @returns {*[]}
65
+ /**
66
+ * 转换饼图数据,处理占比截取为默认2位小数
67
+ * @param data
68
+ * @returns {*[]}
69
69
  */
70
- exports.convertDecimal = convertDecimal;
71
- var convertPieData = function convertPieData(data) {
70
+ var convertPieData = exports.convertPieData = function convertPieData(data) {
72
71
  var _data2;
73
72
  var _data = [];
74
73
  if ((_data2 = data) !== null && _data2 !== void 0 && _data2.length) {
@@ -93,14 +92,13 @@ var convertPieData = function convertPieData(data) {
93
92
  return _data;
94
93
  };
95
94
 
96
- /**
97
- * 合并 xAxis 配置及数据
98
- * @param xAxis
99
- * @param data
100
- * @returns {*&{data: *[]}}
95
+ /**
96
+ * 合并 xAxis 配置及数据
97
+ * @param xAxis
98
+ * @param data
99
+ * @returns {*&{data: *[]}}
101
100
  */
102
- exports.convertPieData = convertPieData;
103
- var mergeXAxisAndData = function mergeXAxisAndData(xAxis, data) {
101
+ var mergeXAxisAndData = exports.mergeXAxisAndData = function mergeXAxisAndData(xAxis, data) {
104
102
  var times = [];
105
103
  if (data !== null && data !== void 0 && data.length) {
106
104
  var field = xAxis.field,
@@ -116,22 +114,20 @@ var mergeXAxisAndData = function mergeXAxisAndData(xAxis, data) {
116
114
  data: times
117
115
  }, xAxis);
118
116
  };
119
- exports.mergeXAxisAndData = mergeXAxisAndData;
120
- var numberTo = function numberTo(data, number, limit) {
117
+ var numberTo = exports.numberTo = function numberTo(data, number, limit) {
121
118
  if (number) {
122
119
  return (Number(data) / number).toFixed(limit || 2);
123
120
  }
124
121
  return data;
125
122
  };
126
123
 
127
- /**
128
- * 合并 series 和数据
129
- * @param series
130
- * @param data
131
- * @returns {*[]}
124
+ /**
125
+ * 合并 series 和数据
126
+ * @param series
127
+ * @param data
128
+ * @returns {*[]}
132
129
  */
133
- exports.numberTo = numberTo;
134
- var mergeSeriesAndData = function mergeSeriesAndData(series, data) {
130
+ var mergeSeriesAndData = exports.mergeSeriesAndData = function mergeSeriesAndData(series, data) {
135
131
  var _series = [];
136
132
  series.map(function (s) {
137
133
  var seriesItem = _objectSpread({}, s);
@@ -146,13 +142,12 @@ var mergeSeriesAndData = function mergeSeriesAndData(series, data) {
146
142
  return _series;
147
143
  };
148
144
 
149
- /**
150
- * 合并配置和数据
151
- * @param options
152
- * @returns {{}}
145
+ /**
146
+ * 合并配置和数据
147
+ * @param options
148
+ * @returns {{}}
153
149
  */
154
- exports.mergeSeriesAndData = mergeSeriesAndData;
155
- var mergeConfigAndData = function mergeConfigAndData(options) {
150
+ var mergeConfigAndData = exports.mergeConfigAndData = function mergeConfigAndData(options) {
156
151
  var xAxis = options.xAxis,
157
152
  yAxis = options.yAxis,
158
153
  series = options.series,
@@ -172,7 +167,6 @@ var mergeConfigAndData = function mergeConfigAndData(options) {
172
167
  }
173
168
  return _objectSpread(_objectSpread({}, options), val);
174
169
  };
175
- exports.mergeConfigAndData = mergeConfigAndData;
176
170
  var getUnit = function getUnit(units, name) {
177
171
  if (units && _typeof(units) === 'object') {
178
172
  if (Array.isArray(units)) {
@@ -186,10 +180,10 @@ var getUnit = function getUnit(units, name) {
186
180
  }
187
181
  return units || '';
188
182
  };
189
- /**
190
- * 获取 tooltip
191
- * @param options
192
- * @returns {*&{trigger: string}}
183
+ /**
184
+ * 获取 tooltip
185
+ * @param options
186
+ * @returns {*&{trigger: string}}
193
187
  */
194
188
  var getTooltip = function getTooltip(options, unit, series) {
195
189
  var _series$;
@@ -214,10 +208,10 @@ var getTooltip = function getTooltip(options, unit, series) {
214
208
  }, options);
215
209
  };
216
210
 
217
- /**
218
- * 获取 图例
219
- * @param options
220
- * @returns {*&{pageTextStyle: {color: string}, textStyle: {color: string}, type: string, pageIconInactiveColor: string, pageIconColor: string}}
211
+ /**
212
+ * 获取 图例
213
+ * @param options
214
+ * @returns {*&{pageTextStyle: {color: string}, textStyle: {color: string}, type: string, pageIconInactiveColor: string, pageIconColor: string}}
221
215
  */
222
216
  var getLegend = function getLegend(options) {
223
217
  return _objectSpread({
@@ -227,11 +221,11 @@ var getLegend = function getLegend(options) {
227
221
  }, options);
228
222
  };
229
223
 
230
- /**
231
- * 获取布局
232
- * @param grid
233
- * @param dataZoom
234
- * @returns {*&{top: string, left: number, bottom: string, right: number, containLabel: boolean}}
224
+ /**
225
+ * 获取布局
226
+ * @param grid
227
+ * @param dataZoom
228
+ * @returns {*&{top: string, left: number, bottom: string, right: number, containLabel: boolean}}
235
229
  */
236
230
  var getGrid = function getGrid(grid, dataZoom) {
237
231
  return _objectSpread({
@@ -243,10 +237,10 @@ var getGrid = function getGrid(grid, dataZoom) {
243
237
  }, grid);
244
238
  };
245
239
 
246
- /**
247
- * 获取 xAxis 单项
248
- * @param options 参数可以是: "[xx, xx]"、"{data: [xx, xx], ...}"
249
- * @returns {{axisLabel: {textStyle: {color: string}}, data: *, axisLine: {lineStyle: {color: string}}, axisTick: {show: boolean}, type: string, boundaryGap: boolean}}
240
+ /**
241
+ * 获取 xAxis 单项
242
+ * @param options 参数可以是: "[xx, xx]"、"{data: [xx, xx], ...}"
243
+ * @returns {{axisLabel: {textStyle: {color: string}}, data: *, axisLine: {lineStyle: {color: string}}, axisTick: {show: boolean}, type: string, boundaryGap: boolean}}
250
244
  */
251
245
  var getXAxisItem = function getXAxisItem(options) {
252
246
  var _ref = Array.isArray(options) ? {
@@ -279,10 +273,10 @@ var getXAxisItem = function getXAxisItem(options) {
279
273
  }, other);
280
274
  };
281
275
 
282
- /**
283
- * 获取 xAxis 配置
284
- * @param xAxis 参数说明:"[xx, xx]"、"[[xx, xx], [xx, xx]]"、"[{data: [xx, xx], ...}]"
285
- * @returns {(*&{axisLabel: {textStyle: {color: string}}, data, axisLine: {lineStyle: {color: string}}, axisTick: {show: boolean}, type: string, boundaryGap: boolean})|*[]}
276
+ /**
277
+ * 获取 xAxis 配置
278
+ * @param xAxis 参数说明:"[xx, xx]"、"[[xx, xx], [xx, xx]]"、"[{data: [xx, xx], ...}]"
279
+ * @returns {(*&{axisLabel: {textStyle: {color: string}}, data, axisLine: {lineStyle: {color: string}}, axisTick: {show: boolean}, type: string, boundaryGap: boolean})|*[]}
286
280
  */
287
281
  var getXAxis = function getXAxis(xAxis) {
288
282
  if (xAxis) {
@@ -300,10 +294,10 @@ var getXAxis = function getXAxis(xAxis) {
300
294
  };
301
295
  };
302
296
 
303
- /**
304
- * 获取单个 yAxis 配置
305
- * @param options 参数可以是:"xx"、"{name: 'xx', ...其他配置}"
306
- * @returns {{axisLabel: {textStyle: {color: string}, showMaxLabel: boolean}, axisLine: {lineStyle: {color: string}}, axisTick: {show: boolean}, splitLine: {show: boolean}, nameTextStyle: {color: string}}}
297
+ /**
298
+ * 获取单个 yAxis 配置
299
+ * @param options 参数可以是:"xx"、"{name: 'xx', ...其他配置}"
300
+ * @returns {{axisLabel: {textStyle: {color: string}, showMaxLabel: boolean}, axisLine: {lineStyle: {color: string}}, axisTick: {show: boolean}, splitLine: {show: boolean}, nameTextStyle: {color: string}}}
307
301
  */
308
302
  var getYAxisItem = function getYAxisItem(options) {
309
303
  options = options || {};
@@ -346,10 +340,10 @@ var getYAxisItem = function getYAxisItem(options) {
346
340
  }, other);
347
341
  };
348
342
 
349
- /**
350
- * 获取 yAxis 配置
351
- * @param yAxis 参数可以是: "xx"、"['xx', 'xxx']"、"[{name: 'xx', ...其他配置}]"
352
- * @returns {{axisLabel: {textStyle: {color: string}, showMaxLabel: boolean}, axisLine: {lineStyle: {color: string}}, axisTick: {show: boolean}, splitLine: {show: boolean}, nameTextStyle: {color: string}}|*[]}
343
+ /**
344
+ * 获取 yAxis 配置
345
+ * @param yAxis 参数可以是: "xx"、"['xx', 'xxx']"、"[{name: 'xx', ...其他配置}]"
346
+ * @returns {{axisLabel: {textStyle: {color: string}, showMaxLabel: boolean}, axisLine: {lineStyle: {color: string}}, axisTick: {show: boolean}, splitLine: {show: boolean}, nameTextStyle: {color: string}}|*[]}
353
347
  */
354
348
  var getYAxis = function getYAxis(yAxis) {
355
349
  if (yAxis) {
@@ -374,12 +368,12 @@ var getYAxis = function getYAxis(yAxis) {
374
368
  };
375
369
  };
376
370
 
377
- /**
378
- * 获取 折线图 数据项
379
- * @param name
380
- * @param data
381
- * @param other
382
- * @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
371
+ /**
372
+ * 获取 折线图 数据项
373
+ * @param name
374
+ * @param data
375
+ * @param other
376
+ * @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
383
377
  */
384
378
  var getLineSeries = function getLineSeries(_ref3) {
385
379
  var name = _ref3.name,
@@ -396,12 +390,12 @@ var getLineSeries = function getLineSeries(_ref3) {
396
390
  }, other);
397
391
  };
398
392
 
399
- /**
400
- * 获取 柱状图 数据项
401
- * @param name
402
- * @param data
403
- * @param other
404
- * @returns {*&{barMaxWidth: number, connectNulls: boolean, data, barMinWidth: number, name, type: string}}
393
+ /**
394
+ * 获取 柱状图 数据项
395
+ * @param name
396
+ * @param data
397
+ * @param other
398
+ * @returns {*&{barMaxWidth: number, connectNulls: boolean, data, barMinWidth: number, name, type: string}}
405
399
  */
406
400
  var getBarSeries = function getBarSeries(_ref4) {
407
401
  var name = _ref4.name,
@@ -545,12 +539,12 @@ var getWordCloudSeries = function getWordCloudSeries(_ref8) {
545
539
  }];
546
540
  };
547
541
 
548
- /**
549
- * 获取 饼图 数据项
550
- * @param name
551
- * @param data
552
- * @param other
553
- * @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
542
+ /**
543
+ * 获取 饼图 数据项
544
+ * @param name
545
+ * @param data
546
+ * @param other
547
+ * @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
554
548
  */
555
549
  var getPieSeries = function getPieSeries(_ref9) {
556
550
  var name = _ref9.name,
@@ -563,12 +557,12 @@ var getPieSeries = function getPieSeries(_ref9) {
563
557
  }, other);
564
558
  };
565
559
 
566
- /**
567
- * 获取 散点图 数据项
568
- * @param name
569
- * @param data
570
- * @param other
571
- * @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
560
+ /**
561
+ * 获取 散点图 数据项
562
+ * @param name
563
+ * @param data
564
+ * @param other
565
+ * @returns {*&{connectNulls: boolean, data, symbolSize: number, name, type: string, smooth: boolean}}
572
566
  */
573
567
  var getScatterSeries = function getScatterSeries(_ref10) {
574
568
  var name = _ref10.name,
@@ -581,12 +575,12 @@ var getScatterSeries = function getScatterSeries(_ref10) {
581
575
  }, other);
582
576
  };
583
577
 
584
- /**
585
- * 获取颜色
586
- * @param color 参数可为:"#xxx", "['#xxx', '#xxx]"
587
- * @returns {string|{x: number, y: number, y2: number, x2: number, global: boolean, colorStops: *[], type: string}}
578
+ /**
579
+ * 获取颜色
580
+ * @param color 参数可为:"#xxx", "['#xxx', '#xxx]"
581
+ * @returns {string|{x: number, y: number, y2: number, x2: number, global: boolean, colorStops: *[], type: string}}
588
582
  */
589
- var getColor = function getColor(color) {
583
+ var getColor = exports.getColor = function getColor(color) {
590
584
  if (typeof color === 'string') {
591
585
  return color;
592
586
  } else if (Array.isArray(color)) {
@@ -616,12 +610,11 @@ var getColor = function getColor(color) {
616
610
  }
617
611
  };
618
612
 
619
- /**
620
- * 获取区间渐变颜色
621
- * @param color 参数可为:"#xxx", "['#xxx', '#xxx]"
622
- * @returns {{color: {x: number, y: number, y2: number, globalCoord: boolean, x2: number, colorStops: [{offset: number, color: string},{offset: number, color: string}], type: string}}}
613
+ /**
614
+ * 获取区间渐变颜色
615
+ * @param color 参数可为:"#xxx", "['#xxx', '#xxx]"
616
+ * @returns {{color: {x: number, y: number, y2: number, globalCoord: boolean, x2: number, colorStops: [{offset: number, color: string},{offset: number, color: string}], type: string}}}
623
617
  */
624
- exports.getColor = getColor;
625
618
  var getAreaColor = function getAreaColor(color) {
626
619
  var _ref11 = typeof color === 'string' ? [color, color] : color,
627
620
  _ref12 = _slicedToArray(_ref11, 2),
@@ -641,16 +634,15 @@ var getAreaColor = function getAreaColor(color) {
641
634
  offset: 1,
642
635
  color: end
643
636
  } /* 100% 处的颜色*/],
644
-
645
637
  globalCoord: false // 缺省为 false
646
638
  }
647
639
  };
648
640
  };
649
641
 
650
- /**
651
- * 获取数据
652
- * @param series 参数:"{name, data, type, color, areaColor}"
653
- * @returns {*[]}
642
+ /**
643
+ * 获取数据
644
+ * @param series 参数:"{name, data, type, color, areaColor}"
645
+ * @returns {*[]}
654
646
  */
655
647
  var getSeries = function getSeries(series) {
656
648
  var _series = [];
@@ -671,7 +663,6 @@ var getSeries = function getSeries(series) {
671
663
  // 自定义样式的柱状图
672
664
  wordCloud: getWordCloudSeries // 词云图
673
665
  };
674
-
675
666
  series.map(function (v) {
676
667
  var type = v.type,
677
668
  color = v.color,
@@ -735,8 +726,8 @@ var getDataZoom = function getDataZoom(options) {
735
726
  }
736
727
  return _dataZoom;
737
728
  };
738
- var Chart = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
739
- var _option$series, _option$series$, _option$series$$data;
729
+ var Chart = /*#__PURE__*/(0, _react.memo)(/*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
730
+ var _option$series;
740
731
  var _mergeConfigAndData = mergeConfigAndData(props || {}),
741
732
  data = _mergeConfigAndData.data,
742
733
  onEvents = _mergeConfigAndData.onEvents,
@@ -785,7 +776,7 @@ var Chart = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(f
785
776
  var onClick = function onClick(e) {
786
777
  if (onEvents !== null && onEvents !== void 0 && onEvents.onClick) {
787
778
  var _chartRef$current, _chartRef$current$get;
788
- var chart = (_chartRef$current = chartRef.current) === null || _chartRef$current === void 0 ? void 0 : (_chartRef$current$get = _chartRef$current.getEchartsInstance) === null || _chartRef$current$get === void 0 ? void 0 : _chartRef$current$get.call(_chartRef$current);
779
+ var chart = (_chartRef$current = chartRef.current) === null || _chartRef$current === void 0 || (_chartRef$current$get = _chartRef$current.getEchartsInstance) === null || _chartRef$current$get === void 0 ? void 0 : _chartRef$current$get.call(_chartRef$current);
789
780
  if (chart) {
790
781
  var rect = chart.getDom().getBoundingClientRect();
791
782
  var x = e.clientX - rect.left;
@@ -795,7 +786,7 @@ var Chart = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(f
795
786
  var xIndex = chart.convertFromPixel({
796
787
  seriesIndex: 0
797
788
  }, [x, y])[0];
798
- onEvents === null || onEvents === void 0 ? void 0 : onEvents.onClick(xIndex);
789
+ onEvents === null || onEvents === void 0 || onEvents.onClick(xIndex);
799
790
  }
800
791
  }
801
792
  }
@@ -806,7 +797,7 @@ var Chart = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(f
806
797
  height: height,
807
798
  width: '100%'
808
799
  }, style)
809
- }, (_option$series = option.series) !== null && _option$series !== void 0 && (_option$series$ = _option$series[0]) !== null && _option$series$ !== void 0 && (_option$series$$data = _option$series$.data) !== null && _option$series$$data !== void 0 && _option$series$$data.length ? /*#__PURE__*/_react["default"].createElement(_echartsForReact["default"], {
800
+ }, (_option$series = option.series) !== null && _option$series !== void 0 && (_option$series = _option$series[0]) !== null && _option$series !== void 0 && (_option$series = _option$series.data) !== null && _option$series !== void 0 && _option$series.length ? /*#__PURE__*/_react["default"].createElement(_echartsForReact["default"], {
810
801
  ref: chartRef,
811
802
  option: option,
812
803
  notMerge: true,
@@ -823,6 +814,5 @@ var Chart = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(f
823
814
  // 如果相同,则不会重新渲染
824
815
  return JSON.stringify(prevProps) === JSON.stringify(nextProps);
825
816
  });
826
- var _default = Chart;
827
- exports["default"] = _default;
817
+ var _default = exports["default"] = Chart;
828
818
  //# sourceMappingURL=index.js.map