@visactor/vchart 1.6.7 → 1.7.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (993) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.js +44570 -43966
  3. package/build/index.min.js +1 -1
  4. package/build/tsconfig.tsbuildinfo +1 -1
  5. package/cjs/animation/utils.d.ts +2 -2
  6. package/cjs/chart/area/area.js +2 -1
  7. package/cjs/chart/area/area.js.map +1 -1
  8. package/cjs/chart/base-chart.d.ts +13 -16
  9. package/cjs/chart/base-chart.js +68 -68
  10. package/cjs/chart/base-chart.js.map +1 -1
  11. package/cjs/chart/interface/chart.d.ts +4 -6
  12. package/cjs/chart/interface/chart.js.map +1 -1
  13. package/cjs/chart/line/line.js +2 -1
  14. package/cjs/chart/line/line.js.map +1 -1
  15. package/cjs/chart/sequence/sequence.d.ts +1 -1
  16. package/cjs/chart/sequence/sequence.js +1 -1
  17. package/cjs/chart/sequence/sequence.js.map +1 -1
  18. package/cjs/compile/compiler.js +1 -2
  19. package/cjs/compile/grammar-item.js +2 -1
  20. package/cjs/compile/mark/compilable-mark.d.ts +10 -6
  21. package/cjs/compile/mark/compilable-mark.js +22 -11
  22. package/cjs/compile/mark/compilable-mark.js.map +1 -1
  23. package/cjs/compile/mark/interface.d.ts +6 -4
  24. package/cjs/compile/mark/interface.js.map +1 -1
  25. package/cjs/compile/mark/util.d.ts +1 -3
  26. package/cjs/compile/mark/util.js +1 -37
  27. package/cjs/compile/mark/util.js.map +1 -1
  28. package/cjs/component/axis/base-axis.d.ts +2 -4
  29. package/cjs/component/axis/base-axis.js +20 -35
  30. package/cjs/component/axis/base-axis.js.map +1 -1
  31. package/cjs/component/axis/cartesian/axis.d.ts +12 -22
  32. package/cjs/component/axis/cartesian/axis.js +51 -67
  33. package/cjs/component/axis/cartesian/axis.js.map +1 -1
  34. package/cjs/component/axis/cartesian/band-axis.d.ts +0 -7
  35. package/cjs/component/axis/cartesian/band-axis.js +0 -1
  36. package/cjs/component/axis/cartesian/band-axis.js.map +1 -1
  37. package/cjs/component/axis/cartesian/interface/common.d.ts +0 -6
  38. package/cjs/component/axis/cartesian/interface/common.js.map +1 -1
  39. package/cjs/component/axis/cartesian/interface/theme.d.ts +1 -1
  40. package/cjs/component/axis/cartesian/interface/theme.js.map +1 -1
  41. package/cjs/component/axis/interface/common.d.ts +0 -1
  42. package/cjs/component/axis/interface/common.js.map +1 -1
  43. package/cjs/component/axis/interface/spec.js.map +1 -1
  44. package/cjs/component/axis/mixin/band-axis-mixin.d.ts +0 -1
  45. package/cjs/component/axis/mixin/band-axis-mixin.js +2 -2
  46. package/cjs/component/axis/mixin/band-axis-mixin.js.map +1 -1
  47. package/cjs/component/axis/mixin/linear-axis-mixin.d.ts +0 -1
  48. package/cjs/component/axis/mixin/linear-axis-mixin.js +4 -3
  49. package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  50. package/cjs/component/axis/polar/axis.d.ts +3 -4
  51. package/cjs/component/axis/polar/axis.js +13 -15
  52. package/cjs/component/axis/polar/axis.js.map +1 -1
  53. package/cjs/component/base/base-component.d.ts +12 -4
  54. package/cjs/component/base/base-component.js +21 -11
  55. package/cjs/component/base/base-component.js.map +1 -1
  56. package/cjs/component/base/util.js +16 -12
  57. package/cjs/component/base/util.js.map +1 -1
  58. package/cjs/component/brush/brush.d.ts +2 -4
  59. package/cjs/component/brush/brush.js +4 -6
  60. package/cjs/component/brush/brush.js.map +1 -1
  61. package/cjs/component/crosshair/base.d.ts +3 -4
  62. package/cjs/component/crosshair/base.js +1 -1
  63. package/cjs/component/crosshair/base.js.map +1 -1
  64. package/cjs/component/crosshair/cartesian.d.ts +2 -0
  65. package/cjs/component/crosshair/cartesian.js +6 -8
  66. package/cjs/component/crosshair/cartesian.js.map +1 -1
  67. package/cjs/component/crosshair/interface/spec.d.ts +1 -1
  68. package/cjs/component/crosshair/interface/spec.js.map +1 -1
  69. package/cjs/component/crosshair/polar.d.ts +2 -0
  70. package/cjs/component/crosshair/polar.js +5 -8
  71. package/cjs/component/crosshair/polar.js.map +1 -1
  72. package/cjs/component/custom-mark/custom-mark.d.ts +2 -3
  73. package/cjs/component/custom-mark/custom-mark.js +2 -3
  74. package/cjs/component/custom-mark/custom-mark.js.map +1 -1
  75. package/cjs/component/data-zoom/data-filter-base-component.d.ts +8 -8
  76. package/cjs/component/data-zoom/data-filter-base-component.js +60 -38
  77. package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
  78. package/cjs/component/data-zoom/data-zoom/data-zoom.d.ts +4 -2
  79. package/cjs/component/data-zoom/data-zoom/data-zoom.js +47 -44
  80. package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  81. package/cjs/component/data-zoom/data-zoom/interface.d.ts +6 -1
  82. package/cjs/component/data-zoom/data-zoom/interface.js.map +1 -1
  83. package/cjs/component/data-zoom/scroll-bar/interface.d.ts +6 -2
  84. package/cjs/component/data-zoom/scroll-bar/interface.js.map +1 -1
  85. package/cjs/component/data-zoom/scroll-bar/scroll-bar.d.ts +3 -0
  86. package/cjs/component/data-zoom/scroll-bar/scroll-bar.js +24 -23
  87. package/cjs/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
  88. package/cjs/component/data-zoom/util.d.ts +4 -0
  89. package/cjs/component/data-zoom/util.js +11 -2
  90. package/cjs/component/data-zoom/util.js.map +1 -1
  91. package/cjs/component/geo/geo-coordinate.d.ts +3 -2
  92. package/cjs/component/geo/geo-coordinate.js +4 -4
  93. package/cjs/component/geo/geo-coordinate.js.map +1 -1
  94. package/cjs/component/index.d.ts +3 -2
  95. package/cjs/component/index.js.map +1 -1
  96. package/cjs/component/indicator/indicator.d.ts +1 -3
  97. package/cjs/component/indicator/indicator.js +4 -5
  98. package/cjs/component/indicator/indicator.js.map +1 -1
  99. package/cjs/component/indicator/interface.d.ts +1 -1
  100. package/cjs/component/indicator/interface.js.map +1 -1
  101. package/cjs/component/interface/common.d.ts +3 -3
  102. package/cjs/component/interface/common.js.map +1 -1
  103. package/cjs/component/interface/theme.d.ts +2 -1
  104. package/cjs/component/interface/theme.js.map +1 -1
  105. package/cjs/component/label/base-label.d.ts +2 -4
  106. package/cjs/component/label/base-label.js +1 -3
  107. package/cjs/component/label/base-label.js.map +1 -1
  108. package/cjs/component/label/interface.d.ts +4 -0
  109. package/cjs/component/label/interface.js.map +1 -1
  110. package/cjs/component/label/label.d.ts +5 -7
  111. package/cjs/component/label/label.js +15 -11
  112. package/cjs/component/label/label.js.map +1 -1
  113. package/cjs/component/label/totalLabel.d.ts +1 -3
  114. package/cjs/component/label/totalLabel.js +4 -4
  115. package/cjs/component/label/totalLabel.js.map +1 -1
  116. package/cjs/component/label/util.d.ts +9 -2
  117. package/cjs/component/label/util.js +20 -5
  118. package/cjs/component/label/util.js.map +1 -1
  119. package/cjs/component/legend/base-legend.d.ts +6 -9
  120. package/cjs/component/legend/base-legend.js +3 -9
  121. package/cjs/component/legend/base-legend.js.map +1 -1
  122. package/cjs/component/legend/continuous/legend.d.ts +4 -1
  123. package/cjs/component/legend/continuous/legend.js +7 -7
  124. package/cjs/component/legend/continuous/legend.js.map +1 -1
  125. package/cjs/component/legend/discrete/legend.d.ts +4 -1
  126. package/cjs/component/legend/discrete/legend.js +6 -7
  127. package/cjs/component/legend/discrete/legend.js.map +1 -1
  128. package/cjs/component/legend/discrete/util.d.ts +1 -1
  129. package/cjs/component/legend/discrete/util.js.map +1 -1
  130. package/cjs/component/legend/util.d.ts +2 -2
  131. package/cjs/component/map-label/component.d.ts +1 -3
  132. package/cjs/component/map-label/component.js +2 -3
  133. package/cjs/component/map-label/component.js.map +1 -1
  134. package/cjs/component/marker/base-marker.d.ts +7 -3
  135. package/cjs/component/marker/base-marker.js +43 -19
  136. package/cjs/component/marker/base-marker.js.map +1 -1
  137. package/cjs/component/marker/interface.d.ts +15 -4
  138. package/cjs/component/marker/interface.js.map +1 -1
  139. package/cjs/component/marker/mark-area/interface/spec.d.ts +1 -1
  140. package/cjs/component/marker/mark-area/interface/spec.js.map +1 -1
  141. package/cjs/component/marker/mark-area/mark-area.d.ts +1 -3
  142. package/cjs/component/marker/mark-area/mark-area.js +32 -20
  143. package/cjs/component/marker/mark-area/mark-area.js.map +1 -1
  144. package/cjs/component/marker/mark-line/interface/spec.d.ts +3 -4
  145. package/cjs/component/marker/mark-line/interface/spec.js.map +1 -1
  146. package/cjs/component/marker/mark-line/mark-line.d.ts +1 -3
  147. package/cjs/component/marker/mark-line/mark-line.js +36 -22
  148. package/cjs/component/marker/mark-line/mark-line.js.map +1 -1
  149. package/cjs/component/marker/mark-line/util.d.ts +3 -3
  150. package/cjs/component/marker/mark-line/util.js.map +1 -1
  151. package/cjs/component/marker/mark-point/interface/spec.d.ts +5 -4
  152. package/cjs/component/marker/mark-point/interface/spec.js.map +1 -1
  153. package/cjs/component/marker/mark-point/interface/theme.d.ts +5 -5
  154. package/cjs/component/marker/mark-point/interface/theme.js.map +1 -1
  155. package/cjs/component/marker/mark-point/mark-point.d.ts +1 -3
  156. package/cjs/component/marker/mark-point/mark-point.js +17 -13
  157. package/cjs/component/marker/mark-point/mark-point.js.map +1 -1
  158. package/cjs/component/marker/utils.d.ts +3 -4
  159. package/cjs/component/marker/utils.js +44 -25
  160. package/cjs/component/marker/utils.js.map +1 -1
  161. package/cjs/component/player/interface/theme.d.ts +1 -1
  162. package/cjs/component/player/interface/theme.js.map +1 -1
  163. package/cjs/component/player/player.d.ts +6 -7
  164. package/cjs/component/player/player.js +4 -7
  165. package/cjs/component/player/player.js.map +1 -1
  166. package/cjs/component/title/interface/theme.d.ts +1 -1
  167. package/cjs/component/title/interface/theme.js.map +1 -1
  168. package/cjs/component/title/title.d.ts +6 -9
  169. package/cjs/component/title/title.js +13 -24
  170. package/cjs/component/title/title.js.map +1 -1
  171. package/cjs/component/tooltip/handler/base.js +6 -6
  172. package/cjs/component/tooltip/handler/base.js.map +1 -1
  173. package/cjs/component/tooltip/handler/dom/util.js +3 -2
  174. package/cjs/component/tooltip/handler/dom/util.js.map +1 -1
  175. package/cjs/component/tooltip/handler/utils/attribute.d.ts +3 -3
  176. package/cjs/component/tooltip/handler/utils/attribute.js.map +1 -1
  177. package/cjs/component/tooltip/handler/utils/common.js.map +1 -1
  178. package/cjs/component/tooltip/interface/spec.d.ts +1 -1
  179. package/cjs/component/tooltip/interface/spec.js.map +1 -1
  180. package/cjs/component/tooltip/interface/theme.d.ts +10 -11
  181. package/cjs/component/tooltip/interface/theme.js.map +1 -1
  182. package/cjs/component/tooltip/tooltip.d.ts +3 -2
  183. package/cjs/component/tooltip/tooltip.js +7 -11
  184. package/cjs/component/tooltip/tooltip.js.map +1 -1
  185. package/cjs/component/util.d.ts +1 -3
  186. package/cjs/component/util.js +2 -2
  187. package/cjs/component/util.js.map +1 -1
  188. package/cjs/constant/index.js +2 -1
  189. package/cjs/constant/layout.d.ts +1 -0
  190. package/cjs/constant/layout.js +2 -2
  191. package/cjs/constant/layout.js.map +1 -1
  192. package/cjs/constant/scatter.js +1 -2
  193. package/cjs/core/expression-function.d.ts +12 -0
  194. package/cjs/core/expression-function.js +30 -0
  195. package/cjs/core/expression-function.js.map +1 -0
  196. package/cjs/core/factory.d.ts +5 -2
  197. package/cjs/core/factory.js +6 -3
  198. package/cjs/core/factory.js.map +1 -1
  199. package/cjs/core/index.d.ts +2 -1
  200. package/cjs/core/index.js +3 -2
  201. package/cjs/core/index.js.map +1 -1
  202. package/cjs/core/interface.d.ts +5 -0
  203. package/cjs/core/interface.js.map +1 -1
  204. package/cjs/core/vchart.d.ts +9 -1
  205. package/cjs/core/vchart.js +94 -68
  206. package/cjs/core/vchart.js.map +1 -1
  207. package/cjs/data/initialize.js +7 -6
  208. package/cjs/data/initialize.js.map +1 -1
  209. package/cjs/data/transforms/aggregation.d.ts +4 -3
  210. package/cjs/data/transforms/aggregation.js +4 -4
  211. package/cjs/data/transforms/aggregation.js.map +1 -1
  212. package/cjs/data/transforms/dimension-statistics.js +14 -4
  213. package/cjs/data/transforms/dimension-statistics.js.map +1 -1
  214. package/cjs/event/bubble.js +1 -2
  215. package/cjs/event/event.js +2 -1
  216. package/cjs/event/events/base.d.ts +16 -0
  217. package/cjs/event/events/base.js +23 -0
  218. package/cjs/event/events/base.js.map +1 -0
  219. package/cjs/event/events/dimension/util/cartesian.d.ts +1 -1
  220. package/cjs/event/events/dimension/util/cartesian.js.map +1 -1
  221. package/cjs/event/events/dimension/util/common.d.ts +1 -2
  222. package/cjs/event/events/dimension/util/common.js +1 -1
  223. package/cjs/event/events/dimension/util/common.js.map +1 -1
  224. package/cjs/event/events/dimension/util/polar.d.ts +1 -1
  225. package/cjs/event/events/dimension/util/polar.js.map +1 -1
  226. package/cjs/event/interface.d.ts +2 -2
  227. package/cjs/event/interface.js.map +1 -1
  228. package/cjs/index-wx-simple.d.ts +4 -0
  229. package/cjs/index-wx-simple.js +35 -0
  230. package/cjs/index-wx-simple.js.map +1 -0
  231. package/cjs/interaction/trigger.js +1 -1
  232. package/cjs/interaction/zoom/zoomable.d.ts +1 -0
  233. package/cjs/interaction/zoom/zoomable.js +6 -5
  234. package/cjs/interaction/zoom/zoomable.js.map +1 -1
  235. package/cjs/layout/base-layout.d.ts +3 -5
  236. package/cjs/layout/base-layout.js +9 -9
  237. package/cjs/layout/base-layout.js.map +1 -1
  238. package/cjs/layout/grid-layout/grid-layout.d.ts +1 -2
  239. package/cjs/layout/grid-layout/grid-layout.js +6 -4
  240. package/cjs/layout/grid-layout/grid-layout.js.map +1 -1
  241. package/cjs/layout/interface.d.ts +74 -6
  242. package/cjs/layout/interface.js.map +1 -1
  243. package/cjs/{model → layout}/layout-item.d.ts +35 -23
  244. package/cjs/{model → layout}/layout-item.js +98 -64
  245. package/cjs/layout/layout-item.js.map +1 -0
  246. package/cjs/layout/layout3d/index.d.ts +2 -4
  247. package/cjs/layout/layout3d/index.js +6 -6
  248. package/cjs/layout/layout3d/index.js.map +1 -1
  249. package/cjs/layout/util.d.ts +1 -1
  250. package/cjs/layout/util.js.map +1 -1
  251. package/cjs/mark/arc.js +2 -2
  252. package/cjs/mark/arc.js.map +1 -1
  253. package/cjs/mark/base/base-mark.d.ts +2 -2
  254. package/cjs/mark/base/base-mark.js +62 -40
  255. package/cjs/mark/base/base-mark.js.map +1 -1
  256. package/cjs/mark/label.js +1 -4
  257. package/cjs/mark/label.js.map +1 -1
  258. package/cjs/model/base-model.d.ts +10 -8
  259. package/cjs/model/base-model.js +27 -31
  260. package/cjs/model/base-model.js.map +1 -1
  261. package/cjs/model/interface.d.ts +21 -89
  262. package/cjs/model/interface.js.map +1 -1
  263. package/cjs/model/layout-model.d.ts +41 -0
  264. package/cjs/model/layout-model.js +86 -0
  265. package/cjs/model/layout-model.js.map +1 -0
  266. package/cjs/region/interface.d.ts +3 -2
  267. package/cjs/region/interface.js.map +1 -1
  268. package/cjs/region/region.d.ts +12 -7
  269. package/cjs/region/region.js +18 -10
  270. package/cjs/region/region.js.map +1 -1
  271. package/cjs/series/area/area.d.ts +1 -1
  272. package/cjs/series/area/area.js +5 -6
  273. package/cjs/series/area/area.js.map +1 -1
  274. package/cjs/series/area/interface.d.ts +4 -0
  275. package/cjs/series/area/interface.js.map +1 -1
  276. package/cjs/series/bar/bar.js +2 -4
  277. package/cjs/series/bar/bar.js.map +1 -1
  278. package/cjs/series/base/base-series.d.ts +14 -4
  279. package/cjs/series/base/base-series.js +40 -15
  280. package/cjs/series/base/base-series.js.map +1 -1
  281. package/cjs/series/cartesian/cartesian.d.ts +3 -0
  282. package/cjs/series/cartesian/cartesian.js +16 -4
  283. package/cjs/series/cartesian/cartesian.js.map +1 -1
  284. package/cjs/series/correlation/correlation.js +3 -7
  285. package/cjs/series/correlation/correlation.js.map +1 -1
  286. package/cjs/series/funnel/funnel-3d.js +1 -1
  287. package/cjs/series/funnel/funnel-3d.js.map +1 -1
  288. package/cjs/series/funnel/funnel.js +2 -6
  289. package/cjs/series/funnel/funnel.js.map +1 -1
  290. package/cjs/series/funnel/interface.d.ts +1 -2
  291. package/cjs/series/funnel/interface.js.map +1 -1
  292. package/cjs/series/gauge/gauge.d.ts +0 -1
  293. package/cjs/series/gauge/gauge.js +3 -8
  294. package/cjs/series/gauge/gauge.js.map +1 -1
  295. package/cjs/series/heatmap/heatmap.js +2 -4
  296. package/cjs/series/heatmap/heatmap.js.map +1 -1
  297. package/cjs/series/index.d.ts +2 -2
  298. package/cjs/series/index.js.map +1 -1
  299. package/cjs/series/interface/common.d.ts +2 -2
  300. package/cjs/series/interface/common.js.map +1 -1
  301. package/cjs/series/interface/series.d.ts +4 -2
  302. package/cjs/series/interface/series.js.map +1 -1
  303. package/cjs/series/interface/type.d.ts +3 -1
  304. package/cjs/series/interface/type.js +2 -1
  305. package/cjs/series/interface/type.js.map +1 -1
  306. package/cjs/series/line/interface.d.ts +4 -0
  307. package/cjs/series/line/interface.js.map +1 -1
  308. package/cjs/series/line/line.d.ts +1 -1
  309. package/cjs/series/line/line.js.map +1 -1
  310. package/cjs/series/map/map.js +2 -4
  311. package/cjs/series/map/map.js.map +1 -1
  312. package/cjs/series/mixin/line-mixin.d.ts +5 -2
  313. package/cjs/series/mixin/line-mixin.js +16 -10
  314. package/cjs/series/mixin/line-mixin.js.map +1 -1
  315. package/cjs/series/pie/pie.js +1 -4
  316. package/cjs/series/pie/pie.js.map +1 -1
  317. package/cjs/series/polar/progress-like/progress-like.js +4 -4
  318. package/cjs/series/polar/progress-like/progress-like.js.map +1 -1
  319. package/cjs/series/radar/animation.js.map +1 -1
  320. package/cjs/series/range-column/range-column.js +2 -2
  321. package/cjs/series/range-column/range-column.js.map +1 -1
  322. package/cjs/series/rose/rose.d.ts +2 -1
  323. package/cjs/series/rose/rose.js +2 -4
  324. package/cjs/series/rose/rose.js.map +1 -1
  325. package/cjs/series/scatter/scatter.js +2 -4
  326. package/cjs/series/scatter/scatter.js.map +1 -1
  327. package/cjs/series/waterfall/waterfall.js +1 -1
  328. package/cjs/series/waterfall/waterfall.js.map +1 -1
  329. package/cjs/series/word-cloud/base.d.ts +1 -0
  330. package/cjs/series/word-cloud/base.js +33 -33
  331. package/cjs/series/word-cloud/base.js.map +1 -1
  332. package/cjs/series/word-cloud/word-cloud-3d.js +32 -32
  333. package/cjs/series/word-cloud/word-cloud-3d.js.map +1 -1
  334. package/cjs/theme/builtin/common/component/axis/cartesian-axis.js +2 -2
  335. package/cjs/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -1
  336. package/cjs/theme/builtin/common/component/axis/common-axis.js +1 -1
  337. package/cjs/theme/builtin/common/component/axis/common-axis.js.map +1 -1
  338. package/cjs/theme/builtin/common/component/crosshair.js +5 -5
  339. package/cjs/theme/builtin/common/component/crosshair.js.map +1 -1
  340. package/cjs/theme/builtin/common/component/data-zoom.js +10 -10
  341. package/cjs/theme/builtin/common/component/data-zoom.js.map +1 -1
  342. package/cjs/theme/builtin/common/component/indicator.js +1 -1
  343. package/cjs/theme/builtin/common/component/indicator.js.map +1 -1
  344. package/cjs/theme/builtin/common/component/legend/color-legend.js +3 -4
  345. package/cjs/theme/builtin/common/component/legend/color-legend.js.map +1 -1
  346. package/cjs/theme/builtin/common/component/legend/discrete-legend.js +2 -2
  347. package/cjs/theme/builtin/common/component/legend/discrete-legend.js.map +1 -1
  348. package/cjs/theme/builtin/common/component/legend/size-legend.js +6 -6
  349. package/cjs/theme/builtin/common/component/legend/size-legend.js.map +1 -1
  350. package/cjs/theme/builtin/common/component/map-label.js.map +1 -1
  351. package/cjs/theme/builtin/common/component/mark-area.js.map +1 -1
  352. package/cjs/theme/builtin/common/component/mark-line.js +9 -9
  353. package/cjs/theme/builtin/common/component/mark-line.js.map +1 -1
  354. package/cjs/theme/builtin/common/component/mark-point.js +15 -3
  355. package/cjs/theme/builtin/common/component/mark-point.js.map +1 -1
  356. package/cjs/theme/builtin/common/component/player.js +7 -7
  357. package/cjs/theme/builtin/common/component/player.js.map +1 -1
  358. package/cjs/theme/builtin/common/component/poptip.js +3 -4
  359. package/cjs/theme/builtin/common/component/poptip.js.map +1 -1
  360. package/cjs/theme/builtin/common/component/scroll-bar.js +20 -7
  361. package/cjs/theme/builtin/common/component/scroll-bar.js.map +1 -1
  362. package/cjs/theme/builtin/common/component/title.js +1 -1
  363. package/cjs/theme/builtin/common/component/title.js.map +1 -1
  364. package/cjs/theme/builtin/common/component/tooltip.d.ts +2 -1
  365. package/cjs/theme/builtin/common/component/tooltip.js +3 -4
  366. package/cjs/theme/builtin/common/component/tooltip.js.map +1 -1
  367. package/cjs/theme/builtin/common/component/total-label.js.map +1 -1
  368. package/cjs/theme/builtin/common/mark.js.map +1 -1
  369. package/cjs/theme/builtin/common/series/rangeColumn.js +1 -1
  370. package/cjs/theme/builtin/common/series/rangeColumn.js.map +1 -1
  371. package/cjs/theme/builtin/common-mobile/component/axis/band-axis.d.ts +2 -0
  372. package/cjs/theme/builtin/common-mobile/component/axis/band-axis.js +22 -0
  373. package/cjs/theme/builtin/common-mobile/component/axis/band-axis.js.map +1 -0
  374. package/cjs/theme/builtin/common-mobile/component/axis/cartesian-axis.d.ts +3 -0
  375. package/cjs/theme/builtin/common-mobile/component/axis/cartesian-axis.js +36 -0
  376. package/cjs/theme/builtin/common-mobile/component/axis/cartesian-axis.js.map +1 -0
  377. package/cjs/theme/builtin/common-mobile/component/axis/common-axis.d.ts +2 -0
  378. package/cjs/theme/builtin/common-mobile/component/axis/common-axis.js +42 -0
  379. package/cjs/theme/builtin/common-mobile/component/axis/common-axis.js.map +1 -0
  380. package/cjs/theme/builtin/common-mobile/component/axis/linear-axis.d.ts +2 -0
  381. package/cjs/theme/builtin/common-mobile/component/axis/linear-axis.js +22 -0
  382. package/cjs/theme/builtin/common-mobile/component/axis/linear-axis.js.map +1 -0
  383. package/cjs/theme/builtin/common-mobile/component/axis/polar-axis.d.ts +3 -0
  384. package/cjs/theme/builtin/common-mobile/component/axis/polar-axis.js +25 -0
  385. package/cjs/theme/builtin/common-mobile/component/axis/polar-axis.js.map +1 -0
  386. package/cjs/theme/builtin/common-mobile/component/crosshair.d.ts +2 -0
  387. package/cjs/theme/builtin/common-mobile/component/crosshair.js +39 -0
  388. package/cjs/theme/builtin/common-mobile/component/crosshair.js.map +1 -0
  389. package/cjs/theme/builtin/common-mobile/component/data-zoom.d.ts +2 -0
  390. package/cjs/theme/builtin/common-mobile/component/data-zoom.js +40 -0
  391. package/cjs/theme/builtin/common-mobile/component/data-zoom.js.map +1 -0
  392. package/cjs/theme/builtin/common-mobile/component/index.d.ts +2 -0
  393. package/cjs/theme/builtin/common-mobile/component/index.js +33 -0
  394. package/cjs/theme/builtin/common-mobile/component/index.js.map +1 -0
  395. package/cjs/theme/builtin/common-mobile/component/indicator.d.ts +2 -0
  396. package/cjs/theme/builtin/common-mobile/component/indicator.js +23 -0
  397. package/cjs/theme/builtin/common-mobile/component/indicator.js.map +1 -0
  398. package/cjs/theme/builtin/common-mobile/component/legend/color-legend.d.ts +2 -0
  399. package/cjs/theme/builtin/common-mobile/component/legend/color-legend.js +23 -0
  400. package/cjs/theme/builtin/common-mobile/component/legend/color-legend.js.map +1 -0
  401. package/cjs/theme/builtin/common-mobile/component/legend/continuous.d.ts +2 -0
  402. package/cjs/theme/builtin/common-mobile/component/legend/continuous.js +44 -0
  403. package/cjs/theme/builtin/common-mobile/component/legend/continuous.js.map +1 -0
  404. package/cjs/theme/builtin/common-mobile/component/legend/discrete-legend.d.ts +2 -0
  405. package/cjs/theme/builtin/common-mobile/component/legend/discrete-legend.js +39 -0
  406. package/cjs/theme/builtin/common-mobile/component/legend/discrete-legend.js.map +1 -0
  407. package/cjs/theme/builtin/common-mobile/component/legend/size-legend.d.ts +2 -0
  408. package/cjs/theme/builtin/common-mobile/component/legend/size-legend.js +23 -0
  409. package/cjs/theme/builtin/common-mobile/component/legend/size-legend.js.map +1 -0
  410. package/cjs/theme/builtin/common-mobile/component/map-label.d.ts +2 -0
  411. package/cjs/theme/builtin/common-mobile/component/map-label.js +39 -0
  412. package/cjs/theme/builtin/common-mobile/component/map-label.js.map +1 -0
  413. package/cjs/theme/builtin/common-mobile/component/mark-area.d.ts +2 -0
  414. package/cjs/theme/builtin/common-mobile/component/mark-area.js +24 -0
  415. package/cjs/theme/builtin/common-mobile/component/mark-area.js.map +1 -0
  416. package/cjs/theme/builtin/common-mobile/component/mark-line.d.ts +2 -0
  417. package/cjs/theme/builtin/common-mobile/component/mark-line.js +33 -0
  418. package/cjs/theme/builtin/common-mobile/component/mark-line.js.map +1 -0
  419. package/cjs/theme/builtin/common-mobile/component/mark-point.d.ts +2 -0
  420. package/cjs/theme/builtin/common-mobile/component/mark-point.js +19 -0
  421. package/cjs/theme/builtin/common-mobile/component/mark-point.js.map +1 -0
  422. package/cjs/theme/builtin/common-mobile/component/player.d.ts +2 -0
  423. package/cjs/theme/builtin/common-mobile/component/player.js +51 -0
  424. package/cjs/theme/builtin/common-mobile/component/player.js.map +1 -0
  425. package/cjs/theme/builtin/common-mobile/component/poptip.d.ts +2 -0
  426. package/cjs/theme/builtin/common-mobile/component/poptip.js +25 -0
  427. package/cjs/theme/builtin/common-mobile/component/poptip.js.map +1 -0
  428. package/cjs/theme/builtin/common-mobile/component/title.d.ts +2 -0
  429. package/cjs/theme/builtin/common-mobile/component/title.js +23 -0
  430. package/cjs/theme/builtin/common-mobile/component/title.js.map +1 -0
  431. package/cjs/theme/builtin/common-mobile/component/tooltip.d.ts +2 -0
  432. package/cjs/theme/builtin/common-mobile/component/tooltip.js +43 -0
  433. package/cjs/theme/builtin/common-mobile/component/tooltip.js.map +1 -0
  434. package/cjs/theme/builtin/common-mobile/component/total-label.d.ts +2 -0
  435. package/cjs/theme/builtin/common-mobile/component/total-label.js +16 -0
  436. package/cjs/theme/builtin/common-mobile/component/total-label.js.map +1 -0
  437. package/cjs/theme/builtin/common-mobile/constants.d.ts +2 -0
  438. package/cjs/theme/builtin/common-mobile/constants.js +23 -0
  439. package/cjs/theme/builtin/common-mobile/constants.js.map +1 -0
  440. package/cjs/theme/builtin/common-mobile/mark.d.ts +3 -0
  441. package/cjs/theme/builtin/common-mobile/mark.js +35 -0
  442. package/cjs/theme/builtin/common-mobile/mark.js.map +1 -0
  443. package/cjs/theme/builtin/dark/color-scheme.js +20 -11
  444. package/cjs/theme/builtin/dark/color-scheme.js.map +1 -1
  445. package/cjs/theme/builtin/dark-mobile/index.d.ts +2 -0
  446. package/cjs/theme/builtin/dark-mobile/index.js +18 -0
  447. package/cjs/theme/builtin/dark-mobile/index.js.map +1 -0
  448. package/cjs/theme/builtin/index.d.ts +2 -4
  449. package/cjs/theme/builtin/index.js +17 -20
  450. package/cjs/theme/builtin/index.js.map +1 -1
  451. package/cjs/theme/builtin/light/color-scheme.js +19 -10
  452. package/cjs/theme/builtin/light/color-scheme.js.map +1 -1
  453. package/cjs/theme/builtin/light-mobile/index.d.ts +2 -0
  454. package/cjs/theme/builtin/light-mobile/index.js +18 -0
  455. package/cjs/theme/builtin/light-mobile/index.js.map +1 -0
  456. package/cjs/theme/color-scheme/builtin/interface.d.ts +16 -7
  457. package/cjs/theme/color-scheme/builtin/interface.js.map +1 -1
  458. package/cjs/theme/color-scheme/legacy.js +18 -2
  459. package/cjs/theme/color-scheme/legacy.js.map +1 -1
  460. package/cjs/theme/color-scheme/util.js +2 -2
  461. package/cjs/theme/color-scheme/util.js.map +1 -1
  462. package/cjs/theme/interface.d.ts +1 -2
  463. package/cjs/theme/interface.js.map +1 -1
  464. package/cjs/theme/theme-manager.d.ts +1 -1
  465. package/cjs/theme/theme-manager.js +2 -2
  466. package/cjs/theme/theme-manager.js.map +1 -1
  467. package/cjs/typings/index.d.ts +1 -0
  468. package/cjs/typings/index.js +2 -1
  469. package/cjs/typings/index.js.map +1 -1
  470. package/cjs/typings/layout.d.ts +23 -0
  471. package/cjs/typings/layout.js +6 -0
  472. package/cjs/typings/layout.js.map +1 -0
  473. package/cjs/typings/spec/common.d.ts +2 -4
  474. package/cjs/typings/spec/common.js.map +1 -1
  475. package/cjs/typings/visual.d.ts +1 -1
  476. package/cjs/typings/visual.js.map +1 -1
  477. package/cjs/util/space.d.ts +1 -1
  478. package/cjs/util/space.js.map +1 -1
  479. package/cjs/util/spec/background.js +8 -14
  480. package/cjs/util/spec/background.js.map +1 -1
  481. package/cjs/util/spec/common.d.ts +1 -1
  482. package/cjs/util/spec/common.js +2 -2
  483. package/cjs/util/spec/common.js.map +1 -1
  484. package/cjs/util/spec/preprocess.d.ts +1 -1
  485. package/cjs/util/spec/preprocess.js +7 -17
  486. package/cjs/util/spec/preprocess.js.map +1 -1
  487. package/cjs/util/spec/transform.d.ts +2 -0
  488. package/cjs/util/spec/transform.js +18 -2
  489. package/cjs/util/spec/transform.js.map +1 -1
  490. package/cjs/vchart-all.js +2 -3
  491. package/cjs/vchart-all.js.map +1 -1
  492. package/cjs/vchart-simple.d.ts +1 -0
  493. package/cjs/vchart-simple.js +4 -4
  494. package/cjs/vchart-simple.js.map +1 -1
  495. package/esm/animation/utils.d.ts +2 -2
  496. package/esm/chart/area/area.js +2 -1
  497. package/esm/chart/area/area.js.map +1 -1
  498. package/esm/chart/base-chart.d.ts +13 -16
  499. package/esm/chart/base-chart.js +66 -67
  500. package/esm/chart/base-chart.js.map +1 -1
  501. package/esm/chart/interface/chart.d.ts +4 -6
  502. package/esm/chart/interface/chart.js.map +1 -1
  503. package/esm/chart/line/line.js +2 -1
  504. package/esm/chart/line/line.js.map +1 -1
  505. package/esm/chart/sequence/sequence.d.ts +1 -1
  506. package/esm/chart/sequence/sequence.js +1 -1
  507. package/esm/chart/sequence/sequence.js.map +1 -1
  508. package/esm/compile/compiler.js +1 -2
  509. package/esm/compile/grammar-item.js +2 -1
  510. package/esm/compile/mark/compilable-mark.d.ts +10 -6
  511. package/esm/compile/mark/compilable-mark.js +23 -12
  512. package/esm/compile/mark/compilable-mark.js.map +1 -1
  513. package/esm/compile/mark/interface.d.ts +6 -4
  514. package/esm/compile/mark/interface.js.map +1 -1
  515. package/esm/compile/mark/util.d.ts +1 -3
  516. package/esm/compile/mark/util.js +0 -34
  517. package/esm/compile/mark/util.js.map +1 -1
  518. package/esm/component/axis/base-axis.d.ts +2 -4
  519. package/esm/component/axis/base-axis.js +19 -36
  520. package/esm/component/axis/base-axis.js.map +1 -1
  521. package/esm/component/axis/cartesian/axis.d.ts +12 -22
  522. package/esm/component/axis/cartesian/axis.js +49 -63
  523. package/esm/component/axis/cartesian/axis.js.map +1 -1
  524. package/esm/component/axis/cartesian/band-axis.d.ts +0 -7
  525. package/esm/component/axis/cartesian/band-axis.js +0 -1
  526. package/esm/component/axis/cartesian/band-axis.js.map +1 -1
  527. package/esm/component/axis/cartesian/interface/common.d.ts +0 -6
  528. package/esm/component/axis/cartesian/interface/common.js.map +1 -1
  529. package/esm/component/axis/cartesian/interface/theme.d.ts +1 -1
  530. package/esm/component/axis/cartesian/interface/theme.js.map +1 -1
  531. package/esm/component/axis/interface/common.d.ts +0 -1
  532. package/esm/component/axis/interface/common.js.map +1 -1
  533. package/esm/component/axis/interface/spec.js.map +1 -1
  534. package/esm/component/axis/mixin/band-axis-mixin.d.ts +0 -1
  535. package/esm/component/axis/mixin/band-axis-mixin.js +2 -2
  536. package/esm/component/axis/mixin/band-axis-mixin.js.map +1 -1
  537. package/esm/component/axis/mixin/linear-axis-mixin.d.ts +0 -1
  538. package/esm/component/axis/mixin/linear-axis-mixin.js +4 -3
  539. package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  540. package/esm/component/axis/polar/axis.d.ts +3 -4
  541. package/esm/component/axis/polar/axis.js +12 -14
  542. package/esm/component/axis/polar/axis.js.map +1 -1
  543. package/esm/component/base/base-component.d.ts +12 -4
  544. package/esm/component/base/base-component.js +22 -14
  545. package/esm/component/base/base-component.js.map +1 -1
  546. package/esm/component/base/util.js +7 -3
  547. package/esm/component/base/util.js.map +1 -1
  548. package/esm/component/brush/brush.d.ts +2 -4
  549. package/esm/component/brush/brush.js +4 -6
  550. package/esm/component/brush/brush.js.map +1 -1
  551. package/esm/component/crosshair/base.d.ts +3 -4
  552. package/esm/component/crosshair/base.js +1 -1
  553. package/esm/component/crosshair/base.js.map +1 -1
  554. package/esm/component/crosshair/cartesian.d.ts +2 -0
  555. package/esm/component/crosshair/cartesian.js +5 -8
  556. package/esm/component/crosshair/cartesian.js.map +1 -1
  557. package/esm/component/crosshair/interface/spec.d.ts +1 -1
  558. package/esm/component/crosshair/interface/spec.js.map +1 -1
  559. package/esm/component/crosshair/polar.d.ts +2 -0
  560. package/esm/component/crosshair/polar.js +5 -8
  561. package/esm/component/crosshair/polar.js.map +1 -1
  562. package/esm/component/custom-mark/custom-mark.d.ts +2 -3
  563. package/esm/component/custom-mark/custom-mark.js +2 -3
  564. package/esm/component/custom-mark/custom-mark.js.map +1 -1
  565. package/esm/component/data-zoom/data-filter-base-component.d.ts +8 -8
  566. package/esm/component/data-zoom/data-filter-base-component.js +60 -37
  567. package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
  568. package/esm/component/data-zoom/data-zoom/data-zoom.d.ts +4 -2
  569. package/esm/component/data-zoom/data-zoom/data-zoom.js +47 -44
  570. package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  571. package/esm/component/data-zoom/data-zoom/interface.d.ts +6 -1
  572. package/esm/component/data-zoom/data-zoom/interface.js.map +1 -1
  573. package/esm/component/data-zoom/scroll-bar/interface.d.ts +6 -2
  574. package/esm/component/data-zoom/scroll-bar/interface.js.map +1 -1
  575. package/esm/component/data-zoom/scroll-bar/scroll-bar.d.ts +3 -0
  576. package/esm/component/data-zoom/scroll-bar/scroll-bar.js +24 -23
  577. package/esm/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -1
  578. package/esm/component/data-zoom/util.d.ts +4 -0
  579. package/esm/component/data-zoom/util.js +13 -1
  580. package/esm/component/data-zoom/util.js.map +1 -1
  581. package/esm/component/geo/geo-coordinate.d.ts +3 -2
  582. package/esm/component/geo/geo-coordinate.js +3 -1
  583. package/esm/component/geo/geo-coordinate.js.map +1 -1
  584. package/esm/component/index.d.ts +3 -2
  585. package/esm/component/index.js.map +1 -1
  586. package/esm/component/indicator/indicator.d.ts +1 -3
  587. package/esm/component/indicator/indicator.js +4 -5
  588. package/esm/component/indicator/indicator.js.map +1 -1
  589. package/esm/component/indicator/interface.d.ts +1 -1
  590. package/esm/component/indicator/interface.js.map +1 -1
  591. package/esm/component/interface/common.d.ts +3 -3
  592. package/esm/component/interface/common.js.map +1 -1
  593. package/esm/component/interface/theme.d.ts +2 -1
  594. package/esm/component/interface/theme.js.map +1 -1
  595. package/esm/component/label/base-label.d.ts +2 -4
  596. package/esm/component/label/base-label.js +1 -3
  597. package/esm/component/label/base-label.js.map +1 -1
  598. package/esm/component/label/interface.d.ts +4 -0
  599. package/esm/component/label/interface.js.map +1 -1
  600. package/esm/component/label/label.d.ts +5 -7
  601. package/esm/component/label/label.js +16 -11
  602. package/esm/component/label/label.js.map +1 -1
  603. package/esm/component/label/totalLabel.d.ts +1 -3
  604. package/esm/component/label/totalLabel.js +4 -4
  605. package/esm/component/label/totalLabel.js.map +1 -1
  606. package/esm/component/label/util.d.ts +9 -2
  607. package/esm/component/label/util.js +17 -3
  608. package/esm/component/label/util.js.map +1 -1
  609. package/esm/component/legend/base-legend.d.ts +6 -9
  610. package/esm/component/legend/base-legend.js +3 -9
  611. package/esm/component/legend/base-legend.js.map +1 -1
  612. package/esm/component/legend/continuous/legend.d.ts +4 -1
  613. package/esm/component/legend/continuous/legend.js +6 -7
  614. package/esm/component/legend/continuous/legend.js.map +1 -1
  615. package/esm/component/legend/discrete/legend.d.ts +4 -1
  616. package/esm/component/legend/discrete/legend.js +6 -7
  617. package/esm/component/legend/discrete/legend.js.map +1 -1
  618. package/esm/component/legend/discrete/util.d.ts +1 -1
  619. package/esm/component/legend/discrete/util.js.map +1 -1
  620. package/esm/component/legend/util.d.ts +2 -2
  621. package/esm/component/map-label/component.d.ts +1 -3
  622. package/esm/component/map-label/component.js +2 -2
  623. package/esm/component/map-label/component.js.map +1 -1
  624. package/esm/component/marker/base-marker.d.ts +7 -3
  625. package/esm/component/marker/base-marker.js +41 -18
  626. package/esm/component/marker/base-marker.js.map +1 -1
  627. package/esm/component/marker/interface.d.ts +15 -4
  628. package/esm/component/marker/interface.js.map +1 -1
  629. package/esm/component/marker/mark-area/interface/spec.d.ts +1 -1
  630. package/esm/component/marker/mark-area/interface/spec.js.map +1 -1
  631. package/esm/component/marker/mark-area/mark-area.d.ts +1 -3
  632. package/esm/component/marker/mark-area/mark-area.js +29 -18
  633. package/esm/component/marker/mark-area/mark-area.js.map +1 -1
  634. package/esm/component/marker/mark-line/interface/spec.d.ts +3 -4
  635. package/esm/component/marker/mark-line/interface/spec.js.map +1 -1
  636. package/esm/component/marker/mark-line/mark-line.d.ts +1 -3
  637. package/esm/component/marker/mark-line/mark-line.js +36 -18
  638. package/esm/component/marker/mark-line/mark-line.js.map +1 -1
  639. package/esm/component/marker/mark-line/util.d.ts +3 -3
  640. package/esm/component/marker/mark-line/util.js.map +1 -1
  641. package/esm/component/marker/mark-point/interface/spec.d.ts +5 -4
  642. package/esm/component/marker/mark-point/interface/spec.js.map +1 -1
  643. package/esm/component/marker/mark-point/interface/theme.d.ts +5 -5
  644. package/esm/component/marker/mark-point/interface/theme.js.map +1 -1
  645. package/esm/component/marker/mark-point/mark-point.d.ts +1 -3
  646. package/esm/component/marker/mark-point/mark-point.js +17 -12
  647. package/esm/component/marker/mark-point/mark-point.js.map +1 -1
  648. package/esm/component/marker/utils.d.ts +3 -4
  649. package/esm/component/marker/utils.js +43 -23
  650. package/esm/component/marker/utils.js.map +1 -1
  651. package/esm/component/player/interface/theme.d.ts +1 -1
  652. package/esm/component/player/interface/theme.js.map +1 -1
  653. package/esm/component/player/player.d.ts +6 -7
  654. package/esm/component/player/player.js +4 -7
  655. package/esm/component/player/player.js.map +1 -1
  656. package/esm/component/title/interface/theme.d.ts +1 -1
  657. package/esm/component/title/interface/theme.js.map +1 -1
  658. package/esm/component/title/title.d.ts +6 -9
  659. package/esm/component/title/title.js +12 -22
  660. package/esm/component/title/title.js.map +1 -1
  661. package/esm/component/tooltip/handler/base.js +5 -7
  662. package/esm/component/tooltip/handler/base.js.map +1 -1
  663. package/esm/component/tooltip/handler/dom/util.js +3 -1
  664. package/esm/component/tooltip/handler/dom/util.js.map +1 -1
  665. package/esm/component/tooltip/handler/utils/attribute.d.ts +3 -3
  666. package/esm/component/tooltip/handler/utils/attribute.js.map +1 -1
  667. package/esm/component/tooltip/handler/utils/common.js.map +1 -1
  668. package/esm/component/tooltip/interface/spec.d.ts +1 -1
  669. package/esm/component/tooltip/interface/spec.js.map +1 -1
  670. package/esm/component/tooltip/interface/theme.d.ts +10 -11
  671. package/esm/component/tooltip/interface/theme.js.map +1 -1
  672. package/esm/component/tooltip/tooltip.d.ts +3 -2
  673. package/esm/component/tooltip/tooltip.js +7 -10
  674. package/esm/component/tooltip/tooltip.js.map +1 -1
  675. package/esm/component/util.d.ts +1 -3
  676. package/esm/component/util.js +2 -2
  677. package/esm/component/util.js.map +1 -1
  678. package/esm/constant/index.js +2 -1
  679. package/esm/constant/layout.d.ts +1 -0
  680. package/esm/constant/layout.js +2 -0
  681. package/esm/constant/layout.js.map +1 -1
  682. package/esm/constant/scatter.js +1 -2
  683. package/esm/core/expression-function.d.ts +12 -0
  684. package/esm/core/expression-function.js +22 -0
  685. package/esm/core/expression-function.js.map +1 -0
  686. package/esm/core/factory.d.ts +5 -2
  687. package/esm/core/factory.js +6 -3
  688. package/esm/core/factory.js.map +1 -1
  689. package/esm/core/index.d.ts +2 -1
  690. package/esm/core/index.js +3 -1
  691. package/esm/core/index.js.map +1 -1
  692. package/esm/core/interface.d.ts +5 -0
  693. package/esm/core/interface.js.map +1 -1
  694. package/esm/core/vchart.d.ts +9 -1
  695. package/esm/core/vchart.js +62 -41
  696. package/esm/core/vchart.js.map +1 -1
  697. package/esm/data/initialize.js +7 -7
  698. package/esm/data/initialize.js.map +1 -1
  699. package/esm/data/transforms/aggregation.d.ts +4 -3
  700. package/esm/data/transforms/aggregation.js +6 -6
  701. package/esm/data/transforms/aggregation.js.map +1 -1
  702. package/esm/data/transforms/dimension-statistics.js +14 -4
  703. package/esm/data/transforms/dimension-statistics.js.map +1 -1
  704. package/esm/event/bubble.js +1 -2
  705. package/esm/event/event.js +2 -1
  706. package/esm/event/events/base.d.ts +16 -0
  707. package/esm/event/events/base.js +15 -0
  708. package/esm/event/events/base.js.map +1 -0
  709. package/esm/event/events/dimension/util/cartesian.d.ts +1 -1
  710. package/esm/event/events/dimension/util/cartesian.js.map +1 -1
  711. package/esm/event/events/dimension/util/common.d.ts +1 -2
  712. package/esm/event/events/dimension/util/common.js +1 -1
  713. package/esm/event/events/dimension/util/common.js.map +1 -1
  714. package/esm/event/events/dimension/util/polar.d.ts +1 -1
  715. package/esm/event/events/dimension/util/polar.js.map +1 -1
  716. package/esm/event/interface.d.ts +2 -2
  717. package/esm/event/interface.js.map +1 -1
  718. package/esm/index-wx-simple.d.ts +4 -0
  719. package/esm/index-wx-simple.js +35 -0
  720. package/esm/index-wx-simple.js.map +1 -0
  721. package/esm/interaction/trigger.js +1 -1
  722. package/esm/interaction/zoom/zoomable.d.ts +1 -0
  723. package/esm/interaction/zoom/zoomable.js +6 -5
  724. package/esm/interaction/zoom/zoomable.js.map +1 -1
  725. package/esm/layout/base-layout.d.ts +3 -5
  726. package/esm/layout/base-layout.js +9 -9
  727. package/esm/layout/base-layout.js.map +1 -1
  728. package/esm/layout/grid-layout/grid-layout.d.ts +1 -2
  729. package/esm/layout/grid-layout/grid-layout.js +6 -4
  730. package/esm/layout/grid-layout/grid-layout.js.map +1 -1
  731. package/esm/layout/interface.d.ts +74 -6
  732. package/esm/layout/interface.js.map +1 -1
  733. package/esm/{model → layout}/layout-item.d.ts +35 -23
  734. package/esm/{model → layout}/layout-item.js +93 -63
  735. package/esm/layout/layout-item.js.map +1 -0
  736. package/esm/layout/layout3d/index.d.ts +2 -4
  737. package/esm/layout/layout3d/index.js +5 -5
  738. package/esm/layout/layout3d/index.js.map +1 -1
  739. package/esm/layout/util.d.ts +1 -1
  740. package/esm/layout/util.js.map +1 -1
  741. package/esm/mark/arc.js +2 -2
  742. package/esm/mark/arc.js.map +1 -1
  743. package/esm/mark/base/base-mark.d.ts +2 -2
  744. package/esm/mark/base/base-mark.js +59 -38
  745. package/esm/mark/base/base-mark.js.map +1 -1
  746. package/esm/mark/label.js +1 -4
  747. package/esm/mark/label.js.map +1 -1
  748. package/esm/model/base-model.d.ts +10 -8
  749. package/esm/model/base-model.js +27 -35
  750. package/esm/model/base-model.js.map +1 -1
  751. package/esm/model/interface.d.ts +21 -89
  752. package/esm/model/interface.js.map +1 -1
  753. package/esm/model/layout-model.d.ts +41 -0
  754. package/esm/model/layout-model.js +80 -0
  755. package/esm/model/layout-model.js.map +1 -0
  756. package/esm/region/interface.d.ts +3 -2
  757. package/esm/region/interface.js.map +1 -1
  758. package/esm/region/region.d.ts +12 -7
  759. package/esm/region/region.js +19 -11
  760. package/esm/region/region.js.map +1 -1
  761. package/esm/series/area/area.d.ts +1 -1
  762. package/esm/series/area/area.js +5 -6
  763. package/esm/series/area/area.js.map +1 -1
  764. package/esm/series/area/interface.d.ts +4 -0
  765. package/esm/series/area/interface.js.map +1 -1
  766. package/esm/series/bar/bar.js +1 -5
  767. package/esm/series/bar/bar.js.map +1 -1
  768. package/esm/series/base/base-series.d.ts +14 -4
  769. package/esm/series/base/base-series.js +38 -16
  770. package/esm/series/base/base-series.js.map +1 -1
  771. package/esm/series/cartesian/cartesian.d.ts +3 -0
  772. package/esm/series/cartesian/cartesian.js +16 -4
  773. package/esm/series/cartesian/cartesian.js.map +1 -1
  774. package/esm/series/correlation/correlation.js +2 -8
  775. package/esm/series/correlation/correlation.js.map +1 -1
  776. package/esm/series/funnel/funnel-3d.js +1 -1
  777. package/esm/series/funnel/funnel-3d.js.map +1 -1
  778. package/esm/series/funnel/funnel.js +3 -7
  779. package/esm/series/funnel/funnel.js.map +1 -1
  780. package/esm/series/funnel/interface.d.ts +1 -2
  781. package/esm/series/funnel/interface.js.map +1 -1
  782. package/esm/series/gauge/gauge.d.ts +0 -1
  783. package/esm/series/gauge/gauge.js +2 -9
  784. package/esm/series/gauge/gauge.js.map +1 -1
  785. package/esm/series/heatmap/heatmap.js +1 -5
  786. package/esm/series/heatmap/heatmap.js.map +1 -1
  787. package/esm/series/index.d.ts +2 -2
  788. package/esm/series/index.js.map +1 -1
  789. package/esm/series/interface/common.d.ts +2 -2
  790. package/esm/series/interface/common.js.map +1 -1
  791. package/esm/series/interface/series.d.ts +4 -2
  792. package/esm/series/interface/series.js.map +1 -1
  793. package/esm/series/interface/type.d.ts +3 -1
  794. package/esm/series/interface/type.js +2 -1
  795. package/esm/series/interface/type.js.map +1 -1
  796. package/esm/series/line/interface.d.ts +4 -0
  797. package/esm/series/line/interface.js.map +1 -1
  798. package/esm/series/line/line.d.ts +1 -1
  799. package/esm/series/line/line.js.map +1 -1
  800. package/esm/series/map/map.js +1 -5
  801. package/esm/series/map/map.js.map +1 -1
  802. package/esm/series/mixin/line-mixin.d.ts +5 -2
  803. package/esm/series/mixin/line-mixin.js +15 -10
  804. package/esm/series/mixin/line-mixin.js.map +1 -1
  805. package/esm/series/pie/pie.js +1 -4
  806. package/esm/series/pie/pie.js.map +1 -1
  807. package/esm/series/polar/progress-like/progress-like.js +3 -4
  808. package/esm/series/polar/progress-like/progress-like.js.map +1 -1
  809. package/esm/series/radar/animation.js.map +1 -1
  810. package/esm/series/range-column/range-column.js +1 -3
  811. package/esm/series/range-column/range-column.js.map +1 -1
  812. package/esm/series/rose/rose.d.ts +2 -1
  813. package/esm/series/rose/rose.js +1 -5
  814. package/esm/series/rose/rose.js.map +1 -1
  815. package/esm/series/scatter/scatter.js +1 -5
  816. package/esm/series/scatter/scatter.js.map +1 -1
  817. package/esm/series/waterfall/waterfall.js +1 -1
  818. package/esm/series/waterfall/waterfall.js.map +1 -1
  819. package/esm/series/word-cloud/base.d.ts +1 -0
  820. package/esm/series/word-cloud/base.js +33 -33
  821. package/esm/series/word-cloud/base.js.map +1 -1
  822. package/esm/series/word-cloud/word-cloud-3d.js +32 -32
  823. package/esm/series/word-cloud/word-cloud-3d.js.map +1 -1
  824. package/esm/theme/builtin/common/component/axis/cartesian-axis.js +2 -2
  825. package/esm/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -1
  826. package/esm/theme/builtin/common/component/axis/common-axis.js +1 -1
  827. package/esm/theme/builtin/common/component/axis/common-axis.js.map +1 -1
  828. package/esm/theme/builtin/common/component/crosshair.js +5 -5
  829. package/esm/theme/builtin/common/component/crosshair.js.map +1 -1
  830. package/esm/theme/builtin/common/component/data-zoom.js +10 -10
  831. package/esm/theme/builtin/common/component/data-zoom.js.map +1 -1
  832. package/esm/theme/builtin/common/component/indicator.js +1 -1
  833. package/esm/theme/builtin/common/component/indicator.js.map +1 -1
  834. package/esm/theme/builtin/common/component/legend/color-legend.js +3 -4
  835. package/esm/theme/builtin/common/component/legend/color-legend.js.map +1 -1
  836. package/esm/theme/builtin/common/component/legend/discrete-legend.js +2 -2
  837. package/esm/theme/builtin/common/component/legend/discrete-legend.js.map +1 -1
  838. package/esm/theme/builtin/common/component/legend/size-legend.js +6 -6
  839. package/esm/theme/builtin/common/component/legend/size-legend.js.map +1 -1
  840. package/esm/theme/builtin/common/component/map-label.js.map +1 -1
  841. package/esm/theme/builtin/common/component/mark-area.js.map +1 -1
  842. package/esm/theme/builtin/common/component/mark-line.js +9 -9
  843. package/esm/theme/builtin/common/component/mark-line.js.map +1 -1
  844. package/esm/theme/builtin/common/component/mark-point.js +15 -3
  845. package/esm/theme/builtin/common/component/mark-point.js.map +1 -1
  846. package/esm/theme/builtin/common/component/player.js +7 -7
  847. package/esm/theme/builtin/common/component/player.js.map +1 -1
  848. package/esm/theme/builtin/common/component/poptip.js +3 -4
  849. package/esm/theme/builtin/common/component/poptip.js.map +1 -1
  850. package/esm/theme/builtin/common/component/scroll-bar.js +20 -7
  851. package/esm/theme/builtin/common/component/scroll-bar.js.map +1 -1
  852. package/esm/theme/builtin/common/component/title.js +1 -1
  853. package/esm/theme/builtin/common/component/title.js.map +1 -1
  854. package/esm/theme/builtin/common/component/tooltip.d.ts +2 -1
  855. package/esm/theme/builtin/common/component/tooltip.js +3 -4
  856. package/esm/theme/builtin/common/component/tooltip.js.map +1 -1
  857. package/esm/theme/builtin/common/component/total-label.js.map +1 -1
  858. package/esm/theme/builtin/common/mark.js.map +1 -1
  859. package/esm/theme/builtin/common/series/rangeColumn.js +1 -1
  860. package/esm/theme/builtin/common/series/rangeColumn.js.map +1 -1
  861. package/esm/theme/builtin/common-mobile/component/axis/band-axis.d.ts +2 -0
  862. package/esm/theme/builtin/common-mobile/component/axis/band-axis.js +18 -0
  863. package/esm/theme/builtin/common-mobile/component/axis/band-axis.js.map +1 -0
  864. package/esm/theme/builtin/common-mobile/component/axis/cartesian-axis.d.ts +3 -0
  865. package/esm/theme/builtin/common-mobile/component/axis/cartesian-axis.js +32 -0
  866. package/esm/theme/builtin/common-mobile/component/axis/cartesian-axis.js.map +1 -0
  867. package/esm/theme/builtin/common-mobile/component/axis/common-axis.d.ts +2 -0
  868. package/esm/theme/builtin/common-mobile/component/axis/common-axis.js +36 -0
  869. package/esm/theme/builtin/common-mobile/component/axis/common-axis.js.map +1 -0
  870. package/esm/theme/builtin/common-mobile/component/axis/linear-axis.d.ts +2 -0
  871. package/esm/theme/builtin/common-mobile/component/axis/linear-axis.js +18 -0
  872. package/esm/theme/builtin/common-mobile/component/axis/linear-axis.js.map +1 -0
  873. package/esm/theme/builtin/common-mobile/component/axis/polar-axis.d.ts +3 -0
  874. package/esm/theme/builtin/common-mobile/component/axis/polar-axis.js +23 -0
  875. package/esm/theme/builtin/common-mobile/component/axis/polar-axis.js.map +1 -0
  876. package/esm/theme/builtin/common-mobile/component/crosshair.d.ts +2 -0
  877. package/esm/theme/builtin/common-mobile/component/crosshair.js +35 -0
  878. package/esm/theme/builtin/common-mobile/component/crosshair.js.map +1 -0
  879. package/esm/theme/builtin/common-mobile/component/data-zoom.d.ts +2 -0
  880. package/esm/theme/builtin/common-mobile/component/data-zoom.js +34 -0
  881. package/esm/theme/builtin/common-mobile/component/data-zoom.js.map +1 -0
  882. package/esm/theme/builtin/common-mobile/component/index.d.ts +2 -0
  883. package/esm/theme/builtin/common-mobile/component/index.js +65 -0
  884. package/esm/theme/builtin/common-mobile/component/index.js.map +1 -0
  885. package/esm/theme/builtin/common-mobile/component/indicator.d.ts +2 -0
  886. package/esm/theme/builtin/common-mobile/component/indicator.js +17 -0
  887. package/esm/theme/builtin/common-mobile/component/indicator.js.map +1 -0
  888. package/esm/theme/builtin/common-mobile/component/legend/color-legend.d.ts +2 -0
  889. package/esm/theme/builtin/common-mobile/component/legend/color-legend.js +17 -0
  890. package/esm/theme/builtin/common-mobile/component/legend/color-legend.js.map +1 -0
  891. package/esm/theme/builtin/common-mobile/component/legend/continuous.d.ts +2 -0
  892. package/esm/theme/builtin/common-mobile/component/legend/continuous.js +38 -0
  893. package/esm/theme/builtin/common-mobile/component/legend/continuous.js.map +1 -0
  894. package/esm/theme/builtin/common-mobile/component/legend/discrete-legend.d.ts +2 -0
  895. package/esm/theme/builtin/common-mobile/component/legend/discrete-legend.js +33 -0
  896. package/esm/theme/builtin/common-mobile/component/legend/discrete-legend.js.map +1 -0
  897. package/esm/theme/builtin/common-mobile/component/legend/size-legend.d.ts +2 -0
  898. package/esm/theme/builtin/common-mobile/component/legend/size-legend.js +17 -0
  899. package/esm/theme/builtin/common-mobile/component/legend/size-legend.js.map +1 -0
  900. package/esm/theme/builtin/common-mobile/component/map-label.d.ts +2 -0
  901. package/esm/theme/builtin/common-mobile/component/map-label.js +33 -0
  902. package/esm/theme/builtin/common-mobile/component/map-label.js.map +1 -0
  903. package/esm/theme/builtin/common-mobile/component/mark-area.d.ts +2 -0
  904. package/esm/theme/builtin/common-mobile/component/mark-area.js +18 -0
  905. package/esm/theme/builtin/common-mobile/component/mark-area.js.map +1 -0
  906. package/esm/theme/builtin/common-mobile/component/mark-line.d.ts +2 -0
  907. package/esm/theme/builtin/common-mobile/component/mark-line.js +27 -0
  908. package/esm/theme/builtin/common-mobile/component/mark-line.js.map +1 -0
  909. package/esm/theme/builtin/common-mobile/component/mark-point.d.ts +2 -0
  910. package/esm/theme/builtin/common-mobile/component/mark-point.js +15 -0
  911. package/esm/theme/builtin/common-mobile/component/mark-point.js.map +1 -0
  912. package/esm/theme/builtin/common-mobile/component/player.d.ts +2 -0
  913. package/esm/theme/builtin/common-mobile/component/player.js +47 -0
  914. package/esm/theme/builtin/common-mobile/component/player.js.map +1 -0
  915. package/esm/theme/builtin/common-mobile/component/poptip.d.ts +2 -0
  916. package/esm/theme/builtin/common-mobile/component/poptip.js +19 -0
  917. package/esm/theme/builtin/common-mobile/component/poptip.js.map +1 -0
  918. package/esm/theme/builtin/common-mobile/component/title.d.ts +2 -0
  919. package/esm/theme/builtin/common-mobile/component/title.js +17 -0
  920. package/esm/theme/builtin/common-mobile/component/title.js.map +1 -0
  921. package/esm/theme/builtin/common-mobile/component/tooltip.d.ts +2 -0
  922. package/esm/theme/builtin/common-mobile/component/tooltip.js +37 -0
  923. package/esm/theme/builtin/common-mobile/component/tooltip.js.map +1 -0
  924. package/esm/theme/builtin/common-mobile/component/total-label.d.ts +2 -0
  925. package/esm/theme/builtin/common-mobile/component/total-label.js +10 -0
  926. package/esm/theme/builtin/common-mobile/component/total-label.js.map +1 -0
  927. package/esm/theme/builtin/common-mobile/constants.d.ts +2 -0
  928. package/esm/theme/builtin/common-mobile/constants.js +19 -0
  929. package/esm/theme/builtin/common-mobile/constants.js.map +1 -0
  930. package/esm/theme/builtin/common-mobile/mark.d.ts +3 -0
  931. package/esm/theme/builtin/common-mobile/mark.js +31 -0
  932. package/esm/theme/builtin/common-mobile/mark.js.map +1 -0
  933. package/esm/theme/builtin/dark/color-scheme.js +20 -11
  934. package/esm/theme/builtin/dark/color-scheme.js.map +1 -1
  935. package/esm/theme/builtin/dark-mobile/index.d.ts +2 -0
  936. package/esm/theme/builtin/dark-mobile/index.js +16 -0
  937. package/esm/theme/builtin/dark-mobile/index.js.map +1 -0
  938. package/esm/theme/builtin/index.d.ts +2 -4
  939. package/esm/theme/builtin/index.js +16 -23
  940. package/esm/theme/builtin/index.js.map +1 -1
  941. package/esm/theme/builtin/light/color-scheme.js +19 -10
  942. package/esm/theme/builtin/light/color-scheme.js.map +1 -1
  943. package/esm/theme/builtin/light-mobile/index.d.ts +2 -0
  944. package/esm/theme/builtin/light-mobile/index.js +16 -0
  945. package/esm/theme/builtin/light-mobile/index.js.map +1 -0
  946. package/esm/theme/color-scheme/builtin/interface.d.ts +16 -7
  947. package/esm/theme/color-scheme/builtin/interface.js.map +1 -1
  948. package/esm/theme/color-scheme/legacy.js +18 -2
  949. package/esm/theme/color-scheme/legacy.js.map +1 -1
  950. package/esm/theme/color-scheme/util.js +2 -2
  951. package/esm/theme/color-scheme/util.js.map +1 -1
  952. package/esm/theme/interface.d.ts +1 -2
  953. package/esm/theme/interface.js.map +1 -1
  954. package/esm/theme/theme-manager.d.ts +1 -1
  955. package/esm/theme/theme-manager.js +2 -2
  956. package/esm/theme/theme-manager.js.map +1 -1
  957. package/esm/typings/index.d.ts +1 -0
  958. package/esm/typings/index.js +2 -0
  959. package/esm/typings/index.js.map +1 -1
  960. package/esm/typings/layout.d.ts +23 -0
  961. package/esm/typings/layout.js +2 -0
  962. package/esm/typings/layout.js.map +1 -0
  963. package/esm/typings/spec/common.d.ts +2 -4
  964. package/esm/typings/spec/common.js.map +1 -1
  965. package/esm/typings/visual.d.ts +1 -1
  966. package/esm/typings/visual.js.map +1 -1
  967. package/esm/util/space.d.ts +1 -1
  968. package/esm/util/space.js.map +1 -1
  969. package/esm/util/spec/background.js +3 -11
  970. package/esm/util/spec/background.js.map +1 -1
  971. package/esm/util/spec/common.d.ts +1 -1
  972. package/esm/util/spec/common.js +2 -2
  973. package/esm/util/spec/common.js.map +1 -1
  974. package/esm/util/spec/preprocess.d.ts +1 -1
  975. package/esm/util/spec/preprocess.js +5 -18
  976. package/esm/util/spec/preprocess.js.map +1 -1
  977. package/esm/util/spec/transform.d.ts +2 -0
  978. package/esm/util/spec/transform.js +17 -1
  979. package/esm/util/spec/transform.js.map +1 -1
  980. package/esm/vchart-all.js +1 -4
  981. package/esm/vchart-all.js.map +1 -1
  982. package/esm/vchart-simple.d.ts +1 -0
  983. package/esm/vchart-simple.js +15 -14
  984. package/esm/vchart-simple.js.map +1 -1
  985. package/package.json +18 -19
  986. package/cjs/model/layout-item.js.map +0 -1
  987. package/cjs/theme/util.d.ts +0 -5
  988. package/cjs/theme/util.js +0 -35
  989. package/cjs/theme/util.js.map +0 -1
  990. package/esm/model/layout-item.js.map +0 -1
  991. package/esm/theme/util.d.ts +0 -5
  992. package/esm/theme/util.js +0 -37
  993. package/esm/theme/util.js.map +0 -1
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.THEME_CONSTANTS = void 0, exports.THEME_CONSTANTS = {
6
+ defaultFontFamily: "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol",
7
+ defaultFontSize: 12,
8
+ l1FontSize: 30,
9
+ l1LineHeight: "150%",
10
+ l2FontSize: 18,
11
+ l2LineHeight: "140%",
12
+ l3FontSize: 14,
13
+ l3LineHeight: "150%",
14
+ l4FontSize: 12,
15
+ l4LineHeight: "150%",
16
+ l5FontSize: 10,
17
+ l5LineHeight: "130%",
18
+ l6FontSize: 8,
19
+ l6LineHeight: "120%",
20
+ axisTickSize: 0,
21
+ areaOpacity: .2
22
+ };
23
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/theme/builtin/common-mobile/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAoB;IAC9C,iBAAiB,EAEf,gKAAgK;IAClK,eAAe,EAAE,EAAE;IAEnB,UAAU,EAAE,EAAE;IACd,YAAY,EAAE,MAAM;IAEpB,UAAU,EAAE,EAAE;IACd,YAAY,EAAE,MAAM;IAEpB,UAAU,EAAE,EAAE;IACd,YAAY,EAAE,MAAM;IAEpB,UAAU,EAAE,EAAE;IACd,YAAY,EAAE,MAAM;IAEpB,UAAU,EAAE,EAAE;IACd,YAAY,EAAE,MAAM;IAEpB,UAAU,EAAE,CAAC;IACb,YAAY,EAAE,MAAM;IAEpB,YAAY,EAAE,CAAC;IAEf,WAAW,EAAE,GAAG;CACjB,CAAC","file":"constants.js","sourcesContent":["import type { IThemeConstants } from '../../interface';\n\nexport const THEME_CONSTANTS: IThemeConstants = {\n defaultFontFamily:\n // eslint-disable-next-line max-len\n 'PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol',\n defaultFontSize: 12,\n\n l1FontSize: 30,\n l1LineHeight: '150%',\n\n l2FontSize: 18,\n l2LineHeight: '140%',\n\n l3FontSize: 14,\n l3LineHeight: '150%',\n\n l4FontSize: 12,\n l4LineHeight: '150%',\n\n l5FontSize: 10,\n l5LineHeight: '130%',\n\n l6FontSize: 8,\n l6LineHeight: '120%',\n\n axisTickSize: 0,\n\n areaOpacity: 0.2\n};\n"]}
@@ -0,0 +1,3 @@
1
+ import type { IGlobalMarkThemeByName, IGlobalMarkThemeByType } from '../../interface';
2
+ export declare const markByType: IGlobalMarkThemeByType;
3
+ export declare const markByName: IGlobalMarkThemeByName;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.markByName = exports.markByType = void 0;
6
+
7
+ const constants_1 = require("./constants");
8
+
9
+ exports.markByType = {
10
+ text: {
11
+ style: {
12
+ fontSize: constants_1.THEME_CONSTANTS.l4FontSize,
13
+ lineHeight: constants_1.THEME_CONSTANTS.l4LineHeight,
14
+ fontWeight: "normal",
15
+ fillOpacity: 1
16
+ }
17
+ }
18
+ }, exports.markByName = {
19
+ label: {
20
+ style: {
21
+ fontSize: constants_1.THEME_CONSTANTS.l4FontSize
22
+ }
23
+ },
24
+ line: {
25
+ style: {
26
+ lineWidth: 2
27
+ }
28
+ },
29
+ point: {
30
+ style: {
31
+ size: 8
32
+ }
33
+ }
34
+ };
35
+ //# sourceMappingURL=mark.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/theme/builtin/common-mobile/mark.ts"],"names":[],"mappings":";;;AACA,2CAA8C;AAEjC,QAAA,UAAU,GAA2B;IAChD,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,QAAQ,EAAE,2BAAe,CAAC,UAAU;YACpC,UAAU,EAAE,2BAAe,CAAC,YAAY;YAExC,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,CAAC;SACf;KACF;CACF,CAAC;AAEW,QAAA,UAAU,GAA2B;IAChD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,QAAQ,EAAE,2BAAe,CAAC,UAAU;SAErC;KACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,SAAS,EAAE,CAAC;SACb;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,IAAI,EAAE,CAAC;SACR;KACF;CACF,CAAC","file":"mark.js","sourcesContent":["import type { IGlobalMarkThemeByName, IGlobalMarkThemeByType } from '../../interface';\nimport { THEME_CONSTANTS } from './constants';\n\nexport const markByType: IGlobalMarkThemeByType = {\n text: {\n style: {\n fontSize: THEME_CONSTANTS.l4FontSize,\n lineHeight: THEME_CONSTANTS.l4LineHeight,\n\n fontWeight: 'normal',\n fillOpacity: 1\n }\n }\n};\n\nexport const markByName: IGlobalMarkThemeByName = {\n label: {\n style: {\n fontSize: THEME_CONSTANTS.l4FontSize\n // lineHeight: THEME_CONSTANTS.l4LineHeight,\n }\n },\n line: {\n style: {\n lineWidth: 2\n }\n },\n point: {\n style: {\n size: 8\n }\n }\n};\n"]}
@@ -12,22 +12,31 @@ exports.colorScheme = {
12
12
  palette: {
13
13
  backgroundColor: "#202226",
14
14
  borderColor: "#404349",
15
- shadowColor: "#000000",
15
+ shadowColor: "rgba(0,0,0,0.1)",
16
+ hoverBackgroundColor: "#404349",
17
+ sliderRailColor: "#404349",
18
+ sliderHandleColor: "#202226",
19
+ sliderTrackColor: "#4284FF",
20
+ popupBackgroundColor: "#404349",
16
21
  primaryFontColor: "#fdfdfd",
17
- secondaryFontColor: "#888c93",
18
- axisFontColor: "#bbbdc3",
22
+ secondaryFontColor: "#bbbdc3",
23
+ tertiaryFontColor: "#888c93",
24
+ axisLabelFontColor: "#888c93",
19
25
  disableFontColor: "#55595f",
20
- labelReverseFontColor: "#202226",
26
+ axisMarkerFontColor: "#202226",
21
27
  axisGridColor: "#404349",
22
28
  axisDomainColor: "#4b4f54",
23
- dataZoomHandlerStrokeColor: "#888c93",
24
- dataZoomHandlerFillColor: "#202226",
25
- dataZoomBackgroundColor: "#404349",
29
+ dataZoomHandleStrokeColor: "#bbbdc3",
26
30
  dataZoomChartColor: "#55595F",
27
- dataZoomSelectedColor: "#4284FF",
28
- scrollBarSliderColor: "#ffffff",
29
- tooltipBackgroundColor: "#404349",
30
- markLabelBackgroundColor: "#f0bd30"
31
+ playerControllerColor: "#4284FF",
32
+ scrollBarSliderColor: "rgba(255,255,255,0.3)",
33
+ axisMarkerBackgroundColor: "#fdfdfd",
34
+ markLabelBackgroundColor: "#404349",
35
+ markLineStrokeColor: "#bbbdc3",
36
+ dangerColor: "#eb4b4b",
37
+ warningColor: "#f0bd30",
38
+ successColor: "#14b267",
39
+ infoColor: "#4284ff"
31
40
  }
32
41
  }
33
42
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/theme/builtin/dark/color-scheme.ts"],"names":[],"mappings":";;;AACA,gEAAgE;AAGnD,QAAA,WAAW,GAAsB;IAC5C,OAAO,EAAE;QACP,UAAU,EAAV,oBAAU;QACV,OAAO,EAAE;YAEP,eAAe,EAAE,SAAS;YAE1B,WAAW,EAAE,SAAS;YAEtB,WAAW,EAAE,SAAS;YAGtB,gBAAgB,EAAE,SAAS;YAE3B,kBAAkB,EAAE,SAAS;YAE7B,aAAa,EAAE,SAAS;YAExB,gBAAgB,EAAE,SAAS;YAE3B,qBAAqB,EAAE,SAAS;YAGhC,aAAa,EAAE,SAAS;YAExB,eAAe,EAAE,SAAS;YAG1B,0BAA0B,EAAE,SAAS;YAErC,wBAAwB,EAAE,SAAS;YAEnC,uBAAuB,EAAE,SAAS;YAElC,kBAAkB,EAAE,SAAS;YAE7B,qBAAqB,EAAE,SAAS;YAGhC,oBAAoB,EAAE,SAAS;YAG/B,sBAAsB,EAAE,SAAS;YAGjC,wBAAwB,EAAE,SAAS;SACb;KACzB;CACF,CAAC","file":"color-scheme.js","sourcesContent":["import type { IThemeColorScheme } from '../../color-scheme/interface';\nimport { dataScheme } from '../../color-scheme/builtin/default';\nimport type { BuiltinColorPalette } from '../../color-scheme/builtin/interface';\n\nexport const colorScheme: IThemeColorScheme = {\n default: {\n dataScheme,\n palette: {\n /** 背景色 */\n backgroundColor: '#202226',\n /** 图表边框色 */\n borderColor: '#404349',\n /** 默认阴影颜色 */\n shadowColor: '#000000',\n\n /** 主要字色 */\n primaryFontColor: '#fdfdfd',\n /** 次要字色 */\n secondaryFontColor: '#888c93',\n /** 轴字色 */\n axisFontColor: '#bbbdc3',\n /** 禁用字色 */\n disableFontColor: '#55595f',\n /** 标签反转字色 */\n labelReverseFontColor: '#202226',\n\n /** 轴网格线颜色 */\n axisGridColor: '#404349',\n /** 轴线颜色 */\n axisDomainColor: '#4b4f54',\n\n /** 缩略轴滑块描边颜色 */\n dataZoomHandlerStrokeColor: '#888c93',\n /** 缩略轴滑块填充颜色 */\n dataZoomHandlerFillColor: '#202226',\n /** 缩略轴背景区域颜色 */\n dataZoomBackgroundColor: '#404349',\n /** 缩略轴图表区域颜色 */\n dataZoomChartColor: '#55595F',\n /** 缩略轴选择区域颜色 */\n dataZoomSelectedColor: '#4284FF',\n\n /** 滚动条滑块颜色 */\n scrollBarSliderColor: '#ffffff',\n\n /** 提示信息背景区域颜色 */\n tooltipBackgroundColor: '#404349',\n\n /** 标注标签背景颜色 */\n markLabelBackgroundColor: '#f0bd30'\n } as BuiltinColorPalette\n }\n};\n"]}
1
+ {"version":3,"sources":["../src/theme/builtin/dark/color-scheme.ts"],"names":[],"mappings":";;;AACA,gEAAgE;AAGnD,QAAA,WAAW,GAAsB;IAC5C,OAAO,EAAE;QACP,UAAU,EAAV,oBAAU;QACV,OAAO,EAAE;YAEP,eAAe,EAAE,SAAS;YAE1B,WAAW,EAAE,SAAS;YAEtB,WAAW,EAAE,iBAAiB;YAE9B,oBAAoB,EAAE,SAAS;YAE/B,eAAe,EAAE,SAAS;YAE1B,iBAAiB,EAAE,SAAS;YAE5B,gBAAgB,EAAE,SAAS;YAE3B,oBAAoB,EAAE,SAAS;YAG/B,gBAAgB,EAAE,SAAS;YAE3B,kBAAkB,EAAE,SAAS;YAE7B,iBAAiB,EAAE,SAAS;YAE5B,kBAAkB,EAAE,SAAS;YAE7B,gBAAgB,EAAE,SAAS;YAE3B,mBAAmB,EAAE,SAAS;YAG9B,aAAa,EAAE,SAAS;YAExB,eAAe,EAAE,SAAS;YAG1B,yBAAyB,EAAE,SAAS;YAEpC,kBAAkB,EAAE,SAAS;YAG7B,qBAAqB,EAAE,SAAS;YAGhC,oBAAoB,EAAE,uBAAuB;YAG7C,yBAAyB,EAAE,SAAS;YAEpC,wBAAwB,EAAE,SAAS;YAEnC,mBAAmB,EAAE,SAAS;YAG9B,WAAW,EAAE,SAAS;YAEtB,YAAY,EAAE,SAAS;YAEvB,YAAY,EAAE,SAAS;YAEvB,SAAS,EAAE,SAAS;SACE;KACzB;CACF,CAAC","file":"color-scheme.js","sourcesContent":["import type { IThemeColorScheme } from '../../color-scheme/interface';\nimport { dataScheme } from '../../color-scheme/builtin/default';\nimport type { BuiltinColorPalette } from '../../color-scheme/builtin/interface';\n\nexport const colorScheme: IThemeColorScheme = {\n default: {\n dataScheme,\n palette: {\n /** 背景色 */\n backgroundColor: '#202226',\n /** 图表边框色 */\n borderColor: '#404349',\n /** 默认阴影颜色 */\n shadowColor: 'rgba(0,0,0,0.1)',\n /** 鼠标 hover 项背景颜色 */\n hoverBackgroundColor: '#404349',\n /** 滑块类组件背景条填充颜色 */\n sliderRailColor: '#404349',\n /** 滑块类组件滑块填充颜色 */\n sliderHandleColor: '#202226',\n /** 滑块类组件已选范围填充颜色 */\n sliderTrackColor: '#4284FF',\n /** 浮层背景区域颜色 */\n popupBackgroundColor: '#404349',\n\n /** 主要字色 */\n primaryFontColor: '#fdfdfd',\n /** 次要字色 */\n secondaryFontColor: '#bbbdc3',\n /** 第三字色 */\n tertiaryFontColor: '#888c93',\n /** 轴标签字色 */\n axisLabelFontColor: '#888c93',\n /** 禁用字色 */\n disableFontColor: '#55595f',\n /** 轴高亮标记字色 */\n axisMarkerFontColor: '#202226',\n\n /** 轴网格线颜色 */\n axisGridColor: '#404349',\n /** 轴线颜色 */\n axisDomainColor: '#4b4f54',\n\n /** 缩略轴滑块描边颜色 */\n dataZoomHandleStrokeColor: '#bbbdc3',\n /** 缩略轴图表区域颜色 */\n dataZoomChartColor: '#55595F',\n\n /** 播放器控制器填充颜色 */\n playerControllerColor: '#4284FF',\n\n /** 滚动条滑块颜色 */\n scrollBarSliderColor: 'rgba(255,255,255,0.3)',\n\n /** 轴高亮标记背景色 */\n axisMarkerBackgroundColor: '#fdfdfd',\n /** 标注标签背景颜色 */\n markLabelBackgroundColor: '#404349',\n /** 标注线颜色 */\n markLineStrokeColor: '#bbbdc3',\n\n /** 危险色 */\n dangerColor: '#eb4b4b',\n /** 警告色 */\n warningColor: '#f0bd30',\n /** 成功色 */\n successColor: '#14b267',\n /** 信息色 */\n infoColor: '#4284ff'\n } as BuiltinColorPalette\n }\n};\n"]}
@@ -0,0 +1,2 @@
1
+ import type { ITheme } from '../../interface';
2
+ export declare const darkMobileTheme: ITheme;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.darkMobileTheme = void 0;
6
+
7
+ const component_1 = require("../common-mobile/component"), mark_1 = require("../common-mobile/mark"), color_scheme_1 = require("../dark/color-scheme");
8
+
9
+ exports.darkMobileTheme = {
10
+ name: "dark-mobile",
11
+ type: "dark",
12
+ padding: 12,
13
+ colorScheme: color_scheme_1.colorScheme,
14
+ component: component_1.component,
15
+ mark: mark_1.markByType,
16
+ markByName: mark_1.markByName
17
+ };
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/theme/builtin/dark-mobile/index.ts"],"names":[],"mappings":";;;AAQA,0DAAuD;AACvD,gDAA+D;AAC/D,uDAAmD;AAEtC,QAAA,eAAe,GAAW;IACrC,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,EAAE;IACX,WAAW,EAAX,0BAAW;IACX,SAAS,EAAT,qBAAS;IACT,IAAI,EAAE,iBAAU;IAChB,UAAU,EAAV,iBAAU;CACX,CAAC","file":"index.js","sourcesContent":["/**\n * 主题的命名,不要使用类似 arco,default 等字段,应该要以主题的特征来,颜色/场景特征(light, dark)\n *\n * 1. 对除了 color 外的一些主题设置,应该要有专门的设计,**不要直接复制**\n * 2. 原则上来讲,默认值尽量都放主题中,但是也可根据情况自行判断\n * 3. 目前主题只到系列,不到系列的 mark,对于这个分界没有太清楚,后续根据需求再做开放\n */\nimport type { ITheme } from '../../interface';\nimport { component } from '../common-mobile/component';\nimport { markByName, markByType } from '../common-mobile/mark';\nimport { colorScheme } from '../dark/color-scheme';\n\nexport const darkMobileTheme: ITheme = {\n name: 'dark-mobile',\n type: 'dark',\n padding: 12,\n colorScheme,\n component,\n mark: markByType,\n markByName\n};\n"]}
@@ -1,15 +1,13 @@
1
1
  export * from './light';
2
+ export * from './dark';
2
3
  export * from './common/legacy';
3
- import type { IChartLevelTheme } from '../../core/interface';
4
4
  import type { ITheme } from '../interface';
5
5
  export declare const builtinThemes: Record<string, ITheme>;
6
- export declare const getDefaultThemeName: (type?: ITheme['type']) => string;
7
6
  export declare const defaultThemeName: string;
8
7
  export declare const themes: Map<string, ITheme>;
9
8
  export declare const hasThemeMerged: Map<string, boolean>;
10
9
  export declare const registerTheme: (name: string, theme: Partial<ITheme>) => void;
11
- export declare const getTheme: (name: string) => ITheme;
10
+ export declare const getTheme: (name?: string, transformed?: boolean) => ITheme;
12
11
  export declare const removeTheme: (name: string) => boolean;
13
12
  export declare const themeExist: (name: any) => boolean;
14
13
  export declare const getMergedTheme: (theme: Partial<ITheme>) => ITheme;
15
- export declare const defaultChartLevelTheme: IChartLevelTheme;
@@ -17,34 +17,36 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
17
17
 
18
18
  Object.defineProperty(exports, "__esModule", {
19
19
  value: !0
20
- }), exports.defaultChartLevelTheme = exports.getMergedTheme = exports.themeExist = exports.removeTheme = exports.getTheme = exports.registerTheme = exports.hasThemeMerged = exports.themes = exports.defaultThemeName = exports.getDefaultThemeName = exports.builtinThemes = void 0,
21
- __exportStar(require("./light"), exports), __exportStar(require("./common/legacy"), exports);
20
+ }), exports.getMergedTheme = exports.themeExist = exports.removeTheme = exports.getTheme = exports.registerTheme = exports.hasThemeMerged = exports.themes = exports.defaultThemeName = exports.builtinThemes = void 0,
21
+ __exportStar(require("./light"), exports), __exportStar(require("./dark"), exports),
22
+ __exportStar(require("./common/legacy"), exports);
22
23
 
23
- const vutils_1 = require("@visactor/vutils"), merge_theme_1 = require("../../util/spec/merge-theme"), util_1 = require("../color-scheme/util"), dark_1 = require("./dark"), light_1 = require("./light");
24
+ const vutils_1 = require("@visactor/vutils"), merge_theme_1 = require("../../util/spec/merge-theme"), light_1 = require("./light"), preprocess_1 = require("../../util/spec/preprocess");
24
25
 
25
26
  exports.builtinThemes = {
26
- [light_1.lightTheme.name]: light_1.lightTheme,
27
- [dark_1.darkTheme.name]: dark_1.darkTheme
28
- };
27
+ [light_1.lightTheme.name]: light_1.lightTheme
28
+ }, exports.defaultThemeName = light_1.lightTheme.name, exports.themes = new Map(Object.keys(exports.builtinThemes).map((key => [ key, exports.builtinThemes[key] ])));
29
29
 
30
- const getDefaultThemeName = type => "dark" === type ? dark_1.darkTheme.name : light_1.lightTheme.name;
30
+ const transformedThemes = new Map(Object.keys(exports.builtinThemes).map((key => [ key, (0,
31
+ preprocess_1.preprocessTheme)(exports.builtinThemes[key], exports.builtinThemes[key].colorScheme) ])));
31
32
 
32
- exports.getDefaultThemeName = getDefaultThemeName, exports.defaultThemeName = (0,
33
- exports.getDefaultThemeName)(), exports.themes = new Map(Object.keys(exports.builtinThemes).map((key => [ key, exports.builtinThemes[key] ]))),
34
33
  exports.hasThemeMerged = new Map(Object.keys(exports.builtinThemes).map((key => [ key, key === exports.defaultThemeName ])));
35
34
 
36
35
  const registerTheme = (name, theme) => {
37
- name && (exports.themes.set(name, (0, exports.getMergedTheme)(theme)), exports.hasThemeMerged.set(name, !0));
36
+ if (!name) return;
37
+ const mergedTheme = (0, exports.getMergedTheme)(theme);
38
+ exports.themes.set(name, mergedTheme), transformedThemes.set(name, (0, preprocess_1.preprocessTheme)(mergedTheme, mergedTheme.colorScheme)),
39
+ exports.hasThemeMerged.set(name, !0);
38
40
  };
39
41
 
40
42
  exports.registerTheme = registerTheme;
41
43
 
42
- const getTheme = name => (exports.hasThemeMerged.has(name) && !exports.hasThemeMerged.get(name) && (0,
43
- exports.registerTheme)(name, exports.themes.get(name)), exports.themes.get(name) || exports.themes.get(exports.defaultThemeName));
44
+ const getTheme = (name = exports.defaultThemeName, transformed = !1) => (exports.hasThemeMerged.has(name) && !exports.hasThemeMerged.get(name) && (0,
45
+ exports.registerTheme)(name, exports.themes.get(name)), transformed ? transformedThemes.get(name) : exports.themes.get(name));
44
46
 
45
47
  exports.getTheme = getTheme;
46
48
 
47
- const removeTheme = name => exports.themes.delete(name) && exports.hasThemeMerged.delete(name);
49
+ const removeTheme = name => exports.themes.delete(name) && transformedThemes.delete(name) && exports.hasThemeMerged.delete(name);
48
50
 
49
51
  exports.removeTheme = removeTheme;
50
52
 
@@ -53,14 +55,9 @@ const themeExist = name => !!(0, vutils_1.isString)(name) && exports.themes.has(
53
55
  exports.themeExist = themeExist;
54
56
 
55
57
  const getMergedTheme = theme => {
56
- const baseThemeName = (0, exports.getDefaultThemeName)(theme.type), baseTheme = (0,
57
- exports.getTheme)(baseThemeName);
58
+ const baseTheme = (0, exports.getTheme)(exports.defaultThemeName);
58
59
  return (0, merge_theme_1.mergeTheme)({}, baseTheme, theme);
59
60
  };
60
61
 
61
- exports.getMergedTheme = getMergedTheme, exports.defaultChartLevelTheme = {
62
- background: (0, util_1.getActualColor)(exports.builtinThemes[exports.defaultThemeName].background, exports.builtinThemes[exports.defaultThemeName].colorScheme),
63
- fontFamily: exports.builtinThemes[exports.defaultThemeName].fontFamily,
64
- colorScheme: exports.builtinThemes[exports.defaultThemeName].colorScheme
65
- };
62
+ exports.getMergedTheme = getMergedTheme;
66
63
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/theme/builtin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0CAAwB;AAExB,kDAAgC;AAEhC,6CAA4C;AAE5C,6DAAyD;AACzD,+CAAsD;AAEtD,iCAAmC;AACnC,mCAAqC;AAGxB,QAAA,aAAa,GAA2B;IACnD,CAAC,kBAAU,CAAC,IAAI,CAAC,EAAE,kBAAU;IAC7B,CAAC,gBAAS,CAAC,IAAI,CAAC,EAAE,gBAAS;CAC5B,CAAC;AAGK,MAAM,mBAAmB,GAAG,CAAC,IAAqB,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,gBAAS,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAU,CAAC,IAAI,CAAC,CAAC;AAAtG,QAAA,mBAAmB,uBAAmF;AACtG,QAAA,gBAAgB,GAAG,IAAA,2BAAmB,GAAE,CAAC;AAGzC,QAA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W,eAEtB;AAGK,MAAM,UAAU,GAAG,CAAC,IAAS,EAAE,EAAE;IACtC,IAAI,CAAC,IAAA,iBAAQ,EAAC,IAAI,CAAC,EAAE;QACnB,OAAO,KAAK,CAAC;KACd;IACD,OAAO,cAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC,CAAC;AALW,QAAA,UAAU,cAKrB;AAGK,MAAM,cAAc,GAAG,CAAC,KAAsB,EAAU,EAAE;IAC/D,MAAM,aAAa,GAAG,IAAA,2BAAmB,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACtD,MAAM,SAAS,GAAG,IAAA,gBAAQ,EAAC,aAAa,CAAC,CAAC;IAC1C,OAAO,IAAA,wBAAU,EAAC,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;AAC1C,CAAC,CAAC;AAJW,QAAA,cAAc,kBAIzB;AAEW,QAAA,sBAAsB,GAAqB;IACtD,UAAU,EAAE,IAAA,qBAAc,EAAC,qBAAa,CAAC,wBAAgB,CAAC,CAAC,UAAU,EAAE,qBAAa,CAAC,wBAAgB,CAAC,CAAC,WAAW,CAAC;IACnH,UAAU,EAAE,qBAAa,CAAC,wBAAgB,CAAC,CAAC,UAAU;IACtD,WAAW,EAAE,qBAAa,CAAC,wBAAgB,CAAC,CAAC,WAAW;CACzD,CAAC","file":"index.js","sourcesContent":["export * from './light';\n/** 历史弃用主题 */\nexport * from './common/legacy';\n\nimport { isString } from '@visactor/vutils';\nimport type { IChartLevelTheme } from '../../core/interface';\nimport { mergeTheme } from '../../util/spec/merge-theme';\nimport { getActualColor } from '../color-scheme/util';\nimport type { ITheme } from '../interface';\nimport { darkTheme } from './dark';\nimport { lightTheme } from './light';\n\n/** 声明内置主题 */\nexport const builtinThemes: Record<string, ITheme> = {\n [lightTheme.name]: lightTheme,\n [darkTheme.name]: darkTheme\n};\n\n/** 获取默认主题 */\nexport const getDefaultThemeName = (type?: ITheme['type']) => (type === 'dark' ? darkTheme.name : lightTheme.name);\nexport const defaultThemeName = getDefaultThemeName();\n\n/** 全局主题 map (包含用户新注册的主题) */\nexport const themes: Map<string, ITheme> = new Map(Object.keys(builtinThemes).map(key => [key, builtinThemes[key]]));\n/** 主题 map 中的元素是否 merge 过默认主题 (非默认主题的其他内置主题没有 merge 过默认主题) */\nexport const hasThemeMerged: Map<string, boolean> = new Map(\n Object.keys(builtinThemes).map(key => [key, key === defaultThemeName])\n);\n\n/** 注册主题 */\nexport const registerTheme = (name: string, theme: Partial<ITheme>) => {\n if (!name) {\n return;\n }\n // 所有主题基于默认主题扩展,保证基础值\n themes.set(name, getMergedTheme(theme));\n hasThemeMerged.set(name, true);\n};\n\n/** 获取注册过的主题 */\nexport const getTheme = (name: string) => {\n if (hasThemeMerged.has(name) && !hasThemeMerged.get(name)) {\n // 重新 merge 默认主题\n registerTheme(name, themes.get(name));\n }\n return themes.get(name) || themes.get(defaultThemeName);\n};\n\n/** 删除主题 */\nexport const removeTheme = (name: string): boolean => {\n return themes.delete(name) && hasThemeMerged.delete(name);\n};\n\n/** 主题是否存在 */\nexport const themeExist = (name: any) => {\n if (!isString(name)) {\n return false;\n }\n return themes.has(name);\n};\n\n/** 使新主题基于默认主题扩展,保证基础值 */\nexport const getMergedTheme = (theme: Partial<ITheme>): ITheme => {\n const baseThemeName = getDefaultThemeName(theme.type);\n const baseTheme = getTheme(baseThemeName);\n return mergeTheme({}, baseTheme, theme);\n};\n\nexport const defaultChartLevelTheme: IChartLevelTheme = {\n background: getActualColor(builtinThemes[defaultThemeName].background, builtinThemes[defaultThemeName].colorScheme),\n fontFamily: builtinThemes[defaultThemeName].fontFamily,\n colorScheme: builtinThemes[defaultThemeName].colorScheme\n};\n"]}
1
+ {"version":3,"sources":["../src/theme/builtin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,yCAAuB;AAEvB,kDAAgC;AAEhC,6CAA4C;AAC5C,6DAAyD;AAEzD,mCAAqC;AAErC,2DAA6D;AA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AM,QAAQ,GAAG,CAAC,OAAe,wBAAgB,EAAE,cAAuB,KAAK,EAAE,EAAE;IACxF,IAAI,sBAAc,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,sBAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QAEzD,IAAA,qBAAa,EAAC,IAAI,EAAE,cAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;KACvC;IAED,IAAI,WAAW,EAAE;QACf,OAAO,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KACpC;IAED,OAAO,cAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC,CAAC;AAXW,QAAA,QAAQ,YAWnB;AAGK,MAAM,WAAW,GAAG,CAAC,IAAY,EAAW,EAAE;IACnD,OAAO,cAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,sBAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC9F,CAAC,CAAC;AAFW,QAAA,WAAW,eAEtB;AAGK,MAAM,UAAU,GAAG,CAAC,IAAS,EAAE,EAAE;IACtC,IAAI,CAAC,IAAA,iBAAQ,EAAC,IAAI,CAAC,EAAE;QACnB,OAAO,KAAK,CAAC;KACd;IACD,OAAO,cAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC,CAAC;AALW,QAAA,UAAU,cAKrB;AAGK,MAAM,cAAc,GAAG,CAAC,KAAsB,EAAU,EAAE;IAC/D,MAAM,SAAS,GAAG,IAAA,gBAAQ,EAAC,wBAAgB,CAAC,CAAC;IAC7C,OAAO,IAAA,wBAAU,EAAC,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;AAC1C,CAAC,CAAC;AAHW,QAAA,cAAc,kBAGzB","file":"index.js","sourcesContent":["export * from './light';\nexport * from './dark';\n/** 历史弃用主题 */\nexport * from './common/legacy';\n\nimport { isString } from '@visactor/vutils';\nimport { mergeTheme } from '../../util/spec/merge-theme';\nimport type { ITheme } from '../interface';\nimport { lightTheme } from './light';\n// import { darkTheme } from './dark';\nimport { preprocessTheme } from '../../util/spec/preprocess';\n\n/** 声明内置主题(含 token 未转换) */\nexport const builtinThemes: Record<string, ITheme> = {\n [lightTheme.name]: lightTheme\n // [darkTheme.name]: darkTheme\n};\n/** 默认主题名称 */\nexport const defaultThemeName = lightTheme.name;\n\n/** 全局主题 map (包含用户新注册的主题)(含 token 未转换) */\nexport const themes: Map<string, ITheme> = new Map(Object.keys(builtinThemes).map(key => [key, builtinThemes[key]]));\n\n/** 全局已将 token 转换的主题 map (包含用户新注册的主题) */\nconst transformedThemes: Map<string, ITheme> = new Map(\n Object.keys(builtinThemes).map(key => [key, preprocessTheme(builtinThemes[key], builtinThemes[key].colorScheme)])\n);\n\n/** 主题 map 中的元素是否 merge 过默认主题 (非默认主题的其他内置主题没有 merge 过默认主题) */\nexport const hasThemeMerged: Map<string, boolean> = new Map(\n Object.keys(builtinThemes).map(key => [key, key === defaultThemeName])\n);\n\n/** 注册主题 */\nexport const registerTheme = (name: string, theme: Partial<ITheme>) => {\n if (!name) {\n return;\n }\n // 所有主题基于默认主题扩展,保证基础值\n const mergedTheme = getMergedTheme(theme);\n themes.set(name, mergedTheme);\n transformedThemes.set(name, preprocessTheme(mergedTheme, mergedTheme.colorScheme));\n hasThemeMerged.set(name, true);\n};\n/**\n * 获取注册过的主题\n * @param name 主题名称\n * @param transformed 是否获取 token 转换后的主题\n * @returns 返回主题\n */\nexport const getTheme = (name: string = defaultThemeName, transformed: boolean = false) => {\n if (hasThemeMerged.has(name) && !hasThemeMerged.get(name)) {\n // 重新 merge 默认主题\n registerTheme(name, themes.get(name));\n }\n\n if (transformed) {\n return transformedThemes.get(name);\n }\n\n return themes.get(name);\n};\n\n/** 删除主题 */\nexport const removeTheme = (name: string): boolean => {\n return themes.delete(name) && transformedThemes.delete(name) && hasThemeMerged.delete(name);\n};\n\n/** 主题是否存在 */\nexport const themeExist = (name: any) => {\n if (!isString(name)) {\n return false;\n }\n return themes.has(name);\n};\n\n/** 使新主题基于默认主题扩展,保证基础值 */\nexport const getMergedTheme = (theme: Partial<ITheme>): ITheme => {\n const baseTheme = getTheme(defaultThemeName);\n return mergeTheme({}, baseTheme, theme);\n};\n"]}
@@ -12,22 +12,31 @@ exports.colorScheme = {
12
12
  palette: {
13
13
  backgroundColor: "#ffffff",
14
14
  borderColor: "#e3e5e8",
15
- shadowColor: "#21252c",
15
+ shadowColor: "rgba(33,37,44,0.1)",
16
+ hoverBackgroundColor: "#f1f2f5",
17
+ sliderRailColor: "#f1f3f4",
18
+ sliderHandleColor: "#ffffff",
19
+ sliderTrackColor: "#0040ff",
20
+ popupBackgroundColor: "#ffffff",
16
21
  primaryFontColor: "#21252c",
17
22
  secondaryFontColor: "#606773",
18
- axisFontColor: "#89909d",
23
+ tertiaryFontColor: "#89909d",
24
+ axisLabelFontColor: "#89909d",
19
25
  disableFontColor: "#bcc1cb",
20
- labelReverseFontColor: "#ffffff",
26
+ axisMarkerFontColor: "#ffffff",
21
27
  axisGridColor: "#f1f2f5",
22
28
  axisDomainColor: "#d9dde4",
23
- dataZoomHandlerStrokeColor: "#aeb5be",
24
- dataZoomHandlerFillColor: "#ffffff",
25
- dataZoomBackgroundColor: "#f1f3f4",
29
+ dataZoomHandleStrokeColor: "#aeb5be",
26
30
  dataZoomChartColor: "#c9ced8",
27
- dataZoomSelectedColor: "#0040ff",
28
- scrollBarSliderColor: "#000000",
29
- tooltipBackgroundColor: "#ffffff",
30
- markLabelBackgroundColor: "#ffc528"
31
+ playerControllerColor: "#0040ff",
32
+ scrollBarSliderColor: "rgba(0,0,0,0.3)",
33
+ axisMarkerBackgroundColor: "#21252c",
34
+ markLabelBackgroundColor: "#f1f2f5",
35
+ markLineStrokeColor: "#606773",
36
+ dangerColor: "#e33232",
37
+ warningColor: "#ffc528",
38
+ successColor: "#07a35a",
39
+ infoColor: "#3073f2"
31
40
  }
32
41
  }
33
42
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/theme/builtin/light/color-scheme.ts"],"names":[],"mappings":";;;AACA,gEAAgE;AAGnD,QAAA,WAAW,GAAsB;IAC5C,OAAO,EAAE;QACP,UAAU,EAAV,oBAAU;QACV,OAAO,EAAE;YAEP,eAAe,EAAE,SAAS;YAE1B,WAAW,EAAE,SAAS;YAEtB,WAAW,EAAE,SAAS;YAGtB,gBAAgB,EAAE,SAAS;YAE3B,kBAAkB,EAAE,SAAS;YAE7B,aAAa,EAAE,SAAS;YAExB,gBAAgB,EAAE,SAAS;YAE3B,qBAAqB,EAAE,SAAS;YAGhC,aAAa,EAAE,SAAS;YAExB,eAAe,EAAE,SAAS;YAG1B,0BAA0B,EAAE,SAAS;YAErC,wBAAwB,EAAE,SAAS;YAEnC,uBAAuB,EAAE,SAAS;YAElC,kBAAkB,EAAE,SAAS;YAE7B,qBAAqB,EAAE,SAAS;YAGhC,oBAAoB,EAAE,SAAS;YAG/B,sBAAsB,EAAE,SAAS;YAGjC,wBAAwB,EAAE,SAAS;SACb;KACzB;CACF,CAAC","file":"color-scheme.js","sourcesContent":["import type { IThemeColorScheme } from '../../color-scheme/interface';\nimport { dataScheme } from '../../color-scheme/builtin/default';\nimport type { BuiltinColorPalette } from '../../color-scheme/builtin/interface';\n\nexport const colorScheme: IThemeColorScheme = {\n default: {\n dataScheme,\n palette: {\n /** 背景色 */\n backgroundColor: '#ffffff',\n /** 图表边框色 */\n borderColor: '#e3e5e8',\n /** 默认阴影颜色 */\n shadowColor: '#21252c',\n\n /** 主要字色 */\n primaryFontColor: '#21252c',\n /** 次要字色 */\n secondaryFontColor: '#606773',\n /** 轴字色 */\n axisFontColor: '#89909d',\n /** 禁用字色 */\n disableFontColor: '#bcc1cb',\n /** 标签反转字色 */\n labelReverseFontColor: '#ffffff',\n\n /** 轴网格线颜色 */\n axisGridColor: '#f1f2f5',\n /** 轴线颜色 */\n axisDomainColor: '#d9dde4',\n\n /** 缩略轴滑块描边颜色 */\n dataZoomHandlerStrokeColor: '#aeb5be',\n /** 缩略轴滑块填充颜色 */\n dataZoomHandlerFillColor: '#ffffff',\n /** 缩略轴背景区域颜色 */\n dataZoomBackgroundColor: '#f1f3f4',\n /** 缩略轴图表区域颜色 */\n dataZoomChartColor: '#c9ced8',\n /** 缩略轴选择区域颜色 */\n dataZoomSelectedColor: '#0040ff',\n\n /** 滚动条滑块颜色 */\n scrollBarSliderColor: '#000000',\n\n /** 提示信息背景区域颜色 */\n tooltipBackgroundColor: '#ffffff',\n\n /** 标注标签背景颜色 */\n markLabelBackgroundColor: '#ffc528'\n } as BuiltinColorPalette\n }\n};\n"]}
1
+ {"version":3,"sources":["../src/theme/builtin/light/color-scheme.ts"],"names":[],"mappings":";;;AACA,gEAAgE;AAGnD,QAAA,WAAW,GAAsB;IAC5C,OAAO,EAAE;QACP,UAAU,EAAV,oBAAU;QACV,OAAO,EAAE;YAEP,eAAe,EAAE,SAAS;YAE1B,WAAW,EAAE,SAAS;YAEtB,WAAW,EAAE,oBAAoB;YAEjC,oBAAoB,EAAE,SAAS;YAE/B,eAAe,EAAE,SAAS;YAE1B,iBAAiB,EAAE,SAAS;YAE5B,gBAAgB,EAAE,SAAS;YAE3B,oBAAoB,EAAE,SAAS;YAG/B,gBAAgB,EAAE,SAAS;YAE3B,kBAAkB,EAAE,SAAS;YAE7B,iBAAiB,EAAE,SAAS;YAE5B,kBAAkB,EAAE,SAAS;YAE7B,gBAAgB,EAAE,SAAS;YAE3B,mBAAmB,EAAE,SAAS;YAG9B,aAAa,EAAE,SAAS;YAExB,eAAe,EAAE,SAAS;YAG1B,yBAAyB,EAAE,SAAS;YAEpC,kBAAkB,EAAE,SAAS;YAG7B,qBAAqB,EAAE,SAAS;YAGhC,oBAAoB,EAAE,iBAAiB;YAGvC,yBAAyB,EAAE,SAAS;YAEpC,wBAAwB,EAAE,SAAS;YAEnC,mBAAmB,EAAE,SAAS;YAG9B,WAAW,EAAE,SAAS;YAEtB,YAAY,EAAE,SAAS;YAEvB,YAAY,EAAE,SAAS;YAEvB,SAAS,EAAE,SAAS;SACE;KACzB;CACF,CAAC","file":"color-scheme.js","sourcesContent":["import type { IThemeColorScheme } from '../../color-scheme/interface';\nimport { dataScheme } from '../../color-scheme/builtin/default';\nimport type { BuiltinColorPalette } from '../../color-scheme/builtin/interface';\n\nexport const colorScheme: IThemeColorScheme = {\n default: {\n dataScheme,\n palette: {\n /** 背景色 */\n backgroundColor: '#ffffff',\n /** 图表边框色 */\n borderColor: '#e3e5e8',\n /** 默认阴影颜色 */\n shadowColor: 'rgba(33,37,44,0.1)',\n /** 鼠标 hover 项背景颜色 */\n hoverBackgroundColor: '#f1f2f5',\n /** 滑块类组件背景条填充颜色 */\n sliderRailColor: '#f1f3f4',\n /** 滑块类组件滑块填充颜色 */\n sliderHandleColor: '#ffffff',\n /** 滑块类组件已选范围填充颜色 */\n sliderTrackColor: '#0040ff',\n /** 浮层背景区域颜色 */\n popupBackgroundColor: '#ffffff',\n\n /** 主要字色 */\n primaryFontColor: '#21252c',\n /** 次要字色 */\n secondaryFontColor: '#606773',\n /** 第三字色 */\n tertiaryFontColor: '#89909d',\n /** 轴标签字色 */\n axisLabelFontColor: '#89909d',\n /** 禁用字色 */\n disableFontColor: '#bcc1cb',\n /** 轴高亮标记字色 */\n axisMarkerFontColor: '#ffffff',\n\n /** 轴网格线颜色 */\n axisGridColor: '#f1f2f5',\n /** 轴线颜色 */\n axisDomainColor: '#d9dde4',\n\n /** 缩略轴滑块描边颜色 */\n dataZoomHandleStrokeColor: '#aeb5be',\n /** 缩略轴图表区域颜色 */\n dataZoomChartColor: '#c9ced8',\n\n /** 播放器控制器填充颜色 */\n playerControllerColor: '#0040ff',\n\n /** 滚动条滑块颜色 */\n scrollBarSliderColor: 'rgba(0,0,0,0.3)',\n\n /** 轴高亮标记背景色 */\n axisMarkerBackgroundColor: '#21252c',\n /** 标注标签背景颜色 */\n markLabelBackgroundColor: '#f1f2f5',\n /** 标注线颜色 */\n markLineStrokeColor: '#606773',\n\n /** 危险色 */\n dangerColor: '#e33232',\n /** 警告色 */\n warningColor: '#ffc528',\n /** 成功色 */\n successColor: '#07a35a',\n /** 信息色 */\n infoColor: '#3073f2'\n } as BuiltinColorPalette\n }\n};\n"]}
@@ -0,0 +1,2 @@
1
+ import type { ITheme } from '../../interface';
2
+ export declare const lightMobileTheme: ITheme;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.lightMobileTheme = void 0;
6
+
7
+ const component_1 = require("../common-mobile/component"), mark_1 = require("../common-mobile/mark"), color_scheme_1 = require("../light/color-scheme");
8
+
9
+ exports.lightMobileTheme = {
10
+ name: "light-mobile",
11
+ type: "light",
12
+ padding: 12,
13
+ colorScheme: color_scheme_1.colorScheme,
14
+ component: component_1.component,
15
+ mark: mark_1.markByType,
16
+ markByName: mark_1.markByName
17
+ };
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/theme/builtin/light-mobile/index.ts"],"names":[],"mappings":";;;AAQA,0DAAuD;AACvD,gDAA+D;AAC/D,wDAAoD;AAEvC,QAAA,gBAAgB,GAAW;IACtC,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,EAAE;IACX,WAAW,EAAX,0BAAW;IACX,SAAS,EAAT,qBAAS;IACT,IAAI,EAAE,iBAAU;IAChB,UAAU,EAAV,iBAAU;CACX,CAAC","file":"index.js","sourcesContent":["/**\n * 主题的命名,不要使用类似 arco,default 等字段,应该要以主题的特征来,颜色/场景特征(light, dark)\n *\n * 1. 对除了 color 外的一些主题设置,应该要有专门的设计,**不要直接复制**\n * 2. 原则上来讲,默认值尽量都放主题中,但是也可根据情况自行判断\n * 3. 目前主题只到系列,不到系列的 mark,对于这个分界没有太清楚,后续根据需求再做开放\n */\nimport type { ITheme } from '../../interface';\nimport { component } from '../common-mobile/component';\nimport { markByName, markByType } from '../common-mobile/mark';\nimport { colorScheme } from '../light/color-scheme';\n\nexport const lightMobileTheme: ITheme = {\n name: 'light-mobile',\n type: 'light',\n padding: 12,\n colorScheme,\n component,\n mark: markByType,\n markByName\n};\n"]}
@@ -3,19 +3,28 @@ export type BuiltinColorPalette = IColorSchemeStruct['palette'] & {
3
3
  backgroundColor: string;
4
4
  borderColor: string;
5
5
  shadowColor: string;
6
+ hoverBackgroundColor: string;
7
+ sliderRailColor: string;
8
+ sliderHandleColor: string;
9
+ sliderTrackColor: string;
10
+ popupBackgroundColor: string;
6
11
  primaryFontColor: string;
7
12
  secondaryFontColor: string;
8
- axisFontColor: string;
13
+ tertiaryFontColor: string;
14
+ axisLabelFontColor: string;
9
15
  disableFontColor: string;
10
- labelReverseFontColor: string;
16
+ axisMarkerFontColor: string;
11
17
  axisGridColor: string;
12
18
  axisDomainColor: string;
13
- dataZoomHandlerStrokeColor: string;
14
- dataZoomHandlerFillColor: string;
15
- dataZoomBackgroundColor: string;
19
+ dataZoomHandleStrokeColor: string;
16
20
  dataZoomChartColor: string;
17
- dataZoomSelectedColor: string;
21
+ playerControllerColor: string;
18
22
  scrollBarSliderColor: string;
19
- tooltipBackgroundColor: string;
23
+ axisMarkerBackgroundColor: string;
20
24
  markLabelBackgroundColor: string;
25
+ markLineStrokeColor: string;
26
+ dangerColor: string;
27
+ warningColor: string;
28
+ successColor: string;
29
+ infoColor: string;
21
30
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/theme/color-scheme/builtin/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { IColorSchemeStruct } from '../interface';\n\nexport type BuiltinColorPalette = IColorSchemeStruct['palette'] & {\n /** 背景色 */\n backgroundColor: string;\n /** 图表边框色 */\n borderColor: string;\n /** 默认阴影颜色 */\n shadowColor: string;\n\n /** 主要字色(图表标题、大数字) */\n primaryFontColor: string;\n /** 次要字色(图例、tooltip、数据标签) */\n secondaryFontColor: string;\n /** 轴字色 */\n axisFontColor: string;\n /** 禁用字色(非激活态字色) */\n disableFontColor: string;\n /** 标签反转字色 */\n labelReverseFontColor: string;\n\n /** 轴网格线颜色 */\n axisGridColor: string;\n /** 轴线颜色 */\n axisDomainColor: string;\n\n /** 缩略轴滑块描边颜色 */\n dataZoomHandlerStrokeColor: string;\n /** 缩略轴滑块填充颜色 */\n dataZoomHandlerFillColor: string;\n /** 缩略轴背景区域颜色 */\n dataZoomBackgroundColor: string;\n /** 缩略轴图表区域颜色 */\n dataZoomChartColor: string;\n /** 缩略轴选择区域颜色 */\n dataZoomSelectedColor: string;\n\n /** 滚动条滑块颜色 */\n scrollBarSliderColor: string;\n\n /** 提示信息背景区域颜色 */\n tooltipBackgroundColor: string;\n\n /** 标注标签背景颜色 */\n markLabelBackgroundColor: string;\n};\n"]}
1
+ {"version":3,"sources":["../src/theme/color-scheme/builtin/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { IColorSchemeStruct } from '../interface';\n\nexport type BuiltinColorPalette = IColorSchemeStruct['palette'] & {\n /** 背景色 */\n backgroundColor: string;\n /** 图表边框色 */\n borderColor: string;\n /** 默认阴影颜色 */\n shadowColor: string;\n /** 鼠标 hover 项背景颜色 */\n hoverBackgroundColor: string;\n /** 滑块类组件背景条填充颜色 */\n sliderRailColor: string;\n /** 滑块类组件滑块填充颜色 */\n sliderHandleColor: string;\n /** 滑块类组件已选范围填充颜色 */\n sliderTrackColor: string;\n /** 浮层背景区域颜色 */\n popupBackgroundColor: string;\n\n /** 主要字色(图表标题、大数字) */\n primaryFontColor: string;\n /** 次要字色(图例、tooltip、数据标签) */\n secondaryFontColor: string;\n /** 第三字色(图表副标题) */\n tertiaryFontColor: string;\n /** 轴标签字色 */\n axisLabelFontColor: string;\n /** 禁用字色(非激活态字色) */\n disableFontColor: string;\n /** 轴高亮标记字色(crosshair 标签字色) */\n axisMarkerFontColor: string;\n\n /** 轴网格线颜色 */\n axisGridColor: string;\n /** 轴线颜色 */\n axisDomainColor: string;\n\n /** 缩略轴滑块描边颜色 */\n dataZoomHandleStrokeColor: string;\n /** 缩略轴图表区域颜色 */\n dataZoomChartColor: string;\n\n /** 播放器控制器填充颜色 */\n playerControllerColor: string;\n\n /** 滚动条滑块颜色 */\n scrollBarSliderColor: string;\n\n /** 轴高亮标记背景色(crosshair 标签背景色) */\n axisMarkerBackgroundColor: string;\n /** 标注标签背景颜色 */\n markLabelBackgroundColor: string;\n /** 标注线颜色 */\n markLineStrokeColor: string;\n\n /** 危险色 */\n dangerColor: string;\n /** 警告色 */\n warningColor: string;\n /** 成功色 */\n successColor: string;\n /** 信息色 */\n infoColor: string;\n};\n"]}
@@ -13,9 +13,25 @@ Object.defineProperty(exports, "__esModule", {
13
13
  }), exports.getUpgradedTokenValue = exports.legacyTokenToNewToken = exports.newTokenToLegacyToken = void 0,
14
14
  exports.newTokenToLegacyToken = {
15
15
  primaryFontColor: "titleFontColor",
16
- secondaryFontColor: "labelFontColor"
16
+ secondaryFontColor: "labelFontColor",
17
+ axisLabelFontColor: "axisFontColor",
18
+ axisMarkerFontColor: "labelReverseFontColor",
19
+ dataZoomHandleStrokeColor: "dataZoomHandlerStrokeColor",
20
+ sliderHandleColor: "dataZoomHandlerFillColor",
21
+ sliderRailColor: "dataZoomBackgroundColor",
22
+ sliderTrackColor: "dataZoomSelectedColor",
23
+ playerControllerColor: "dataZoomSelectedColor",
24
+ popupBackgroundColor: "tooltipBackgroundColor",
25
+ hoverBackgroundColor: "axisGridColor"
17
26
  }, exports.legacyTokenToNewToken = {
18
27
  titleFontColor: "primaryFontColor",
19
- labelFontColor: "secondaryFontColor"
28
+ labelFontColor: "secondaryFontColor",
29
+ axisFontColor: "axisLabelFontColor",
30
+ labelReverseFontColor: "axisMarkerFontColor",
31
+ dataZoomHandlerStrokeColor: "dataZoomHandleStrokeColor",
32
+ dataZoomHandlerFillColor: "sliderHandleColor",
33
+ dataZoomBackgroundColor: "sliderRailColor",
34
+ dataZoomSelectedColor: "sliderTrackColor",
35
+ tooltipBackgroundColor: "popupBackgroundColor"
20
36
  }, exports.getUpgradedTokenValue = getUpgradedTokenValue;
21
37
  //# sourceMappingURL=legacy.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/theme/color-scheme/legacy.ts"],"names":[],"mappings":";;;AAQa,QAAA,qBAAqB,GAA8C;IAC9E,gBAAgB,EAAE,gBAAgB;IAClC,kBAAkB,EAAE,gBAAgB;CACrC,CAAC;AAEW,QAAA,qBAAqB,GAA8C;IAC9E,cAAc,EAAE,kBAAkB;IAClC,cAAc,EAAE,oBAAoB;CACrC,CAAC;AAEF,SAAgB,qBAAqB,CAAC,OAAsC,EAAE,GAAW;IAEvF,MAAM,SAAS,GAAG,6BAAqB,CAAC,GAAG,CAAC,CAAC;IAC7C,IAAI,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,EAAE;QACnC,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC;KAC3B;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;QAChB,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC;KACrB;IAED,MAAM,MAAM,GAAG,6BAAqB,CAAC,GAAG,CAAC,CAAC;IAC1C,IAAI,MAAM,EAAE;QACV,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;KACxB;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAjBD,sDAiBC","file":"legacy.js","sourcesContent":["// FIXME: token 兼容策略,照目前的设计不应该硬编码。\n// 后续需要二选一:\n// - 主题模块指定唯一一套支持的 token(可以保留这段硬编码)\n// - 在默认主题中做声明式的兼容(需要删除这段硬编码,并在 IColorKey 中支持新属性)\n\nimport type { BuiltinColorPalette } from './builtin';\nimport type { ColorSchemeItem, IColorSchemeStruct } from './interface';\n\nexport const newTokenToLegacyToken: Record<keyof BuiltinColorPalette, string> = {\n primaryFontColor: 'titleFontColor',\n secondaryFontColor: 'labelFontColor'\n};\n\nexport const legacyTokenToNewToken: Record<string, keyof BuiltinColorPalette> = {\n titleFontColor: 'primaryFontColor',\n labelFontColor: 'secondaryFontColor'\n};\n\nexport function getUpgradedTokenValue(palette: IColorSchemeStruct['palette'], key: string): ColorSchemeItem {\n // 情况一:用户定义了包含旧 token 的新色板\n const legacyKey = newTokenToLegacyToken[key];\n if (legacyKey && palette[legacyKey]) {\n return palette[legacyKey];\n }\n // 情况二:默认情况,用户尝试取色(大部分情况下在此退出)\n if (palette[key]) {\n return palette[key];\n }\n // 情况三:用户没有取到颜色,判断用户是否在尝试用旧 token 取色\n const newKey = legacyTokenToNewToken[key];\n if (newKey) {\n return palette[newKey];\n }\n // 情况四:真的取不到颜色\n return undefined;\n}\n"]}
1
+ {"version":3,"sources":["../src/theme/color-scheme/legacy.ts"],"names":[],"mappings":";;;AAQa,QAAA,qBAAqB,GAA8C;IAC9E,gBAAgB,EAAE,gBAAgB;IAClC,kBAAkB,EAAE,gBAAgB;IACpC,kBAAkB,EAAE,eAAe;IACnC,mBAAmB,EAAE,uBAAuB;IAC5C,yBAAyB,EAAE,4BAA4B;IACvD,iBAAiB,EAAE,0BAA0B;IAC7C,eAAe,EAAE,yBAAyB;IAC1C,gBAAgB,EAAE,uBAAuB;IACzC,qBAAqB,EAAE,uBAAuB;IAC9C,oBAAoB,EAAE,wBAAwB;IAC9C,oBAAoB,EAAE,eAAe;CAItC,CAAC;AAEW,QAAA,qBAAqB,GAA8C;IAC9E,cAAc,EAAE,kBAAkB;IAClC,cAAc,EAAE,oBAAoB;IACpC,aAAa,EAAE,oBAAoB;IACnC,qBAAqB,EAAE,qBAAqB;IAC5C,0BAA0B,EAAE,2BAA2B;IACvD,wBAAwB,EAAE,mBAAmB;IAC7C,uBAAuB,EAAE,iBAAiB;IAC1C,qBAAqB,EAAE,kBAAkB;IACzC,sBAAsB,EAAE,sBAAsB;CAC/C,CAAC;AAEF,SAAgB,qBAAqB,CAAC,OAAsC,EAAE,GAAW;IAEvF,MAAM,SAAS,GAAG,6BAAqB,CAAC,GAAG,CAAC,CAAC;IAC7C,IAAI,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,EAAE;QACnC,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC;KAC3B;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;QAChB,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC;KACrB;IAED,MAAM,MAAM,GAAG,6BAAqB,CAAC,GAAG,CAAC,CAAC;IAC1C,IAAI,MAAM,EAAE;QACV,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;KACxB;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAjBD,sDAiBC","file":"legacy.js","sourcesContent":["// FIXME: token 兼容策略,照目前的设计不应该硬编码。\n// 后续需要二选一:\n// - 主题模块指定唯一一套支持的 token(可以保留这段硬编码)\n// - 在默认主题中做声明式的兼容(需要删除这段硬编码,并在 IColorKey 中支持新属性)\n\nimport type { BuiltinColorPalette } from './builtin';\nimport type { ColorSchemeItem, IColorSchemeStruct } from './interface';\n\nexport const newTokenToLegacyToken: Record<keyof BuiltinColorPalette, string> = {\n primaryFontColor: 'titleFontColor',\n secondaryFontColor: 'labelFontColor',\n axisLabelFontColor: 'axisFontColor',\n axisMarkerFontColor: 'labelReverseFontColor',\n dataZoomHandleStrokeColor: 'dataZoomHandlerStrokeColor',\n sliderHandleColor: 'dataZoomHandlerFillColor',\n sliderRailColor: 'dataZoomBackgroundColor',\n sliderTrackColor: 'dataZoomSelectedColor',\n playerControllerColor: 'dataZoomSelectedColor',\n popupBackgroundColor: 'tooltipBackgroundColor',\n hoverBackgroundColor: 'axisGridColor'\n // 以下两个新 token 不做兼容策略,因为其对应的 legacy token 仍在使用\n // axisMarkerBackgroundColor: 'primaryFontColor',\n // markLineStrokeColor: 'primaryFontColor',\n};\n\nexport const legacyTokenToNewToken: Record<string, keyof BuiltinColorPalette> = {\n titleFontColor: 'primaryFontColor',\n labelFontColor: 'secondaryFontColor',\n axisFontColor: 'axisLabelFontColor',\n labelReverseFontColor: 'axisMarkerFontColor',\n dataZoomHandlerStrokeColor: 'dataZoomHandleStrokeColor',\n dataZoomHandlerFillColor: 'sliderHandleColor',\n dataZoomBackgroundColor: 'sliderRailColor',\n dataZoomSelectedColor: 'sliderTrackColor',\n tooltipBackgroundColor: 'popupBackgroundColor'\n};\n\nexport function getUpgradedTokenValue(palette: IColorSchemeStruct['palette'], key: string): ColorSchemeItem {\n // 情况一:用户定义了包含旧 token 的新色板\n const legacyKey = newTokenToLegacyToken[key];\n if (legacyKey && palette[legacyKey]) {\n return palette[legacyKey];\n }\n // 情况二:默认情况,用户尝试取色(大部分情况下在此退出)\n if (palette[key]) {\n return palette[key];\n }\n // 情况三:用户没有取到颜色,判断用户是否在尝试用旧 token 取色\n const newKey = legacyTokenToNewToken[key];\n if (newKey) {\n return palette[newKey];\n }\n // 情况四:真的取不到颜色\n return undefined;\n}\n"]}
@@ -48,7 +48,7 @@ exports.getDataScheme = getDataScheme, exports.computeActualDataScheme = compute
48
48
  exports.queryColorFromColorScheme = queryColorFromColorScheme;
49
49
 
50
50
  const getActualColor = (value, colorScheme, seriesSpec) => {
51
- if (isColorKey(value) && colorScheme) {
51
+ if (colorScheme && isColorKey(value)) {
52
52
  const color = queryColorFromColorScheme(colorScheme, value, seriesSpec);
53
53
  if (color) return color;
54
54
  }
@@ -56,7 +56,7 @@ const getActualColor = (value, colorScheme, seriesSpec) => {
56
56
  };
57
57
 
58
58
  function isColorKey(obj) {
59
- return (0, vutils_1.isObject)(obj) && "palette" === obj.type && !!obj.key;
59
+ return obj && "palette" === obj.type && !!obj.key;
60
60
  }
61
61
 
62
62
  function isProgressiveDataColorScheme(obj) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/theme/color-scheme/util.ts"],"names":[],"mappings":";;;AAAA,6CAAsG;AACtG,4CAAyC;AAWzC,iDAAoE;AACpE,qCAAiD;AAQjD,SAAgB,aAAa,CAC3B,WAA+B,EAC/B,UAAwB;;IAExB,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,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AAW,uBAAX,WAAW,CAAG,UAAU,CAAC,mCAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,CAAC;KAC3G;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAbD,wDAaC","file":"util.js","sourcesContent":["import { isArray, isFunction, isObject, isString, isValid, ColorUtil, isNil } from '@visactor/vutils';\nimport { Color } from '../../util/color';\nimport type {\n ColorScheme,\n ColorSchemeItem,\n IColorKey,\n IColorSchemeStruct,\n IProgressiveDataSchemeCase,\n IThemeColorScheme,\n ProgressiveDataScheme\n} from './interface';\nimport type { ISeriesSpec } from '../../typings';\nimport { getDirectionFromSeriesSpec } from '../../series/util/spec';\nimport { getUpgradedTokenValue } from './legacy';\n\n/**\n * 从色板中获取数据色板(在此步骤中替换语义色值)\n * @param colorScheme\n * @param seriesType\n * @returns\n */\nexport function getDataScheme(\n colorScheme?: IThemeColorScheme,\n seriesSpec?: ISeriesSpec\n): Array<ColorSchemeItem> | ProgressiveDataScheme<ColorSchemeItem> {\n if (!colorScheme) {\n return [];\n }\n const scheme = getColorSchemeBySeries(colorScheme, seriesSpec);\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, seriesSpec);\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, seriesSpec);\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 seriesSpec?: ISeriesSpec\n): ColorSchemeItem | undefined {\n const scheme = getColorSchemeBySeries(colorScheme, seriesSpec);\n if (!scheme) {\n return undefined;\n }\n let color;\n const { palette } = scheme as IColorSchemeStruct;\n if (isObject(palette)) {\n color = getUpgradedTokenValue(palette, colorKey.key) ?? colorKey.default;\n }\n if (!color) {\n return undefined;\n }\n if ((isNil(colorKey.a) && isNil(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, seriesSpec?: ISeriesSpec) => {\n if (isColorKey(value)) {\n if (colorScheme) {\n const color = queryColorFromColorScheme(colorScheme, value, seriesSpec);\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) || obj.length === 0) {\n return false;\n }\n return obj.every(item => {\n return isValid((item as IProgressiveDataSchemeCase<T>).scheme);\n });\n}\n\n/** 将色板转化为标准形式 */\nexport function transformColorSchemeToStandardStruct(colorScheme: ColorScheme): IColorSchemeStruct {\n if (isArray(colorScheme)) {\n return {\n dataScheme: colorScheme\n };\n }\n return colorScheme;\n}\n\nexport function getColorSchemeBySeries(\n colorScheme?: IThemeColorScheme,\n seriesSpec?: ISeriesSpec\n): ColorScheme | undefined {\n const { type: seriesType } = seriesSpec ?? {};\n let scheme: ColorScheme | undefined;\n if (!seriesSpec || isNil(seriesType)) {\n scheme = colorScheme?.default;\n } else {\n const direction = getDirectionFromSeriesSpec(seriesSpec);\n scheme = colorScheme?.[`${seriesType}_${direction}`] ?? colorScheme?.[seriesType] ?? colorScheme?.default;\n }\n return scheme;\n}\n"]}
1
+ {"version":3,"sources":["../src/theme/color-scheme/util.ts"],"names":[],"mappings":";;;AAAA,6CAAsG;AACtG,4CAAyC;AAWzC,iDAAoE;AACpE,qCAAiD;AAQjD,SAAgB,aAAa,CAC3B,WAA+B,EAC/B,UAAwB;;IAExB,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,EAAE,CAAC;KACX;IACD,MAAM,MAAM,GAAG,sBAAsB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IAC/D,IAAI,CAAC,MAAM,IAAI,IAAA,gBAAO,EAAC,MAAM,CAAC,EAAE;QAE9B,OAAO,MAAC,MAA0E,mCAAI,EAAE,CAAC;KAC1F;SAAM,IAAI,IAAA,iBAAQ,EAAC,MAAM,CAAC,EAAE;QAE3B,MAAM,EAAE,UAAU,EAAE,GAA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,CAAC,EAAE;QACrC,OAAO,KAAK,CAAC;KACd;IACD,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;QACtB,OAAO,IAAA,gBAAO,EAAE,IAAsC,CAAC,MAAM,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC;AAPD,oEAOC;AAGD,SAAgB,oCAAoC,CAAC,WAAwB;IAC3E,IAAI,IAAA,gBAAO,EAAC,WAAW,CAAC,EAAE;QACxB,OAAO;YACL,UAAU,EAAE,WAAW;SACxB,CAAC;KACH;IACD,OAAO,WAAW,CAAC;AACrB,CAAC;AAPD,oFAOC;AAED,SAAgB,sBAAsB,CACpC,WAA+B,EAC/B,UAAwB;;IAExB,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,EAAE,CAAC;IAC9C,IAAI,MAA+B,CAAC;IACpC,IAAI,CAAC,UAAU,IAAI,IAAA,cAAK,EAAC,UAAU,CAAC,EAAE;QACpC,MAAM,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,CAAC;KAC/B;SAAM;QACL,MAAM,SAAS,GAAG,IAAA,iCAA0B,EAAC,UAAU,CAAC,CAAC;QACzD,MAAM,GAAG,MAAA,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,GAAG,UAAU,IAAI,SAAS,EAAE,CAAC,mCAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,UAAU,CAAC,mCAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,CAAC;KAC3G;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAbD,wDAaC","file":"util.js","sourcesContent":["import { isArray, isFunction, isObject, isString, isValid, ColorUtil, isNil } from '@visactor/vutils';\nimport { Color } from '../../util/color';\nimport type {\n ColorScheme,\n ColorSchemeItem,\n IColorKey,\n IColorSchemeStruct,\n IProgressiveDataSchemeCase,\n IThemeColorScheme,\n ProgressiveDataScheme\n} from './interface';\nimport type { ISeriesSpec } from '../../typings';\nimport { getDirectionFromSeriesSpec } from '../../series/util/spec';\nimport { getUpgradedTokenValue } from './legacy';\n\n/**\n * 从色板中获取数据色板(在此步骤中替换语义色值)\n * @param colorScheme\n * @param seriesType\n * @returns\n */\nexport function getDataScheme(\n colorScheme?: IThemeColorScheme,\n seriesSpec?: ISeriesSpec\n): Array<ColorSchemeItem> | ProgressiveDataScheme<ColorSchemeItem> {\n if (!colorScheme) {\n return [];\n }\n const scheme = getColorSchemeBySeries(colorScheme, seriesSpec);\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, seriesSpec);\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, seriesSpec);\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 seriesSpec?: ISeriesSpec\n): ColorSchemeItem | undefined {\n const scheme = getColorSchemeBySeries(colorScheme, seriesSpec);\n if (!scheme) {\n return undefined;\n }\n let color;\n const { palette } = scheme as IColorSchemeStruct;\n if (isObject(palette)) {\n color = getUpgradedTokenValue(palette, colorKey.key) ?? colorKey.default;\n }\n if (!color) {\n return undefined;\n }\n if ((isNil(colorKey.a) && isNil(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, seriesSpec?: ISeriesSpec) => {\n if (colorScheme && isColorKey(value)) {\n const color = queryColorFromColorScheme(colorScheme, value, seriesSpec);\n if (color) {\n return color;\n }\n }\n return value;\n};\n\nexport function isColorKey(obj: any): obj is IColorKey {\n return 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) || obj.length === 0) {\n return false;\n }\n return obj.every(item => {\n return isValid((item as IProgressiveDataSchemeCase<T>).scheme);\n });\n}\n\n/** 将色板转化为标准形式 */\nexport function transformColorSchemeToStandardStruct(colorScheme: ColorScheme): IColorSchemeStruct {\n if (isArray(colorScheme)) {\n return {\n dataScheme: colorScheme\n };\n }\n return colorScheme;\n}\n\nexport function getColorSchemeBySeries(\n colorScheme?: IThemeColorScheme,\n seriesSpec?: ISeriesSpec\n): ColorScheme | undefined {\n const { type: seriesType } = seriesSpec ?? {};\n let scheme: ColorScheme | undefined;\n if (!seriesSpec || isNil(seriesType)) {\n scheme = colorScheme?.default;\n } else {\n const direction = getDirectionFromSeriesSpec(seriesSpec);\n scheme = colorScheme?.[`${seriesType}_${direction}`] ?? colorScheme?.[seriesType] ?? colorScheme?.default;\n }\n return scheme;\n}\n"]}
@@ -1,7 +1,6 @@
1
- import type { ILayoutPaddingSpec } from '../model/interface';
2
1
  import type { ISeriesTheme } from '../series/interface';
3
2
  import type { IMarkTheme } from '../typings/spec';
4
- import type { IArcMarkSpec, IAreaMarkSpec, ILineMarkSpec, IRectMarkSpec, ISymbolMarkSpec, ITextMarkSpec, IPathMarkSpec } from '../typings';
3
+ import type { IArcMarkSpec, IAreaMarkSpec, ILineMarkSpec, IRectMarkSpec, ISymbolMarkSpec, ITextMarkSpec, IPathMarkSpec, ILayoutPaddingSpec } from '../typings';
5
4
  import type { MarkTypeEnum } from '../mark/interface';
6
5
  import type { IColorKey, IThemeColorScheme } from './color-scheme/interface';
7
6
  import type { IGradientColor } from '@visactor/vrender-core';
@@ -1 +1 @@
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 { IColorKey, IThemeColorScheme } from './color-scheme/interface';\nimport type { IGradientColor } from '@visactor/vrender-core';\nimport type { IComponentTheme } from '../component/interface';\n\nexport interface ITheme {\n /**\n * 第 1 种配置:主题信息\n */\n /** 主题命名 */\n name?: string;\n /** 主题描述 */\n description?: string;\n /**\n * 主题类别:亮色或者暗色\n * 该配置用于指定该主题需要 merge 的是内置的亮色主题还是暗色主题\n */\n type?: 'light' | 'dark';\n\n /**\n * 第 2 种配置:图表层级的样式属性\n */\n /** 图表背景色 */\n background?: string | IGradientColor | IColorKey;\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 * 自动关闭动画的阀值,对应的是单系列data的长度\n */\n animationThreshold?: number;\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 /** 默认字体 */\n defaultFontFamily: string;\n /** 默认字号 */\n defaultFontSize: number;\n\n /** 1级字阶字号,用于:环形图中间数值 / 展示型数值 */\n l1FontSize: number;\n /** 1级字阶行高 */\n l1LineHeight: number | string;\n\n /** 2级字阶字号,用于:展示型文字 / 指标卡数值 */\n l2FontSize: number;\n /** 2级字阶行高 */\n l2LineHeight: number | string;\n\n /** 3级字阶字号,用于:图表标题 */\n l3FontSize: number;\n /** 3级字阶行高 */\n l3LineHeight: number | string;\n\n /** 4级字阶字号,用于:数据标签、tooltip */\n l4FontSize: number;\n /** 4级字阶行高 */\n l4LineHeight: number | string;\n\n /** 5级字阶字号,用于:坐标轴标题、轴标签、图例文字 */\n l5FontSize: number;\n /** 5级字阶行高 */\n l5LineHeight: number | string;\n\n /** 6级字阶字号,用于:地图标签 */\n l6FontSize: number;\n /** 6级字阶行高 */\n l6LineHeight: number | string;\n\n /** 轴 tick 长度 */\n axisTickSize: number;\n\n /** 面积图元透明度 */\n areaOpacity: number;\n}\n"]}
1
+ {"version":3,"sources":["../src/theme/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import 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 ILayoutPaddingSpec\n} from '../typings';\nimport type { MarkTypeEnum } from '../mark/interface';\nimport type { IColorKey, IThemeColorScheme } from './color-scheme/interface';\nimport type { IGradientColor } from '@visactor/vrender-core';\nimport type { IComponentTheme } from '../component/interface';\n\nexport interface ITheme {\n /**\n * 第 1 种配置:主题信息\n */\n /** 主题命名 */\n name?: string;\n /** 主题描述 */\n description?: string;\n /**\n * 主题类别:亮色或者暗色\n * 该配置用于指定该主题需要 merge 的是内置的亮色主题还是暗色主题\n */\n type?: 'light' | 'dark';\n\n /**\n * 第 2 种配置:图表层级的样式属性\n */\n /** 图表背景色 */\n background?: string | IGradientColor | IColorKey;\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 * 自动关闭动画的阀值,对应的是单系列data的长度\n */\n animationThreshold?: number;\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 /** 默认字体 */\n defaultFontFamily: string;\n /** 默认字号 */\n defaultFontSize: number;\n\n /** 1级字阶字号,用于:环形图中间数值 / 展示型数值 */\n l1FontSize: number;\n /** 1级字阶行高 */\n l1LineHeight: number | string;\n\n /** 2级字阶字号,用于:展示型文字 / 指标卡数值 */\n l2FontSize: number;\n /** 2级字阶行高 */\n l2LineHeight: number | string;\n\n /** 3级字阶字号,用于:图表标题 */\n l3FontSize: number;\n /** 3级字阶行高 */\n l3LineHeight: number | string;\n\n /** 4级字阶字号,用于:数据标签、tooltip */\n l4FontSize: number;\n /** 4级字阶行高 */\n l4LineHeight: number | string;\n\n /** 5级字阶字号,用于:坐标轴标题、轴标签、图例文字 */\n l5FontSize: number;\n /** 5级字阶行高 */\n l5LineHeight: number | string;\n\n /** 6级字阶字号,用于:地图标签 */\n l6FontSize: number;\n /** 6级字阶行高 */\n l6LineHeight: number | string;\n\n /** 轴 tick 长度 */\n axisTickSize: number;\n\n /** 面积图元透明度 */\n areaOpacity: number;\n}\n"]}
@@ -3,7 +3,7 @@ export declare class ThemeManager {
3
3
  static readonly themes: Map<string, ITheme>;
4
4
  private static _currentThemeName;
5
5
  static registerTheme(name: string, theme: Partial<ITheme>): void;
6
- static getTheme(name: string): ITheme;
6
+ static getTheme(name: string, transformed?: boolean): ITheme;
7
7
  static removeTheme(name: string): boolean;
8
8
  static themeExist(name: any): boolean;
9
9
  static getDefaultTheme(): ITheme;
@@ -10,8 +10,8 @@ class ThemeManager {
10
10
  static registerTheme(name, theme) {
11
11
  (0, builtin_1.registerTheme)(name, theme);
12
12
  }
13
- static getTheme(name) {
14
- return (0, builtin_1.getTheme)(name);
13
+ static getTheme(name, transformed = !1) {
14
+ return (0, builtin_1.getTheme)(name, transformed);
15
15
  }
16
16
  static removeTheme(name) {
17
17
  return (0, builtin_1.removeTheme)(name);