@delon/chart 12.4.2 → 13.0.0-beta.1

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 (360) hide show
  1. package/bar/bar.component.d.ts +4 -1
  2. package/bar/bar.d.ts +1 -0
  3. package/bar/bar.module.d.ts +8 -0
  4. package/bar/package.json +5 -6
  5. package/card/card.component.d.ts +7 -4
  6. package/card/card.d.ts +1 -0
  7. package/card/card.module.d.ts +9 -0
  8. package/card/package.json +5 -6
  9. package/card/style/index.less +11 -0
  10. package/chart-echarts/delon-chart-chart-echarts.d.ts +1 -0
  11. package/chart-echarts/echarts.component.d.ts +3 -0
  12. package/chart-echarts/echarts.module.d.ts +7 -0
  13. package/chart-echarts/echarts.service.d.ts +3 -0
  14. package/chart-echarts/package.json +5 -6
  15. package/chart.d.ts +1 -0
  16. package/core/delon-chart-core.d.ts +1 -0
  17. package/core/g2.base.component.d.ts +4 -1
  18. package/core/g2.servicce.d.ts +3 -0
  19. package/core/package.json +5 -6
  20. package/custom/custom.component.d.ts +4 -1
  21. package/custom/custom.module.d.ts +7 -0
  22. package/custom/delon-chart-custom.d.ts +5 -0
  23. package/custom/package.json +6 -7
  24. package/esm2020/bar/bar.component.mjs +143 -0
  25. package/{esm2015/bar/bar.js → esm2020/bar/bar.mjs} +0 -0
  26. package/esm2020/bar/bar.module.mjs +21 -0
  27. package/{esm2015/bar/public_api.js → esm2020/bar/public_api.mjs} +0 -0
  28. package/esm2020/card/card.component.mjs +55 -0
  29. package/{esm2015/card/card.js → esm2020/card/card.mjs} +0 -0
  30. package/esm2020/card/card.module.mjs +22 -0
  31. package/{esm2015/card/public_api.js → esm2020/card/public_api.mjs} +0 -0
  32. package/{esm2015/chart-echarts/delon-chart-chart-echarts.js → esm2020/chart-echarts/delon-chart-chart-echarts.mjs} +0 -0
  33. package/esm2020/chart-echarts/echarts.component.mjs +162 -0
  34. package/esm2020/chart-echarts/echarts.module.mjs +20 -0
  35. package/esm2020/chart-echarts/echarts.service.mjs +60 -0
  36. package/{esm2015/chart-echarts/echarts.types.js → esm2020/chart-echarts/echarts.types.mjs} +0 -0
  37. package/{esm2015/chart-echarts/public_api.js → esm2020/chart-echarts/public_api.mjs} +0 -0
  38. package/{esm2015/chart.js → esm2020/chart.mjs} +0 -0
  39. package/{esm2015/core/delon-chart-core.js → esm2020/core/delon-chart-core.mjs} +0 -0
  40. package/esm2020/core/g2.base.component.mjs +109 -0
  41. package/esm2020/core/g2.servicce.mjs +54 -0
  42. package/{esm2015/core/public_api.js → esm2020/core/public_api.mjs} +0 -0
  43. package/{esm2015/core/types/interaction.js → esm2020/core/types/interaction.mjs} +0 -0
  44. package/{esm2015/core/types/time.js → esm2020/core/types/time.mjs} +0 -0
  45. package/esm2020/core/utils.mjs +21 -0
  46. package/esm2020/custom/custom.component.mjs +70 -0
  47. package/esm2020/custom/custom.module.mjs +20 -0
  48. package/esm2020/custom/delon-chart-custom.mjs +5 -0
  49. package/{esm2015/custom/public_api.js → esm2020/custom/public_api.mjs} +0 -0
  50. package/{esm2015/mini-progress/mini-progress.js → esm2020/gauge/delon-chart-gauge.mjs} +1 -1
  51. package/esm2020/gauge/gauge.component.mjs +169 -0
  52. package/esm2020/gauge/gauge.module.mjs +20 -0
  53. package/{esm2015/gauge/public_api.js → esm2020/gauge/public_api.mjs} +0 -0
  54. package/esm2020/mini-area/delon-chart-mini-area.mjs +5 -0
  55. package/esm2020/mini-area/mini-area.component.mjs +133 -0
  56. package/esm2020/mini-area/mini-area.module.mjs +19 -0
  57. package/{esm2015/mini-area/public_api.js → esm2020/mini-area/public_api.mjs} +0 -0
  58. package/esm2020/mini-bar/delon-chart-mini-bar.mjs +5 -0
  59. package/esm2020/mini-bar/mini-bar.component.mjs +100 -0
  60. package/esm2020/mini-bar/mini-bar.module.mjs +19 -0
  61. package/{esm2015/mini-bar/public_api.js → esm2020/mini-bar/public_api.mjs} +0 -0
  62. package/{esm2015/gauge/gauge.js → esm2020/mini-progress/delon-chart-mini-progress.mjs} +1 -1
  63. package/esm2020/mini-progress/mini-progress.component.mjs +46 -0
  64. package/esm2020/mini-progress/mini-progress.module.mjs +21 -0
  65. package/{esm2015/mini-progress/public_api.js → esm2020/mini-progress/public_api.mjs} +0 -0
  66. package/{esm2015/pie/pie.js → esm2020/number-info/delon-chart-number-info.mjs} +1 -1
  67. package/esm2020/number-info/number-info.component.mjs +45 -0
  68. package/esm2020/number-info/number-info.module.mjs +21 -0
  69. package/{esm2015/number-info/public_api.js → esm2020/number-info/public_api.mjs} +0 -0
  70. package/{esm2015/number-info/number-info.js → esm2020/pie/delon-chart-pie.mjs} +1 -1
  71. package/esm2020/pie/pie.component.mjs +215 -0
  72. package/esm2020/pie/pie.module.mjs +22 -0
  73. package/{esm2015/pie/public_api.js → esm2020/pie/public_api.mjs} +0 -0
  74. package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
  75. package/esm2020/radar/delon-chart-radar.mjs +5 -0
  76. package/{esm2015/radar/public_api.js → esm2020/radar/public_api.mjs} +0 -0
  77. package/esm2020/radar/radar.component.mjs +148 -0
  78. package/esm2020/radar/radar.module.mjs +22 -0
  79. package/esm2020/single-bar/delon-chart-single-bar.mjs +5 -0
  80. package/{esm2015/single-bar/public_api.js → esm2020/single-bar/public_api.mjs} +0 -0
  81. package/esm2020/single-bar/single-bar.component.mjs +126 -0
  82. package/esm2020/single-bar/single-bar.module.mjs +19 -0
  83. package/esm2020/tag-cloud/delon-chart-tag-cloud.mjs +5 -0
  84. package/{esm2015/tag-cloud/public_api.js → esm2020/tag-cloud/public_api.mjs} +0 -0
  85. package/esm2020/tag-cloud/tag-cloud.component.mjs +161 -0
  86. package/esm2020/tag-cloud/tag-cloud.module.mjs +20 -0
  87. package/esm2020/timeline/delon-chart-timeline.mjs +5 -0
  88. package/{esm2015/timeline/public_api.js → esm2020/timeline/public_api.mjs} +0 -0
  89. package/esm2020/timeline/timeline.component.mjs +204 -0
  90. package/esm2020/timeline/timeline.module.mjs +21 -0
  91. package/esm2020/trend/delon-chart-trend.mjs +5 -0
  92. package/{esm2015/trend/public_api.js → esm2020/trend/public_api.mjs} +0 -0
  93. package/esm2020/trend/trend.component.mjs +52 -0
  94. package/esm2020/trend/trend.module.mjs +20 -0
  95. package/esm2020/water-wave/delon-chart-water-wave.mjs +5 -0
  96. package/{esm2015/water-wave/public_api.js → esm2020/water-wave/public_api.mjs} +0 -0
  97. package/esm2020/water-wave/water-wave.component.mjs +221 -0
  98. package/esm2020/water-wave/water-wave.module.mjs +20 -0
  99. package/fesm2015/{bar.js → bar.mjs} +57 -34
  100. package/fesm2015/bar.mjs.map +1 -0
  101. package/fesm2015/card.mjs +81 -0
  102. package/fesm2015/card.mjs.map +1 -0
  103. package/fesm2015/{chart.js → chart.mjs} +1 -1
  104. package/fesm2015/chart.mjs.map +1 -0
  105. package/fesm2015/{delon-chart-chart-echarts.js → delon-chart-chart-echarts.mjs} +62 -53
  106. package/fesm2015/delon-chart-chart-echarts.mjs.map +1 -0
  107. package/fesm2015/{delon-chart-core.js → delon-chart-core.mjs} +23 -29
  108. package/fesm2015/delon-chart-core.mjs.map +1 -0
  109. package/fesm2015/delon-chart-custom.mjs +94 -0
  110. package/fesm2015/delon-chart-custom.mjs.map +1 -0
  111. package/fesm2015/{gauge.js → delon-chart-gauge.mjs} +46 -31
  112. package/fesm2015/delon-chart-gauge.mjs.map +1 -0
  113. package/fesm2015/delon-chart-mini-area.mjs +156 -0
  114. package/fesm2015/delon-chart-mini-area.mjs.map +1 -0
  115. package/fesm2015/delon-chart-mini-bar.mjs +123 -0
  116. package/fesm2015/delon-chart-mini-bar.mjs.map +1 -0
  117. package/fesm2015/delon-chart-mini-progress.mjs +71 -0
  118. package/fesm2015/delon-chart-mini-progress.mjs.map +1 -0
  119. package/fesm2015/delon-chart-number-info.mjs +70 -0
  120. package/fesm2015/delon-chart-number-info.mjs.map +1 -0
  121. package/fesm2015/delon-chart-pie.mjs +241 -0
  122. package/fesm2015/delon-chart-pie.mjs.map +1 -0
  123. package/fesm2015/{radar.js → delon-chart-radar.mjs} +43 -33
  124. package/fesm2015/delon-chart-radar.mjs.map +1 -0
  125. package/fesm2015/delon-chart-single-bar.mjs +147 -0
  126. package/fesm2015/delon-chart-single-bar.mjs.map +1 -0
  127. package/fesm2015/{tag-cloud.js → delon-chart-tag-cloud.mjs} +39 -26
  128. package/fesm2015/delon-chart-tag-cloud.mjs.map +1 -0
  129. package/fesm2015/{timeline.js → delon-chart-timeline.mjs} +64 -36
  130. package/fesm2015/delon-chart-timeline.mjs.map +1 -0
  131. package/fesm2015/delon-chart-trend.mjs +76 -0
  132. package/fesm2015/delon-chart-trend.mjs.map +1 -0
  133. package/fesm2015/{water-wave.js → delon-chart-water-wave.mjs} +38 -37
  134. package/fesm2015/delon-chart-water-wave.mjs.map +1 -0
  135. package/fesm2020/bar.mjs +168 -0
  136. package/fesm2020/bar.mjs.map +1 -0
  137. package/fesm2020/card.mjs +81 -0
  138. package/fesm2020/card.mjs.map +1 -0
  139. package/fesm2020/chart.mjs +7 -0
  140. package/fesm2020/chart.mjs.map +1 -0
  141. package/fesm2020/delon-chart-chart-echarts.mjs +242 -0
  142. package/fesm2020/delon-chart-chart-echarts.mjs.map +1 -0
  143. package/fesm2020/delon-chart-core.mjs +187 -0
  144. package/fesm2020/delon-chart-core.mjs.map +1 -0
  145. package/fesm2020/delon-chart-custom.mjs +94 -0
  146. package/fesm2020/delon-chart-custom.mjs.map +1 -0
  147. package/fesm2020/delon-chart-gauge.mjs +193 -0
  148. package/fesm2020/delon-chart-gauge.mjs.map +1 -0
  149. package/fesm2020/delon-chart-mini-area.mjs +156 -0
  150. package/fesm2020/delon-chart-mini-area.mjs.map +1 -0
  151. package/fesm2020/delon-chart-mini-bar.mjs +123 -0
  152. package/fesm2020/delon-chart-mini-bar.mjs.map +1 -0
  153. package/fesm2020/delon-chart-mini-progress.mjs +71 -0
  154. package/fesm2020/delon-chart-mini-progress.mjs.map +1 -0
  155. package/fesm2020/delon-chart-number-info.mjs +70 -0
  156. package/fesm2020/delon-chart-number-info.mjs.map +1 -0
  157. package/fesm2020/delon-chart-pie.mjs +241 -0
  158. package/fesm2020/delon-chart-pie.mjs.map +1 -0
  159. package/fesm2020/delon-chart-radar.mjs +174 -0
  160. package/fesm2020/delon-chart-radar.mjs.map +1 -0
  161. package/fesm2020/delon-chart-single-bar.mjs +149 -0
  162. package/fesm2020/delon-chart-single-bar.mjs.map +1 -0
  163. package/fesm2020/delon-chart-tag-cloud.mjs +185 -0
  164. package/fesm2020/delon-chart-tag-cloud.mjs.map +1 -0
  165. package/fesm2020/delon-chart-timeline.mjs +229 -0
  166. package/fesm2020/delon-chart-timeline.mjs.map +1 -0
  167. package/fesm2020/delon-chart-trend.mjs +76 -0
  168. package/fesm2020/delon-chart-trend.mjs.map +1 -0
  169. package/fesm2020/delon-chart-water-wave.mjs +245 -0
  170. package/fesm2020/delon-chart-water-wave.mjs.map +1 -0
  171. package/{mini-bar/mini-bar.d.ts → gauge/delon-chart-gauge.d.ts} +1 -0
  172. package/gauge/gauge.component.d.ts +8 -5
  173. package/gauge/gauge.module.d.ts +7 -0
  174. package/gauge/package.json +6 -7
  175. package/mini-area/delon-chart-mini-area.d.ts +5 -0
  176. package/mini-area/mini-area.component.d.ts +3 -0
  177. package/mini-area/mini-area.module.d.ts +6 -0
  178. package/mini-area/package.json +6 -7
  179. package/mini-bar/delon-chart-mini-bar.d.ts +5 -0
  180. package/mini-bar/mini-bar.component.d.ts +3 -0
  181. package/mini-bar/mini-bar.module.d.ts +6 -0
  182. package/mini-bar/package.json +6 -7
  183. package/mini-progress/delon-chart-mini-progress.d.ts +5 -0
  184. package/mini-progress/mini-progress.component.d.ts +6 -3
  185. package/mini-progress/mini-progress.module.d.ts +8 -0
  186. package/mini-progress/package.json +6 -7
  187. package/mini-progress/style/index.less +5 -0
  188. package/number-info/delon-chart-number-info.d.ts +5 -0
  189. package/number-info/number-info.component.d.ts +9 -6
  190. package/number-info/number-info.module.d.ts +8 -0
  191. package/number-info/package.json +6 -7
  192. package/number-info/style/index.less +12 -0
  193. package/package.json +160 -12
  194. package/{custom/g2Custom.d.ts → pie/delon-chart-pie.d.ts} +1 -0
  195. package/pie/package.json +6 -7
  196. package/pie/pie.component.d.ts +8 -5
  197. package/pie/pie.module.d.ts +9 -0
  198. package/pie/style/index.less +14 -0
  199. package/{gauge/gauge.d.ts → radar/delon-chart-radar.d.ts} +1 -0
  200. package/radar/package.json +6 -7
  201. package/radar/radar.component.d.ts +4 -1
  202. package/radar/radar.module.d.ts +9 -0
  203. package/radar/style/index.less +6 -0
  204. package/single-bar/delon-chart-single-bar.d.ts +5 -0
  205. package/single-bar/package.json +6 -7
  206. package/single-bar/single-bar.component.d.ts +4 -1
  207. package/single-bar/single-bar.module.d.ts +6 -0
  208. package/tag-cloud/delon-chart-tag-cloud.d.ts +5 -0
  209. package/tag-cloud/package.json +6 -7
  210. package/tag-cloud/tag-cloud.component.d.ts +3 -0
  211. package/tag-cloud/tag-cloud.module.d.ts +7 -0
  212. package/timeline/delon-chart-timeline.d.ts +5 -0
  213. package/timeline/package.json +6 -7
  214. package/timeline/timeline.component.d.ts +5 -2
  215. package/timeline/timeline.module.d.ts +8 -0
  216. package/{mini-area/mini-area.d.ts → trend/delon-chart-trend.d.ts} +1 -0
  217. package/trend/package.json +6 -7
  218. package/trend/style/index.less +6 -0
  219. package/trend/trend.component.d.ts +4 -1
  220. package/trend/trend.module.d.ts +7 -0
  221. package/water-wave/delon-chart-water-wave.d.ts +5 -0
  222. package/water-wave/package.json +6 -7
  223. package/water-wave/style/index.less +4 -0
  224. package/water-wave/water-wave.component.d.ts +5 -2
  225. package/water-wave/water-wave.module.d.ts +7 -0
  226. package/bar/bar.metadata.json +0 -1
  227. package/bundles/bar.umd.js +0 -471
  228. package/bundles/bar.umd.js.map +0 -1
  229. package/bundles/card.umd.js +0 -408
  230. package/bundles/card.umd.js.map +0 -1
  231. package/bundles/chart.umd.js +0 -19
  232. package/bundles/chart.umd.js.map +0 -1
  233. package/bundles/delon-chart-chart-echarts.umd.js +0 -617
  234. package/bundles/delon-chart-chart-echarts.umd.js.map +0 -1
  235. package/bundles/delon-chart-core.umd.js +0 -550
  236. package/bundles/delon-chart-core.umd.js.map +0 -1
  237. package/bundles/g2Custom.umd.js +0 -407
  238. package/bundles/g2Custom.umd.js.map +0 -1
  239. package/bundles/gauge.umd.js +0 -511
  240. package/bundles/gauge.umd.js.map +0 -1
  241. package/bundles/mini-area.umd.js +0 -471
  242. package/bundles/mini-area.umd.js.map +0 -1
  243. package/bundles/mini-bar.umd.js +0 -444
  244. package/bundles/mini-bar.umd.js.map +0 -1
  245. package/bundles/mini-progress.umd.js +0 -401
  246. package/bundles/mini-progress.umd.js.map +0 -1
  247. package/bundles/number-info.umd.js +0 -392
  248. package/bundles/number-info.umd.js.map +0 -1
  249. package/bundles/pie.umd.js +0 -567
  250. package/bundles/pie.umd.js.map +0 -1
  251. package/bundles/radar.umd.js +0 -497
  252. package/bundles/radar.umd.js.map +0 -1
  253. package/bundles/single-bar.umd.js +0 -464
  254. package/bundles/single-bar.umd.js.map +0 -1
  255. package/bundles/tag-cloud.umd.js +0 -495
  256. package/bundles/tag-cloud.umd.js.map +0 -1
  257. package/bundles/timeline.umd.js +0 -524
  258. package/bundles/timeline.umd.js.map +0 -1
  259. package/bundles/trend.umd.js +0 -391
  260. package/bundles/trend.umd.js.map +0 -1
  261. package/bundles/water-wave.umd.js +0 -587
  262. package/bundles/water-wave.umd.js.map +0 -1
  263. package/card/card.metadata.json +0 -1
  264. package/chart-echarts/delon-chart-chart-echarts.metadata.json +0 -1
  265. package/chart.metadata.json +0 -1
  266. package/core/delon-chart-core.metadata.json +0 -1
  267. package/custom/g2Custom.metadata.json +0 -1
  268. package/esm2015/bar/bar.component.js +0 -124
  269. package/esm2015/bar/bar.module.js +0 -16
  270. package/esm2015/card/card.component.js +0 -52
  271. package/esm2015/card/card.module.js +0 -17
  272. package/esm2015/chart-echarts/echarts.component.js +0 -152
  273. package/esm2015/chart-echarts/echarts.module.js +0 -15
  274. package/esm2015/chart-echarts/echarts.service.js +0 -64
  275. package/esm2015/core/g2.base.component.js +0 -110
  276. package/esm2015/core/g2.servicce.js +0 -58
  277. package/esm2015/core/utils.js +0 -15
  278. package/esm2015/custom/custom.component.js +0 -58
  279. package/esm2015/custom/custom.module.js +0 -15
  280. package/esm2015/custom/g2Custom.js +0 -5
  281. package/esm2015/gauge/gauge.component.js +0 -158
  282. package/esm2015/gauge/gauge.module.js +0 -15
  283. package/esm2015/mini-area/mini-area.component.js +0 -117
  284. package/esm2015/mini-area/mini-area.js +0 -5
  285. package/esm2015/mini-area/mini-area.module.js +0 -14
  286. package/esm2015/mini-bar/mini-bar.component.js +0 -90
  287. package/esm2015/mini-bar/mini-bar.js +0 -5
  288. package/esm2015/mini-bar/mini-bar.module.js +0 -14
  289. package/esm2015/mini-progress/mini-progress.component.js +0 -50
  290. package/esm2015/mini-progress/mini-progress.module.js +0 -16
  291. package/esm2015/number-info/number-info.component.js +0 -40
  292. package/esm2015/number-info/number-info.module.js +0 -16
  293. package/esm2015/pie/pie.component.js +0 -197
  294. package/esm2015/pie/pie.module.js +0 -17
  295. package/esm2015/radar/radar.component.js +0 -142
  296. package/esm2015/radar/radar.js +0 -5
  297. package/esm2015/radar/radar.module.js +0 -17
  298. package/esm2015/single-bar/single-bar.component.js +0 -111
  299. package/esm2015/single-bar/single-bar.js +0 -5
  300. package/esm2015/single-bar/single-bar.module.js +0 -14
  301. package/esm2015/tag-cloud/tag-cloud.component.js +0 -142
  302. package/esm2015/tag-cloud/tag-cloud.js +0 -5
  303. package/esm2015/tag-cloud/tag-cloud.module.js +0 -15
  304. package/esm2015/timeline/timeline.component.js +0 -178
  305. package/esm2015/timeline/timeline.js +0 -5
  306. package/esm2015/timeline/timeline.module.js +0 -16
  307. package/esm2015/trend/trend.component.js +0 -42
  308. package/esm2015/trend/trend.js +0 -5
  309. package/esm2015/trend/trend.module.js +0 -15
  310. package/esm2015/water-wave/water-wave.component.js +0 -224
  311. package/esm2015/water-wave/water-wave.js +0 -5
  312. package/esm2015/water-wave/water-wave.module.js +0 -15
  313. package/fesm2015/bar.js.map +0 -1
  314. package/fesm2015/card.js +0 -74
  315. package/fesm2015/card.js.map +0 -1
  316. package/fesm2015/chart.js.map +0 -1
  317. package/fesm2015/delon-chart-chart-echarts.js.map +0 -1
  318. package/fesm2015/delon-chart-core.js.map +0 -1
  319. package/fesm2015/g2Custom.js +0 -78
  320. package/fesm2015/g2Custom.js.map +0 -1
  321. package/fesm2015/gauge.js.map +0 -1
  322. package/fesm2015/mini-area.js +0 -136
  323. package/fesm2015/mini-area.js.map +0 -1
  324. package/fesm2015/mini-bar.js +0 -109
  325. package/fesm2015/mini-bar.js.map +0 -1
  326. package/fesm2015/mini-progress.js +0 -70
  327. package/fesm2015/mini-progress.js.map +0 -1
  328. package/fesm2015/number-info.js +0 -61
  329. package/fesm2015/number-info.js.map +0 -1
  330. package/fesm2015/pie.js +0 -219
  331. package/fesm2015/pie.js.map +0 -1
  332. package/fesm2015/radar.js.map +0 -1
  333. package/fesm2015/single-bar.js +0 -130
  334. package/fesm2015/single-bar.js.map +0 -1
  335. package/fesm2015/tag-cloud.js.map +0 -1
  336. package/fesm2015/timeline.js.map +0 -1
  337. package/fesm2015/trend.js +0 -62
  338. package/fesm2015/trend.js.map +0 -1
  339. package/fesm2015/water-wave.js.map +0 -1
  340. package/gauge/gauge.metadata.json +0 -1
  341. package/mini-area/mini-area.metadata.json +0 -1
  342. package/mini-bar/mini-bar.metadata.json +0 -1
  343. package/mini-progress/mini-progress.d.ts +0 -4
  344. package/mini-progress/mini-progress.metadata.json +0 -1
  345. package/number-info/number-info.d.ts +0 -4
  346. package/number-info/number-info.metadata.json +0 -1
  347. package/pie/pie.d.ts +0 -4
  348. package/pie/pie.metadata.json +0 -1
  349. package/radar/radar.d.ts +0 -4
  350. package/radar/radar.metadata.json +0 -1
  351. package/single-bar/single-bar.d.ts +0 -4
  352. package/single-bar/single-bar.metadata.json +0 -1
  353. package/tag-cloud/tag-cloud.d.ts +0 -4
  354. package/tag-cloud/tag-cloud.metadata.json +0 -1
  355. package/timeline/timeline.d.ts +0 -4
  356. package/timeline/timeline.metadata.json +0 -1
  357. package/trend/trend.d.ts +0 -4
  358. package/trend/trend.metadata.json +0 -1
  359. package/water-wave/water-wave.d.ts +0 -4
  360. package/water-wave/water-wave.metadata.json +0 -1
@@ -1,136 +0,0 @@
1
- import { __decorate } from 'tslib';
2
- import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, NgModule } from '@angular/core';
3
- import { G2BaseComponent, genMiniTooltipOptions } from '@delon/chart/core';
4
- import { InputNumber, InputBoolean } from '@delon/util/decorator';
5
- import { CommonModule } from '@angular/common';
6
-
7
- class G2MiniAreaComponent extends G2BaseComponent {
8
- constructor() {
9
- super(...arguments);
10
- // #region fields
11
- this.color = 'rgba(24, 144, 255, 0.2)';
12
- this.borderColor = '#1890FF';
13
- this.borderWidth = 2;
14
- this.height = 56;
15
- this.fit = true;
16
- this.line = false;
17
- this.animate = true;
18
- this.padding = [8, 8, 8, 8];
19
- this.data = [];
20
- this.yTooltipSuffix = '';
21
- this.tooltipType = 'default';
22
- this.clickItem = new EventEmitter();
23
- }
24
- // #endregion
25
- install() {
26
- const { el, fit, height, padding, xAxis, yAxis, yTooltipSuffix, tooltipType, line, theme, animate, color, borderColor, borderWidth } = this;
27
- const chart = (this._chart = new window.G2.Chart({
28
- container: el.nativeElement,
29
- autoFit: fit,
30
- height,
31
- padding,
32
- theme
33
- }));
34
- chart.animate(animate);
35
- if (!xAxis && !yAxis) {
36
- chart.axis(false);
37
- }
38
- if (xAxis) {
39
- chart.axis('x', xAxis);
40
- }
41
- else {
42
- chart.axis('x', false);
43
- }
44
- if (yAxis) {
45
- chart.axis('y', yAxis);
46
- }
47
- else {
48
- chart.axis('y', false);
49
- }
50
- chart.legend(false);
51
- chart.tooltip(genMiniTooltipOptions(tooltipType));
52
- chart
53
- .area()
54
- .position('x*y')
55
- .color(color)
56
- .tooltip('x*y', (x, y) => ({ name: x, value: y + yTooltipSuffix }))
57
- .shape('smooth');
58
- if (line) {
59
- chart.line().position('x*y').shape('smooth').color(borderColor).size(borderWidth).tooltip(false);
60
- }
61
- chart.on(`plot:click`, (ev) => {
62
- const records = this._chart.getSnapRecords({ x: ev.x, y: ev.y });
63
- this.ngZone.run(() => this.clickItem.emit({ item: records[0]._origin, ev }));
64
- });
65
- this.changeData();
66
- chart.render();
67
- }
68
- changeData() {
69
- const { _chart, data } = this;
70
- if (!_chart || !Array.isArray(data) || data.length <= 0)
71
- return;
72
- _chart.changeData(data);
73
- }
74
- }
75
- G2MiniAreaComponent.decorators = [
76
- { type: Component, args: [{
77
- selector: 'g2-mini-area',
78
- exportAs: 'g2MiniArea',
79
- template: ``,
80
- host: {
81
- '[style.height.px]': 'height'
82
- },
83
- preserveWhitespaces: false,
84
- changeDetection: ChangeDetectionStrategy.OnPush,
85
- encapsulation: ViewEncapsulation.None
86
- },] }
87
- ];
88
- G2MiniAreaComponent.propDecorators = {
89
- color: [{ type: Input }],
90
- borderColor: [{ type: Input }],
91
- borderWidth: [{ type: Input }],
92
- height: [{ type: Input }],
93
- fit: [{ type: Input }],
94
- line: [{ type: Input }],
95
- animate: [{ type: Input }],
96
- xAxis: [{ type: Input }],
97
- yAxis: [{ type: Input }],
98
- padding: [{ type: Input }],
99
- data: [{ type: Input }],
100
- yTooltipSuffix: [{ type: Input }],
101
- tooltipType: [{ type: Input }],
102
- clickItem: [{ type: Output }]
103
- };
104
- __decorate([
105
- InputNumber()
106
- ], G2MiniAreaComponent.prototype, "borderWidth", void 0);
107
- __decorate([
108
- InputNumber()
109
- ], G2MiniAreaComponent.prototype, "height", void 0);
110
- __decorate([
111
- InputBoolean()
112
- ], G2MiniAreaComponent.prototype, "fit", void 0);
113
- __decorate([
114
- InputBoolean()
115
- ], G2MiniAreaComponent.prototype, "line", void 0);
116
- __decorate([
117
- InputBoolean()
118
- ], G2MiniAreaComponent.prototype, "animate", void 0);
119
-
120
- const COMPONENTS = [G2MiniAreaComponent];
121
- class G2MiniAreaModule {
122
- }
123
- G2MiniAreaModule.decorators = [
124
- { type: NgModule, args: [{
125
- imports: [CommonModule],
126
- declarations: COMPONENTS,
127
- exports: COMPONENTS
128
- },] }
129
- ];
130
-
131
- /**
132
- * Generated bundle index. Do not edit.
133
- */
134
-
135
- export { G2MiniAreaComponent, G2MiniAreaModule };
136
- //# sourceMappingURL=mini-area.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mini-area.js","sources":["../../../../packages/chart/mini-area/mini-area.component.ts","../../../../packages/chart/mini-area/mini-area.module.ts","../../../../packages/chart/mini-area/mini-area.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\n\nimport type { Chart, Event } from '@antv/g2';\n\nimport { G2BaseComponent, genMiniTooltipOptions } from '@delon/chart/core';\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport interface G2MiniAreaData {\n x: NzSafeAny;\n y: NzSafeAny;\n [key: string]: NzSafeAny;\n}\n\nexport interface G2MiniAreaClickItem {\n item: G2MiniAreaData;\n ev: Event;\n}\n\n@Component({\n selector: 'g2-mini-area',\n exportAs: 'g2MiniArea',\n template: ``,\n host: {\n '[style.height.px]': 'height'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2MiniAreaComponent extends G2BaseComponent {\n static ngAcceptInputType_borderWidth: NumberInput;\n static ngAcceptInputType_height: NumberInput;\n static ngAcceptInputType_fit: BooleanInput;\n static ngAcceptInputType_line: BooleanInput;\n static ngAcceptInputType_animate: BooleanInput;\n\n // #region fields\n\n @Input() color = 'rgba(24, 144, 255, 0.2)';\n @Input() borderColor = '#1890FF';\n @Input() @InputNumber() borderWidth = 2;\n @Input() @InputNumber() height = 56;\n @Input() @InputBoolean() fit = true;\n @Input() @InputBoolean() line = false;\n @Input() @InputBoolean() animate = true;\n @Input() xAxis: NzSafeAny;\n @Input() yAxis: NzSafeAny;\n @Input() padding: number | number[] | 'auto' = [8, 8, 8, 8];\n @Input() data: G2MiniAreaData[] = [];\n @Input() yTooltipSuffix = '';\n @Input() tooltipType: 'mini' | 'default' = 'default';\n @Output() readonly clickItem = new EventEmitter<G2MiniAreaClickItem>();\n\n // #endregion\n\n install(): void {\n const {\n el,\n fit,\n height,\n padding,\n xAxis,\n yAxis,\n yTooltipSuffix,\n tooltipType,\n line,\n theme,\n animate,\n color,\n borderColor,\n borderWidth\n } = this;\n const chart: Chart = (this._chart = new (window as NzSafeAny).G2.Chart({\n container: el.nativeElement,\n autoFit: fit,\n height,\n padding,\n theme\n }));\n chart.animate(animate);\n\n if (!xAxis && !yAxis) {\n chart.axis(false);\n }\n\n if (xAxis) {\n chart.axis('x', xAxis);\n } else {\n chart.axis('x', false);\n }\n\n if (yAxis) {\n chart.axis('y', yAxis);\n } else {\n chart.axis('y', false);\n }\n\n chart.legend(false);\n chart.tooltip(genMiniTooltipOptions(tooltipType));\n\n chart\n .area()\n .position('x*y')\n .color(color)\n .tooltip('x*y', (x, y) => ({ name: x, value: y + yTooltipSuffix }))\n .shape('smooth');\n\n if (line) {\n chart.line().position('x*y').shape('smooth').color(borderColor).size(borderWidth).tooltip(false);\n }\n\n chart.on(`plot:click`, (ev: Event) => {\n const records = this._chart.getSnapRecords({ x: ev.x, y: ev.y });\n this.ngZone.run(() => this.clickItem.emit({ item: records[0]._origin, ev }));\n });\n\n this.changeData();\n chart.render();\n }\n\n changeData(): void {\n const { _chart, data } = this;\n if (!_chart || !Array.isArray(data) || data.length <= 0) return;\n\n _chart.changeData(data);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { G2MiniAreaComponent } from './mini-area.component';\n\nconst COMPONENTS = [G2MiniAreaComponent];\n\n@NgModule({\n imports: [CommonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class G2MiniAreaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":"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"}
@@ -1,109 +0,0 @@
1
- import { __decorate } from 'tslib';
2
- import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, NgModule } from '@angular/core';
3
- import { G2BaseComponent, genMiniTooltipOptions } from '@delon/chart/core';
4
- import { InputNumber } from '@delon/util/decorator';
5
- import { CommonModule } from '@angular/common';
6
-
7
- class G2MiniBarComponent extends G2BaseComponent {
8
- constructor() {
9
- super(...arguments);
10
- // #region fields
11
- this.color = '#1890FF';
12
- this.height = 0;
13
- this.borderWidth = 5;
14
- this.padding = [8, 8, 8, 8];
15
- this.data = [];
16
- this.yTooltipSuffix = '';
17
- this.tooltipType = 'default';
18
- this.clickItem = new EventEmitter();
19
- }
20
- // #endregion
21
- install() {
22
- const { el, height, padding, yTooltipSuffix, tooltipType, theme, color, borderWidth } = this;
23
- const chart = (this._chart = new window.G2.Chart({
24
- container: el.nativeElement,
25
- autoFit: true,
26
- height,
27
- padding,
28
- theme
29
- }));
30
- chart.scale({
31
- x: {
32
- type: 'cat'
33
- },
34
- y: {
35
- min: 0
36
- }
37
- });
38
- chart.legend(false);
39
- chart.axis(false);
40
- chart.tooltip(genMiniTooltipOptions(tooltipType, { showCrosshairs: false }));
41
- chart
42
- .interval()
43
- .position('x*y')
44
- .color('x*y', (x, y) => {
45
- const colorItem = this.data.find(w => w.x === x && w.y === y);
46
- return colorItem && colorItem.color ? colorItem.color : color;
47
- })
48
- .size(borderWidth)
49
- .tooltip('x*y', (x, y) => ({ name: x, value: y + yTooltipSuffix }));
50
- chart.on(`interval:click`, (ev) => {
51
- this.ngZone.run(() => { var _a; return this.clickItem.emit({ item: (_a = ev.data) === null || _a === void 0 ? void 0 : _a.data, ev }); });
52
- });
53
- this.changeData();
54
- chart.render();
55
- }
56
- changeData() {
57
- const { _chart, data } = this;
58
- if (!_chart || !Array.isArray(data) || data.length <= 0)
59
- return;
60
- _chart.changeData(data);
61
- }
62
- }
63
- G2MiniBarComponent.decorators = [
64
- { type: Component, args: [{
65
- selector: 'g2-mini-bar',
66
- exportAs: 'g2MiniBar',
67
- template: ``,
68
- host: {
69
- '[style.height.px]': 'height'
70
- },
71
- preserveWhitespaces: false,
72
- changeDetection: ChangeDetectionStrategy.OnPush,
73
- encapsulation: ViewEncapsulation.None
74
- },] }
75
- ];
76
- G2MiniBarComponent.propDecorators = {
77
- color: [{ type: Input }],
78
- height: [{ type: Input }],
79
- borderWidth: [{ type: Input }],
80
- padding: [{ type: Input }],
81
- data: [{ type: Input }],
82
- yTooltipSuffix: [{ type: Input }],
83
- tooltipType: [{ type: Input }],
84
- clickItem: [{ type: Output }]
85
- };
86
- __decorate([
87
- InputNumber()
88
- ], G2MiniBarComponent.prototype, "height", void 0);
89
- __decorate([
90
- InputNumber()
91
- ], G2MiniBarComponent.prototype, "borderWidth", void 0);
92
-
93
- const COMPONENTS = [G2MiniBarComponent];
94
- class G2MiniBarModule {
95
- }
96
- G2MiniBarModule.decorators = [
97
- { type: NgModule, args: [{
98
- imports: [CommonModule],
99
- declarations: COMPONENTS,
100
- exports: COMPONENTS
101
- },] }
102
- ];
103
-
104
- /**
105
- * Generated bundle index. Do not edit.
106
- */
107
-
108
- export { G2MiniBarComponent, G2MiniBarModule };
109
- //# sourceMappingURL=mini-bar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mini-bar.js","sources":["../../../../packages/chart/mini-bar/mini-bar.component.ts","../../../../packages/chart/mini-bar/mini-bar.module.ts","../../../../packages/chart/mini-bar/mini-bar.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\n\nimport type { Chart, Event } from '@antv/g2';\n\nimport { G2BaseComponent, genMiniTooltipOptions } from '@delon/chart/core';\nimport { InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport interface G2MiniBarData {\n x: NzSafeAny;\n y: NzSafeAny;\n color?: string | null;\n [key: string]: NzSafeAny;\n}\n\nexport interface G2MiniBarClickItem {\n item: G2MiniBarData;\n ev: Event;\n}\n\n@Component({\n selector: 'g2-mini-bar',\n exportAs: 'g2MiniBar',\n template: ``,\n host: {\n '[style.height.px]': 'height'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2MiniBarComponent extends G2BaseComponent {\n static ngAcceptInputType_height: NumberInput;\n static ngAcceptInputType_borderWidth: NumberInput;\n\n // #region fields\n\n @Input() color = '#1890FF';\n @Input() @InputNumber() height = 0;\n @Input() @InputNumber() borderWidth = 5;\n @Input() padding: number | number[] | 'auto' = [8, 8, 8, 8];\n @Input() data: G2MiniBarData[] = [];\n @Input() yTooltipSuffix = '';\n @Input() tooltipType: 'mini' | 'default' = 'default';\n @Output() readonly clickItem = new EventEmitter<G2MiniBarClickItem>();\n\n // #endregion\n\n install(): void {\n const { el, height, padding, yTooltipSuffix, tooltipType, theme, color, borderWidth } = this;\n const chart: Chart = (this._chart = new (window as NzSafeAny).G2.Chart({\n container: el.nativeElement,\n autoFit: true,\n height,\n padding,\n theme\n }));\n chart.scale({\n x: {\n type: 'cat'\n },\n y: {\n min: 0\n }\n });\n chart.legend(false);\n chart.axis(false);\n chart.tooltip(genMiniTooltipOptions(tooltipType, { showCrosshairs: false }));\n chart\n .interval()\n .position('x*y')\n .color('x*y', (x, y) => {\n const colorItem = this.data.find(w => w.x === x && w.y === y);\n return colorItem && colorItem.color ? colorItem.color : color;\n })\n .size(borderWidth)\n .tooltip('x*y', (x: NzSafeAny, y: NzSafeAny) => ({ name: x, value: y + yTooltipSuffix }));\n\n chart.on(`interval:click`, (ev: Event) => {\n this.ngZone.run(() => this.clickItem.emit({ item: ev.data?.data, ev }));\n });\n\n this.changeData();\n chart.render();\n }\n\n changeData(): void {\n const { _chart, data } = this;\n if (!_chart || !Array.isArray(data) || data.length <= 0) return;\n _chart.changeData(data);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { G2MiniBarComponent } from './mini-bar.component';\n\nconst COMPONENTS = [G2MiniBarComponent];\n\n@NgModule({\n imports: [CommonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class G2MiniBarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":"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"}
@@ -1,70 +0,0 @@
1
- import { __decorate } from 'tslib';
2
- import { Component, ChangeDetectionStrategy, ViewEncapsulation, ChangeDetectorRef, Input, NgModule } from '@angular/core';
3
- import { DelonLocaleService, DelonLocaleModule } from '@delon/theme';
4
- import { toNumber, InputNumber } from '@delon/util/decorator';
5
- import { CommonModule } from '@angular/common';
6
- import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
7
-
8
- class G2MiniProgressComponent {
9
- constructor(i18n, cdr) {
10
- this.i18n = i18n;
11
- this.cdr = cdr;
12
- this.color = '#1890FF';
13
- }
14
- fixNum(value) {
15
- return Math.min(Math.max(toNumber(value), 0), 100);
16
- }
17
- ngOnChanges() {
18
- this.target = this.fixNum(this.target);
19
- this.percent = this.fixNum(this.percent);
20
- this.cdr.detectChanges();
21
- }
22
- }
23
- G2MiniProgressComponent.decorators = [
24
- { type: Component, args: [{
25
- selector: 'g2-mini-progress',
26
- exportAs: 'g2MiniProgress',
27
- template: "<div\n nz-tooltip\n [nzTooltipTitle]=\"i18n.getData('miniProgress').target + target + '%'\"\n class=\"g2-mini-progress__target\"\n [ngStyle]=\"{ 'left.%': target }\"\n>\n <span class=\"g2-mini-progress__target-item\" [ngStyle]=\"{ 'background-color': color }\"></span>\n <span class=\"g2-mini-progress__target-item\" [ngStyle]=\"{ 'background-color': color }\"></span>\n</div>\n<div class=\"g2-mini-progress__wrap\">\n <div\n class=\"g2-mini-progress__value\"\n [ngStyle]=\"{ 'background-color': color, 'width.%': percent, 'height.px': strokeWidth }\"\n ></div>\n</div>\n",
28
- host: { '[class.g2-mini-progress]': 'true' },
29
- preserveWhitespaces: false,
30
- changeDetection: ChangeDetectionStrategy.OnPush,
31
- encapsulation: ViewEncapsulation.None
32
- },] }
33
- ];
34
- G2MiniProgressComponent.ctorParameters = () => [
35
- { type: DelonLocaleService },
36
- { type: ChangeDetectorRef }
37
- ];
38
- G2MiniProgressComponent.propDecorators = {
39
- color: [{ type: Input }],
40
- target: [{ type: Input }],
41
- percent: [{ type: Input }],
42
- strokeWidth: [{ type: Input }]
43
- };
44
- __decorate([
45
- InputNumber()
46
- ], G2MiniProgressComponent.prototype, "target", void 0);
47
- __decorate([
48
- InputNumber()
49
- ], G2MiniProgressComponent.prototype, "percent", void 0);
50
- __decorate([
51
- InputNumber()
52
- ], G2MiniProgressComponent.prototype, "strokeWidth", void 0);
53
-
54
- const COMPONENTS = [G2MiniProgressComponent];
55
- class G2MiniProgressModule {
56
- }
57
- G2MiniProgressModule.decorators = [
58
- { type: NgModule, args: [{
59
- imports: [CommonModule, DelonLocaleModule, NzToolTipModule],
60
- declarations: COMPONENTS,
61
- exports: COMPONENTS
62
- },] }
63
- ];
64
-
65
- /**
66
- * Generated bundle index. Do not edit.
67
- */
68
-
69
- export { G2MiniProgressComponent, G2MiniProgressModule };
70
- //# sourceMappingURL=mini-progress.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mini-progress.js","sources":["../../../../packages/chart/mini-progress/mini-progress.component.ts","../../../../packages/chart/mini-progress/mini-progress.module.ts","../../../../packages/chart/mini-progress/mini-progress.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Input,\n OnChanges,\n ViewEncapsulation\n} from '@angular/core';\n\nimport { DelonLocaleService } from '@delon/theme';\nimport { InputNumber, NumberInput, toNumber } from '@delon/util/decorator';\n\n@Component({\n selector: 'g2-mini-progress',\n exportAs: 'g2MiniProgress',\n templateUrl: './mini-progress.component.html',\n host: { '[class.g2-mini-progress]': 'true' },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class G2MiniProgressComponent implements OnChanges {\n static ngAcceptInputType_target: NumberInput;\n static ngAcceptInputType_percent: NumberInput;\n static ngAcceptInputType_strokeWidth: NumberInput;\n\n @Input() color = '#1890FF';\n @Input() @InputNumber() target: number;\n @Input() @InputNumber() percent: number;\n @Input() @InputNumber() strokeWidth: number;\n\n constructor(public i18n: DelonLocaleService, private cdr: ChangeDetectorRef) {}\n\n private fixNum(value: number): number {\n return Math.min(Math.max(toNumber(value), 0), 100);\n }\n\n ngOnChanges(): void {\n this.target = this.fixNum(this.target);\n this.percent = this.fixNum(this.percent);\n this.cdr.detectChanges();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DelonLocaleModule } from '@delon/theme';\nimport { NzToolTipModule } from 'ng-zorro-antd/tooltip';\n\nimport { G2MiniProgressComponent } from './mini-progress.component';\n\nconst COMPONENTS = [G2MiniProgressComponent];\n\n@NgModule({\n imports: [CommonModule, DelonLocaleModule, NzToolTipModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class G2MiniProgressModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MAqBa,uBAAuB;IAUlC,YAAmB,IAAwB,EAAU,GAAsB;QAAxD,SAAI,GAAJ,IAAI,CAAoB;QAAU,QAAG,GAAH,GAAG,CAAmB;QALlE,UAAK,GAAG,SAAS,CAAC;KAKoD;IAEvE,MAAM,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;KACpD;IAED,WAAW;QACT,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzC,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;KAC1B;;;YA7BF,SAAS,SAAC;gBACT,QAAQ,EAAE,kBAAkB;gBAC5B,QAAQ,EAAE,gBAAgB;gBAC1B,qlBAA6C;gBAC7C,IAAI,EAAE,EAAE,0BAA0B,EAAE,MAAM,EAAE;gBAC5C,mBAAmB,EAAE,KAAK;gBAC1B,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;aACtC;;;YAXQ,kBAAkB;YAPzB,iBAAiB;;;oBAwBhB,KAAK;qBACL,KAAK;sBACL,KAAK;0BACL,KAAK;;AAFkB;IAAd,WAAW,EAAE;uDAAgB;AACf;IAAd,WAAW,EAAE;wDAAiB;AAChB;IAAd,WAAW,EAAE;4DAAqB;;ACrB9C,MAAM,UAAU,GAAG,CAAC,uBAAuB,CAAC,CAAC;MAOhC,oBAAoB;;;YALhC,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,YAAY,EAAE,iBAAiB,EAAE,eAAe,CAAC;gBAC3D,YAAY,EAAE,UAAU;gBACxB,OAAO,EAAE,UAAU;aACpB;;;ACdD;;;;;;"}
@@ -1,61 +0,0 @@
1
- import { __decorate } from 'tslib';
2
- import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, NgModule } from '@angular/core';
3
- import { InputNumber } from '@delon/util/decorator';
4
- import { CommonModule } from '@angular/common';
5
- import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
6
- import { NzIconModule } from 'ng-zorro-antd/icon';
7
-
8
- class NumberInfoComponent {
9
- constructor() {
10
- /** 状态样式 */
11
- this.theme = 'light';
12
- /** 设置数字和描述直接的间距(像素) */
13
- this.gap = 8;
14
- }
15
- }
16
- NumberInfoComponent.decorators = [
17
- { type: Component, args: [{
18
- selector: 'number-info',
19
- exportAs: 'numberInfo',
20
- template: "<div *ngIf=\"title\" class=\"number-info__title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n</div>\n<div *ngIf=\"subTitle\" class=\"number-info__title-sub\">\n <ng-container *nzStringTemplateOutlet=\"subTitle\">{{ subTitle }}</ng-container>\n</div>\n<div class=\"number-info__value\" [ngStyle]=\"{ 'margin-top.px': gap }\">\n <span class=\"number-info__value-text\">\n <ng-container *nzStringTemplateOutlet=\"total\">{{ total }}</ng-container>\n <em class=\"number-info__value-suffix\" *ngIf=\"suffix\">{{ suffix }}</em>\n </span>\n <span *ngIf=\"status || subTotal\" class=\"number-info__value-text number-info__value-sub\">\n <ng-container *nzStringTemplateOutlet=\"subTotal\">{{ subTotal }}</ng-container>\n <i *ngIf=\"status\" nz-icon nzType=\"caret-{{ status }}\"></i>\n </span>\n</div>\n",
21
- host: {
22
- '[class.number-info]': `true`,
23
- '[class.number-info__light]': `theme === 'light'`,
24
- '[class.number-info__default]': `theme === 'default'`
25
- },
26
- preserveWhitespaces: false,
27
- changeDetection: ChangeDetectionStrategy.OnPush,
28
- encapsulation: ViewEncapsulation.None
29
- },] }
30
- ];
31
- NumberInfoComponent.propDecorators = {
32
- title: [{ type: Input }],
33
- subTitle: [{ type: Input }],
34
- total: [{ type: Input }],
35
- subTotal: [{ type: Input }],
36
- suffix: [{ type: Input }],
37
- status: [{ type: Input }],
38
- theme: [{ type: Input }],
39
- gap: [{ type: Input }]
40
- };
41
- __decorate([
42
- InputNumber()
43
- ], NumberInfoComponent.prototype, "gap", void 0);
44
-
45
- const COMPONENTS = [NumberInfoComponent];
46
- class NumberInfoModule {
47
- }
48
- NumberInfoModule.decorators = [
49
- { type: NgModule, args: [{
50
- imports: [CommonModule, NzIconModule, NzOutletModule],
51
- declarations: COMPONENTS,
52
- exports: COMPONENTS
53
- },] }
54
- ];
55
-
56
- /**
57
- * Generated bundle index. Do not edit.
58
- */
59
-
60
- export { NumberInfoComponent, NumberInfoModule };
61
- //# sourceMappingURL=number-info.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"number-info.js","sources":["../../../../packages/chart/number-info/number-info.component.ts","../../../../packages/chart/number-info/number-info.module.ts","../../../../packages/chart/number-info/number-info.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, TemplateRef, ViewEncapsulation } from '@angular/core';\n\nimport { InputNumber, NumberInput } from '@delon/util/decorator';\n\n@Component({\n selector: 'number-info',\n exportAs: 'numberInfo',\n templateUrl: './number-info.component.html',\n host: {\n '[class.number-info]': `true`,\n '[class.number-info__light]': `theme === 'light'`,\n '[class.number-info__default]': `theme === 'default'`\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class NumberInfoComponent {\n static ngAcceptInputType_gap: NumberInput;\n\n /** 标题 */\n @Input() title: string | TemplateRef<void>;\n /** 子标题 */\n @Input() subTitle: string | TemplateRef<void>;\n /** 总量 */\n @Input() total: string | number | TemplateRef<void>;\n /** 总量后缀 */\n @Input() subTotal: string | number | TemplateRef<void>;\n /** 子总量 */\n @Input() suffix: string;\n /** 增加状态 */\n @Input() status: 'up' | 'down';\n /** 状态样式 */\n @Input() theme: 'light' | 'default' = 'light';\n /** 设置数字和描述直接的间距(像素) */\n @Input() @InputNumber() gap = 8;\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\nimport { NumberInfoComponent } from './number-info.component';\n\nconst COMPONENTS = [NumberInfoComponent];\n\n@NgModule({\n imports: [CommonModule, NzIconModule, NzOutletModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class NumberInfoModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MAiBa,mBAAmB;IAbhC;;QA6BW,UAAK,GAAwB,OAAO,CAAC;;QAEtB,QAAG,GAAG,CAAC,CAAC;KACjC;;;YAhCA,SAAS,SAAC;gBACT,QAAQ,EAAE,aAAa;gBACvB,QAAQ,EAAE,YAAY;gBACtB,41BAA2C;gBAC3C,IAAI,EAAE;oBACJ,qBAAqB,EAAE,MAAM;oBAC7B,4BAA4B,EAAE,mBAAmB;oBACjD,8BAA8B,EAAE,qBAAqB;iBACtD;gBACD,mBAAmB,EAAE,KAAK;gBAC1B,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;aACtC;;;oBAKE,KAAK;uBAEL,KAAK;oBAEL,KAAK;uBAEL,KAAK;qBAEL,KAAK;qBAEL,KAAK;oBAEL,KAAK;kBAEL,KAAK;;AAAkB;IAAd,WAAW,EAAE;gDAAS;;AC3BlC,MAAM,UAAU,GAAG,CAAC,mBAAmB,CAAC,CAAC;MAO5B,gBAAgB;;;YAL5B,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,cAAc,CAAC;gBACrD,YAAY,EAAE,UAAU;gBACxB,OAAO,EAAE,UAAU;aACpB;;;ACdD;;;;;;"}
package/fesm2015/pie.js DELETED
@@ -1,219 +0,0 @@
1
- import { __decorate } from 'tslib';
2
- import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, NgModule } from '@angular/core';
3
- import { G2BaseComponent } from '@delon/chart/core';
4
- import { InputBoolean, InputNumber } from '@delon/util/decorator';
5
- import { CommonModule } from '@angular/common';
6
- import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
7
- import { NzDividerModule } from 'ng-zorro-antd/divider';
8
- import { NzSkeletonModule } from 'ng-zorro-antd/skeleton';
9
-
10
- class G2PieComponent extends G2BaseComponent {
11
- constructor() {
12
- super(...arguments);
13
- this.legendData = [];
14
- // #region fields
15
- this.animate = true;
16
- this.color = 'rgba(24, 144, 255, 0.85)';
17
- this.height = 0;
18
- this.hasLegend = false;
19
- this.inner = 0.75;
20
- this.padding = [12, 0, 12, 0];
21
- this.tooltip = true;
22
- this.lineWidth = 0;
23
- this.blockMaxWidth = 380;
24
- this.select = true;
25
- this.data = [];
26
- this.interaction = 'none';
27
- this.ratio = {
28
- text: '占比',
29
- inverse: '反比',
30
- color: '',
31
- inverseColor: '#F0F2F5'
32
- };
33
- this.clickItem = new EventEmitter();
34
- }
35
- // #endregion
36
- get block() {
37
- return this.hasLegend && this.el.nativeElement.clientWidth <= this.blockMaxWidth;
38
- }
39
- fixData() {
40
- const { percent, color } = this;
41
- this.isPercent = percent != null;
42
- if (!this.isPercent) {
43
- return;
44
- }
45
- this.select = false;
46
- this.tooltip = false;
47
- const { text, inverse, color: textColor, inverseColor } = this.ratio;
48
- this.percentColor = (value) => (value === text ? textColor || color : inverseColor);
49
- this.data = [
50
- {
51
- x: text,
52
- y: percent
53
- },
54
- {
55
- x: inverse,
56
- y: 100 - percent
57
- }
58
- ];
59
- }
60
- install() {
61
- const { node, height, padding, tooltip, inner, hasLegend, interaction, theme, animate, lineWidth, isPercent, percentColor, colors } = this;
62
- const chart = (this._chart = new window.G2.Chart({
63
- container: node.nativeElement,
64
- autoFit: true,
65
- height,
66
- padding,
67
- theme
68
- }));
69
- chart.animate(animate);
70
- if (!tooltip) {
71
- chart.tooltip(false);
72
- }
73
- else {
74
- chart.tooltip({
75
- showTitle: false,
76
- showMarkers: false
77
- });
78
- }
79
- if (interaction !== 'none') {
80
- chart.interaction(interaction);
81
- }
82
- chart.axis(false).legend(false).coordinate('theta', { innerRadius: inner });
83
- chart.filter('x', (_val, item) => item.checked !== false);
84
- chart
85
- .interval()
86
- .adjust('stack')
87
- .position('y')
88
- .style({ lineWidth, stroke: '#fff' })
89
- .color('x', isPercent ? percentColor : colors)
90
- .tooltip('x*percent', (name, p) => ({
91
- name,
92
- value: `${hasLegend ? p : (p * 100).toFixed(2)} %`
93
- }))
94
- .state({});
95
- chart.scale({
96
- x: {
97
- type: 'cat',
98
- range: [0, 1]
99
- }
100
- });
101
- chart.on(`interval:click`, (ev) => {
102
- this.ngZone.run(() => { var _a; return this.clickItem.emit({ item: (_a = ev.data) === null || _a === void 0 ? void 0 : _a.data, ev }); });
103
- });
104
- this.changeData();
105
- chart.render();
106
- }
107
- changeData() {
108
- const { _chart, data } = this;
109
- if (!_chart || !Array.isArray(data) || data.length <= 0)
110
- return;
111
- // 转化 percent
112
- const totalSum = data.reduce((cur, item) => cur + item.y, 0);
113
- for (const item of data) {
114
- item.percent = totalSum === 0 ? 0 : item.y / totalSum;
115
- }
116
- _chart.changeData(data);
117
- this.ngZone.run(() => this.genLegend());
118
- }
119
- genLegend() {
120
- const { hasLegend, isPercent, cdr, _chart } = this;
121
- if (!hasLegend || isPercent)
122
- return;
123
- this.legendData = _chart.geometries[0].dataArray.map((item) => {
124
- const origin = item[0]._origin;
125
- origin.color = item[0].color;
126
- origin.checked = true;
127
- origin.percent = (origin.percent * 100).toFixed(2);
128
- return origin;
129
- });
130
- cdr.detectChanges();
131
- }
132
- _click(i) {
133
- const { legendData, _chart } = this;
134
- legendData[i].checked = !legendData[i].checked;
135
- _chart.render(true);
136
- }
137
- onChanges() {
138
- this.fixData();
139
- }
140
- }
141
- G2PieComponent.decorators = [
142
- { type: Component, args: [{
143
- selector: 'g2-pie',
144
- exportAs: 'g2Pie',
145
- template: "<nz-skeleton *ngIf=\"!loaded\"></nz-skeleton>\n<div class=\"g2-pie__chart\">\n <div #container></div>\n <div *ngIf=\"subTitle || total\" class=\"g2-pie__total\">\n <h4 *ngIf=\"subTitle\" class=\"g2-pie__total-title\">\n <ng-container *nzStringTemplateOutlet=\"subTitle\">\n <div [innerHTML]=\"subTitle\"></div>\n </ng-container>\n </h4>\n <div *ngIf=\"total\" class=\"g2-pie__total-stat\">\n <ng-container *nzStringTemplateOutlet=\"total\">\n <div [innerHTML]=\"total\"></div>\n </ng-container>\n </div>\n </div>\n</div>\n<ul *ngIf=\"hasLegend && legendData?.length\" class=\"g2-pie__legend\">\n <li *ngFor=\"let item of legendData; let index = index\" (click)=\"_click(index)\" class=\"g2-pie__legend-item\">\n <span class=\"g2-pie__legend-dot\" [ngStyle]=\"{ 'background-color': !item.checked ? '#aaa' : item.color }\"></span>\n <span class=\"g2-pie__legend-title\">{{ item.x }}</span>\n <nz-divider nzType=\"vertical\"></nz-divider>\n <span class=\"g2-pie__legend-percent\">{{ item.percent }}%</span>\n <span class=\"g2-pie__legend-value\" [innerHTML]=\"valueFormat ? valueFormat(item.y) : item.y\"></span>\n </li>\n</ul>\n",
146
- host: {
147
- '[class.g2-pie]': 'true',
148
- '[class.g2-pie__legend-has]': 'hasLegend',
149
- '[class.g2-pie__legend-block]': 'block',
150
- '[class.g2-pie__mini]': 'isPercent'
151
- },
152
- preserveWhitespaces: false,
153
- changeDetection: ChangeDetectionStrategy.OnPush,
154
- encapsulation: ViewEncapsulation.None
155
- },] }
156
- ];
157
- G2PieComponent.propDecorators = {
158
- animate: [{ type: Input }],
159
- color: [{ type: Input }],
160
- subTitle: [{ type: Input }],
161
- total: [{ type: Input }],
162
- height: [{ type: Input }],
163
- hasLegend: [{ type: Input }],
164
- inner: [{ type: Input }],
165
- padding: [{ type: Input }],
166
- percent: [{ type: Input }],
167
- tooltip: [{ type: Input }],
168
- lineWidth: [{ type: Input }],
169
- blockMaxWidth: [{ type: Input }],
170
- select: [{ type: Input }],
171
- valueFormat: [{ type: Input }],
172
- data: [{ type: Input }],
173
- colors: [{ type: Input }],
174
- interaction: [{ type: Input }],
175
- ratio: [{ type: Input }],
176
- clickItem: [{ type: Output }]
177
- };
178
- __decorate([
179
- InputBoolean()
180
- ], G2PieComponent.prototype, "animate", void 0);
181
- __decorate([
182
- InputNumber()
183
- ], G2PieComponent.prototype, "height", void 0);
184
- __decorate([
185
- InputBoolean()
186
- ], G2PieComponent.prototype, "hasLegend", void 0);
187
- __decorate([
188
- InputNumber()
189
- ], G2PieComponent.prototype, "percent", void 0);
190
- __decorate([
191
- InputBoolean()
192
- ], G2PieComponent.prototype, "tooltip", void 0);
193
- __decorate([
194
- InputNumber()
195
- ], G2PieComponent.prototype, "lineWidth", void 0);
196
- __decorate([
197
- InputNumber()
198
- ], G2PieComponent.prototype, "blockMaxWidth", void 0);
199
- __decorate([
200
- InputBoolean()
201
- ], G2PieComponent.prototype, "select", void 0);
202
-
203
- const COMPONENTS = [G2PieComponent];
204
- class G2PieModule {
205
- }
206
- G2PieModule.decorators = [
207
- { type: NgModule, args: [{
208
- imports: [CommonModule, NzDividerModule, NzOutletModule, NzSkeletonModule],
209
- declarations: COMPONENTS,
210
- exports: COMPONENTS
211
- },] }
212
- ];
213
-
214
- /**
215
- * Generated bundle index. Do not edit.
216
- */
217
-
218
- export { G2PieComponent, G2PieModule };
219
- //# sourceMappingURL=pie.js.map