@visactor/vchart 0.0.1-alpha.2 → 0.2.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (896) hide show
  1. package/README.md +82 -1
  2. package/build/index.js +2680 -2068
  3. package/build/index.min.js +2 -2
  4. package/cjs/animation/utils.d.ts +2 -1
  5. package/cjs/animation/utils.js.map +1 -1
  6. package/cjs/chart/base-chart.js +2 -2
  7. package/cjs/chart/base-chart.js.map +1 -1
  8. package/cjs/chart/{boxplot/boxPlot.js → box-plot/box-plot.js} +1 -1
  9. package/cjs/chart/box-plot/box-plot.js.map +1 -0
  10. package/{esm/chart/boxplot → cjs/chart/box-plot}/index.d.ts +1 -1
  11. package/cjs/chart/{boxplot → box-plot}/index.js +1 -1
  12. package/cjs/chart/box-plot/index.js.map +1 -0
  13. package/cjs/chart/box-plot/interface.js.map +1 -0
  14. package/cjs/chart/index.d.ts +3 -1
  15. package/cjs/chart/index.js +2 -1
  16. package/cjs/chart/index.js.map +1 -1
  17. package/cjs/chart/treemap/treemap.js.map +1 -1
  18. package/cjs/compile/compilable-base.js +1 -1
  19. package/cjs/compile/compiler.d.ts +2 -2
  20. package/cjs/compile/compiler.js +24 -25
  21. package/cjs/compile/compiler.js.map +1 -1
  22. package/cjs/compile/grammar-item.js +1 -1
  23. package/cjs/compile/mark/interface.js.map +1 -1
  24. package/cjs/compile/util.js +1 -1
  25. package/cjs/component/axis/base-axis.d.ts +70 -1
  26. package/cjs/component/axis/base-axis.js +93 -4
  27. package/cjs/component/axis/base-axis.js.map +1 -1
  28. package/cjs/component/axis/cartesian/axis.d.ts +0 -1
  29. package/cjs/component/axis/cartesian/axis.js +3 -6
  30. package/cjs/component/axis/cartesian/axis.js.map +1 -1
  31. package/cjs/component/axis/polar/axis.d.ts +0 -1
  32. package/cjs/component/axis/polar/axis.js +3 -6
  33. package/cjs/component/axis/polar/axis.js.map +1 -1
  34. package/cjs/component/axis/utils.d.ts +13 -70
  35. package/cjs/component/axis/utils.js +23 -109
  36. package/cjs/component/axis/utils.js.map +1 -1
  37. package/cjs/component/base/base-component.d.ts +0 -5
  38. package/cjs/component/base/base-component.js +8 -19
  39. package/cjs/component/base/base-component.js.map +1 -1
  40. package/cjs/component/base/util.d.ts +1 -1
  41. package/cjs/component/base/util.js +20 -9
  42. package/cjs/component/base/util.js.map +1 -1
  43. package/cjs/component/crosshair/base.d.ts +0 -1
  44. package/cjs/component/crosshair/base.js +1 -4
  45. package/cjs/component/crosshair/base.js.map +1 -1
  46. package/cjs/component/custom-mark/custom-mark.js +4 -1
  47. package/cjs/component/custom-mark/custom-mark.js.map +1 -1
  48. package/cjs/component/data-zoom/data-filter-base-component.d.ts +1 -1
  49. package/cjs/component/data-zoom/data-filter-base-component.js +2 -2
  50. package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
  51. package/cjs/component/index.js +1 -1
  52. package/cjs/component/interface/index.d.ts +1 -0
  53. package/cjs/component/interface/index.js +1 -1
  54. package/cjs/component/interface/index.js.map +1 -1
  55. package/cjs/component/interface/theme.d.ts +38 -0
  56. package/cjs/component/interface/theme.js +6 -0
  57. package/cjs/component/interface/theme.js.map +1 -0
  58. package/cjs/component/label/label.d.ts +0 -1
  59. package/cjs/component/label/label.js +12 -6
  60. package/cjs/component/label/label.js.map +1 -1
  61. package/cjs/component/legend/base-legend.js +5 -2
  62. package/cjs/component/legend/base-legend.js.map +1 -1
  63. package/cjs/component/legend/continuous/legend.d.ts +1 -1
  64. package/cjs/component/legend/continuous/legend.js +2 -2
  65. package/cjs/component/legend/continuous/legend.js.map +1 -1
  66. package/cjs/component/legend/discrete/legend.d.ts +1 -1
  67. package/cjs/component/legend/discrete/legend.js +2 -2
  68. package/cjs/component/legend/discrete/legend.js.map +1 -1
  69. package/cjs/component/legend/util.d.ts +4 -4
  70. package/cjs/component/map-label/component.js +2 -2
  71. package/cjs/component/map-label/component.js.map +1 -1
  72. package/cjs/component/map-label/interface.d.ts +6 -4
  73. package/cjs/component/map-label/interface.js.map +1 -1
  74. package/cjs/component/marker/utils.js +14 -9
  75. package/cjs/component/marker/utils.js.map +1 -1
  76. package/cjs/component/player/interface/theme.d.ts +2 -1
  77. package/cjs/component/player/interface/theme.js.map +1 -1
  78. package/cjs/component/player/player.d.ts +0 -1
  79. package/cjs/component/player/player.js +0 -3
  80. package/cjs/component/player/player.js.map +1 -1
  81. package/cjs/component/player/utils/transform.js.map +1 -1
  82. package/cjs/component/title/interface/theme.d.ts +4 -2
  83. package/cjs/component/title/interface/theme.js.map +1 -1
  84. package/cjs/component/title/title.d.ts +1 -1
  85. package/cjs/component/title/title.js +4 -6
  86. package/cjs/component/title/title.js.map +1 -1
  87. package/cjs/component/tooltip/handler/base.d.ts +5 -3
  88. package/cjs/component/tooltip/handler/base.js +9 -8
  89. package/cjs/component/tooltip/handler/base.js.map +1 -1
  90. package/cjs/component/tooltip/handler/canvas/canvas-tooltip-handler.d.ts +4 -5
  91. package/cjs/component/tooltip/handler/canvas/canvas-tooltip-handler.js +4 -4
  92. package/cjs/component/tooltip/handler/canvas/canvas-tooltip-handler.js.map +1 -1
  93. package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.d.ts +2 -4
  94. package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js +2 -2
  95. package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
  96. package/cjs/component/tooltip/handler/dom/model/base-tooltip-model.d.ts +1 -1
  97. package/cjs/component/tooltip/tooltip.js +1 -1
  98. package/cjs/component/tooltip/tooltip.js.map +1 -1
  99. package/cjs/constant/box-plot.js +1 -2
  100. package/cjs/constant/label.js +2 -1
  101. package/cjs/core/factory.d.ts +1 -0
  102. package/cjs/core/factory.js +3 -0
  103. package/cjs/core/factory.js.map +1 -1
  104. package/cjs/core/instance-manager.d.ts +9 -0
  105. package/cjs/core/instance-manager.js +26 -0
  106. package/cjs/core/instance-manager.js.map +1 -0
  107. package/cjs/core/interface.js +1 -2
  108. package/cjs/core/vchart.d.ts +2 -6
  109. package/cjs/core/vchart.js +10 -23
  110. package/cjs/core/vchart.js.map +1 -1
  111. package/cjs/event/event.js +2 -1
  112. package/cjs/index.d.ts +1 -1
  113. package/cjs/index.js +1 -1
  114. package/cjs/index.js.map +1 -1
  115. package/cjs/mark/arc.d.ts +1 -1
  116. package/cjs/mark/arc.js +4 -3
  117. package/cjs/mark/arc.js.map +1 -1
  118. package/cjs/mark/area.d.ts +3 -2
  119. package/cjs/mark/area.js +8 -4
  120. package/cjs/mark/area.js.map +1 -1
  121. package/cjs/mark/base/base-mark.js +2 -1
  122. package/cjs/mark/base/base-mark.js.map +1 -1
  123. package/cjs/mark/base/index.d.ts +1 -2
  124. package/cjs/mark/base/index.js +1 -10
  125. package/cjs/mark/base/index.js.map +1 -1
  126. package/{esm/mark/boxPlot.d.ts → cjs/mark/box-plot.d.ts} +1 -1
  127. package/cjs/mark/{boxPlot.js → box-plot.js} +3 -3
  128. package/{esm/mark/boxPlot.js.map → cjs/mark/box-plot.js.map} +1 -1
  129. package/cjs/mark/component.d.ts +1 -1
  130. package/cjs/mark/component.js +2 -2
  131. package/cjs/mark/component.js.map +1 -1
  132. package/cjs/mark/line.d.ts +1 -1
  133. package/cjs/mark/line.js +2 -2
  134. package/cjs/mark/line.js.map +1 -1
  135. package/cjs/mark/linkPath.d.ts +1 -1
  136. package/cjs/mark/linkPath.js +4 -3
  137. package/cjs/mark/linkPath.js.map +1 -1
  138. package/cjs/mark/mark-set/index.d.ts +6 -5
  139. package/cjs/mark/mark-set/index.js +15 -12
  140. package/cjs/mark/mark-set/index.js.map +1 -1
  141. package/cjs/mark/path.d.ts +1 -1
  142. package/cjs/mark/path.js +2 -2
  143. package/cjs/mark/path.js.map +1 -1
  144. package/cjs/mark/polygon.d.ts +1 -1
  145. package/cjs/mark/polygon.js +3 -3
  146. package/cjs/mark/polygon.js.map +1 -1
  147. package/cjs/mark/progress-arc.js +1 -1
  148. package/cjs/mark/rect.d.ts +1 -1
  149. package/cjs/mark/rect.js +6 -5
  150. package/cjs/mark/rect.js.map +1 -1
  151. package/cjs/mark/rule.d.ts +1 -1
  152. package/cjs/mark/rule.js +3 -3
  153. package/cjs/mark/rule.js.map +1 -1
  154. package/cjs/mark/symbol.d.ts +1 -1
  155. package/cjs/mark/symbol.js +5 -4
  156. package/cjs/mark/symbol.js.map +1 -1
  157. package/cjs/mark/text.d.ts +1 -1
  158. package/cjs/mark/text.js +5 -4
  159. package/cjs/mark/text.js.map +1 -1
  160. package/cjs/model/base-model.d.ts +12 -5
  161. package/cjs/model/base-model.js +52 -29
  162. package/cjs/model/base-model.js.map +1 -1
  163. package/cjs/model/interface.d.ts +8 -2
  164. package/cjs/model/interface.js.map +1 -1
  165. package/cjs/model/layout-item.js +20 -18
  166. package/cjs/model/layout-item.js.map +1 -1
  167. package/cjs/region/region.d.ts +1 -4
  168. package/cjs/region/region.js +16 -13
  169. package/cjs/region/region.js.map +1 -1
  170. package/cjs/scale/color-ordinal-scale.d.ts +8 -0
  171. package/cjs/scale/color-ordinal-scale.js +24 -0
  172. package/cjs/scale/color-ordinal-scale.js.map +1 -0
  173. package/cjs/scale/global-scale.js +2 -1
  174. package/cjs/scale/global-scale.js.map +1 -1
  175. package/cjs/series/area/area.d.ts +2 -0
  176. package/cjs/series/area/area.js +15 -9
  177. package/cjs/series/area/area.js.map +1 -1
  178. package/cjs/series/area/interface.d.ts +5 -5
  179. package/cjs/series/area/interface.js.map +1 -1
  180. package/cjs/series/bar/bar.d.ts +6 -0
  181. package/cjs/series/bar/bar.js +24 -8
  182. package/cjs/series/bar/bar.js.map +1 -1
  183. package/cjs/series/bar/interface.d.ts +5 -4
  184. package/cjs/series/bar/interface.js.map +1 -1
  185. package/cjs/series/base/base-series.d.ts +10 -11
  186. package/cjs/series/base/base-series.js +53 -31
  187. package/cjs/series/base/base-series.js.map +1 -1
  188. package/{esm/series/box-plot/boxPlot.d.ts → cjs/series/box-plot/box-plot.d.ts} +2 -0
  189. package/cjs/series/box-plot/{boxPlot.js → box-plot.js} +16 -6
  190. package/cjs/series/box-plot/box-plot.js.map +1 -0
  191. package/cjs/series/box-plot/interface.d.ts +3 -2
  192. package/cjs/series/box-plot/interface.js.map +1 -1
  193. package/cjs/series/box-plot/tooltip-helper.js.map +1 -1
  194. package/cjs/series/cartesian/cartesian.d.ts +1 -1
  195. package/cjs/series/circle-packing/circle-packing.d.ts +2 -0
  196. package/cjs/series/circle-packing/circle-packing.js +13 -8
  197. package/cjs/series/circle-packing/circle-packing.js.map +1 -1
  198. package/cjs/series/circle-packing/interface.d.ts +5 -4
  199. package/cjs/series/circle-packing/interface.js.map +1 -1
  200. package/cjs/series/dot/dot.d.ts +6 -8
  201. package/cjs/series/dot/dot.js +43 -17
  202. package/cjs/series/dot/dot.js.map +1 -1
  203. package/cjs/series/dot/interface.d.ts +10 -10
  204. package/cjs/series/dot/interface.js.map +1 -1
  205. package/cjs/series/funnel/funnel.d.ts +12 -2
  206. package/cjs/series/funnel/funnel.js +84 -23
  207. package/cjs/series/funnel/funnel.js.map +1 -1
  208. package/cjs/series/funnel/interface.d.ts +16 -15
  209. package/cjs/series/funnel/interface.js.map +1 -1
  210. package/cjs/series/gauge/gauge-pointer.d.ts +2 -0
  211. package/cjs/series/gauge/gauge-pointer.js +22 -6
  212. package/cjs/series/gauge/gauge-pointer.js.map +1 -1
  213. package/cjs/series/gauge/gauge.d.ts +3 -2
  214. package/cjs/series/gauge/gauge.js +26 -17
  215. package/cjs/series/gauge/gauge.js.map +1 -1
  216. package/cjs/series/gauge/interface.d.ts +12 -11
  217. package/cjs/series/gauge/interface.js.map +1 -1
  218. package/cjs/series/heatmap/heatmap.d.ts +3 -1
  219. package/cjs/series/heatmap/heatmap.js +18 -9
  220. package/cjs/series/heatmap/heatmap.js.map +1 -1
  221. package/cjs/series/heatmap/interface.d.ts +6 -5
  222. package/cjs/series/heatmap/interface.js.map +1 -1
  223. package/cjs/series/interface/common.d.ts +56 -1
  224. package/cjs/series/interface/common.js +24 -1
  225. package/cjs/series/interface/common.js.map +1 -1
  226. package/cjs/series/interface/series.d.ts +2 -1
  227. package/cjs/series/interface/series.js.map +1 -1
  228. package/cjs/series/line/line.d.ts +2 -0
  229. package/cjs/series/line/line.js +7 -5
  230. package/cjs/series/line/line.js.map +1 -1
  231. package/cjs/series/link/interface.d.ts +4 -4
  232. package/cjs/series/link/interface.js.map +1 -1
  233. package/cjs/series/link/link.d.ts +4 -7
  234. package/cjs/series/link/link.js +20 -14
  235. package/cjs/series/link/link.js.map +1 -1
  236. package/cjs/series/map/map.d.ts +2 -0
  237. package/cjs/series/map/map.js +13 -6
  238. package/cjs/series/map/map.js.map +1 -1
  239. package/cjs/series/mixin/line-mixin.d.ts +4 -3
  240. package/cjs/series/mixin/line-mixin.js +15 -7
  241. package/cjs/series/mixin/line-mixin.js.map +1 -1
  242. package/cjs/series/pie/interface.d.ts +7 -6
  243. package/cjs/series/pie/interface.js.map +1 -1
  244. package/cjs/series/pie/pie.d.ts +8 -3
  245. package/cjs/series/pie/pie.js +61 -33
  246. package/cjs/series/pie/pie.js.map +1 -1
  247. package/cjs/series/progress/circular/circular.d.ts +2 -0
  248. package/cjs/series/progress/circular/circular.js +16 -9
  249. package/cjs/series/progress/circular/circular.js.map +1 -1
  250. package/cjs/series/progress/circular/interface.d.ts +5 -4
  251. package/cjs/series/progress/circular/interface.js.map +1 -1
  252. package/cjs/series/progress/linear/interface.d.ts +6 -5
  253. package/cjs/series/progress/linear/interface.js.map +1 -1
  254. package/cjs/series/progress/linear/linear.d.ts +2 -0
  255. package/cjs/series/progress/linear/linear.js +31 -21
  256. package/cjs/series/progress/linear/linear.js.map +1 -1
  257. package/cjs/series/radar/interface.d.ts +5 -4
  258. package/cjs/series/radar/interface.js.map +1 -1
  259. package/cjs/series/radar/radar.d.ts +2 -0
  260. package/cjs/series/radar/radar.js +9 -4
  261. package/cjs/series/radar/radar.js.map +1 -1
  262. package/cjs/series/range-area/range-area.d.ts +2 -0
  263. package/cjs/series/range-area/range-area.js +4 -3
  264. package/cjs/series/range-area/range-area.js.map +1 -1
  265. package/cjs/series/range-column/interface.d.ts +9 -8
  266. package/cjs/series/range-column/interface.js.map +1 -1
  267. package/cjs/series/range-column/rangeColumn.d.ts +2 -0
  268. package/cjs/series/range-column/rangeColumn.js +28 -19
  269. package/cjs/series/range-column/rangeColumn.js.map +1 -1
  270. package/cjs/series/rose/interface.d.ts +3 -2
  271. package/cjs/series/rose/interface.js.map +1 -1
  272. package/cjs/series/rose/rose.d.ts +2 -0
  273. package/cjs/series/rose/rose.js +14 -13
  274. package/cjs/series/rose/rose.js.map +1 -1
  275. package/cjs/series/sankey/animation.js.map +1 -1
  276. package/cjs/series/sankey/interface.d.ts +7 -6
  277. package/cjs/series/sankey/interface.js.map +1 -1
  278. package/cjs/series/sankey/sankey.d.ts +2 -0
  279. package/cjs/series/sankey/sankey.js +25 -22
  280. package/cjs/series/sankey/sankey.js.map +1 -1
  281. package/cjs/series/scatter/interface.d.ts +6 -5
  282. package/cjs/series/scatter/interface.js.map +1 -1
  283. package/cjs/series/scatter/scatter.d.ts +2 -0
  284. package/cjs/series/scatter/scatter.js +15 -10
  285. package/cjs/series/scatter/scatter.js.map +1 -1
  286. package/cjs/series/sunburst/interface.d.ts +5 -4
  287. package/cjs/series/sunburst/interface.js.map +1 -1
  288. package/cjs/series/sunburst/sunburst.d.ts +3 -1
  289. package/cjs/series/sunburst/sunburst.js +9 -4
  290. package/cjs/series/sunburst/sunburst.js.map +1 -1
  291. package/cjs/series/treemap/interface.d.ts +9 -8
  292. package/cjs/series/treemap/interface.js.map +1 -1
  293. package/cjs/series/treemap/treemap.d.ts +2 -0
  294. package/cjs/series/treemap/treemap.js +19 -6
  295. package/cjs/series/treemap/treemap.js.map +1 -1
  296. package/cjs/series/waterfall/interface.d.ts +6 -5
  297. package/cjs/series/waterfall/interface.js.map +1 -1
  298. package/cjs/series/waterfall/waterfall.d.ts +2 -0
  299. package/cjs/series/waterfall/waterfall.js +15 -5
  300. package/cjs/series/waterfall/waterfall.js.map +1 -1
  301. package/cjs/series/word-cloud/interface.d.ts +7 -6
  302. package/cjs/series/word-cloud/interface.js.map +1 -1
  303. package/cjs/series/word-cloud/word-cloud.d.ts +4 -3
  304. package/cjs/series/word-cloud/word-cloud.js +22 -11
  305. package/cjs/series/word-cloud/word-cloud.js.map +1 -1
  306. package/cjs/theme/buildin-theme/config.d.ts +1 -4
  307. package/cjs/theme/buildin-theme/config.js +2 -18
  308. package/cjs/theme/buildin-theme/config.js.map +1 -1
  309. package/cjs/theme/buildin-theme/dark.js.map +1 -1
  310. package/cjs/theme/buildin-theme/light/color-scheme.js +14 -1
  311. package/cjs/theme/buildin-theme/light/color-scheme.js.map +1 -1
  312. package/cjs/theme/buildin-theme/light/component/axis/band-axis.d.ts +2 -0
  313. package/cjs/theme/buildin-theme/light/component/axis/band-axis.js +22 -0
  314. package/cjs/theme/buildin-theme/light/component/axis/band-axis.js.map +1 -0
  315. package/cjs/theme/buildin-theme/light/component/{cartesian-axis.d.ts → axis/cartesian-axis.d.ts} +1 -1
  316. package/cjs/theme/buildin-theme/light/component/{cartesian-axis.js → axis/cartesian-axis.js} +7 -9
  317. package/cjs/theme/buildin-theme/light/component/axis/cartesian-axis.js.map +1 -0
  318. package/cjs/theme/buildin-theme/light/component/axis/common-axis.d.ts +2 -0
  319. package/cjs/theme/buildin-theme/light/component/{common-axis.js → axis/common-axis.js} +32 -14
  320. package/cjs/theme/buildin-theme/light/component/axis/common-axis.js.map +1 -0
  321. package/cjs/theme/buildin-theme/light/component/axis/linear-axis.d.ts +2 -0
  322. package/cjs/theme/buildin-theme/light/component/axis/linear-axis.js +22 -0
  323. package/cjs/theme/buildin-theme/light/component/axis/linear-axis.js.map +1 -0
  324. package/cjs/theme/buildin-theme/light/component/{polar-axis.d.ts → axis/polar-axis.d.ts} +1 -1
  325. package/cjs/theme/buildin-theme/light/component/axis/polar-axis.js +25 -0
  326. package/cjs/theme/buildin-theme/light/component/axis/polar-axis.js.map +1 -0
  327. package/cjs/theme/buildin-theme/light/component/crosshair.js +9 -5
  328. package/cjs/theme/buildin-theme/light/component/crosshair.js.map +1 -1
  329. package/cjs/theme/buildin-theme/light/component/index.d.ts +2 -0
  330. package/cjs/theme/buildin-theme/light/component/index.js +32 -0
  331. package/cjs/theme/buildin-theme/light/component/index.js.map +1 -0
  332. package/cjs/theme/buildin-theme/light/component/legend/color-legend.d.ts +2 -0
  333. package/cjs/theme/buildin-theme/light/component/{color-legend.js → legend/color-legend.js} +3 -3
  334. package/cjs/theme/buildin-theme/light/component/legend/color-legend.js.map +1 -0
  335. package/cjs/theme/buildin-theme/light/component/legend/continuous.d.ts +2 -0
  336. package/cjs/theme/buildin-theme/light/component/legend/continuous.js +60 -0
  337. package/cjs/theme/buildin-theme/light/component/legend/continuous.js.map +1 -0
  338. package/cjs/theme/buildin-theme/light/component/legend/discrete-legend.d.ts +2 -0
  339. package/cjs/theme/buildin-theme/light/component/{discrete-legend.js → legend/discrete-legend.js} +17 -6
  340. package/cjs/theme/buildin-theme/light/component/legend/discrete-legend.js.map +1 -0
  341. package/cjs/theme/buildin-theme/light/component/legend/size-legend.d.ts +2 -0
  342. package/cjs/theme/buildin-theme/light/component/{size-legend.js → legend/size-legend.js} +3 -3
  343. package/cjs/theme/buildin-theme/light/component/legend/size-legend.js.map +1 -0
  344. package/cjs/theme/buildin-theme/light/component/map-label.d.ts +2 -0
  345. package/cjs/{component/map-label/config.js → theme/buildin-theme/light/component/map-label.js} +8 -8
  346. package/cjs/theme/buildin-theme/light/component/map-label.js.map +1 -0
  347. package/cjs/theme/buildin-theme/light/component/player.js +20 -11
  348. package/cjs/theme/buildin-theme/light/component/player.js.map +1 -1
  349. package/cjs/theme/buildin-theme/light/component/title.js +19 -3
  350. package/cjs/theme/buildin-theme/light/component/title.js.map +1 -1
  351. package/cjs/theme/buildin-theme/light/component/tooltip.js +7 -3
  352. package/cjs/theme/buildin-theme/light/component/tooltip.js.map +1 -1
  353. package/cjs/theme/buildin-theme/light/constants.d.ts +2 -0
  354. package/cjs/theme/buildin-theme/light/constants.js +16 -0
  355. package/cjs/theme/buildin-theme/light/constants.js.map +1 -0
  356. package/cjs/theme/buildin-theme/light/index.js +5 -20
  357. package/cjs/theme/buildin-theme/light/index.js.map +1 -1
  358. package/cjs/theme/buildin-theme/light/mark.d.ts +3 -0
  359. package/cjs/theme/buildin-theme/light/mark.js +72 -0
  360. package/cjs/theme/buildin-theme/light/mark.js.map +1 -0
  361. package/cjs/theme/buildin-theme/light/series/area.js +2 -12
  362. package/cjs/theme/buildin-theme/light/series/area.js.map +1 -1
  363. package/cjs/theme/buildin-theme/light/series/bar.js +2 -2
  364. package/cjs/theme/buildin-theme/light/series/bar.js.map +1 -1
  365. package/cjs/theme/buildin-theme/light/series/bar3d.js +2 -2
  366. package/cjs/theme/buildin-theme/light/series/bar3d.js.map +1 -1
  367. package/cjs/theme/buildin-theme/light/series/box-plot.d.ts +2 -0
  368. package/cjs/theme/buildin-theme/light/series/box-plot.js +12 -0
  369. package/cjs/theme/buildin-theme/light/series/box-plot.js.map +1 -0
  370. package/cjs/theme/buildin-theme/light/series/circular-progress.js +11 -1
  371. package/cjs/theme/buildin-theme/light/series/circular-progress.js.map +1 -1
  372. package/cjs/theme/buildin-theme/light/series/funnel.js +8 -5
  373. package/cjs/theme/buildin-theme/light/series/funnel.js.map +1 -1
  374. package/cjs/theme/buildin-theme/light/series/funnel3d.js +9 -6
  375. package/cjs/theme/buildin-theme/light/series/funnel3d.js.map +1 -1
  376. package/cjs/theme/buildin-theme/light/series/gauge.js +6 -1
  377. package/cjs/theme/buildin-theme/light/series/gauge.js.map +1 -1
  378. package/cjs/theme/buildin-theme/light/series/index.js +5 -2
  379. package/cjs/theme/buildin-theme/light/series/index.js.map +1 -1
  380. package/cjs/theme/buildin-theme/light/series/line.js +2 -7
  381. package/cjs/theme/buildin-theme/light/series/line.js.map +1 -1
  382. package/cjs/theme/buildin-theme/light/series/linear-progress.js +5 -0
  383. package/cjs/theme/buildin-theme/light/series/linear-progress.js.map +1 -1
  384. package/cjs/theme/buildin-theme/light/series/map.js +8 -4
  385. package/cjs/theme/buildin-theme/light/series/map.js.map +1 -1
  386. package/cjs/theme/buildin-theme/light/series/pie.js +9 -2
  387. package/cjs/theme/buildin-theme/light/series/pie.js.map +1 -1
  388. package/cjs/theme/buildin-theme/light/series/pie3d.js +4 -3
  389. package/cjs/theme/buildin-theme/light/series/pie3d.js.map +1 -1
  390. package/cjs/theme/buildin-theme/light/series/radar.js +2 -12
  391. package/cjs/theme/buildin-theme/light/series/radar.js.map +1 -1
  392. package/cjs/theme/buildin-theme/light/series/rangeColumn.js +2 -2
  393. package/cjs/theme/buildin-theme/light/series/rangeColumn.js.map +1 -1
  394. package/cjs/theme/buildin-theme/light/series/rose.d.ts +2 -0
  395. package/cjs/theme/buildin-theme/light/series/rose.js +20 -0
  396. package/cjs/theme/buildin-theme/light/series/rose.js.map +1 -0
  397. package/cjs/theme/buildin-theme/light/series/sankey.d.ts +2 -0
  398. package/cjs/theme/buildin-theme/light/series/sankey.js +14 -0
  399. package/cjs/theme/buildin-theme/light/series/sankey.js.map +1 -0
  400. package/cjs/theme/buildin-theme/light/series/scatter.js +10 -4
  401. package/cjs/theme/buildin-theme/light/series/scatter.js.map +1 -1
  402. package/cjs/theme/buildin-theme/light/series/treemap.js +4 -4
  403. package/cjs/theme/buildin-theme/light/series/treemap.js.map +1 -1
  404. package/cjs/theme/buildin-theme/light/series/waterfall.js +3 -3
  405. package/cjs/theme/buildin-theme/light/series/waterfall.js.map +1 -1
  406. package/cjs/theme/buildin-theme/light/series/word-cloud3d.js +1 -1
  407. package/cjs/theme/buildin-theme/light/series/word-cloud3d.js.map +1 -1
  408. package/cjs/theme/color-scheme/interface.d.ts +16 -8
  409. package/cjs/theme/color-scheme/interface.js.map +1 -1
  410. package/cjs/theme/color-scheme/util.d.ts +6 -3
  411. package/cjs/theme/color-scheme/util.js +39 -10
  412. package/cjs/theme/color-scheme/util.js.map +1 -1
  413. package/cjs/theme/interface.d.ts +22 -38
  414. package/cjs/theme/interface.js.map +1 -1
  415. package/cjs/theme/theme-manager.d.ts +1 -0
  416. package/cjs/theme/theme-manager.js +5 -2
  417. package/cjs/theme/theme-manager.js.map +1 -1
  418. package/cjs/typings/spec/chart.d.ts +1 -1
  419. package/cjs/typings/spec/chart.js.map +1 -1
  420. package/cjs/typings/visual.d.ts +13 -12
  421. package/cjs/typings/visual.js.map +1 -1
  422. package/cjs/util/color.d.ts +0 -3
  423. package/cjs/util/color.js +2 -12
  424. package/cjs/util/color.js.map +1 -1
  425. package/cjs/util/scale.d.ts +12 -1
  426. package/cjs/util/scale.js +4 -2
  427. package/cjs/util/scale.js.map +1 -1
  428. package/cjs/vchart-all.js +4 -4
  429. package/cjs/vchart-all.js.map +1 -1
  430. package/esm/animation/utils.d.ts +2 -1
  431. package/esm/animation/utils.js.map +1 -1
  432. package/esm/chart/base-chart.js +3 -3
  433. package/esm/chart/base-chart.js.map +1 -1
  434. package/esm/chart/{boxplot/boxPlot.js → box-plot/box-plot.js} +1 -1
  435. package/esm/chart/box-plot/box-plot.js.map +1 -0
  436. package/{cjs/chart/boxplot → esm/chart/box-plot}/index.d.ts +1 -1
  437. package/esm/chart/{boxplot → box-plot}/index.js +1 -1
  438. package/esm/chart/box-plot/index.js.map +1 -0
  439. package/esm/chart/box-plot/interface.js.map +1 -0
  440. package/esm/chart/index.d.ts +3 -1
  441. package/esm/chart/index.js +5 -1
  442. package/esm/chart/index.js.map +1 -1
  443. package/esm/chart/treemap/treemap.js.map +1 -1
  444. package/esm/compile/compilable-base.js +1 -1
  445. package/esm/compile/compiler.d.ts +2 -2
  446. package/esm/compile/compiler.js +24 -25
  447. package/esm/compile/compiler.js.map +1 -1
  448. package/esm/compile/grammar-item.js +1 -1
  449. package/esm/compile/mark/interface.js.map +1 -1
  450. package/esm/compile/util.js +1 -1
  451. package/esm/component/axis/base-axis.d.ts +70 -1
  452. package/esm/component/axis/base-axis.js +98 -4
  453. package/esm/component/axis/base-axis.js.map +1 -1
  454. package/esm/component/axis/cartesian/axis.d.ts +0 -1
  455. package/esm/component/axis/cartesian/axis.js +4 -7
  456. package/esm/component/axis/cartesian/axis.js.map +1 -1
  457. package/esm/component/axis/polar/axis.d.ts +0 -1
  458. package/esm/component/axis/polar/axis.js +4 -7
  459. package/esm/component/axis/polar/axis.js.map +1 -1
  460. package/esm/component/axis/utils.d.ts +13 -70
  461. package/esm/component/axis/utils.js +12 -99
  462. package/esm/component/axis/utils.js.map +1 -1
  463. package/esm/component/base/base-component.d.ts +0 -5
  464. package/esm/component/base/base-component.js +7 -20
  465. package/esm/component/base/base-component.js.map +1 -1
  466. package/esm/component/base/util.d.ts +1 -1
  467. package/esm/component/base/util.js +18 -9
  468. package/esm/component/base/util.js.map +1 -1
  469. package/esm/component/crosshair/base.d.ts +0 -1
  470. package/esm/component/crosshair/base.js +1 -4
  471. package/esm/component/crosshair/base.js.map +1 -1
  472. package/esm/component/custom-mark/custom-mark.js +4 -1
  473. package/esm/component/custom-mark/custom-mark.js.map +1 -1
  474. package/esm/component/data-zoom/data-filter-base-component.d.ts +1 -1
  475. package/esm/component/data-zoom/data-filter-base-component.js +2 -2
  476. package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
  477. package/esm/component/index.js +1 -1
  478. package/esm/component/interface/index.d.ts +1 -0
  479. package/esm/component/interface/index.js +2 -0
  480. package/esm/component/interface/index.js.map +1 -1
  481. package/esm/component/interface/theme.d.ts +38 -0
  482. package/esm/component/interface/theme.js +2 -0
  483. package/esm/component/interface/theme.js.map +1 -0
  484. package/esm/component/label/label.d.ts +0 -1
  485. package/esm/component/label/label.js +12 -6
  486. package/esm/component/label/label.js.map +1 -1
  487. package/esm/component/legend/base-legend.js +5 -2
  488. package/esm/component/legend/base-legend.js.map +1 -1
  489. package/esm/component/legend/continuous/legend.d.ts +1 -1
  490. package/esm/component/legend/continuous/legend.js +2 -2
  491. package/esm/component/legend/continuous/legend.js.map +1 -1
  492. package/esm/component/legend/discrete/legend.d.ts +1 -1
  493. package/esm/component/legend/discrete/legend.js +2 -2
  494. package/esm/component/legend/discrete/legend.js.map +1 -1
  495. package/esm/component/legend/util.d.ts +4 -4
  496. package/esm/component/map-label/component.js +1 -5
  497. package/esm/component/map-label/component.js.map +1 -1
  498. package/esm/component/map-label/interface.d.ts +6 -4
  499. package/esm/component/map-label/interface.js.map +1 -1
  500. package/esm/component/marker/utils.js +14 -9
  501. package/esm/component/marker/utils.js.map +1 -1
  502. package/esm/component/player/interface/theme.d.ts +2 -1
  503. package/esm/component/player/interface/theme.js.map +1 -1
  504. package/esm/component/player/player.d.ts +0 -1
  505. package/esm/component/player/player.js +0 -3
  506. package/esm/component/player/player.js.map +1 -1
  507. package/esm/component/player/utils/transform.js.map +1 -1
  508. package/esm/component/title/interface/theme.d.ts +4 -2
  509. package/esm/component/title/interface/theme.js.map +1 -1
  510. package/esm/component/title/title.d.ts +1 -1
  511. package/esm/component/title/title.js +3 -6
  512. package/esm/component/title/title.js.map +1 -1
  513. package/esm/component/tooltip/handler/base.d.ts +5 -3
  514. package/esm/component/tooltip/handler/base.js +9 -8
  515. package/esm/component/tooltip/handler/base.js.map +1 -1
  516. package/esm/component/tooltip/handler/canvas/canvas-tooltip-handler.d.ts +4 -5
  517. package/esm/component/tooltip/handler/canvas/canvas-tooltip-handler.js +6 -6
  518. package/esm/component/tooltip/handler/canvas/canvas-tooltip-handler.js.map +1 -1
  519. package/esm/component/tooltip/handler/dom/dom-tooltip-handler.d.ts +2 -4
  520. package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js +2 -3
  521. package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
  522. package/esm/component/tooltip/handler/dom/model/base-tooltip-model.d.ts +1 -1
  523. package/esm/component/tooltip/tooltip.js +1 -1
  524. package/esm/component/tooltip/tooltip.js.map +1 -1
  525. package/esm/constant/box-plot.js +1 -2
  526. package/esm/constant/label.js +2 -1
  527. package/esm/core/factory.d.ts +1 -0
  528. package/esm/core/factory.js +3 -0
  529. package/esm/core/factory.js.map +1 -1
  530. package/esm/core/instance-manager.d.ts +9 -0
  531. package/esm/core/instance-manager.js +20 -0
  532. package/esm/core/instance-manager.js.map +1 -0
  533. package/esm/core/interface.js +1 -2
  534. package/esm/core/vchart.d.ts +2 -6
  535. package/esm/core/vchart.js +10 -22
  536. package/esm/core/vchart.js.map +1 -1
  537. package/esm/event/event.js +2 -1
  538. package/esm/index.d.ts +1 -1
  539. package/esm/index.js +1 -1
  540. package/esm/index.js.map +1 -1
  541. package/esm/mark/arc.d.ts +1 -1
  542. package/esm/mark/arc.js +3 -2
  543. package/esm/mark/arc.js.map +1 -1
  544. package/esm/mark/area.d.ts +3 -2
  545. package/esm/mark/area.js +7 -3
  546. package/esm/mark/area.js.map +1 -1
  547. package/esm/mark/base/base-mark.js +4 -3
  548. package/esm/mark/base/base-mark.js.map +1 -1
  549. package/esm/mark/base/index.d.ts +1 -2
  550. package/esm/mark/base/index.js +1 -3
  551. package/esm/mark/base/index.js.map +1 -1
  552. package/{cjs/mark/boxPlot.d.ts → esm/mark/box-plot.d.ts} +1 -1
  553. package/esm/mark/{boxPlot.js → box-plot.js} +2 -2
  554. package/esm/mark/box-plot.js.map +1 -0
  555. package/esm/mark/component.d.ts +1 -1
  556. package/esm/mark/component.js +1 -1
  557. package/esm/mark/component.js.map +1 -1
  558. package/esm/mark/line.d.ts +1 -1
  559. package/esm/mark/line.js +1 -1
  560. package/esm/mark/line.js.map +1 -1
  561. package/esm/mark/linkPath.d.ts +1 -1
  562. package/esm/mark/linkPath.js +3 -2
  563. package/esm/mark/linkPath.js.map +1 -1
  564. package/esm/mark/mark-set/index.d.ts +6 -5
  565. package/esm/mark/mark-set/index.js +16 -13
  566. package/esm/mark/mark-set/index.js.map +1 -1
  567. package/esm/mark/path.d.ts +1 -1
  568. package/esm/mark/path.js +1 -1
  569. package/esm/mark/path.js.map +1 -1
  570. package/esm/mark/polygon.d.ts +1 -1
  571. package/esm/mark/polygon.js +2 -2
  572. package/esm/mark/polygon.js.map +1 -1
  573. package/esm/mark/progress-arc.js +1 -1
  574. package/esm/mark/rect.d.ts +1 -1
  575. package/esm/mark/rect.js +4 -3
  576. package/esm/mark/rect.js.map +1 -1
  577. package/esm/mark/rule.d.ts +1 -1
  578. package/esm/mark/rule.js +2 -2
  579. package/esm/mark/rule.js.map +1 -1
  580. package/esm/mark/symbol.d.ts +1 -1
  581. package/esm/mark/symbol.js +4 -3
  582. package/esm/mark/symbol.js.map +1 -1
  583. package/esm/mark/text.d.ts +1 -1
  584. package/esm/mark/text.js +4 -3
  585. package/esm/mark/text.js.map +1 -1
  586. package/esm/model/base-model.d.ts +12 -5
  587. package/esm/model/base-model.js +50 -29
  588. package/esm/model/base-model.js.map +1 -1
  589. package/esm/model/interface.d.ts +8 -2
  590. package/esm/model/interface.js.map +1 -1
  591. package/esm/model/layout-item.js +19 -17
  592. package/esm/model/layout-item.js.map +1 -1
  593. package/esm/region/region.d.ts +1 -4
  594. package/esm/region/region.js +15 -13
  595. package/esm/region/region.js.map +1 -1
  596. package/esm/scale/color-ordinal-scale.d.ts +8 -0
  597. package/esm/scale/color-ordinal-scale.js +18 -0
  598. package/esm/scale/color-ordinal-scale.js.map +1 -0
  599. package/esm/scale/global-scale.js +3 -2
  600. package/esm/scale/global-scale.js.map +1 -1
  601. package/esm/series/area/area.d.ts +2 -0
  602. package/esm/series/area/area.js +15 -6
  603. package/esm/series/area/area.js.map +1 -1
  604. package/esm/series/area/interface.d.ts +5 -5
  605. package/esm/series/area/interface.js.map +1 -1
  606. package/esm/series/bar/bar.d.ts +6 -0
  607. package/esm/series/bar/bar.js +25 -7
  608. package/esm/series/bar/bar.js.map +1 -1
  609. package/esm/series/bar/interface.d.ts +5 -4
  610. package/esm/series/bar/interface.js.map +1 -1
  611. package/esm/series/base/base-series.d.ts +10 -11
  612. package/esm/series/base/base-series.js +59 -30
  613. package/esm/series/base/base-series.js.map +1 -1
  614. package/{cjs/series/box-plot/boxPlot.d.ts → esm/series/box-plot/box-plot.d.ts} +2 -0
  615. package/esm/series/box-plot/{boxPlot.js → box-plot.js} +17 -6
  616. package/esm/series/box-plot/box-plot.js.map +1 -0
  617. package/esm/series/box-plot/interface.d.ts +3 -2
  618. package/esm/series/box-plot/interface.js.map +1 -1
  619. package/esm/series/box-plot/tooltip-helper.js.map +1 -1
  620. package/esm/series/cartesian/cartesian.d.ts +1 -1
  621. package/esm/series/circle-packing/circle-packing.d.ts +2 -0
  622. package/esm/series/circle-packing/circle-packing.js +12 -3
  623. package/esm/series/circle-packing/circle-packing.js.map +1 -1
  624. package/esm/series/circle-packing/interface.d.ts +5 -4
  625. package/esm/series/circle-packing/interface.js.map +1 -1
  626. package/esm/series/dot/dot.d.ts +6 -8
  627. package/esm/series/dot/dot.js +47 -16
  628. package/esm/series/dot/dot.js.map +1 -1
  629. package/esm/series/dot/interface.d.ts +10 -10
  630. package/esm/series/dot/interface.js.map +1 -1
  631. package/esm/series/funnel/funnel.d.ts +12 -2
  632. package/esm/series/funnel/funnel.js +81 -22
  633. package/esm/series/funnel/funnel.js.map +1 -1
  634. package/esm/series/funnel/interface.d.ts +16 -15
  635. package/esm/series/funnel/interface.js.map +1 -1
  636. package/esm/series/gauge/gauge-pointer.d.ts +2 -0
  637. package/esm/series/gauge/gauge-pointer.js +23 -6
  638. package/esm/series/gauge/gauge-pointer.js.map +1 -1
  639. package/esm/series/gauge/gauge.d.ts +3 -2
  640. package/esm/series/gauge/gauge.js +32 -18
  641. package/esm/series/gauge/gauge.js.map +1 -1
  642. package/esm/series/gauge/interface.d.ts +12 -11
  643. package/esm/series/gauge/interface.js.map +1 -1
  644. package/esm/series/heatmap/heatmap.d.ts +3 -1
  645. package/esm/series/heatmap/heatmap.js +19 -9
  646. package/esm/series/heatmap/heatmap.js.map +1 -1
  647. package/esm/series/heatmap/interface.d.ts +6 -5
  648. package/esm/series/heatmap/interface.js.map +1 -1
  649. package/esm/series/interface/common.d.ts +56 -1
  650. package/esm/series/interface/common.js +24 -1
  651. package/esm/series/interface/common.js.map +1 -1
  652. package/esm/series/interface/series.d.ts +2 -1
  653. package/esm/series/interface/series.js.map +1 -1
  654. package/esm/series/line/line.d.ts +2 -0
  655. package/esm/series/line/line.js +9 -4
  656. package/esm/series/line/line.js.map +1 -1
  657. package/esm/series/link/interface.d.ts +4 -4
  658. package/esm/series/link/interface.js.map +1 -1
  659. package/esm/series/link/link.d.ts +4 -7
  660. package/esm/series/link/link.js +22 -15
  661. package/esm/series/link/link.js.map +1 -1
  662. package/esm/series/map/map.d.ts +2 -0
  663. package/esm/series/map/map.js +13 -6
  664. package/esm/series/map/map.js.map +1 -1
  665. package/esm/series/mixin/line-mixin.d.ts +4 -3
  666. package/esm/series/mixin/line-mixin.js +16 -4
  667. package/esm/series/mixin/line-mixin.js.map +1 -1
  668. package/esm/series/pie/interface.d.ts +7 -6
  669. package/esm/series/pie/interface.js.map +1 -1
  670. package/esm/series/pie/pie.d.ts +8 -3
  671. package/esm/series/pie/pie.js +60 -28
  672. package/esm/series/pie/pie.js.map +1 -1
  673. package/esm/series/progress/circular/circular.d.ts +2 -0
  674. package/esm/series/progress/circular/circular.js +16 -6
  675. package/esm/series/progress/circular/circular.js.map +1 -1
  676. package/esm/series/progress/circular/interface.d.ts +5 -4
  677. package/esm/series/progress/circular/interface.js.map +1 -1
  678. package/esm/series/progress/linear/interface.d.ts +6 -5
  679. package/esm/series/progress/linear/interface.js.map +1 -1
  680. package/esm/series/progress/linear/linear.d.ts +2 -0
  681. package/esm/series/progress/linear/linear.js +31 -20
  682. package/esm/series/progress/linear/linear.js.map +1 -1
  683. package/esm/series/radar/interface.d.ts +5 -4
  684. package/esm/series/radar/interface.js.map +1 -1
  685. package/esm/series/radar/radar.d.ts +2 -0
  686. package/esm/series/radar/radar.js +12 -5
  687. package/esm/series/radar/radar.js.map +1 -1
  688. package/esm/series/range-area/range-area.d.ts +2 -0
  689. package/esm/series/range-area/range-area.js +2 -4
  690. package/esm/series/range-area/range-area.js.map +1 -1
  691. package/esm/series/range-column/interface.d.ts +9 -8
  692. package/esm/series/range-column/interface.js.map +1 -1
  693. package/esm/series/range-column/rangeColumn.d.ts +2 -0
  694. package/esm/series/range-column/rangeColumn.js +28 -20
  695. package/esm/series/range-column/rangeColumn.js.map +1 -1
  696. package/esm/series/rose/interface.d.ts +3 -2
  697. package/esm/series/rose/interface.js.map +1 -1
  698. package/esm/series/rose/rose.d.ts +2 -0
  699. package/esm/series/rose/rose.js +16 -14
  700. package/esm/series/rose/rose.js.map +1 -1
  701. package/esm/series/sankey/animation.js.map +1 -1
  702. package/esm/series/sankey/interface.d.ts +7 -6
  703. package/esm/series/sankey/interface.js.map +1 -1
  704. package/esm/series/sankey/sankey.d.ts +2 -0
  705. package/esm/series/sankey/sankey.js +26 -23
  706. package/esm/series/sankey/sankey.js.map +1 -1
  707. package/esm/series/scatter/interface.d.ts +6 -5
  708. package/esm/series/scatter/interface.js.map +1 -1
  709. package/esm/series/scatter/scatter.d.ts +2 -0
  710. package/esm/series/scatter/scatter.js +15 -9
  711. package/esm/series/scatter/scatter.js.map +1 -1
  712. package/esm/series/sunburst/interface.d.ts +5 -4
  713. package/esm/series/sunburst/interface.js.map +1 -1
  714. package/esm/series/sunburst/sunburst.d.ts +3 -1
  715. package/esm/series/sunburst/sunburst.js +11 -4
  716. package/esm/series/sunburst/sunburst.js.map +1 -1
  717. package/esm/series/treemap/interface.d.ts +9 -8
  718. package/esm/series/treemap/interface.js.map +1 -1
  719. package/esm/series/treemap/treemap.d.ts +2 -0
  720. package/esm/series/treemap/treemap.js +21 -6
  721. package/esm/series/treemap/treemap.js.map +1 -1
  722. package/esm/series/waterfall/interface.d.ts +6 -5
  723. package/esm/series/waterfall/interface.js.map +1 -1
  724. package/esm/series/waterfall/waterfall.d.ts +2 -0
  725. package/esm/series/waterfall/waterfall.js +15 -6
  726. package/esm/series/waterfall/waterfall.js.map +1 -1
  727. package/esm/series/word-cloud/interface.d.ts +7 -6
  728. package/esm/series/word-cloud/interface.js.map +1 -1
  729. package/esm/series/word-cloud/word-cloud.d.ts +4 -3
  730. package/esm/series/word-cloud/word-cloud.js +24 -11
  731. package/esm/series/word-cloud/word-cloud.js.map +1 -1
  732. package/esm/theme/buildin-theme/config.d.ts +1 -4
  733. package/esm/theme/buildin-theme/config.js +1 -21
  734. package/esm/theme/buildin-theme/config.js.map +1 -1
  735. package/esm/theme/buildin-theme/dark.js.map +1 -1
  736. package/esm/theme/buildin-theme/light/color-scheme.js +14 -1
  737. package/esm/theme/buildin-theme/light/color-scheme.js.map +1 -1
  738. package/esm/theme/buildin-theme/light/component/axis/band-axis.d.ts +2 -0
  739. package/esm/theme/buildin-theme/light/component/axis/band-axis.js +18 -0
  740. package/esm/theme/buildin-theme/light/component/axis/band-axis.js.map +1 -0
  741. package/esm/theme/buildin-theme/light/component/{cartesian-axis.d.ts → axis/cartesian-axis.d.ts} +1 -1
  742. package/esm/theme/buildin-theme/light/component/{cartesian-axis.js → axis/cartesian-axis.js} +7 -9
  743. package/esm/theme/buildin-theme/light/component/axis/cartesian-axis.js.map +1 -0
  744. package/esm/theme/buildin-theme/light/component/axis/common-axis.d.ts +2 -0
  745. package/esm/theme/buildin-theme/light/component/{common-axis.js → axis/common-axis.js} +32 -14
  746. package/esm/theme/buildin-theme/light/component/axis/common-axis.js.map +1 -0
  747. package/esm/theme/buildin-theme/light/component/axis/linear-axis.d.ts +2 -0
  748. package/esm/theme/buildin-theme/light/component/axis/linear-axis.js +18 -0
  749. package/esm/theme/buildin-theme/light/component/axis/linear-axis.js.map +1 -0
  750. package/esm/theme/buildin-theme/light/component/{polar-axis.d.ts → axis/polar-axis.d.ts} +1 -1
  751. package/esm/theme/buildin-theme/light/component/{polar-axis.js → axis/polar-axis.js} +11 -3
  752. package/esm/theme/buildin-theme/light/component/axis/polar-axis.js.map +1 -0
  753. package/esm/theme/buildin-theme/light/component/crosshair.js +8 -4
  754. package/esm/theme/buildin-theme/light/component/crosshair.js.map +1 -1
  755. package/esm/theme/buildin-theme/light/component/index.d.ts +2 -0
  756. package/esm/theme/buildin-theme/light/component/index.js +62 -0
  757. package/esm/theme/buildin-theme/light/component/index.js.map +1 -0
  758. package/esm/theme/buildin-theme/light/component/legend/color-legend.d.ts +2 -0
  759. package/esm/theme/buildin-theme/light/component/{color-legend.js → legend/color-legend.js} +1 -1
  760. package/esm/theme/buildin-theme/light/component/legend/color-legend.js.map +1 -0
  761. package/esm/theme/buildin-theme/light/component/legend/continuous.d.ts +2 -0
  762. package/esm/theme/buildin-theme/light/component/legend/continuous.js +54 -0
  763. package/esm/theme/buildin-theme/light/component/legend/continuous.js.map +1 -0
  764. package/esm/theme/buildin-theme/light/component/legend/discrete-legend.d.ts +2 -0
  765. package/esm/theme/buildin-theme/light/component/{discrete-legend.js → legend/discrete-legend.js} +14 -5
  766. package/esm/theme/buildin-theme/light/component/legend/discrete-legend.js.map +1 -0
  767. package/esm/theme/buildin-theme/light/component/legend/size-legend.d.ts +2 -0
  768. package/esm/theme/buildin-theme/light/component/{size-legend.js → legend/size-legend.js} +1 -1
  769. package/esm/theme/buildin-theme/light/component/legend/size-legend.js.map +1 -0
  770. package/esm/theme/buildin-theme/light/component/map-label.d.ts +2 -0
  771. package/esm/{component/map-label/config.js → theme/buildin-theme/light/component/map-label.js} +5 -3
  772. package/esm/theme/buildin-theme/light/component/map-label.js.map +1 -0
  773. package/esm/theme/buildin-theme/light/component/player.js +20 -11
  774. package/esm/theme/buildin-theme/light/component/player.js.map +1 -1
  775. package/esm/theme/buildin-theme/light/component/title.js +16 -2
  776. package/esm/theme/buildin-theme/light/component/title.js.map +1 -1
  777. package/esm/theme/buildin-theme/light/component/tooltip.js +6 -2
  778. package/esm/theme/buildin-theme/light/component/tooltip.js.map +1 -1
  779. package/esm/theme/buildin-theme/light/constants.d.ts +2 -0
  780. package/esm/theme/buildin-theme/light/constants.js +10 -0
  781. package/esm/theme/buildin-theme/light/constants.js.map +1 -0
  782. package/esm/theme/buildin-theme/light/index.js +7 -50
  783. package/esm/theme/buildin-theme/light/index.js.map +1 -1
  784. package/esm/theme/buildin-theme/light/mark.d.ts +3 -0
  785. package/esm/theme/buildin-theme/light/mark.js +68 -0
  786. package/esm/theme/buildin-theme/light/mark.js.map +1 -0
  787. package/esm/theme/buildin-theme/light/series/area.js +2 -12
  788. package/esm/theme/buildin-theme/light/series/area.js.map +1 -1
  789. package/esm/theme/buildin-theme/light/series/bar.js +2 -2
  790. package/esm/theme/buildin-theme/light/series/bar.js.map +1 -1
  791. package/esm/theme/buildin-theme/light/series/bar3d.js +2 -2
  792. package/esm/theme/buildin-theme/light/series/bar3d.js.map +1 -1
  793. package/esm/theme/buildin-theme/light/series/box-plot.d.ts +2 -0
  794. package/esm/theme/buildin-theme/light/series/box-plot.js +8 -0
  795. package/esm/theme/buildin-theme/light/series/box-plot.js.map +1 -0
  796. package/esm/theme/buildin-theme/light/series/circular-progress.js +11 -1
  797. package/esm/theme/buildin-theme/light/series/circular-progress.js.map +1 -1
  798. package/esm/theme/buildin-theme/light/series/funnel.js +7 -2
  799. package/esm/theme/buildin-theme/light/series/funnel.js.map +1 -1
  800. package/esm/theme/buildin-theme/light/series/funnel3d.js +8 -3
  801. package/esm/theme/buildin-theme/light/series/funnel3d.js.map +1 -1
  802. package/esm/theme/buildin-theme/light/series/gauge.js +6 -1
  803. package/esm/theme/buildin-theme/light/series/gauge.js.map +1 -1
  804. package/esm/theme/buildin-theme/light/series/index.js +10 -1
  805. package/esm/theme/buildin-theme/light/series/index.js.map +1 -1
  806. package/esm/theme/buildin-theme/light/series/line.js +2 -7
  807. package/esm/theme/buildin-theme/light/series/line.js.map +1 -1
  808. package/esm/theme/buildin-theme/light/series/linear-progress.js +5 -0
  809. package/esm/theme/buildin-theme/light/series/linear-progress.js.map +1 -1
  810. package/esm/theme/buildin-theme/light/series/map.js +8 -4
  811. package/esm/theme/buildin-theme/light/series/map.js.map +1 -1
  812. package/esm/theme/buildin-theme/light/series/pie.js +9 -2
  813. package/esm/theme/buildin-theme/light/series/pie.js.map +1 -1
  814. package/esm/theme/buildin-theme/light/series/pie3d.js +4 -3
  815. package/esm/theme/buildin-theme/light/series/pie3d.js.map +1 -1
  816. package/esm/theme/buildin-theme/light/series/radar.js +2 -12
  817. package/esm/theme/buildin-theme/light/series/radar.js.map +1 -1
  818. package/esm/theme/buildin-theme/light/series/rangeColumn.js +2 -2
  819. package/esm/theme/buildin-theme/light/series/rangeColumn.js.map +1 -1
  820. package/esm/theme/buildin-theme/light/series/rose.d.ts +2 -0
  821. package/esm/theme/buildin-theme/light/series/rose.js +16 -0
  822. package/esm/theme/buildin-theme/light/series/rose.js.map +1 -0
  823. package/esm/theme/buildin-theme/light/series/sankey.d.ts +2 -0
  824. package/esm/theme/buildin-theme/light/series/sankey.js +10 -0
  825. package/esm/theme/buildin-theme/light/series/sankey.js.map +1 -0
  826. package/esm/theme/buildin-theme/light/series/scatter.js +10 -4
  827. package/esm/theme/buildin-theme/light/series/scatter.js.map +1 -1
  828. package/esm/theme/buildin-theme/light/series/treemap.js +3 -1
  829. package/esm/theme/buildin-theme/light/series/treemap.js.map +1 -1
  830. package/esm/theme/buildin-theme/light/series/waterfall.js +3 -1
  831. package/esm/theme/buildin-theme/light/series/waterfall.js.map +1 -1
  832. package/esm/theme/buildin-theme/light/series/word-cloud3d.js +1 -1
  833. package/esm/theme/buildin-theme/light/series/word-cloud3d.js.map +1 -1
  834. package/esm/theme/color-scheme/interface.d.ts +16 -8
  835. package/esm/theme/color-scheme/interface.js.map +1 -1
  836. package/esm/theme/color-scheme/util.d.ts +6 -3
  837. package/esm/theme/color-scheme/util.js +31 -7
  838. package/esm/theme/color-scheme/util.js.map +1 -1
  839. package/esm/theme/interface.d.ts +22 -38
  840. package/esm/theme/interface.js.map +1 -1
  841. package/esm/theme/theme-manager.d.ts +1 -0
  842. package/esm/theme/theme-manager.js +6 -1
  843. package/esm/theme/theme-manager.js.map +1 -1
  844. package/esm/typings/spec/chart.d.ts +1 -1
  845. package/esm/typings/spec/chart.js.map +1 -1
  846. package/esm/typings/visual.d.ts +13 -12
  847. package/esm/typings/visual.js.map +1 -1
  848. package/esm/util/color.d.ts +0 -3
  849. package/esm/util/color.js +0 -10
  850. package/esm/util/color.js.map +1 -1
  851. package/esm/util/scale.d.ts +12 -1
  852. package/esm/util/scale.js +6 -2
  853. package/esm/util/scale.js.map +1 -1
  854. package/esm/vchart-all.js +5 -5
  855. package/esm/vchart-all.js.map +1 -1
  856. package/package.json +1 -1
  857. package/cjs/chart/boxplot/boxPlot.js.map +0 -1
  858. package/cjs/chart/boxplot/index.js.map +0 -1
  859. package/cjs/chart/boxplot/interface.js.map +0 -1
  860. package/cjs/component/map-label/config.d.ts +0 -2
  861. package/cjs/component/map-label/config.js.map +0 -1
  862. package/cjs/mark/boxPlot.js.map +0 -1
  863. package/cjs/series/box-plot/boxPlot.js.map +0 -1
  864. package/cjs/theme/buildin-theme/light/component/cartesian-axis.js.map +0 -1
  865. package/cjs/theme/buildin-theme/light/component/color-legend.d.ts +0 -2
  866. package/cjs/theme/buildin-theme/light/component/color-legend.js.map +0 -1
  867. package/cjs/theme/buildin-theme/light/component/common-axis.d.ts +0 -2
  868. package/cjs/theme/buildin-theme/light/component/common-axis.js.map +0 -1
  869. package/cjs/theme/buildin-theme/light/component/discrete-legend.d.ts +0 -2
  870. package/cjs/theme/buildin-theme/light/component/discrete-legend.js.map +0 -1
  871. package/cjs/theme/buildin-theme/light/component/polar-axis.js +0 -19
  872. package/cjs/theme/buildin-theme/light/component/polar-axis.js.map +0 -1
  873. package/cjs/theme/buildin-theme/light/component/size-legend.d.ts +0 -2
  874. package/cjs/theme/buildin-theme/light/component/size-legend.js.map +0 -1
  875. package/esm/chart/boxplot/boxPlot.js.map +0 -1
  876. package/esm/chart/boxplot/index.js.map +0 -1
  877. package/esm/chart/boxplot/interface.js.map +0 -1
  878. package/esm/component/map-label/config.d.ts +0 -2
  879. package/esm/component/map-label/config.js.map +0 -1
  880. package/esm/series/box-plot/boxPlot.js.map +0 -1
  881. package/esm/theme/buildin-theme/light/component/cartesian-axis.js.map +0 -1
  882. package/esm/theme/buildin-theme/light/component/color-legend.d.ts +0 -2
  883. package/esm/theme/buildin-theme/light/component/color-legend.js.map +0 -1
  884. package/esm/theme/buildin-theme/light/component/common-axis.d.ts +0 -2
  885. package/esm/theme/buildin-theme/light/component/common-axis.js.map +0 -1
  886. package/esm/theme/buildin-theme/light/component/discrete-legend.d.ts +0 -2
  887. package/esm/theme/buildin-theme/light/component/discrete-legend.js.map +0 -1
  888. package/esm/theme/buildin-theme/light/component/polar-axis.js.map +0 -1
  889. package/esm/theme/buildin-theme/light/component/size-legend.d.ts +0 -2
  890. package/esm/theme/buildin-theme/light/component/size-legend.js.map +0 -1
  891. /package/cjs/chart/{boxplot/boxPlot.d.ts → box-plot/box-plot.d.ts} +0 -0
  892. /package/cjs/chart/{boxplot → box-plot}/interface.d.ts +0 -0
  893. /package/cjs/chart/{boxplot → box-plot}/interface.js +0 -0
  894. /package/esm/chart/{boxplot/boxPlot.d.ts → box-plot/box-plot.d.ts} +0 -0
  895. /package/esm/chart/{boxplot → box-plot}/interface.d.ts +0 -0
  896. /package/esm/chart/{boxplot → box-plot}/interface.js +0 -0
@@ -1,8 +1,14 @@
1
- import { DEFAULT_TEXT_FONT_SIZE as fontSize } from "../../config";
1
+ import { THEME_CONSTANTS } from "../constants";
2
2
 
3
3
  export const scatter = {
4
- size: 10,
5
- shape: "circle",
4
+ point: {
5
+ style: {
6
+ size: 8,
7
+ symbolType: "circle",
8
+ lineWidth: 0,
9
+ fillOpacity: .8
10
+ }
11
+ },
6
12
  label: {
7
13
  visible: !1,
8
14
  offset: 5,
@@ -10,7 +16,7 @@ export const scatter = {
10
16
  style: {
11
17
  lineWidth: 2,
12
18
  stroke: "white",
13
- fontSize: fontSize
19
+ fontSize: THEME_CONSTANTS.LABEL_FONT_SIZE
14
20
  }
15
21
  }
16
22
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/theme/buildin-theme/light/series/scatter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAC;AAElE,MAAM,CAAC,MAAM,OAAO,GAAwB;IAC1C,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE;QACL,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,CAAC;QACT,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE;YACL,SAAS,EAAE,CAAC;YACZ,MAAM,EAAE,OAAO;YACf,QAAQ;SACT;KACF;CACF,CAAC","file":"scatter.js","sourcesContent":["import type { IScatterSeriesTheme } from '../../../../series/scatter/interface';\nimport { DEFAULT_TEXT_FONT_SIZE as fontSize } from '../../config';\n\nexport const scatter: IScatterSeriesTheme = {\n size: 10,\n shape: 'circle',\n label: {\n visible: false,\n offset: 5,\n position: 'top',\n style: {\n lineWidth: 2,\n stroke: 'white',\n fontSize\n }\n }\n};\n"]}
1
+ {"version":3,"sources":["../src/theme/buildin-theme/light/series/scatter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,CAAC,MAAM,OAAO,GAAwB;IAC1C,KAAK,EAAE;QACL,KAAK,EAAE;YACL,IAAI,EAAE,CAAC;YACP,UAAU,EAAE,QAAQ;YACpB,SAAS,EAAE,CAAC;YACZ,WAAW,EAAE,GAAG;SACjB;KACF;IACD,KAAK,EAAE;QACL,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,CAAC;QACT,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE;YACL,SAAS,EAAE,CAAC;YACZ,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,eAAe,CAAC,eAAe;SAC1C;KACF;CACF,CAAC","file":"scatter.js","sourcesContent":["import type { IScatterSeriesTheme } from '../../../../series/scatter/interface';\nimport { THEME_CONSTANTS } from '../constants';\n\nexport const scatter: IScatterSeriesTheme = {\n point: {\n style: {\n size: 8,\n symbolType: 'circle',\n lineWidth: 0,\n fillOpacity: 0.8\n }\n },\n label: {\n visible: false,\n offset: 5,\n position: 'top',\n style: {\n lineWidth: 2,\n stroke: 'white',\n fontSize: THEME_CONSTANTS.LABEL_FONT_SIZE\n }\n }\n};\n"]}
@@ -1,4 +1,6 @@
1
- import { DEFAULT_TEXT_FONT_SIZE as fontSize } from "../../config";
1
+ import { THEME_CONSTANTS } from "../constants";
2
+
3
+ const fontSize = THEME_CONSTANTS.LABEL_FONT_SIZE;
2
4
 
3
5
  export const treemap = {
4
6
  gapWidth: 1,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/theme/buildin-theme/light/series/treemap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAC;AAElE,MAAM,CAAC,MAAM,OAAO,GAAwB;IAC1C,QAAQ,EAAE,CAAC;IACX,WAAW,EAAE,CAAC,CAAC,CAAC;IAChB,OAAO,EAAE;QACP,OAAO,EAAE,KAAK;QACd,KAAK,EAAE;YACL,WAAW,EAAE,GAAG;SACjB;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,QAAQ,EAAE,QAAQ;YAClB,IAAI,EAAE,OAAO;YACb,YAAY,EAAE,QAAQ;YACtB,SAAS,EAAE,QAAQ;SACpB;KACF;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,QAAQ,GAAG,CAAC;QACrB,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,OAAO;YACf,SAAS,EAAE,CAAC;YACZ,QAAQ,EAAE,QAAQ;YAClB,YAAY,EAAE,QAAQ;YACtB,SAAS,EAAE,QAAQ;SACpB;KACF;CACF,CAAC","file":"treemap.js","sourcesContent":["import type { ITreemapSeriesTheme } from '../../../../series/treemap/interface';\nimport { DEFAULT_TEXT_FONT_SIZE as fontSize } from '../../config';\n\nexport const treemap: ITreemapSeriesTheme = {\n gapWidth: 1,\n nodePadding: [5],\n nonLeaf: {\n visible: false,\n style: {\n fillOpacity: 0.5\n }\n },\n label: {\n style: {\n fontSize: fontSize,\n fill: 'white',\n textBaseline: 'middle',\n textAlign: 'center'\n }\n },\n nonLeafLabel: {\n padding: fontSize * 2,\n style: {\n fill: 'black',\n stroke: 'white',\n lineWidth: 2,\n fontSize: fontSize,\n textBaseline: 'middle',\n textAlign: 'center'\n }\n }\n};\n"]}
1
+ {"version":3,"sources":["../src/theme/buildin-theme/light/series/treemap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,QAAQ,GAAG,eAAe,CAAC,eAAe,CAAC;AAEjD,MAAM,CAAC,MAAM,OAAO,GAAwB;IAC1C,QAAQ,EAAE,CAAC;IACX,WAAW,EAAE,CAAC,CAAC,CAAC;IAChB,OAAO,EAAE;QACP,OAAO,EAAE,KAAK;QACd,KAAK,EAAE;YACL,WAAW,EAAE,GAAG;SACjB;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,QAAQ,EAAE,QAAQ;YAClB,IAAI,EAAE,OAAO;YACb,YAAY,EAAE,QAAQ;YACtB,SAAS,EAAE,QAAQ;SACpB;KACF;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,QAAQ,GAAG,CAAC;QACrB,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,OAAO;YACf,SAAS,EAAE,CAAC;YACZ,QAAQ,EAAE,QAAQ;YAClB,YAAY,EAAE,QAAQ;YACtB,SAAS,EAAE,QAAQ;SACpB;KACF;CACF,CAAC","file":"treemap.js","sourcesContent":["import type { ITreemapSeriesTheme } from '../../../../series/treemap/interface';\nimport { THEME_CONSTANTS } from '../constants';\n\nconst fontSize = THEME_CONSTANTS.LABEL_FONT_SIZE;\n\nexport const treemap: ITreemapSeriesTheme = {\n gapWidth: 1,\n nodePadding: [5],\n nonLeaf: {\n visible: false,\n style: {\n fillOpacity: 0.5\n }\n },\n label: {\n style: {\n fontSize: fontSize,\n fill: 'white',\n textBaseline: 'middle',\n textAlign: 'center'\n }\n },\n nonLeafLabel: {\n padding: fontSize * 2,\n style: {\n fill: 'black',\n stroke: 'white',\n lineWidth: 2,\n fontSize: fontSize,\n textBaseline: 'middle',\n textAlign: 'center'\n }\n }\n};\n"]}
@@ -1,4 +1,6 @@
1
- import { DEFAULT_TEXT_FONT_SIZE as fontSize } from "../../config";
1
+ import { THEME_CONSTANTS } from "../constants";
2
+
3
+ const fontSize = THEME_CONSTANTS.LABEL_FONT_SIZE;
2
4
 
3
5
  export const waterfall = {
4
6
  seriesFieldName: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/theme/buildin-theme/light/series/waterfall.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAC;AAElE,MAAM,CAAC,MAAM,SAAS,GAA0B;IAC9C,eAAe,EAAE;QACf,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;KACrB;IACD,UAAU,EAAE;QACV,KAAK,EAAE;YACL,MAAM,EAAE,OAAO;YACf,SAAS,EAAE,CAAC;YACZ,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;SACjB;KACF;IACD,UAAU,EAAE;QACV,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,YAAY;QACtB,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,QAAQ;SACT;KACF;IACD,KAAK,EAAE;QACL,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE;YACL,QAAQ;SACT;KACF;CACF,CAAC","file":"waterfall.js","sourcesContent":["import type { IWaterfallSeriesTheme } from '../../../../series/waterfall/interface';\nimport { DEFAULT_TEXT_FONT_SIZE as fontSize } from '../../config';\n\nexport const waterfall: IWaterfallSeriesTheme = {\n seriesFieldName: {\n total: 'total',\n increase: 'increase',\n decrease: 'decrease'\n },\n leaderLine: {\n style: {\n stroke: 'black',\n lineWidth: 1,\n lineDash: [4, 4]\n }\n },\n stackLabel: {\n offset: 12,\n position: 'withChange',\n style: {\n fill: 'black',\n fontSize\n }\n },\n label: {\n visible: false,\n offset: 12,\n position: 'inside',\n style: {\n fontSize\n }\n }\n};\n"]}
1
+ {"version":3,"sources":["../src/theme/buildin-theme/light/series/waterfall.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,QAAQ,GAAG,eAAe,CAAC,eAAe,CAAC;AAEjD,MAAM,CAAC,MAAM,SAAS,GAA0B;IAC9C,eAAe,EAAE;QACf,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;KACrB;IACD,UAAU,EAAE;QACV,KAAK,EAAE;YACL,MAAM,EAAE,OAAO;YACf,SAAS,EAAE,CAAC;YACZ,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;SACjB;KACF;IACD,UAAU,EAAE;QACV,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,YAAY;QACtB,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,QAAQ;SACT;KACF;IACD,KAAK,EAAE;QACL,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE;YACL,QAAQ;SACT;KACF;CACF,CAAC","file":"waterfall.js","sourcesContent":["import type { IWaterfallSeriesTheme } from '../../../../series/waterfall/interface';\nimport { THEME_CONSTANTS } from '../constants';\n\nconst fontSize = THEME_CONSTANTS.LABEL_FONT_SIZE;\n\nexport const waterfall: IWaterfallSeriesTheme = {\n seriesFieldName: {\n total: 'total',\n increase: 'increase',\n decrease: 'decrease'\n },\n leaderLine: {\n style: {\n stroke: 'black',\n lineWidth: 1,\n lineDash: [4, 4]\n }\n },\n stackLabel: {\n offset: 12,\n position: 'withChange',\n style: {\n fill: 'black',\n fontSize\n }\n },\n label: {\n visible: false,\n offset: 12,\n position: 'inside',\n style: {\n fontSize\n }\n }\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  export const wordCloud3d = {
2
- word3d: {
2
+ word: {
3
3
  padding: 1,
4
4
  style: {
5
5
  textAlign: "center",
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/theme/buildin-theme/light/series/word-cloud3d.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAA4B;IAClD,MAAM,EAAE;QACN,OAAO,EAAE,CAAC;QACV,KAAK,EAAE;YACL,SAAS,EAAE,QAAQ;YACnB,YAAY,EAAE,YAAY;SAC3B;KACF;CACF,CAAC","file":"word-cloud3d.js","sourcesContent":["import type { IWordCloud3dSeriesTheme } from '../../../../series/word-cloud/interface';\n\nexport const wordCloud3d: IWordCloud3dSeriesTheme = {\n word3d: {\n padding: 1,\n style: {\n textAlign: 'center',\n textBaseline: 'alphabetic'\n }\n }\n};\n"]}
1
+ {"version":3,"sources":["../src/theme/buildin-theme/light/series/word-cloud3d.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAA4B;IAClD,IAAI,EAAE;QACJ,OAAO,EAAE,CAAC;QACV,KAAK,EAAE;YACL,SAAS,EAAE,QAAQ;YACnB,YAAY,EAAE,YAAY;SAC3B;KACF;CACF,CAAC","file":"word-cloud3d.js","sourcesContent":["import type { IWordCloud3dSeriesTheme } from '../../../../series/word-cloud/interface';\n\nexport const wordCloud3d: IWordCloud3dSeriesTheme = {\n word: {\n padding: 1,\n style: {\n textAlign: 'center',\n textBaseline: 'alphabetic'\n }\n }\n};\n"]}
@@ -1,21 +1,29 @@
1
1
  import type { SeriesTypeEnum } from '../../series/interface';
2
2
  import type { IGradient } from '../../typings';
3
3
  export type IColorSchemeStruct = {
4
- bandColor?: ColorSchemeItem;
5
- background?: ColorSchemeItem;
6
- dataScheme: ColorDataSchemeItem[];
7
- } & {
8
- [key: string]: ColorSchemeItem;
4
+ dataScheme: Array<DataSchemeItem> | ProgressiveDataScheme<DataSchemeItem>;
5
+ palette?: {
6
+ bandColor?: ColorSchemeItem;
7
+ background?: ColorSchemeItem;
8
+ [key: string]: ColorSchemeItem;
9
+ };
9
10
  };
11
+ export type ProgressiveDataScheme<T> = Array<IProgressiveDataSchemeCase<T>>;
12
+ export interface IProgressiveDataSchemeCase<T> {
13
+ maxDomainLength?: number;
14
+ isAvailable?: boolean | IsProgressiveDataSchemeAvailableCallback;
15
+ scheme: T[];
16
+ }
17
+ export type IsProgressiveDataSchemeAvailableCallback = (domain: any[]) => boolean;
10
18
  export interface IColorKey {
11
- type: 'scheme';
19
+ type: 'palette';
12
20
  key: string;
13
21
  l?: number;
14
22
  a?: number;
15
23
  }
16
- export type ColorDataSchemeItem = string | IColorKey;
24
+ export type DataSchemeItem = string | IColorKey;
17
25
  export type ColorSchemeItem = string | IGradient;
18
- export type ColorScheme = string[] | IColorSchemeStruct;
26
+ export type ColorScheme = Array<string> | ProgressiveDataScheme<string> | IColorSchemeStruct;
19
27
  export type IThemeColorScheme = {
20
28
  default: ColorScheme;
21
29
  } & Partial<Record<SeriesTypeEnum, ColorScheme>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/theme/color-scheme/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { SeriesTypeEnum } from '../../series/interface';\nimport type { IGradient } from '../../typings';\n\nexport type IColorSchemeStruct = {\n /** 主色调(可选) */\n bandColor?: ColorSchemeItem;\n /** 背景颜色(可选) */\n background?: ColorSchemeItem;\n /** 数据色板,承载3.x版原有色板的功能 */\n dataScheme: ColorDataSchemeItem[];\n} & {\n /** 其他的语义化颜色 */\n [key: string]: ColorSchemeItem;\n};\n\n/** 语义化颜色的色值索引 */\nexport interface IColorKey {\n /** 颜色type声明 */\n type: 'scheme';\n\n /** 颜色索引 */\n key: string;\n\n /** 明度系数(可选,0~1) */\n l?: number;\n\n /** 透明度系数(可选,0~1) */\n a?: number;\n}\n\nexport type ColorDataSchemeItem = string | IColorKey;\n\nexport type ColorSchemeItem = string | IGradient; // 纯色或渐变色\n\nexport type ColorScheme = string[] | IColorSchemeStruct;\n\nexport type IThemeColorScheme = {\n /** 必选 */\n default: ColorScheme;\n} & Partial<Record<SeriesTypeEnum, ColorScheme>>;\n"]}
1
+ {"version":3,"sources":["../src/theme/color-scheme/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { SeriesTypeEnum } from '../../series/interface';\nimport type { IGradient } from '../../typings';\n\n/** 色板总结构,包含数据色板和语义色板 */\nexport type IColorSchemeStruct = {\n /** 数据色板 */\n dataScheme: Array<DataSchemeItem> | ProgressiveDataScheme<DataSchemeItem>;\n\n /** 语义色板 */\n palette?: {\n /** 主色调(可选) */\n bandColor?: ColorSchemeItem;\n /** 背景颜色(可选) */\n background?: ColorSchemeItem;\n /** 其他的语义化色值 */\n [key: string]: ColorSchemeItem;\n };\n};\n\n/** 渐进式数据色板:由多个色板组成,应用时会依次调用色板的 `isAvailable` 回调,如果当前回调返回 true 则立即应用对应色板 */\nexport type ProgressiveDataScheme<T> = Array<IProgressiveDataSchemeCase<T>>;\n\nexport interface IProgressiveDataSchemeCase<T> {\n /** 可选,适合此色板的 domain 数量 */\n maxDomainLength?: number;\n /** 可选,自定义回调,返回是否应用此色板,将覆盖 maxDomainLength 等配置 */\n isAvailable?: boolean | IsProgressiveDataSchemeAvailableCallback;\n /** 色板 */\n scheme: T[];\n}\n\nexport type IsProgressiveDataSchemeAvailableCallback = (domain: any[]) => boolean;\n\n/** 语义化色值的色值索引 */\nexport interface IColorKey {\n /** 颜色type声明 */\n type: 'palette';\n\n /** 颜色索引 */\n key: string;\n\n /** 明度系数(可选,0~1) */\n l?: number;\n\n /** 透明度系数(可选,0~1) */\n a?: number;\n}\n\nexport type DataSchemeItem = string | IColorKey;\n\nexport type ColorSchemeItem = string | IGradient; // 纯色或渐变色\n\nexport type ColorScheme = Array<string> | ProgressiveDataScheme<string> | IColorSchemeStruct;\n\nexport type IThemeColorScheme = {\n /** 必选 */\n default: ColorScheme;\n} & Partial<Record<SeriesTypeEnum, ColorScheme>>;\n"]}
@@ -1,5 +1,8 @@
1
1
  import type { SeriesTypeEnum } from '../../series/interface';
2
- import type { ColorSchemeItem, IColorKey, IThemeColorScheme } from './interface';
3
- export declare function getDataScheme(colorScheme: IThemeColorScheme, seriesType?: SeriesTypeEnum): ColorSchemeItem[];
4
- export declare function findColor(colorScheme: IThemeColorScheme, colorKey: IColorKey, seriesType?: SeriesTypeEnum): ColorSchemeItem | undefined;
2
+ import type { ColorSchemeItem, IColorKey, IThemeColorScheme, ProgressiveDataScheme } from './interface';
3
+ export declare function getDataScheme(colorScheme: IThemeColorScheme, seriesType?: SeriesTypeEnum): Array<ColorSchemeItem> | ProgressiveDataScheme<ColorSchemeItem>;
4
+ export declare function computeActualDataScheme(dataScheme: Array<ColorSchemeItem> | ProgressiveDataScheme<ColorSchemeItem>, colorDomain: any[]): Array<ColorSchemeItem>;
5
+ export declare function queryColorFromColorScheme(colorScheme: IThemeColorScheme, colorKey: IColorKey, seriesType?: SeriesTypeEnum): ColorSchemeItem | undefined;
6
+ export declare const getActualColor: (value: any, colorScheme?: IThemeColorScheme, seriesType?: SeriesTypeEnum) => any;
5
7
  export declare function isColorKey(obj: any): obj is IColorKey;
8
+ export declare function isProgressiveDataColorScheme<T>(obj: any): obj is ProgressiveDataScheme<T>;
@@ -1,20 +1,32 @@
1
- import { isArray, isObject, isString, isValid } from "@visactor/vutils";
1
+ import { isArray, isFunction, isObject, isString, isValid } from "@visactor/vutils";
2
2
 
3
3
  import { ColorUtil } from "@visactor/vutils";
4
4
 
5
- import { Color } from "../../util";
5
+ import { Color } from "../../util/color";
6
6
 
7
7
  export function getDataScheme(colorScheme, seriesType) {
8
8
  var _a;
9
9
  const scheme = isValid(seriesType) && null !== (_a = null == colorScheme ? void 0 : colorScheme[seriesType]) && void 0 !== _a ? _a : null == colorScheme ? void 0 : colorScheme.default;
10
- return !scheme || isArray(scheme) ? scheme : isObject(scheme) ? scheme.dataScheme.map((color => isColorKey(color) ? findColor(colorScheme, color, seriesType) : color)) : [];
10
+ if (!scheme || isArray(scheme)) return scheme;
11
+ if (isObject(scheme)) {
12
+ const {dataScheme: dataScheme} = scheme;
13
+ return dataScheme ? isProgressiveDataColorScheme(dataScheme) ? dataScheme.map((item => Object.assign(Object.assign({}, item), {
14
+ scheme: item.scheme.map((color => isColorKey(color) ? queryColorFromColorScheme(colorScheme, color, seriesType) : color)).filter(isValid)
15
+ }))) : dataScheme.map((color => isColorKey(color) ? queryColorFromColorScheme(colorScheme, color, seriesType) : color)).filter(isValid) : [];
16
+ }
17
+ return [];
11
18
  }
12
19
 
13
- export function findColor(colorScheme, colorKey, seriesType) {
14
- var _a;
20
+ export function computeActualDataScheme(dataScheme, colorDomain) {
21
+ var _a, _b;
22
+ return isProgressiveDataColorScheme(dataScheme) ? null !== (_b = null === (_a = dataScheme.find((item => isValid(item.isAvailable) ? isFunction(item.isAvailable) ? item.isAvailable(colorDomain) : !!item.isAvailable : !isValid(item.maxDomainLength) || (null == colorDomain ? void 0 : colorDomain.length) <= item.maxDomainLength))) || void 0 === _a ? void 0 : _a.scheme) && void 0 !== _b ? _b : dataScheme[dataScheme.length - 1].scheme : dataScheme;
23
+ }
24
+
25
+ export function queryColorFromColorScheme(colorScheme, colorKey, seriesType) {
26
+ var _a, _b;
15
27
  const scheme = isValid(seriesType) && null !== (_a = colorScheme[seriesType]) && void 0 !== _a ? _a : colorScheme.default;
16
28
  if (!scheme) return;
17
- const color = scheme[colorKey.key];
29
+ const color = null === (_b = scheme.palette) || void 0 === _b ? void 0 : _b[colorKey.key];
18
30
  if (!color) return;
19
31
  if (!isValid(colorKey.a) && !isValid(colorKey.l) || !isString(color)) return color;
20
32
  let c = new Color(color);
@@ -25,7 +37,19 @@ export function findColor(colorScheme, colorKey, seriesType) {
25
37
  return isValid(colorKey.a) && c.setOpacity(colorKey.a), c.toRGBA();
26
38
  }
27
39
 
40
+ export const getActualColor = (value, colorScheme, seriesType) => {
41
+ if (isColorKey(value) && colorScheme) {
42
+ const color = queryColorFromColorScheme(colorScheme, value, seriesType);
43
+ if (color) return color;
44
+ }
45
+ return value;
46
+ };
47
+
28
48
  export function isColorKey(obj) {
29
- return isObject(obj) && "scheme" === obj.type && !!obj.key;
49
+ return isObject(obj) && "palette" === obj.type && !!obj.key;
50
+ }
51
+
52
+ export function isProgressiveDataColorScheme(obj) {
53
+ return !!isArray(obj) && obj.every((item => isValid(item.scheme)));
30
54
  }
31
55
  //# sourceMappingURL=util.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/theme/color-scheme/util.ts"],"names":[],"mappings":"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","file":"util.js","sourcesContent":["import { isArray, isObject, isString, isValid } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport { ColorUtil } from '@visactor/vutils';\nimport type { SeriesTypeEnum } from '../../series/interface';\nimport { Color } from '../../util';\nimport type { ColorSchemeItem, IColorKey, IColorSchemeStruct, IThemeColorScheme } from './interface';\n\n/**\n * 获取数据色板\n * @param colorScheme\n * @param seriesType\n * @returns\n */\nexport function getDataScheme(colorScheme: IThemeColorScheme, seriesType?: SeriesTypeEnum): ColorSchemeItem[] {\n const scheme = !isValid(seriesType) ? colorScheme?.default : colorScheme?.[seriesType] ?? colorScheme?.default;\n if (!scheme || isArray(scheme)) {\n return scheme as string[];\n } else if (isObject(scheme)) {\n return (scheme as IColorSchemeStruct).dataScheme.map(color => {\n if (isColorKey(color)) {\n return findColor(colorScheme, color, seriesType);\n }\n return color;\n });\n }\n return [];\n}\n\n/**\n * 根据色板和色值索引生成颜色\n * @param colorScheme\n * @param colorKey\n * @param seriesType\n * @returns\n */\nexport function findColor(\n colorScheme: IThemeColorScheme,\n colorKey: IColorKey,\n seriesType?: SeriesTypeEnum\n): ColorSchemeItem | undefined {\n const scheme = !isValid(seriesType) ? colorScheme.default : colorScheme[seriesType] ?? colorScheme.default;\n if (!scheme) {\n return undefined;\n }\n const color = scheme[colorKey.key];\n if (!color) {\n return undefined;\n }\n if ((!isValid(colorKey.a) && !isValid(colorKey.l)) || !isString(color)) {\n return color;\n }\n let c = new Color(color);\n if (isValid(colorKey.l)) {\n const { r, g, b } = c.color;\n const { h, s } = ColorUtil.rgbToHsl(r, g, b);\n const rgb = ColorUtil.hslToRgb(h, s, colorKey.l);\n const newColor = new Color(`rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`);\n newColor.setOpacity(c.color.opacity);\n c = newColor;\n }\n if (isValid(colorKey.a)) {\n c.setOpacity(colorKey.a);\n }\n return c.toRGBA();\n}\n\nexport function isColorKey(obj: any): obj is IColorKey {\n return isObject(obj) && (obj as IColorKey).type === 'scheme' && !!(obj as IColorKey).key;\n}\n"]}
1
+ {"version":3,"sources":["../src/theme/color-scheme/util.ts"],"names":[],"mappings":"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","file":"util.js","sourcesContent":["import { isArray, isFunction, isObject, isString, isValid } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport { ColorUtil } from '@visactor/vutils';\nimport type { SeriesTypeEnum } from '../../series/interface';\nimport { Color } from '../../util/color';\nimport type {\n ColorSchemeItem,\n IColorKey,\n IColorSchemeStruct,\n IProgressiveDataSchemeCase,\n IThemeColorScheme,\n ProgressiveDataScheme\n} from './interface';\n\n/**\n * 从色板中获取数据色板(在此步骤中替换语义色值)\n * @param colorScheme\n * @param seriesType\n * @returns\n */\nexport function getDataScheme(\n colorScheme: IThemeColorScheme,\n seriesType?: SeriesTypeEnum\n): Array<ColorSchemeItem> | ProgressiveDataScheme<ColorSchemeItem> {\n const scheme = !isValid(seriesType) ? colorScheme?.default : colorScheme?.[seriesType] ?? colorScheme?.default;\n if (!scheme || isArray(scheme)) {\n // 不带语义色板,直接输出\n return scheme as Array<ColorSchemeItem> | ProgressiveDataScheme<ColorSchemeItem>;\n } else if (isObject(scheme)) {\n // 带语义色板,转换颜色后输出\n const { dataScheme } = scheme as IColorSchemeStruct;\n if (!dataScheme) {\n return [];\n }\n // 渐进式色板的情况\n if (isProgressiveDataColorScheme(dataScheme)) {\n return dataScheme.map(item => ({\n ...item,\n scheme: item.scheme\n .map(color => {\n if (isColorKey(color)) {\n return queryColorFromColorScheme(colorScheme, color, seriesType);\n }\n return color;\n })\n .filter(isValid)\n }));\n }\n // 普通色板的情况\n return dataScheme\n .map(color => {\n if (isColorKey(color)) {\n return queryColorFromColorScheme(colorScheme, color, seriesType);\n }\n return color;\n })\n .filter(isValid);\n }\n return [];\n}\n\n/**\n * 计算最终数据色板(在此步骤中获得渐进式色板的最终色板)\n * @param colorScheme\n * @param seriesType\n * @returns\n */\nexport function computeActualDataScheme(\n dataScheme: Array<ColorSchemeItem> | ProgressiveDataScheme<ColorSchemeItem>,\n colorDomain: any[]\n): Array<ColorSchemeItem> {\n if (isProgressiveDataColorScheme(dataScheme)) {\n return (\n dataScheme.find(item => {\n if (isValid(item.isAvailable)) {\n if (isFunction(item.isAvailable)) {\n return item.isAvailable(colorDomain);\n }\n return !!item.isAvailable;\n } else if (isValid(item.maxDomainLength)) {\n return colorDomain?.length <= item.maxDomainLength;\n }\n return true;\n })?.scheme ?? dataScheme[dataScheme.length - 1].scheme\n );\n }\n return dataScheme;\n}\n\n/**\n * 根据色板和色值索引生成颜色\n * @param colorScheme\n * @param colorKey\n * @param seriesType\n * @returns\n */\nexport function queryColorFromColorScheme(\n colorScheme: IThemeColorScheme,\n colorKey: IColorKey,\n seriesType?: SeriesTypeEnum\n): ColorSchemeItem | undefined {\n const scheme = !isValid(seriesType) ? colorScheme.default : colorScheme[seriesType] ?? colorScheme.default;\n if (!scheme) {\n return undefined;\n }\n const color = (scheme as IColorSchemeStruct).palette?.[colorKey.key];\n if (!color) {\n return undefined;\n }\n if ((!isValid(colorKey.a) && !isValid(colorKey.l)) || !isString(color)) {\n return color;\n }\n let c = new Color(color);\n if (isValid(colorKey.l)) {\n const { r, g, b } = c.color;\n const { h, s } = ColorUtil.rgbToHsl(r, g, b);\n const rgb = ColorUtil.hslToRgb(h, s, colorKey.l);\n const newColor = new Color(`rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`);\n newColor.setOpacity(c.color.opacity);\n c = newColor;\n }\n if (isValid(colorKey.a)) {\n c.setOpacity(colorKey.a);\n }\n return c.toRGBA();\n}\n\n/** 查询语义化颜色 */\nexport const getActualColor = (value: any, colorScheme?: IThemeColorScheme, seriesType?: SeriesTypeEnum) => {\n if (isColorKey(value)) {\n if (colorScheme) {\n const color = queryColorFromColorScheme(colorScheme, value, seriesType);\n if (color) {\n return color;\n }\n }\n }\n return value;\n};\n\nexport function isColorKey(obj: any): obj is IColorKey {\n return isObject(obj) && (obj as IColorKey).type === 'palette' && !!(obj as IColorKey).key;\n}\n\nexport function isProgressiveDataColorScheme<T>(obj: any): obj is ProgressiveDataScheme<T> {\n if (!isArray(obj)) {\n return false;\n }\n return obj.every(item => {\n return isValid((item as IProgressiveDataSchemeCase<T>).scheme);\n });\n}\n"]}
@@ -1,59 +1,43 @@
1
- import type { IAxisCommonTheme } from './../component/axis/interface';
2
1
  import type { ILayoutPaddingSpec } from '../model/interface';
3
- import type { IDataZoomTheme, IScrollBarTheme } from '../component/data-zoom';
4
- import type { ITooltipTheme } from '../component/tooltip/interface';
5
- import type { IDiscreteLegendTheme } from '../component/legend/discrete/interface';
6
- import type { IMarkLineTheme } from '../component/marker/mark-line/interface';
7
2
  import type { ISeriesTheme } from '../series/interface';
8
- import type { ICrosshairTheme } from '../component/crosshair/interface';
9
3
  import type { IMarkTheme } from '../typings/spec';
10
- import type { IArcMarkSpec, IAreaMarkSpec, ILineMarkSpec, IRectMarkSpec, ISymbolMarkSpec, ITextMarkSpec } from '../typings';
11
- import type { ICartesianAxisCommonTheme } from '../component/axis/cartesian/interface';
12
- import type { IPolarAxisCommonTheme } from '../component/axis/polar/interface';
13
- import type { ComponentTypeEnum } from '../component/interface';
14
- import type { IIndicatorTheme } from '../component/indicator/interface';
4
+ import type { IArcMarkSpec, IAreaMarkSpec, ILineMarkSpec, IRectMarkSpec, ISymbolMarkSpec, ITextMarkSpec, IPathMarkSpec } from '../typings';
15
5
  import type { MarkTypeEnum } from '../mark/interface';
16
6
  import type { IThemeColorScheme } from './color-scheme/interface';
17
- import type { IColorLegendTheme, ISizeLegendTheme } from '../component/legend/continuous';
18
- import type { IMarkAreaTheme } from '../component/marker/mark-area/interface';
19
- import type { IPlayerTheme } from '../component/player';
20
- import type { IMarkPointTheme } from '../component/marker/mark-point/interface';
21
- import type { IBrushTheme } from '../component/brush/interface';
22
- import type { ITitleTheme } from '../component/title';
23
7
  import type { IGradientColor } from '@visactor/vrender';
8
+ import type { IComponentTheme } from '../component/interface';
24
9
  export interface ITheme {
25
10
  name?: string;
26
11
  background?: string | IGradientColor;
27
12
  padding?: ILayoutPaddingSpec;
28
13
  fontFamily?: string;
29
- mark?: IGlobalMarkTheme;
30
14
  colorScheme?: IThemeColorScheme;
15
+ mark?: IGlobalMarkThemeByType;
16
+ markByName?: IGlobalMarkThemeByName;
31
17
  series?: ISeriesTheme;
32
- axis?: IAxisCommonTheme;
33
- axisX?: ICartesianAxisCommonTheme;
34
- axisY?: ICartesianAxisCommonTheme;
35
- axisRadius?: IPolarAxisCommonTheme;
36
- axisAngle?: IPolarAxisCommonTheme;
37
- [ComponentTypeEnum.discreteLegend]?: IDiscreteLegendTheme;
38
- [ComponentTypeEnum.colorLegend]?: IColorLegendTheme;
39
- [ComponentTypeEnum.sizeLegend]?: ISizeLegendTheme;
40
- [ComponentTypeEnum.markLine]?: IMarkLineTheme;
41
- [ComponentTypeEnum.markArea]?: IMarkAreaTheme;
42
- [ComponentTypeEnum.markPoint]?: IMarkPointTheme;
43
- [ComponentTypeEnum.tooltip]?: ITooltipTheme;
44
- [ComponentTypeEnum.crosshair]?: ICrosshairTheme;
45
- [ComponentTypeEnum.dataZoom]?: IDataZoomTheme;
46
- [ComponentTypeEnum.scrollBar]?: IScrollBarTheme;
47
- [ComponentTypeEnum.indicator]?: IIndicatorTheme;
48
- [ComponentTypeEnum.player]?: IPlayerTheme;
49
- [ComponentTypeEnum.brush]?: IBrushTheme;
50
- [ComponentTypeEnum.title]?: ITitleTheme;
18
+ component?: IComponentTheme;
51
19
  }
52
- export interface IGlobalMarkTheme {
20
+ export interface IGlobalMarkThemeByType {
53
21
  [MarkTypeEnum.line]?: Partial<IMarkTheme<ILineMarkSpec>>;
54
22
  [MarkTypeEnum.symbol]?: Partial<IMarkTheme<ISymbolMarkSpec>>;
55
23
  [MarkTypeEnum.area]?: Partial<IMarkTheme<IAreaMarkSpec>>;
56
24
  [MarkTypeEnum.rect]?: Partial<IMarkTheme<IRectMarkSpec>>;
57
25
  [MarkTypeEnum.arc]?: Partial<IMarkTheme<IArcMarkSpec>>;
58
26
  [MarkTypeEnum.text]?: Partial<IMarkTheme<ITextMarkSpec>>;
27
+ [MarkTypeEnum.path]?: Partial<IMarkTheme<IPathMarkSpec>>;
28
+ }
29
+ export interface IGlobalMarkThemeByName {
30
+ line?: Partial<IMarkTheme<ILineMarkSpec>>;
31
+ point?: Partial<IMarkTheme<ISymbolMarkSpec>>;
32
+ area?: Partial<IMarkTheme<IAreaMarkSpec>>;
33
+ bar?: Partial<IMarkTheme<IRectMarkSpec>>;
34
+ label?: Partial<IMarkTheme<ITextMarkSpec>>;
35
+ [markName: string]: Partial<IMarkTheme<any>>;
36
+ }
37
+ export interface IThemeConstants {
38
+ FONT_FAMILY: string;
39
+ LABEL_FONT_SIZE: number;
40
+ MAP_LABEL_FONT_SIZE: number;
41
+ TITLE_FONT_SIZE: number;
42
+ AXIS_TICK_SIZE: number;
59
43
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/theme/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { IAxisCommonTheme, ICommonAxisSpec } from './../component/axis/interface';\nimport type { ILayoutPaddingSpec } from '../model/interface';\nimport type { IDataZoomTheme, IScrollBarTheme } from '../component/data-zoom';\nimport type { ITooltipTheme } from '../component/tooltip/interface';\nimport type { IDiscreteLegendTheme } from '../component/legend/discrete/interface';\nimport type { IMarkLineTheme } from '../component/marker/mark-line/interface';\nimport type { ISeriesTheme } from '../series/interface';\nimport type { ICrosshairTheme } from '../component/crosshair/interface';\nimport type { IMarkTheme } from '../typings/spec';\nimport type {\n IArcMarkSpec,\n IAreaMarkSpec,\n ILineMarkSpec,\n IRectMarkSpec,\n ISymbolMarkSpec,\n ITextMarkSpec\n} from '../typings';\nimport type { ICartesianAxisCommonTheme } from '../component/axis/cartesian/interface';\nimport type { IPolarAxisCommonTheme } from '../component/axis/polar/interface';\nimport type { ComponentTypeEnum } from '../component/interface';\nimport type { IIndicatorTheme } from '../component/indicator/interface';\nimport type { MarkTypeEnum } from '../mark/interface';\nimport type { IThemeColorScheme } from './color-scheme/interface';\nimport type { IColorLegendTheme, ISizeLegendTheme } from '../component/legend/continuous';\nimport type { IMarkAreaTheme } from '../component/marker/mark-area/interface';\nimport type { IPlayerTheme } from '../component/player';\nimport type { IMarkPointTheme } from '../component/marker/mark-point/interface';\nimport type { IBrushTheme } from '../component/brush/interface';\nimport type { ITitleTheme } from '../component/title';\nimport type { IGradientColor } from '@visactor/vrender';\n\nexport interface ITheme {\n /** 主题命名 */\n name?: string;\n\n /** 图表层级的样式属性,用于配置背景色 */\n background?: string | IGradientColor;\n /** 图表内边距 */\n padding?: ILayoutPaddingSpec;\n /** 图表字体配置 */\n fontFamily?: string;\n\n /** 全局 mark 样式属性 */\n mark?: IGlobalMarkTheme;\n\n /** 全局色板 */\n colorScheme?: IThemeColorScheme;\n\n /** 系列 */\n series?: ISeriesTheme;\n\n // 组件的配置\n /**\n * 通用坐标轴配置\n */\n axis?: IAxisCommonTheme;\n /**\n * 笛卡尔坐标系下 x 轴的配置\n */\n axisX?: ICartesianAxisCommonTheme;\n /**\n * 笛卡尔坐标系下 y 轴配置\n */\n axisY?: ICartesianAxisCommonTheme;\n /**\n * 极坐标系下半径轴配置\n */\n axisRadius?: IPolarAxisCommonTheme;\n /**\n * 极坐标系下角度轴配置\n */\n axisAngle?: IPolarAxisCommonTheme;\n /**\n * 离散图例配置\n */\n [ComponentTypeEnum.discreteLegend]?: IDiscreteLegendTheme;\n /**\n * 连续颜色图例配置\n */\n [ComponentTypeEnum.colorLegend]?: IColorLegendTheme;\n /**\n * 连续尺寸图例配置\n */\n [ComponentTypeEnum.sizeLegend]?: ISizeLegendTheme;\n /**\n * markLine 标记配置\n */\n [ComponentTypeEnum.markLine]?: IMarkLineTheme;\n /**\n * markArea 标记配置\n */\n [ComponentTypeEnum.markArea]?: IMarkAreaTheme;\n /**\n * markPoint 标记配置\n */\n [ComponentTypeEnum.markPoint]?: IMarkPointTheme;\n /**\n * tooltip 组件配置\n */\n [ComponentTypeEnum.tooltip]?: ITooltipTheme;\n /**\n * crosshair 配置\n */\n [ComponentTypeEnum.crosshair]?: ICrosshairTheme;\n /**\n * dataZoom 配置\n */\n [ComponentTypeEnum.dataZoom]?: IDataZoomTheme;\n /**\n * scrollbar 滚动条配置\n */\n [ComponentTypeEnum.scrollBar]?: IScrollBarTheme;\n /**\n * 指标卡组件配置\n */\n [ComponentTypeEnum.indicator]?: IIndicatorTheme;\n /**\n * 播放器配置\n */\n [ComponentTypeEnum.player]?: IPlayerTheme;\n /**\n * 框选配置\n */\n [ComponentTypeEnum.brush]?: IBrushTheme;\n /**\n * 图表标题配置\n */\n [ComponentTypeEnum.title]?: ITitleTheme;\n}\n\nexport interface IGlobalMarkTheme {\n [MarkTypeEnum.line]?: Partial<IMarkTheme<ILineMarkSpec>>;\n [MarkTypeEnum.symbol]?: Partial<IMarkTheme<ISymbolMarkSpec>>;\n [MarkTypeEnum.area]?: Partial<IMarkTheme<IAreaMarkSpec>>;\n [MarkTypeEnum.rect]?: Partial<IMarkTheme<IRectMarkSpec>>;\n [MarkTypeEnum.arc]?: Partial<IMarkTheme<IArcMarkSpec>>;\n [MarkTypeEnum.text]?: Partial<IMarkTheme<ITextMarkSpec>>;\n}\n"]}
1
+ {"version":3,"sources":["../src/theme/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { ILayoutPaddingSpec } from '../model/interface';\nimport type { ISeriesTheme } from '../series/interface';\nimport type { IMarkTheme } from '../typings/spec';\nimport type {\n IArcMarkSpec,\n IAreaMarkSpec,\n ILineMarkSpec,\n IRectMarkSpec,\n ISymbolMarkSpec,\n ITextMarkSpec,\n IPathMarkSpec\n} from '../typings';\nimport type { MarkTypeEnum } from '../mark/interface';\nimport type { IThemeColorScheme } from './color-scheme/interface';\nimport type { IGradientColor } from '@visactor/vrender';\nimport type { IComponentTheme } from '../component/interface';\n\nexport interface ITheme {\n /**\n * 第 1 种配置:主题信息\n */\n /** 主题命名 */\n name?: string;\n\n /**\n * 第 2 种配置:图表层级的样式属性\n */\n /** 图表背景色 */\n background?: string | IGradientColor;\n /** 图表内边距 */\n padding?: ILayoutPaddingSpec;\n /** 图表字体配置 */\n fontFamily?: string;\n\n /**\n * 3 种配置:色板\n */\n /** 全局色板 */\n colorScheme?: IThemeColorScheme;\n\n /**\n * 4 种配置:全局 mark 属性配置\n */\n /** 全局 mark 样式属性,按 mark 类别索引 */\n mark?: IGlobalMarkThemeByType;\n /** 全局 mark 样式属性,按 mark 名称索引,优先级更高 */\n markByName?: IGlobalMarkThemeByName;\n\n /**\n * 5 种配置:系列属性配置\n */\n /** 系列样式属性 */\n series?: ISeriesTheme;\n\n /**\n * 6 种配置:组件属性配置\n */\n /** 组件样式属性 */\n component?: IComponentTheme;\n}\n\nexport interface IGlobalMarkThemeByType {\n [MarkTypeEnum.line]?: Partial<IMarkTheme<ILineMarkSpec>>;\n [MarkTypeEnum.symbol]?: Partial<IMarkTheme<ISymbolMarkSpec>>;\n [MarkTypeEnum.area]?: Partial<IMarkTheme<IAreaMarkSpec>>;\n [MarkTypeEnum.rect]?: Partial<IMarkTheme<IRectMarkSpec>>;\n [MarkTypeEnum.arc]?: Partial<IMarkTheme<IArcMarkSpec>>;\n [MarkTypeEnum.text]?: Partial<IMarkTheme<ITextMarkSpec>>;\n [MarkTypeEnum.path]?: Partial<IMarkTheme<IPathMarkSpec>>;\n}\n\nexport interface IGlobalMarkThemeByName {\n /** used in lineSeries, areaSeries, radarSeries, etc. */\n line?: Partial<IMarkTheme<ILineMarkSpec>>;\n /** used in lineSeries, areaSeries, radarSeries, scatterSeries etc. */\n point?: Partial<IMarkTheme<ISymbolMarkSpec>>;\n /** used in lineSeries, areaSeries, radarSeries, etc. */\n area?: Partial<IMarkTheme<IAreaMarkSpec>>;\n /** used in barSeries, rangeColumnSeries etc. */\n bar?: Partial<IMarkTheme<IRectMarkSpec>>;\n /** used in many series */\n label?: Partial<IMarkTheme<ITextMarkSpec>>;\n\n [markName: string]: Partial<IMarkTheme<any>>;\n}\n\nexport interface IThemeConstants {\n FONT_FAMILY: string;\n LABEL_FONT_SIZE: number;\n MAP_LABEL_FONT_SIZE: number;\n TITLE_FONT_SIZE: number;\n AXIS_TICK_SIZE: number;\n}\n"]}
@@ -9,4 +9,5 @@ export declare class ThemeManager {
9
9
  static getDefaultTheme(): ITheme;
10
10
  static setCurrentTheme(name: string): void;
11
11
  static getCurrentTheme(): ITheme;
12
+ static getCurrentThemeName(): string;
12
13
  }
@@ -2,6 +2,8 @@ import { merge } from "@visactor/vutils";
2
2
 
3
3
  import { buildinThemeMap, defaultThemeName } from "./buildin-theme";
4
4
 
5
+ import { InstanceManager } from "../core/instance-manager";
6
+
5
7
  export class ThemeManager {
6
8
  static registerTheme(name, theme) {
7
9
  name && ThemeManager.themes.set(name, merge({}, ThemeManager.getDefaultTheme(), theme));
@@ -19,11 +21,14 @@ export class ThemeManager {
19
21
  return ThemeManager.themes.get(defaultThemeName);
20
22
  }
21
23
  static setCurrentTheme(name) {
22
- ThemeManager.themeExist(name) && (ThemeManager._currentThemeName = name);
24
+ ThemeManager.themeExist(name) && (ThemeManager._currentThemeName = name, InstanceManager.forEach((instance => null == instance ? void 0 : instance.setCurrentTheme(name))));
23
25
  }
24
26
  static getCurrentTheme() {
25
27
  return ThemeManager.getTheme(ThemeManager._currentThemeName);
26
28
  }
29
+ static getCurrentThemeName() {
30
+ return ThemeManager._currentThemeName;
31
+ }
27
32
  }
28
33
 
29
34
  ThemeManager.themes = new Map, ThemeManager._currentThemeName = defaultThemeName,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/theme/theme-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGpE,MAAM,OAAO,YAAY;IAYvB,MAAM,CAAC,aAAa,CAAC,IAAY,EAAE,KAAsB;QACvD,IAAI,CAAC,IAAI,EAAE;YACT,OAAO;SACR;QAED,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,YAAY,CAAC,eAAe,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;IAClF,CAAC;IAOD,MAAM,CAAC,QAAQ,CAAC,IAAY;QAC1B,OAAO,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,eAAe,EAAE,CAAC;IACzE,CAAC;IAOD,MAAM,CAAC,WAAW,CAAC,IAAY;QAC7B,OAAO,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IAOD,MAAM,CAAC,UAAU,CAAC,IAAY;QAC5B,OAAO,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAGD,MAAM,CAAC,eAAe;QACpB,OAAO,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACnD,CAAC;IAGD,MAAM,CAAC,eAAe,CAAC,IAAY;QACjC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;YAClC,OAAO;SACR;QACD,YAAY,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAExC,CAAC;IAGD,MAAM,CAAC,eAAe;QACpB,OAAO,YAAY,CAAC,QAAQ,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAC/D,CAAC;;AA9DM,mBAAM,GAAwB,IAAI,GAAG,EAAE,CAAC;AAEhC,8BAAiB,GAAW,gBAAgB,CAAC;AAgE9D,YAAY,CAAC,aAAa,CAAC,gBAAgB,EAAE,eAAe,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAEpF,eAAe,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;IACtC,IAAI,IAAI,KAAK,gBAAgB,EAAE;QAC7B,YAAY,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;KACzC;AACH,CAAC,CAAC,CAAC","file":"theme-manager.js","sourcesContent":["import { merge } from '@visactor/vutils';\nimport { buildinThemeMap, defaultThemeName } from './buildin-theme';\nimport type { ITheme } from './interface';\n\nexport class ThemeManager {\n /** 主题字典 */\n static themes: Map<string, ITheme> = new Map();\n\n private static _currentThemeName: string = defaultThemeName; // 设置缺省为默认主题\n\n /**\n * 注册主题\n * @param name 主题名称\n * @param theme 主题配置\n * @returns\n */\n static registerTheme(name: string, theme: Partial<ITheme>) {\n if (!name) {\n return;\n }\n // 所有主题基于默认主题扩展,保证基础值\n ThemeManager.themes.set(name, merge({}, ThemeManager.getDefaultTheme(), theme));\n }\n\n /**\n * 获取主题\n * @param name 主题名称\n * @returns\n */\n static getTheme(name: string) {\n return ThemeManager.themes.get(name) || ThemeManager.getDefaultTheme();\n }\n\n /**\n * 移除主题\n * @param name 主题名称\n * @returns 是否移除成功\n */\n static removeTheme(name: string): boolean {\n return ThemeManager.themes.delete(name);\n }\n\n /**\n * 判断主题是否存在\n * @param name 主题名称\n * @returns 是否存在\n */\n static themeExist(name: string) {\n return ThemeManager.themes.has(name);\n }\n\n /** 获取图表默认主题(非用户配置) */\n static getDefaultTheme(): ITheme {\n return ThemeManager.themes.get(defaultThemeName);\n }\n\n /** 设置当前主题(所有实例生效) */\n static setCurrentTheme(name: string) {\n if (!ThemeManager.themeExist(name)) {\n return;\n }\n ThemeManager._currentThemeName = name;\n //VChart.set\n }\n\n /** 获取当前主题(只能获取用户通过`setCurrentTheme`方法设置过的主题,默认值为默认主题) */\n static getCurrentTheme(): ITheme {\n return ThemeManager.getTheme(ThemeManager._currentThemeName);\n }\n}\n\n// 先注册默认主题\nThemeManager.registerTheme(defaultThemeName, buildinThemeMap.get(defaultThemeName));\n// 再注册其他内置主题\nbuildinThemeMap.forEach((theme, name) => {\n if (name !== defaultThemeName) {\n ThemeManager.registerTheme(name, theme);\n }\n});\n"]}
1
+ {"version":3,"sources":["../src/theme/theme-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAG3D,MAAM,OAAO,YAAY;IAYvB,MAAM,CAAC,aAAa,CAAC,IAAY,EAAE,KAAsB;QACvD,IAAI,CAAC,IAAI,EAAE;YACT,OAAO;SACR;QAED,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,YAAY,CAAC,eAAe,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;IAClF,CAAC;IAOD,MAAM,CAAC,QAAQ,CAAC,IAAY;QAC1B,OAAO,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,eAAe,EAAE,CAAC;IACzE,CAAC;IAOD,MAAM,CAAC,WAAW,CAAC,IAAY;QAC7B,OAAO,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IAOD,MAAM,CAAC,UAAU,CAAC,IAAY;QAC5B,OAAO,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAGD,MAAM,CAAC,eAAe;QACpB,OAAO,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACnD,CAAC;IAGD,MAAM,CAAC,eAAe,CAAC,IAAY;QACjC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;YAClC,OAAO;SACR;QACD,YAAY,CAAC,iBAAiB,GAAG,IAAI,CAAC;QACtC,eAAe,CAAC,OAAO,CAAC,CAAC,QAAiB,EAAE,EAAE,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;IAClF,CAAC;IAGD,MAAM,CAAC,eAAe;QACpB,OAAO,YAAY,CAAC,QAAQ,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAC/D,CAAC;IAGD,MAAM,CAAC,mBAAmB;QACxB,OAAO,YAAY,CAAC,iBAAiB,CAAC;IACxC,CAAC;;AAnEM,mBAAM,GAAwB,IAAI,GAAG,EAAE,CAAC;AAEhC,8BAAiB,GAAW,gBAAgB,CAAC;AAqE9D,YAAY,CAAC,aAAa,CAAC,gBAAgB,EAAE,eAAe,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAEpF,eAAe,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;IACtC,IAAI,IAAI,KAAK,gBAAgB,EAAE;QAC7B,YAAY,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;KACzC;AACH,CAAC,CAAC,CAAC","file":"theme-manager.js","sourcesContent":["import { merge } from '@visactor/vutils';\nimport { buildinThemeMap, defaultThemeName } from './buildin-theme';\nimport type { ITheme } from './interface';\nimport { InstanceManager } from '../core/instance-manager';\nimport type { IVChart } from '../core/interface';\n\nexport class ThemeManager {\n /** 主题字典 */\n static themes: Map<string, ITheme> = new Map();\n\n private static _currentThemeName: string = defaultThemeName; // 设置缺省为默认主题\n\n /**\n * 注册主题\n * @param name 主题名称\n * @param theme 主题配置\n * @returns\n */\n static registerTheme(name: string, theme: Partial<ITheme>) {\n if (!name) {\n return;\n }\n // 所有主题基于默认主题扩展,保证基础值\n ThemeManager.themes.set(name, merge({}, ThemeManager.getDefaultTheme(), theme));\n }\n\n /**\n * 获取主题\n * @param name 主题名称\n * @returns\n */\n static getTheme(name: string) {\n return ThemeManager.themes.get(name) || ThemeManager.getDefaultTheme();\n }\n\n /**\n * 移除主题\n * @param name 主题名称\n * @returns 是否移除成功\n */\n static removeTheme(name: string): boolean {\n return ThemeManager.themes.delete(name);\n }\n\n /**\n * 判断主题是否存在\n * @param name 主题名称\n * @returns 是否存在\n */\n static themeExist(name: string) {\n return ThemeManager.themes.has(name);\n }\n\n /** 获取图表默认主题(非用户配置) */\n static getDefaultTheme(): ITheme {\n return ThemeManager.themes.get(defaultThemeName);\n }\n\n /** 设置当前主题(所有实例生效) */\n static setCurrentTheme(name: string) {\n if (!ThemeManager.themeExist(name)) {\n return;\n }\n ThemeManager._currentThemeName = name;\n InstanceManager.forEach((instance: IVChart) => instance?.setCurrentTheme(name));\n }\n\n /** 获取当前主题(只能获取用户通过`setCurrentTheme`方法设置过的主题,默认值为默认主题) */\n static getCurrentTheme(): ITheme {\n return ThemeManager.getTheme(ThemeManager._currentThemeName);\n }\n\n /** 获取当前主题名称(只能获取用户通过`setCurrentTheme`方法设置过的主题,默认值为默认主题) */\n static getCurrentThemeName(): string {\n return ThemeManager._currentThemeName;\n }\n}\n\n// 先注册默认主题\nThemeManager.registerTheme(defaultThemeName, buildinThemeMap.get(defaultThemeName));\n// 再注册其他内置主题\nbuildinThemeMap.forEach((theme, name) => {\n if (name !== defaultThemeName) {\n ThemeManager.registerTheme(name, theme);\n }\n});\n"]}
@@ -20,7 +20,7 @@ import type { ICircularProgressChartSpec } from '../../chart/progress/circular/i
20
20
  import type { ILinearProgressChartSpec } from '../../chart/progress/linear/interface';
21
21
  import type { IWordCloudChartSpec } from '../../chart/word-cloud/interface';
22
22
  import type { IFunnelChartSpec } from '../../chart/funnel/interface';
23
- import type { IBoxPlotChartSpec } from '../../chart/boxplot/interface';
23
+ import type { IBoxPlotChartSpec } from '../../chart/box-plot/interface';
24
24
  import type { ISunburstChartSpec } from '../../chart/sunburst/interface';
25
25
  import type { ICirclePackingChartSpec } from '../../chart/circle-packing/interface';
26
26
  export interface ChartSpecMap {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/typings/spec/chart.ts"],"names":[],"mappings":"","file":"chart.js","sourcesContent":["import type { ICommonChartSpec } from '../../chart/common';\nimport type { IGaugeChartSpec } from '../../chart/gauge/interface';\nimport type { IHeatmapChartSpec } from '../../chart/heatmap';\nimport type { IRangeAreaChartSpec } from '../../chart/range-area';\nimport type { ISankeyChartSpec } from '../../chart/sankey';\nimport type { ITreemapChartSpec } from '../../chart/treemap';\nimport type { IWaterfallChartSpec } from '../../chart/waterfall';\nimport type { IAreaChartSpec } from '../../chart/area/interface';\nimport type { ILineChartSpec } from '../../chart/line/interface';\nimport type { IBarChartSpec } from '../../chart/bar/interface';\nimport type { IHistogramChartSpec } from '../../chart/histogram/interface';\nimport type { IRangeColumnChartSpec } from '../../chart/range-column/interface';\nimport type { IMapChartSpec } from '../../chart/map/interface';\nimport type { IPieChartSpec } from '../../chart/pie/interface';\nimport type { IRadarChartSpec } from '../../chart/radar/interface';\nimport type { IRoseChartSpec } from '../../chart/rose/interface';\nimport type { IScatterChartSpec } from '../../chart/scatter/interface';\nimport type { ISequenceChartSpec } from '../../chart/sequence/interface';\nimport type { ICircularProgressChartSpec } from '../../chart/progress/circular/interface';\nimport type { ILinearProgressChartSpec } from '../../chart/progress/linear/interface';\nimport type { IWordCloudChartSpec } from '../../chart/word-cloud/interface';\nimport type { IFunnelChartSpec } from '../../chart/funnel/interface';\nimport type { IBoxPlotChartSpec } from '../../chart/boxplot/interface';\nimport type { ISunburstChartSpec } from '../../chart/sunburst/interface';\nimport type { ICirclePackingChartSpec } from '../../chart/circle-packing/interface';\n\nexport interface ChartSpecMap {\n readonly common: ICommonChartSpec;\n readonly area: IAreaChartSpec;\n readonly line: ILineChartSpec;\n readonly bar: IBarChartSpec;\n // readonly bar3d: IBar3DChartSpec;\n readonly histogram: IHistogramChartSpec;\n // readonly histogram3d: IHistogram3DChartSpec;\n readonly rangeColumn: IRangeColumnChartSpec;\n // readonly rangeColumn3d: IRangeColumn3DChartSpec;\n readonly rangeArea: IRangeAreaChartSpec;\n readonly map: IMapChartSpec;\n readonly pie: IPieChartSpec;\n // readonly pie3d: IPie3DChartSpec;\n readonly radar: IRadarChartSpec;\n readonly rose: IRoseChartSpec;\n readonly scatter: IScatterChartSpec;\n readonly sequence: ISequenceChartSpec;\n readonly circleProgress: ICircularProgressChartSpec;\n readonly linearProgress: ILinearProgressChartSpec;\n readonly wordCloud: IWordCloudChartSpec;\n // readonly wordCloud3d: IWordCloud3DChartSpec;\n readonly funnel: IFunnelChartSpec;\n // readonly funnel3d: IFunnel3DChartSpec;\n readonly waterfall: IWaterfallChartSpec;\n readonly boxplot: IBoxPlotChartSpec;\n readonly gauge: IGaugeChartSpec;\n readonly sankey: ISankeyChartSpec;\n readonly treemap: ITreemapChartSpec;\n readonly sunburst: ISunburstChartSpec;\n readonly circlePacking: ICirclePackingChartSpec;\n readonly heatmap: IHeatmapChartSpec;\n}\n\nexport type ISpec = ChartSpecMap[keyof ChartSpecMap];\n"]}
1
+ {"version":3,"sources":["../src/typings/spec/chart.ts"],"names":[],"mappings":"","file":"chart.js","sourcesContent":["import type { ICommonChartSpec } from '../../chart/common';\nimport type { IGaugeChartSpec } from '../../chart/gauge/interface';\nimport type { IHeatmapChartSpec } from '../../chart/heatmap';\nimport type { IRangeAreaChartSpec } from '../../chart/range-area';\nimport type { ISankeyChartSpec } from '../../chart/sankey';\nimport type { ITreemapChartSpec } from '../../chart/treemap';\nimport type { IWaterfallChartSpec } from '../../chart/waterfall';\nimport type { IAreaChartSpec } from '../../chart/area/interface';\nimport type { ILineChartSpec } from '../../chart/line/interface';\nimport type { IBarChartSpec } from '../../chart/bar/interface';\nimport type { IHistogramChartSpec } from '../../chart/histogram/interface';\nimport type { IRangeColumnChartSpec } from '../../chart/range-column/interface';\nimport type { IMapChartSpec } from '../../chart/map/interface';\nimport type { IPieChartSpec } from '../../chart/pie/interface';\nimport type { IRadarChartSpec } from '../../chart/radar/interface';\nimport type { IRoseChartSpec } from '../../chart/rose/interface';\nimport type { IScatterChartSpec } from '../../chart/scatter/interface';\nimport type { ISequenceChartSpec } from '../../chart/sequence/interface';\nimport type { ICircularProgressChartSpec } from '../../chart/progress/circular/interface';\nimport type { ILinearProgressChartSpec } from '../../chart/progress/linear/interface';\nimport type { IWordCloudChartSpec } from '../../chart/word-cloud/interface';\nimport type { IFunnelChartSpec } from '../../chart/funnel/interface';\nimport type { IBoxPlotChartSpec } from '../../chart/box-plot/interface';\nimport type { ISunburstChartSpec } from '../../chart/sunburst/interface';\nimport type { ICirclePackingChartSpec } from '../../chart/circle-packing/interface';\n\nexport interface ChartSpecMap {\n readonly common: ICommonChartSpec;\n readonly area: IAreaChartSpec;\n readonly line: ILineChartSpec;\n readonly bar: IBarChartSpec;\n // readonly bar3d: IBar3DChartSpec;\n readonly histogram: IHistogramChartSpec;\n // readonly histogram3d: IHistogram3DChartSpec;\n readonly rangeColumn: IRangeColumnChartSpec;\n // readonly rangeColumn3d: IRangeColumn3DChartSpec;\n readonly rangeArea: IRangeAreaChartSpec;\n readonly map: IMapChartSpec;\n readonly pie: IPieChartSpec;\n // readonly pie3d: IPie3DChartSpec;\n readonly radar: IRadarChartSpec;\n readonly rose: IRoseChartSpec;\n readonly scatter: IScatterChartSpec;\n readonly sequence: ISequenceChartSpec;\n readonly circleProgress: ICircularProgressChartSpec;\n readonly linearProgress: ILinearProgressChartSpec;\n readonly wordCloud: IWordCloudChartSpec;\n // readonly wordCloud3d: IWordCloud3DChartSpec;\n readonly funnel: IFunnelChartSpec;\n // readonly funnel3d: IFunnel3DChartSpec;\n readonly waterfall: IWaterfallChartSpec;\n readonly boxplot: IBoxPlotChartSpec;\n readonly gauge: IGaugeChartSpec;\n readonly sankey: ISankeyChartSpec;\n readonly treemap: ITreemapChartSpec;\n readonly sunburst: ISunburstChartSpec;\n readonly circlePacking: ICirclePackingChartSpec;\n readonly heatmap: IHeatmapChartSpec;\n}\n\nexport type ISpec = ChartSpecMap[keyof ChartSpecMap];\n"]}
@@ -7,6 +7,7 @@ import type { IPoint } from './coordinate';
7
7
  import type { IAttributeOpt, IModelMarkAttributeContext } from '../compile/mark';
8
8
  import type { Datum, StringOrNumber } from './common';
9
9
  import type { IPadding } from '@visactor/vutils';
10
+ import type { IColorKey } from '../theme/color-scheme/interface';
10
11
  export interface IVisualSpecBase<D, T> {
11
12
  type: ScaleType;
12
13
  domain: D[];
@@ -41,7 +42,7 @@ export interface ICommonSpec {
41
42
  x?: number;
42
43
  y?: number;
43
44
  z?: number;
44
- stroke?: string | IGradient;
45
+ stroke?: string | IGradient | IColorKey;
45
46
  strokeOpacity?: number;
46
47
  opacity?: number;
47
48
  lineWidth?: number;
@@ -83,7 +84,7 @@ export interface ICommonSpec {
83
84
  [key: string]: any;
84
85
  }
85
86
  export interface IFillMarkSpec extends ICommonSpec {
86
- fill?: VisualType<string> | IGradient | false;
87
+ fill?: VisualType<string> | IGradient | false | IColorKey;
87
88
  fillOpacity?: number;
88
89
  }
89
90
  export interface ISymbolMarkSpec extends IFillMarkSpec {
@@ -157,11 +158,11 @@ export interface IBoxPlotMarkSpec extends ICommonSpec {
157
158
  shaftShape?: BoxPlotShaftShape;
158
159
  boxFill?: string;
159
160
  shaftFillOpacity?: number;
160
- min: (datum: Datum) => number;
161
- q1: (datum: Datum) => number;
162
- median: (datum: Datum) => number;
163
- q3: (datum: Datum) => number;
164
- max: (datum: Datum) => number;
161
+ min?: (datum: Datum) => number;
162
+ q1?: (datum: Datum) => number;
163
+ median?: (datum: Datum) => number;
164
+ q3?: (datum: Datum) => number;
165
+ max?: (datum: Datum) => number;
165
166
  }
166
167
  export interface IOutlierMarkSpec {
167
168
  fill?: string;
@@ -178,11 +179,11 @@ export interface IPathMarkSpec extends IFillMarkSpec {
178
179
  smoothScale?: boolean;
179
180
  }
180
181
  export interface ILinkPathMarkSpec extends IFillMarkSpec {
181
- x0: number;
182
- y0: number;
183
- x1: number;
184
- y1: number;
185
- thickness: number;
182
+ x0?: number;
183
+ y0?: number;
184
+ x1?: number;
185
+ y1?: number;
186
+ thickness?: number;
186
187
  curvature?: number;
187
188
  round?: boolean;
188
189
  ratio?: number;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/typings/visual.ts"],"names":[],"mappings":"","file":"visual.js","sourcesContent":["import type { DataView } from '@visactor/vdataset';\nimport type { Cursor } from './cursor';\nimport type { InterpolateType } from './interpolate';\nimport type { ScaleType } from './scale';\nimport type { ShapeType } from './shape';\nimport type { IPoint } from './coordinate';\nimport type { IAttributeOpt, IModelMarkAttributeContext } from '../compile/mark';\nimport type { Datum, StringOrNumber } from './common';\nimport type { IPadding } from '@visactor/vutils';\n\n// 基础的visual 对应 scale 的属性\nexport interface IVisualSpecBase<D, T> {\n type: ScaleType;\n domain: D[];\n range: T[];\n}\n// 用来给用户进行mark.style上的映射配置。所以要配置数据维度\nexport interface IVisualSpecStyle<D, T> extends IVisualSpecBase<D, T> {\n field?: string;\n}\n\nexport type IDataDomainSpec = {\n dataId: string;\n fields: string[];\n};\n\n// 用来提供给用户进行 scale 配置 所以名字是必选的 对用户配置\nexport interface IVisualSpecScale<D, T> extends Omit<IVisualSpecBase<D, T>, 'domain'> {\n id: string;\n domain:\n | IVisualSpecBase<D, T>['domain']\n // 使用数据的字段值,如果 scale 是连续的,就取区间,如果是离散的就使用 values 。\n // 不考虑图表内的交互等数据筛选,这里只用原始数据的统计信息\n | IDataDomainSpec[];\n}\n// 对用户配置\nexport type IVisual<D = any, R = any> = IVisualSpecStyle<D, R> | IVisualScale;\n\nexport interface IVisualScale {\n /**\n * 对应 IVisualSpecScale 的用户配置 scale-id\n */\n scale: string;\n /**\n * 指定参与映射的数据字段\n */\n field?: string;\n /**\n * 当用户指定 field 后,用该属性来控制值域。\n * @default 'none'\n */\n changeDomain?: 'none' | 'replace' | 'expand';\n}\n\nexport type FunctionType<T> = (\n datum: Datum,\n context: IModelMarkAttributeContext,\n opt?: IAttributeOpt,\n source?: DataView\n) => T;\nexport type ValueType<T> = T;\nexport type VisualType<T> = ValueType<T> | FunctionType<T> | IVisual<unknown, T>;\n\nexport type TextureType =\n | 'circle'\n | 'dimond'\n | 'rect'\n | 'vertical-line'\n | 'horizontal-line'\n | 'bias-lr'\n | 'bias-rl'\n | 'grid';\n\n/**\n * style格式转换\n */\nexport type ConvertToMarkStyleSpec<T extends Record<string, any>> = {\n [key in keyof T]: VisualType<T[key]>;\n};\n\nexport interface ICommonSpec {\n visible?: boolean;\n x?: number;\n y?: number;\n z?: number;\n stroke?: string | IGradient;\n strokeOpacity?: number;\n opacity?: number;\n lineWidth?: number;\n lineDash?: number[];\n lineDashOffset?: number;\n\n cursor?: Cursor;\n zIndex?: number;\n borderSize?: number;\n borderColor?: string;\n borderSpacing?: number;\n borderOpacity?: number;\n angle?: number;\n anchor?: [number, number];\n\n // 3d旋转的属性\n beta?: number;\n alpha?: number;\n anchor3d?: [number, number];\n\n /**\n * 选择模式,精确模式,粗糙模式(包围盒模式),自定义模式\n */\n pickMode?: 'accurate' | 'imprecise' | 'custom';\n boundsMode?: 'accurate' | 'imprecise';\n\n // 以下是纹理相关的属性\n /**\n * 纹理的类型\n */\n texture?: TextureType | string;\n /**\n * 纹理的颜色\n */\n textureColor?: string;\n /**\n * 纹理单元的大小\n */\n textureSize?: number; // 纹理大小\n /**\n * 纹理之间空隙的大小\n */\n texturePadding?: number;\n\n /**\n * 外边框\n */\n outerBorder?: {\n /**\n * 间距\n */\n distance: number | string;\n stroke?: string | IGradient;\n strokeOpacity?: number;\n lineWidth?: number;\n lineDash?: number[];\n lineDashOffset?: number;\n };\n /**\n * 内边框\n */\n innerBorder?: {\n /**\n * 间距\n */\n distance: number | string;\n stroke?: string | IGradient;\n strokeOpacity?: number;\n lineWidth?: number;\n lineDash?: number[];\n lineDashOffset?: number;\n };\n\n [key: string]: any;\n}\n\nexport interface IFillMarkSpec extends ICommonSpec {\n fill?: VisualType<string> | IGradient | false;\n fillOpacity?: number;\n}\n\n// export interface IFillImageMarkSpec {\n// fillImage?: string;\n// repeatX?: RepeatXYType;\n// repeatY?: RepeatXYType;\n// imageOrigin?: ImageOriginType;\n// }\n\nexport interface ISymbolMarkSpec extends IFillMarkSpec {\n dx?: number;\n dy?: number;\n size?: number | number[];\n /** 对外声明使用shape,vrender图形属性对应的是shape */\n shape?: ShapeType | string;\n /** FIXME: vrender Symbol接收的图形属性,暂时都申明一下 */\n symbolType?: ShapeType | string;\n scaleX?: number;\n scaleY?: number;\n}\n\n// lineMark 和 areaMark 共同配置\nexport interface ILineLikeMarkSpec extends IFillMarkSpec {\n curveType?: InterpolateType;\n defined?: boolean;\n /**\n * @private 一个标志位,用于通知 VGrammar 是否执行 getLineSegmentConfigs 方法\n */\n enableSegments?: boolean;\n}\n\nexport interface IAreaMarkSpec extends ILineLikeMarkSpec {\n x1?: number;\n y1?: number;\n\n orient?: 'horizontal' | 'vertical';\n}\n\nexport interface ILineMarkSpec extends ILineLikeMarkSpec {\n lineCap?: LineStrokeCap;\n lineJoin?: LineStrokeJoin;\n miterLimit?: number;\n strokeBoundsBuffer?: number;\n}\n\nexport interface IRuleMarkSpec extends ILineMarkSpec {\n x1?: number;\n y1?: number;\n}\n\nexport interface ITextMarkSpec extends IFillMarkSpec {\n text?: StringOrNumber | string[]; // todo: text配置支持回调\n dx?: number;\n dy?: number;\n fontSize?: number;\n /** @deprecated 后续需要替换成 textAlign,暂时会兼容两种写法 */\n align?: TextAlign;\n textAlign?: TextAlign;\n /** @deprecated 后续需要替换成 textBaseline,暂时会兼容两种写法 */\n baseline?: TextBaseLine;\n textBaseline?: TextBaseLine;\n /** VRender 升级后,统一通过fontFamily声明,老的font配置不再支持 */\n fontFamily?: string;\n fontWeight?: FontWeight;\n fontStyle?: FontStyle;\n limit?: number;\n ellipsis?: string;\n // TODO: 这些不是常规的文字mark属性,待确认需求背景\n lineBreak?: string;\n underline?: boolean;\n lineThrough?: boolean;\n lineHeight?: number;\n}\n\nexport type IPositionedTextMarkSpec = Omit<ITextMarkSpec, 'align' | 'textAlign' | 'baseline' | 'textBaseline'>;\n\nexport interface IRectMarkSpec extends IFillMarkSpec {\n /**\n * @deprecated 后续需要替换成 borderRadius\n */\n cornerRadius?: number;\n /**\n * @deprecated 后续需要替换成 borderRadius\n */\n cornerRadiusTopLeft?: number;\n /**\n * @deprecated 后续需要替换成 borderRadius\n */\n cornerRadiusTopRight?: number;\n /**\n * @deprecated 后续需要替换成 borderRadius\n */\n cornerRadiusBottomLeft?: number;\n /**\n * @deprecated 后续需要替换成 borderRadius\n */\n cornerRadiusBottomRight?: number;\n\n borderRadius?: number | number[];\n\n width?: number;\n height?: number;\n x1?: number;\n y1?: number;\n}\n\n// 3d rect,支持length表示长宽高中的长属性(深度属性)\nexport interface IRect3dMarkSpec extends IRectMarkSpec {\n length?: number;\n}\n\nexport interface IBoxPlotMarkSpec extends ICommonSpec {\n /**\n * box描边宽度\n */\n lineWidth?: number;\n /**\n * box宽度\n */\n boxWidth?: number;\n /**\n * 最大最小值宽度\n */\n shaftWidth?: number;\n /**\n * 中轴线类型\n */\n shaftShape?: BoxPlotShaftShape;\n /**\n * 盒子填充颜色,为空则不填充\n */\n boxFill?: string;\n // /**\n // * 描边颜色\n // */\n // stroke?: string;\n /**\n * 中轴线透明度,仅当shaftType=bar时生效\n */\n shaftFillOpacity?: number;\n\n min: (datum: Datum) => number;\n q1: (datum: Datum) => number;\n median: (datum: Datum) => number;\n q3: (datum: Datum) => number;\n max: (datum: Datum) => number;\n}\n\nexport interface IOutlierMarkSpec {\n //异常点填充颜色\n fill?: string;\n //异常点大小\n size?: number;\n}\n\nexport interface IPathMarkSpec extends IFillMarkSpec {\n path?: string;\n scaleX?: number;\n scaleY?: number;\n scaleCenter?: { x: number; y: number };\n // TODO: 该属性后续可能会删除,未定\n // 平滑缩放,不然会发生跳变,在地图交互场景需要配置为true;常规path缩放不需要\n smoothScale?: boolean;\n}\n\nexport interface ILinkPathMarkSpec extends IFillMarkSpec {\n x0: number;\n y0: number;\n x1: number;\n y1: number;\n thickness: number;\n curvature?: number;\n /** round all the coordinates */\n round?: boolean;\n /** the ratio of normal style path */\n ratio?: number;\n align?: 'start' | 'end' | 'center';\n pathType?: 'line' | 'smooth' | 'polyline';\n endArrow?: boolean;\n startArrow?: boolean;\n backgroundStyle?: any;\n direction?: 'horizontal' | 'vertical' | 'LR' | 'RL' | 'TB' | 'BL' | 'radial';\n}\n\nexport interface IArcMarkSpec extends IFillMarkSpec {\n startAngle?: number;\n endAngle?: number;\n padAngle?: number;\n\n outerRadius?: number;\n innerRadius?: number;\n cornerRadius?: number;\n\n /** arc的中心点偏移距离 */\n centerOffset?: number;\n\n /** arc 的 roundCap 属性,即圆角是否伸出 startAngle 和 endAngle 之外 */\n cap?: boolean | [boolean, boolean];\n /** arc 在 roundCap 打开且应用环形渐变时是否对 cap 部分生效 */\n autoCapConical?: boolean;\n}\n\n// 3d arc,有高度配置\nexport interface IArc3dMarkSpec extends IArcMarkSpec {\n height?: number;\n}\n\nexport interface IProgressArcMarkSpec extends IArcMarkSpec {\n /** 进度条内侧 padding(接受负值) */\n innerPadding?: number;\n /** 进度条外侧 padding(接受负值) */\n outerPadding?: number;\n}\n\nexport interface ICellMarkSpec extends ISymbolMarkSpec {\n padding?: number | number[] | IPadding;\n}\n\nexport interface IGroupMarkSpec extends ICommonSpec, IFillMarkSpec {\n clip?: boolean;\n width?: number;\n height?: number;\n cornerRadius?: number;\n}\n\nexport interface IPolygonMarkSpec extends ICommonSpec, IFillMarkSpec {\n points?: IPoint[];\n borderRadius?: number | number[];\n scaleX?: number;\n scaleY?: number;\n}\n\nexport interface IPyramid3dMarkSpec extends IPolygonMarkSpec {\n // 只能有4个顶点\n points?: IPoint[];\n}\n\n/**\n * ImageFill\n */\nexport type RepeatType = 'no-repeat' | 'repeat-x' | 'repeat-y' | 'repeat';\nexport type RepeatXYType = 'no-repeat' | 'repeat' | 'stretch';\nexport type ImageOriginType = 'top' | 'bottom';\n\n/**\n * gradient\n */\nexport type GradientPropValue<T> = ValueType<T> | FunctionType<T>;\nexport type GradientStop = {\n offset: GradientPropValue<number>;\n color: GradientPropValue<string>;\n opacity?: number;\n};\nexport interface IGradientLinear {\n x0?: GradientPropValue<number>;\n y0?: GradientPropValue<number>;\n x1?: GradientPropValue<number>;\n y1?: GradientPropValue<number>;\n stops: GradientStop[];\n gradient: 'linear';\n}\n\nexport interface IGradientRadial {\n r0?: GradientPropValue<number>;\n x0?: GradientPropValue<number>;\n y0?: GradientPropValue<number>;\n x1?: GradientPropValue<number>;\n y1?: GradientPropValue<number>;\n r1?: GradientPropValue<number>;\n stops: GradientStop[];\n gradient: 'radial';\n}\n\nexport interface IGradientConical {\n x?: GradientPropValue<number>;\n y?: GradientPropValue<number>;\n startAngle?: GradientPropValue<number>;\n endAngle?: GradientPropValue<number>;\n stops: GradientStop[];\n gradient: 'conical';\n}\n\nexport type GradientType = 'linear' | 'radial' | 'conical';\nexport type IGradient = IGradientLinear | IGradientRadial | IGradientConical;\n\nexport type LineStrokeCap = 'butt' | 'round' | 'square';\nexport type LineStrokeJoin = 'arcs' | 'bevel' | 'miter' | 'miter-clip' | 'round';\n\nexport type BoxPlotShaftShape = 'line' | 'bar';\n/**\n * threshold\n */\nexport interface IThresholdStyle extends IVisualSpecStyle<number, string> {\n domain: number[];\n field: string;\n range: string[];\n type: 'threshold';\n}\n\n// FIXME: For some tool methods that need to use common configuration types\nexport interface IUnknownMarkSpec extends ICommonSpec {\n [key: string]: unknown;\n}\n\n/**\n * text\n */\nexport type TextAlign = 'left' | 'right' | 'center';\nexport type TextBaseLine = 'top' | 'bottom' | 'middle' | 'alphabetic';\nexport type FontStyle = 'normal' | 'italic' | 'oblique' | string;\nexport type FontWeight = 'normal' | 'bold' | 'lighter' | 'bolder' | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;\n"]}
1
+ {"version":3,"sources":["../src/typings/visual.ts"],"names":[],"mappings":"","file":"visual.js","sourcesContent":["import type { DataView } from '@visactor/vdataset';\nimport type { Cursor } from './cursor';\nimport type { InterpolateType } from './interpolate';\nimport type { ScaleType } from './scale';\nimport type { ShapeType } from './shape';\nimport type { IPoint } from './coordinate';\nimport type { IAttributeOpt, IModelMarkAttributeContext } from '../compile/mark';\nimport type { Datum, StringOrNumber } from './common';\nimport type { IPadding } from '@visactor/vutils';\nimport type { IColorKey } from '../theme/color-scheme/interface';\n\n// 基础的visual 对应 scale 的属性\nexport interface IVisualSpecBase<D, T> {\n type: ScaleType;\n domain: D[];\n range: T[];\n}\n// 用来给用户进行mark.style上的映射配置。所以要配置数据维度\nexport interface IVisualSpecStyle<D, T> extends IVisualSpecBase<D, T> {\n field?: string;\n}\n\nexport type IDataDomainSpec = {\n dataId: string;\n fields: string[];\n};\n\n// 用来提供给用户进行 scale 配置 所以名字是必选的 对用户配置\nexport interface IVisualSpecScale<D, T> extends Omit<IVisualSpecBase<D, T>, 'domain'> {\n id: string;\n domain:\n | IVisualSpecBase<D, T>['domain']\n // 使用数据的字段值,如果 scale 是连续的,就取区间,如果是离散的就使用 values 。\n // 不考虑图表内的交互等数据筛选,这里只用原始数据的统计信息\n | IDataDomainSpec[];\n}\n// 对用户配置\nexport type IVisual<D = any, R = any> = IVisualSpecStyle<D, R> | IVisualScale;\n\nexport interface IVisualScale {\n /**\n * 对应 IVisualSpecScale 的用户配置 scale-id\n */\n scale: string;\n /**\n * 指定参与映射的数据字段\n */\n field?: string;\n /**\n * 当用户指定 field 后,用该属性来控制值域。\n * @default 'none'\n */\n changeDomain?: 'none' | 'replace' | 'expand';\n}\n\nexport type FunctionType<T> = (\n datum: Datum,\n context: IModelMarkAttributeContext,\n opt?: IAttributeOpt,\n source?: DataView\n) => T;\nexport type ValueType<T> = T;\nexport type VisualType<T> = ValueType<T> | FunctionType<T> | IVisual<unknown, T>;\n\nexport type TextureType =\n | 'circle'\n | 'dimond'\n | 'rect'\n | 'vertical-line'\n | 'horizontal-line'\n | 'bias-lr'\n | 'bias-rl'\n | 'grid';\n\n/**\n * style格式转换\n */\nexport type ConvertToMarkStyleSpec<T extends Record<string, any>> = {\n [key in keyof T]: VisualType<T[key]>;\n};\n\nexport interface ICommonSpec {\n visible?: boolean;\n x?: number;\n y?: number;\n z?: number;\n stroke?: string | IGradient | IColorKey;\n strokeOpacity?: number;\n opacity?: number;\n lineWidth?: number;\n lineDash?: number[];\n lineDashOffset?: number;\n\n cursor?: Cursor;\n zIndex?: number;\n borderSize?: number;\n borderColor?: string;\n borderSpacing?: number;\n borderOpacity?: number;\n angle?: number;\n anchor?: [number, number];\n\n // 3d旋转的属性\n beta?: number;\n alpha?: number;\n anchor3d?: [number, number];\n\n /**\n * 选择模式,精确模式,粗糙模式(包围盒模式),自定义模式\n */\n pickMode?: 'accurate' | 'imprecise' | 'custom';\n boundsMode?: 'accurate' | 'imprecise';\n\n // 以下是纹理相关的属性\n /**\n * 纹理的类型\n */\n texture?: TextureType | string;\n /**\n * 纹理的颜色\n */\n textureColor?: string;\n /**\n * 纹理单元的大小\n */\n textureSize?: number; // 纹理大小\n /**\n * 纹理之间空隙的大小\n */\n texturePadding?: number;\n\n /**\n * 外边框\n */\n outerBorder?: {\n /**\n * 间距\n */\n distance: number | string;\n stroke?: string | IGradient;\n strokeOpacity?: number;\n lineWidth?: number;\n lineDash?: number[];\n lineDashOffset?: number;\n };\n /**\n * 内边框\n */\n innerBorder?: {\n /**\n * 间距\n */\n distance: number | string;\n stroke?: string | IGradient;\n strokeOpacity?: number;\n lineWidth?: number;\n lineDash?: number[];\n lineDashOffset?: number;\n };\n\n [key: string]: any;\n}\n\nexport interface IFillMarkSpec extends ICommonSpec {\n fill?: VisualType<string> | IGradient | false | IColorKey;\n fillOpacity?: number;\n}\n\n// export interface IFillImageMarkSpec {\n// fillImage?: string;\n// repeatX?: RepeatXYType;\n// repeatY?: RepeatXYType;\n// imageOrigin?: ImageOriginType;\n// }\n\nexport interface ISymbolMarkSpec extends IFillMarkSpec {\n dx?: number;\n dy?: number;\n size?: number | number[];\n /** 对外声明使用shape,vrender图形属性对应的是shape */\n shape?: ShapeType | string;\n /** FIXME: vrender Symbol接收的图形属性,暂时都申明一下 */\n symbolType?: ShapeType | string;\n scaleX?: number;\n scaleY?: number;\n}\n\n// lineMark 和 areaMark 共同配置\nexport interface ILineLikeMarkSpec extends IFillMarkSpec {\n curveType?: InterpolateType;\n defined?: boolean;\n /**\n * @private 一个标志位,用于通知 VGrammar 是否执行 getLineSegmentConfigs 方法\n */\n enableSegments?: boolean;\n}\n\nexport interface IAreaMarkSpec extends ILineLikeMarkSpec {\n x1?: number;\n y1?: number;\n\n orient?: 'horizontal' | 'vertical';\n}\n\nexport interface ILineMarkSpec extends ILineLikeMarkSpec {\n lineCap?: LineStrokeCap;\n lineJoin?: LineStrokeJoin;\n miterLimit?: number;\n strokeBoundsBuffer?: number;\n}\n\nexport interface IRuleMarkSpec extends ILineMarkSpec {\n x1?: number;\n y1?: number;\n}\n\nexport interface ITextMarkSpec extends IFillMarkSpec {\n text?: StringOrNumber | string[]; // todo: text配置支持回调\n dx?: number;\n dy?: number;\n fontSize?: number;\n /** @deprecated 后续需要替换成 textAlign,暂时会兼容两种写法 */\n align?: TextAlign;\n textAlign?: TextAlign;\n /** @deprecated 后续需要替换成 textBaseline,暂时会兼容两种写法 */\n baseline?: TextBaseLine;\n textBaseline?: TextBaseLine;\n /** VRender 升级后,统一通过fontFamily声明,老的font配置不再支持 */\n fontFamily?: string;\n fontWeight?: FontWeight;\n fontStyle?: FontStyle;\n limit?: number;\n ellipsis?: string;\n // TODO: 这些不是常规的文字mark属性,待确认需求背景\n lineBreak?: string;\n underline?: boolean;\n lineThrough?: boolean;\n lineHeight?: number;\n}\n\nexport type IPositionedTextMarkSpec = Omit<ITextMarkSpec, 'align' | 'textAlign' | 'baseline' | 'textBaseline'>;\n\nexport interface IRectMarkSpec extends IFillMarkSpec {\n /**\n * @deprecated 后续需要替换成 borderRadius\n */\n cornerRadius?: number;\n /**\n * @deprecated 后续需要替换成 borderRadius\n */\n cornerRadiusTopLeft?: number;\n /**\n * @deprecated 后续需要替换成 borderRadius\n */\n cornerRadiusTopRight?: number;\n /**\n * @deprecated 后续需要替换成 borderRadius\n */\n cornerRadiusBottomLeft?: number;\n /**\n * @deprecated 后续需要替换成 borderRadius\n */\n cornerRadiusBottomRight?: number;\n\n borderRadius?: number | number[];\n\n width?: number;\n height?: number;\n x1?: number;\n y1?: number;\n}\n\n// 3d rect,支持length表示长宽高中的长属性(深度属性)\nexport interface IRect3dMarkSpec extends IRectMarkSpec {\n length?: number;\n}\n\nexport interface IBoxPlotMarkSpec extends ICommonSpec {\n /**\n * box描边宽度\n */\n lineWidth?: number;\n /**\n * box宽度\n */\n boxWidth?: number;\n /**\n * 最大最小值宽度\n */\n shaftWidth?: number;\n /**\n * 中轴线类型\n */\n shaftShape?: BoxPlotShaftShape;\n /**\n * 盒子填充颜色,为空则不填充\n */\n boxFill?: string;\n // /**\n // * 描边颜色\n // */\n // stroke?: string;\n /**\n * 中轴线透明度,仅当shaftType=bar时生效\n */\n shaftFillOpacity?: number;\n\n min?: (datum: Datum) => number;\n q1?: (datum: Datum) => number;\n median?: (datum: Datum) => number;\n q3?: (datum: Datum) => number;\n max?: (datum: Datum) => number;\n}\n\nexport interface IOutlierMarkSpec {\n //异常点填充颜色\n fill?: string;\n //异常点大小\n size?: number;\n}\n\nexport interface IPathMarkSpec extends IFillMarkSpec {\n path?: string;\n scaleX?: number;\n scaleY?: number;\n scaleCenter?: { x: number; y: number };\n // TODO: 该属性后续可能会删除,未定\n // 平滑缩放,不然会发生跳变,在地图交互场景需要配置为true;常规path缩放不需要\n smoothScale?: boolean;\n}\n\nexport interface ILinkPathMarkSpec extends IFillMarkSpec {\n x0?: number;\n y0?: number;\n x1?: number;\n y1?: number;\n thickness?: number;\n curvature?: number;\n /** round all the coordinates */\n round?: boolean;\n /** the ratio of normal style path */\n ratio?: number;\n align?: 'start' | 'end' | 'center';\n pathType?: 'line' | 'smooth' | 'polyline';\n endArrow?: boolean;\n startArrow?: boolean;\n backgroundStyle?: any;\n direction?: 'horizontal' | 'vertical' | 'LR' | 'RL' | 'TB' | 'BL' | 'radial';\n}\n\nexport interface IArcMarkSpec extends IFillMarkSpec {\n startAngle?: number;\n endAngle?: number;\n padAngle?: number;\n\n outerRadius?: number;\n innerRadius?: number;\n cornerRadius?: number;\n\n /** arc的中心点偏移距离 */\n centerOffset?: number;\n\n /** arc 的 roundCap 属性,即圆角是否伸出 startAngle 和 endAngle 之外 */\n cap?: boolean | [boolean, boolean];\n /** arc 在 roundCap 打开且应用环形渐变时是否对 cap 部分生效 */\n autoCapConical?: boolean;\n}\n\n// 3d arc,有高度配置\nexport interface IArc3dMarkSpec extends IArcMarkSpec {\n height?: number;\n}\n\nexport interface IProgressArcMarkSpec extends IArcMarkSpec {\n /** 进度条内侧 padding(接受负值) */\n innerPadding?: number;\n /** 进度条外侧 padding(接受负值) */\n outerPadding?: number;\n}\n\nexport interface ICellMarkSpec extends ISymbolMarkSpec {\n padding?: number | number[] | IPadding;\n}\n\nexport interface IGroupMarkSpec extends ICommonSpec, IFillMarkSpec {\n clip?: boolean;\n width?: number;\n height?: number;\n cornerRadius?: number;\n}\n\nexport interface IPolygonMarkSpec extends ICommonSpec, IFillMarkSpec {\n points?: IPoint[];\n borderRadius?: number | number[];\n scaleX?: number;\n scaleY?: number;\n}\n\nexport interface IPyramid3dMarkSpec extends IPolygonMarkSpec {\n // 只能有4个顶点\n points?: IPoint[];\n}\n\n/**\n * ImageFill\n */\nexport type RepeatType = 'no-repeat' | 'repeat-x' | 'repeat-y' | 'repeat';\nexport type RepeatXYType = 'no-repeat' | 'repeat' | 'stretch';\nexport type ImageOriginType = 'top' | 'bottom';\n\n/**\n * gradient\n */\nexport type GradientPropValue<T> = ValueType<T> | FunctionType<T>;\nexport type GradientStop = {\n offset: GradientPropValue<number>;\n color: GradientPropValue<string>;\n opacity?: number;\n};\nexport interface IGradientLinear {\n x0?: GradientPropValue<number>;\n y0?: GradientPropValue<number>;\n x1?: GradientPropValue<number>;\n y1?: GradientPropValue<number>;\n stops: GradientStop[];\n gradient: 'linear';\n}\n\nexport interface IGradientRadial {\n r0?: GradientPropValue<number>;\n x0?: GradientPropValue<number>;\n y0?: GradientPropValue<number>;\n x1?: GradientPropValue<number>;\n y1?: GradientPropValue<number>;\n r1?: GradientPropValue<number>;\n stops: GradientStop[];\n gradient: 'radial';\n}\n\nexport interface IGradientConical {\n x?: GradientPropValue<number>;\n y?: GradientPropValue<number>;\n startAngle?: GradientPropValue<number>;\n endAngle?: GradientPropValue<number>;\n stops: GradientStop[];\n gradient: 'conical';\n}\n\nexport type GradientType = 'linear' | 'radial' | 'conical';\nexport type IGradient = IGradientLinear | IGradientRadial | IGradientConical;\n\nexport type LineStrokeCap = 'butt' | 'round' | 'square';\nexport type LineStrokeJoin = 'arcs' | 'bevel' | 'miter' | 'miter-clip' | 'round';\n\nexport type BoxPlotShaftShape = 'line' | 'bar';\n/**\n * threshold\n */\nexport interface IThresholdStyle extends IVisualSpecStyle<number, string> {\n domain: number[];\n field: string;\n range: string[];\n type: 'threshold';\n}\n\n// FIXME: For some tool methods that need to use common configuration types\nexport interface IUnknownMarkSpec extends ICommonSpec {\n [key: string]: unknown;\n}\n\n/**\n * text\n */\nexport type TextAlign = 'left' | 'right' | 'center';\nexport type TextBaseLine = 'top' | 'bottom' | 'middle' | 'alphabetic';\nexport type FontStyle = 'normal' | 'italic' | 'oblique' | string;\nexport type FontWeight = 'normal' | 'bold' | 'lighter' | 'bolder' | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;\n"]}
@@ -1,6 +1,3 @@
1
1
  import { ColorUtil } from '@visactor/vutils';
2
- import type { SeriesTypeEnum } from '../series/interface';
3
- import type { IThemeColorScheme } from '../theme/color-scheme/interface';
4
2
  declare const Color: typeof ColorUtil.Color;
5
3
  export { Color };
6
- export declare const getActualColor: (value: any, colorScheme?: IThemeColorScheme, seriesType?: SeriesTypeEnum) => any;
package/esm/util/color.js CHANGED
@@ -1,16 +1,6 @@
1
1
  import { ColorUtil } from "@visactor/vutils";
2
2
 
3
- import { findColor, isColorKey } from "../theme/color-scheme/util";
4
-
5
3
  const {Color: Color} = ColorUtil;
6
4
 
7
5
  export { Color };
8
-
9
- export const getActualColor = (value, colorScheme, seriesType) => {
10
- if (isColorKey(value) && colorScheme) {
11
- const color = findColor(colorScheme, value, seriesType);
12
- if (color) return color;
13
- }
14
- return value;
15
- };
16
6
  //# sourceMappingURL=color.js.map