@visactor/vchart-types 1.7.5 → 1.8.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/package.json +1 -1
  2. package/tsconfig.tsbuildinfo +1 -1
  3. package/types/animation/config.d.ts +5 -1
  4. package/types/animation/utils.d.ts +2 -2
  5. package/types/chart/area/area-transformer.d.ts +6 -0
  6. package/types/chart/area/area.d.ts +6 -4
  7. package/types/chart/area/index.d.ts +1 -0
  8. package/types/chart/bar/3d/bar-3d-transformer.d.ts +6 -0
  9. package/types/chart/bar/3d/bar-3d.d.ts +14 -0
  10. package/types/chart/bar/3d/index.d.ts +2 -0
  11. package/types/chart/bar/bar-transformer.d.ts +6 -0
  12. package/types/chart/bar/bar.d.ts +7 -4
  13. package/types/chart/bar/index.d.ts +2 -1
  14. package/types/chart/base/base-chart-transformer.d.ts +21 -0
  15. package/types/chart/base/base-chart.d.ts +148 -0
  16. package/types/chart/base/index.d.ts +2 -0
  17. package/types/chart/box-plot/box-plot-transformer.d.ts +6 -0
  18. package/types/chart/box-plot/box-plot.d.ts +6 -4
  19. package/types/chart/box-plot/index.d.ts +1 -0
  20. package/types/chart/cartesian/cartesian-transformer.d.ts +8 -0
  21. package/types/chart/cartesian/index.d.ts +1 -1
  22. package/types/chart/circle-packing/circle-packing-transformer.d.ts +7 -0
  23. package/types/chart/circle-packing/circle-packing.d.ts +6 -5
  24. package/types/chart/circle-packing/index.d.ts +1 -0
  25. package/types/chart/common/common-transformer.d.ts +7 -0
  26. package/types/chart/common/common.d.ts +7 -4
  27. package/types/chart/common/index.d.ts +1 -0
  28. package/types/chart/correlation/correlation-transformer.d.ts +6 -0
  29. package/types/chart/correlation/correlation.d.ts +6 -4
  30. package/types/chart/correlation/index.d.ts +1 -0
  31. package/types/chart/funnel/3d/funnel-3d.d.ts +14 -0
  32. package/types/chart/funnel/3d/index.d.ts +1 -0
  33. package/types/chart/funnel/funnel-transformer.d.ts +8 -0
  34. package/types/chart/funnel/funnel.d.ts +7 -2
  35. package/types/chart/funnel/index.d.ts +2 -1
  36. package/types/chart/funnel/interface.d.ts +1 -1
  37. package/types/chart/gauge/gauge-transformer.d.ts +9 -0
  38. package/types/chart/gauge/gauge.d.ts +8 -6
  39. package/types/chart/gauge/index.d.ts +1 -0
  40. package/types/chart/gauge/interface.d.ts +2 -2
  41. package/types/chart/heatmap/heatmap-transformer.d.ts +5 -0
  42. package/types/chart/heatmap/heatmap.d.ts +7 -3
  43. package/types/chart/heatmap/index.d.ts +1 -0
  44. package/types/chart/histogram/3d/histogram-3d.d.ts +14 -0
  45. package/types/chart/histogram/3d/index.d.ts +1 -0
  46. package/types/chart/histogram/base/base.d.ts +8 -0
  47. package/types/chart/histogram/base/histogram-base-transformer.d.ts +6 -0
  48. package/types/chart/histogram/base/index.d.ts +2 -0
  49. package/types/chart/histogram/histogram-transformer.d.ts +5 -0
  50. package/types/chart/histogram/histogram.d.ts +7 -3
  51. package/types/chart/histogram/index.d.ts +2 -1
  52. package/types/chart/index.d.ts +2 -4
  53. package/types/chart/interface/chart.d.ts +20 -7
  54. package/types/chart/interface/common.d.ts +17 -1
  55. package/types/chart/line/index.d.ts +1 -0
  56. package/types/chart/line/interface.d.ts +1 -1
  57. package/types/chart/line/line-transformer.d.ts +6 -0
  58. package/types/chart/line/line.d.ts +6 -4
  59. package/types/chart/map/index.d.ts +1 -0
  60. package/types/chart/map/map-transformer.d.ts +8 -0
  61. package/types/chart/map/map.d.ts +6 -6
  62. package/types/chart/pie/3d/index.d.ts +1 -0
  63. package/types/chart/pie/3d/pie-3d.d.ts +17 -0
  64. package/types/chart/pie/base/base.d.ts +8 -0
  65. package/types/chart/pie/base/index.d.ts +2 -0
  66. package/types/chart/pie/base/pie-transformer.d.ts +7 -0
  67. package/types/chart/pie/index.d.ts +2 -1
  68. package/types/chart/pie/pie.d.ts +7 -2
  69. package/types/chart/polar/index.d.ts +1 -1
  70. package/types/chart/polar/polar-transformer.d.ts +9 -0
  71. package/types/chart/polar/progress-like/index.d.ts +1 -0
  72. package/types/chart/polar/progress-like/progress-like-transformer.d.ts +8 -0
  73. package/types/chart/polar/rose-like/index.d.ts +1 -0
  74. package/types/chart/polar/rose-like/rose-like-transformer.d.ts +7 -0
  75. package/types/chart/progress/circular/circular-progress-transformer.d.ts +7 -0
  76. package/types/chart/progress/circular/circular.d.ts +8 -4
  77. package/types/chart/progress/circular/index.d.ts +1 -0
  78. package/types/chart/progress/circular/interface.d.ts +1 -1
  79. package/types/chart/progress/linear/index.d.ts +1 -0
  80. package/types/chart/progress/linear/interface.d.ts +1 -1
  81. package/types/chart/progress/linear/linear-progress-transformer.d.ts +7 -0
  82. package/types/chart/progress/linear/linear.d.ts +6 -5
  83. package/types/chart/radar/index.d.ts +1 -0
  84. package/types/chart/radar/radar-transformer.d.ts +6 -0
  85. package/types/chart/radar/radar.d.ts +8 -4
  86. package/types/chart/range-area/index.d.ts +1 -0
  87. package/types/chart/range-area/range-area-transformer.d.ts +6 -0
  88. package/types/chart/range-area/range-area.d.ts +7 -4
  89. package/types/chart/range-column/3d/index.d.ts +2 -0
  90. package/types/chart/range-column/3d/range-column-3d-transformer.d.ts +5 -0
  91. package/types/chart/range-column/3d/range-column-3d.d.ts +13 -0
  92. package/types/chart/range-column/index.d.ts +2 -1
  93. package/types/chart/range-column/range-column-transformer.d.ts +6 -0
  94. package/types/chart/range-column/range-column.d.ts +7 -4
  95. package/types/chart/rose/index.d.ts +1 -0
  96. package/types/chart/rose/rose-transformer.d.ts +6 -0
  97. package/types/chart/rose/rose.d.ts +8 -4
  98. package/types/chart/sankey/index.d.ts +1 -0
  99. package/types/chart/sankey/sankey-transformer.d.ts +6 -0
  100. package/types/chart/sankey/sankey.d.ts +6 -4
  101. package/types/chart/scatter/index.d.ts +1 -0
  102. package/types/chart/scatter/scatter-transformer.d.ts +5 -0
  103. package/types/chart/scatter/scatter.d.ts +6 -3
  104. package/types/chart/sequence/index.d.ts +1 -0
  105. package/types/chart/sequence/sequence-transformer.d.ts +7 -0
  106. package/types/chart/sequence/sequence.d.ts +9 -7
  107. package/types/chart/sunburst/index.d.ts +1 -0
  108. package/types/chart/sunburst/sunburst-transformer.d.ts +7 -0
  109. package/types/chart/sunburst/sunburst.d.ts +6 -5
  110. package/types/chart/treemap/index.d.ts +1 -0
  111. package/types/chart/treemap/treemap-transformer.d.ts +7 -0
  112. package/types/chart/treemap/treemap.d.ts +7 -4
  113. package/types/chart/util.d.ts +3 -3
  114. package/types/chart/waterfall/index.d.ts +1 -0
  115. package/types/chart/waterfall/waterfall-transformer.d.ts +7 -0
  116. package/types/chart/waterfall/waterfall.d.ts +6 -3
  117. package/types/chart/word-cloud/3d/index.d.ts +2 -0
  118. package/types/chart/word-cloud/3d/word-cloud-3d-transformer.d.ts +6 -0
  119. package/types/chart/word-cloud/3d/word-cloud-3d.d.ts +15 -0
  120. package/types/chart/word-cloud/base/base.d.ts +9 -0
  121. package/types/chart/word-cloud/base/index.d.ts +2 -0
  122. package/types/chart/word-cloud/base/word-cloud-base-transformer.d.ts +5 -0
  123. package/types/chart/word-cloud/index.d.ts +2 -1
  124. package/types/chart/word-cloud/word-cloud-transformer.d.ts +5 -0
  125. package/types/chart/word-cloud/word-cloud.d.ts +6 -3
  126. package/types/compile/interface/compiler.d.ts +5 -0
  127. package/types/compile/mark/compilable-mark.d.ts +0 -5
  128. package/types/compile/mark/interface.d.ts +1 -4
  129. package/types/component/axis/base-axis.d.ts +27 -4
  130. package/types/component/axis/cartesian/axis.d.ts +6 -7
  131. package/types/component/axis/cartesian/band-axis.d.ts +1 -0
  132. package/types/component/axis/cartesian/linear-axis.d.ts +1 -0
  133. package/types/component/axis/cartesian/log-axis.d.ts +1 -0
  134. package/types/component/axis/cartesian/symlog-axis.d.ts +1 -0
  135. package/types/component/axis/cartesian/time-axis.d.ts +1 -0
  136. package/types/component/axis/cartesian/util/common.d.ts +4 -0
  137. package/types/component/axis/interface/common.d.ts +1 -0
  138. package/types/component/axis/polar/axis.d.ts +7 -7
  139. package/types/component/axis/polar/band-axis.d.ts +1 -0
  140. package/types/component/axis/polar/interface/common.d.ts +0 -1
  141. package/types/component/axis/polar/linear-axis.d.ts +1 -0
  142. package/types/component/axis/polar/util/common.d.ts +5 -0
  143. package/types/component/axis/polar/util/index.d.ts +1 -0
  144. package/types/component/axis/util.d.ts +4 -3
  145. package/types/component/base/base-component-transformer.d.ts +10 -0
  146. package/types/component/base/base-component.d.ts +10 -6
  147. package/types/component/base/index.d.ts +1 -0
  148. package/types/component/base/util.d.ts +2 -2
  149. package/types/component/brush/brush.d.ts +9 -5
  150. package/types/component/crosshair/base.d.ts +5 -4
  151. package/types/component/crosshair/cartesian.d.ts +3 -2
  152. package/types/component/crosshair/polar.d.ts +3 -2
  153. package/types/component/crosshair/util.d.ts +3 -4
  154. package/types/component/custom-mark/custom-mark.d.ts +7 -5
  155. package/types/component/data-zoom/data-filter-base-component.d.ts +3 -3
  156. package/types/component/data-zoom/data-zoom/data-zoom-transformer.d.ts +9 -0
  157. package/types/component/data-zoom/data-zoom/data-zoom.d.ts +12 -2
  158. package/types/component/data-zoom/data-zoom/index.d.ts +1 -0
  159. package/types/component/data-zoom/data-zoom/interface.d.ts +2 -2
  160. package/types/component/data-zoom/interface.d.ts +1 -1
  161. package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +5 -1
  162. package/types/component/data-zoom/util.d.ts +2 -2
  163. package/types/component/geo/geo-coordinate.d.ts +4 -7
  164. package/types/component/index.d.ts +1 -1
  165. package/types/component/indicator/indicator.d.ts +5 -4
  166. package/types/component/interface/common.d.ts +6 -4
  167. package/types/component/interface/type.d.ts +8 -0
  168. package/types/component/label/base-label.d.ts +2 -2
  169. package/types/component/label/index.d.ts +2 -0
  170. package/types/component/label/interface.d.ts +2 -2
  171. package/types/component/label/label-transformer.d.ts +8 -0
  172. package/types/component/label/label.d.ts +13 -5
  173. package/types/component/label/total-label.d.ts +28 -0
  174. package/types/component/label/util.d.ts +1 -0
  175. package/types/component/legend/base-legend.d.ts +3 -1
  176. package/types/component/legend/continuous/legend.d.ts +4 -6
  177. package/types/component/legend/discrete/legend.d.ts +4 -7
  178. package/types/component/legend/util.d.ts +1 -1
  179. package/types/component/map-label/component.d.ts +5 -2
  180. package/types/component/marker/mark-area/mark-area.d.ts +6 -4
  181. package/types/component/marker/mark-line/mark-line.d.ts +6 -4
  182. package/types/component/marker/mark-point/mark-point.d.ts +6 -4
  183. package/types/component/player/player.d.ts +4 -4
  184. package/types/component/title/title.d.ts +9 -6
  185. package/types/component/tooltip/index.d.ts +1 -0
  186. package/types/component/tooltip/tooltip-transformer.d.ts +8 -0
  187. package/types/component/tooltip/tooltip.d.ts +10 -8
  188. package/types/component/util.d.ts +2 -2
  189. package/types/constant/event.d.ts +1 -0
  190. package/types/constant/polar.d.ts +0 -10
  191. package/types/core/factory.d.ts +12 -3
  192. package/types/core/index.d.ts +1 -0
  193. package/types/core/interface.d.ts +17 -11
  194. package/types/core/vchart.d.ts +30 -7
  195. package/types/mark/arc-3d.d.ts +2 -0
  196. package/types/mark/arc.d.ts +1 -0
  197. package/types/mark/area.d.ts +1 -0
  198. package/types/mark/box-plot.d.ts +1 -0
  199. package/types/mark/cell.d.ts +1 -0
  200. package/types/mark/component.d.ts +1 -0
  201. package/types/mark/group.d.ts +2 -1
  202. package/types/mark/image.d.ts +1 -0
  203. package/types/mark/label.d.ts +1 -0
  204. package/types/mark/line.d.ts +1 -0
  205. package/types/mark/link-path.d.ts +1 -0
  206. package/types/mark/path.d.ts +1 -0
  207. package/types/mark/polygon/polygon.d.ts +1 -0
  208. package/types/mark/polygon/pyramid-3d.d.ts +1 -0
  209. package/types/mark/progress-arc.d.ts +1 -0
  210. package/types/mark/rect-3d.d.ts +1 -0
  211. package/types/mark/rect.d.ts +1 -0
  212. package/types/mark/ripple.d.ts +1 -0
  213. package/types/mark/rule.d.ts +1 -0
  214. package/types/mark/symbol.d.ts +1 -0
  215. package/types/mark/text.d.ts +1 -0
  216. package/types/model/base-model-transformer.d.ts +24 -0
  217. package/types/model/base-model.d.ts +9 -14
  218. package/types/model/index.d.ts +3 -0
  219. package/types/model/interface.d.ts +31 -4
  220. package/types/plugin/base/base-plugin-service.d.ts +13 -0
  221. package/types/plugin/base/base-plugin.d.ts +9 -0
  222. package/types/plugin/base/interface.d.ts +22 -0
  223. package/types/plugin/chart/index.d.ts +2 -0
  224. package/types/plugin/chart/interface.d.ts +22 -2
  225. package/types/plugin/chart/media-query/index.d.ts +2 -0
  226. package/types/plugin/chart/media-query/interface/common.d.ts +28 -0
  227. package/types/plugin/chart/media-query/interface/index.d.ts +2 -0
  228. package/types/plugin/chart/media-query/interface/spec.d.ts +25 -0
  229. package/types/plugin/chart/media-query/media-query.d.ts +28 -0
  230. package/types/plugin/chart/media-query/util/action.d.ts +3 -0
  231. package/types/plugin/chart/media-query/util/filter.d.ts +4 -0
  232. package/types/plugin/chart/media-query/util/index.d.ts +2 -0
  233. package/types/plugin/chart/media-query/util/query.d.ts +3 -0
  234. package/types/plugin/chart/plugin-service.d.ts +12 -0
  235. package/types/plugin/chart/register.d.ts +2 -0
  236. package/types/plugin/components/axis-sync-plugin/axis-sync.d.ts +5 -3
  237. package/types/plugin/components/interface.d.ts +15 -25
  238. package/types/plugin/components/plugin-service.d.ts +2 -10
  239. package/types/plugin/index.d.ts +1 -0
  240. package/types/region/index.d.ts +3 -0
  241. package/types/region/interface.d.ts +10 -2
  242. package/types/region/region-transformer.d.ts +8 -0
  243. package/types/region/region.d.ts +7 -4
  244. package/types/series/area/area-transformer.d.ts +5 -0
  245. package/types/series/area/area.d.ts +5 -3
  246. package/types/series/bar/bar-transformer.d.ts +5 -0
  247. package/types/series/bar/bar.d.ts +5 -3
  248. package/types/series/base/base-series-transformer.d.ts +18 -0
  249. package/types/series/base/base-series.d.ts +7 -8
  250. package/types/series/base/index.d.ts +2 -0
  251. package/types/series/box-plot/box-plot.d.ts +2 -3
  252. package/types/series/box-plot/interface.d.ts +1 -2
  253. package/types/series/cartesian/cartesian.d.ts +1 -1
  254. package/types/series/circle-packing/interface.d.ts +1 -2
  255. package/types/series/correlation/correlation-transformer.d.ts +5 -0
  256. package/types/series/correlation/correlation.d.ts +5 -4
  257. package/types/series/dot/dot.d.ts +2 -3
  258. package/types/series/funnel/3d/funnel-3d-transformer.d.ts +6 -0
  259. package/types/series/funnel/3d/funnel-3d.d.ts +22 -0
  260. package/types/series/funnel/3d/index.d.ts +2 -0
  261. package/types/series/funnel/funnel-transformer.d.ts +5 -0
  262. package/types/series/funnel/funnel.d.ts +5 -3
  263. package/types/series/gauge/gauge-pointer.d.ts +2 -3
  264. package/types/series/gauge/gauge-transformer.d.ts +5 -0
  265. package/types/series/gauge/gauge.d.ts +4 -3
  266. package/types/series/geo/interface.d.ts +1 -1
  267. package/types/series/heatmap/heatmap-transformer.d.ts +5 -0
  268. package/types/series/heatmap/heatmap.d.ts +5 -4
  269. package/types/series/index.d.ts +3 -3
  270. package/types/series/interface/common.d.ts +11 -6
  271. package/types/series/interface/series.d.ts +2 -3
  272. package/types/series/line/line.d.ts +5 -3
  273. package/types/series/link/link.d.ts +2 -3
  274. package/types/series/map/map-transformer.d.ts +5 -0
  275. package/types/series/map/map.d.ts +8 -3
  276. package/types/series/mixin/line-mixin-transformer.d.ts +5 -0
  277. package/types/series/mixin/line-mixin.d.ts +1 -2
  278. package/types/series/pie/3d/index.d.ts +2 -0
  279. package/types/series/pie/3d/pie-3d-transformer.d.ts +5 -0
  280. package/types/series/pie/3d/pie-3d.d.ts +20 -0
  281. package/types/series/pie/interface.d.ts +3 -0
  282. package/types/series/pie/pie-transformer.d.ts +9 -0
  283. package/types/series/pie/pie.d.ts +6 -13
  284. package/types/series/polar/index.d.ts +3 -0
  285. package/types/series/polar/polar.d.ts +0 -1
  286. package/types/series/progress/circular/circular.d.ts +2 -3
  287. package/types/series/progress/linear/linear.d.ts +1 -3
  288. package/types/series/radar/radar.d.ts +5 -3
  289. package/types/series/range-column/3d/index.d.ts +2 -0
  290. package/types/series/range-column/3d/range-column-3d-transformer.d.ts +5 -0
  291. package/types/series/range-column/3d/range-column-3d.d.ts +15 -0
  292. package/types/series/range-column/range-column-transformer.d.ts +5 -0
  293. package/types/series/range-column/range-column.d.ts +2 -0
  294. package/types/series/rose/rose-transformer.d.ts +5 -0
  295. package/types/series/rose/rose.d.ts +4 -3
  296. package/types/series/scatter/scatter-transformer.d.ts +5 -0
  297. package/types/series/scatter/scatter.d.ts +5 -3
  298. package/types/series/sunburst/sunburst.d.ts +1 -1
  299. package/types/series/waterfall/waterfall-transformer.d.ts +5 -0
  300. package/types/series/waterfall/waterfall.d.ts +4 -3
  301. package/types/theme/builtin/index.d.ts +0 -1
  302. package/types/typings/spec/common.d.ts +2 -0
  303. package/types/util/color.d.ts +1 -3
  304. package/types/util/space.d.ts +1 -3
@@ -0,0 +1,5 @@
1
+ import type { IPolarAxisCommonSpec } from '../interface';
2
+ export declare const getPolarAxisInfo: (spec: IPolarAxisCommonSpec) => {
3
+ axisType: import("../..").AxisType;
4
+ componentName: string;
5
+ };
@@ -0,0 +1 @@
1
+ export * from './common';
@@ -1,6 +1,6 @@
1
1
  import type { IOrientType, IPolarOrientType } from '../../typings';
2
2
  import type { AxisType, ICommonAxisSpec, ILinearAxisSpec } from './interface';
3
- import type { IModelOption } from '../../model/interface';
3
+ import type { ITheme } from '../../theme';
4
4
  export declare const DEFAULT_TITLE_STYLE: {
5
5
  left: {
6
6
  textAlign: string;
@@ -24,5 +24,6 @@ export declare function getLinearAxisSpecDomain(axisSpec: ILinearAxisSpec, defau
24
24
  };
25
25
  export declare function isValidCartesianAxis(spec: any): boolean;
26
26
  export declare function isValidPolarAxis(spec: any): boolean;
27
- export declare const getCartesianAxisTheme: (orient: IOrientType, type: AxisType, option: Partial<IModelOption>) => any;
28
- export declare const getPolarAxisTheme: (orient: IPolarOrientType, type: AxisType, option: Partial<IModelOption>) => any;
27
+ export declare const getCartesianAxisTheme: (orient: IOrientType, type: AxisType, chartTheme: ITheme) => any;
28
+ export declare const getPolarAxisTheme: (orient: IPolarOrientType, type: AxisType, chartTheme: ITheme) => any;
29
+ export declare const isDiscreteAxis: (axisType: AxisType) => boolean;
@@ -0,0 +1,10 @@
1
+ import { BaseModelSpecTransformer } from '../../model';
2
+ import type { IComponentSpec } from './interface';
3
+ export declare class BaseComponentSpecTransformer<T extends IComponentSpec = IComponentSpec, K = any> extends BaseModelSpecTransformer<T, K> {
4
+ getTheme(spec: T, chartSpec: any): K;
5
+ protected _mergeThemeToSpec(spec: T, chartSpec: any): {
6
+ spec: T;
7
+ theme: K;
8
+ };
9
+ protected _adjustPadding(spec: T): void;
10
+ }
@@ -9,10 +9,15 @@ import type { IAnimate } from '../../animation/interface';
9
9
  import type { Datum, ILayoutRect } from '../../typings';
10
10
  import type { IComponentSpec } from './interface';
11
11
  import { LayoutModel } from '../../model/layout-model';
12
- export declare abstract class BaseComponent<T extends IComponentSpec = IComponentSpec> extends LayoutModel<T> implements IComponent {
12
+ import { BaseComponentSpecTransformer } from './base-component-transformer';
13
+ import type { IModelRenderOption, IModelSpecInfo } from '../../model/interface';
14
+ export declare class BaseComponent<T extends IComponentSpec = IComponentSpec> extends LayoutModel<T> implements IComponent {
15
+ static transformerConstructor: typeof BaseComponentSpecTransformer;
13
16
  name: string;
14
17
  readonly modelType: string;
18
+ readonly transformerConstructor: any;
15
19
  pluginService?: IComponentPluginService;
20
+ static createComponent(specInfo: IModelSpecInfo, options: IComponentOption): IComponent;
16
21
  protected _option: IComponentOption;
17
22
  protected _regions: IRegion[];
18
23
  getRegions(): IRegion[];
@@ -21,18 +26,17 @@ export declare abstract class BaseComponent<T extends IComponentSpec = IComponen
21
26
  animate?: IAnimate;
22
27
  constructor(spec: T, options: IComponentOption);
23
28
  initLayout(): void;
24
- abstract changeRegions(regions: IRegion[]): void;
25
- protected abstract _getNeedClearVRenderComponents(): IGraphic[];
29
+ changeRegions(regions: IRegion[]): void;
30
+ protected _getNeedClearVRenderComponents(): IGraphic[];
31
+ onRender(ctx: IModelRenderOption): void;
26
32
  getVRenderComponents(): IGraphic<Partial<import("@visactor/vrender-core").IGraphicAttribute>>[];
27
33
  protected callPlugin(cb: (plugin: IComponentPlugin) => void): void;
28
34
  protected eventPos(markEventParams: BaseEventParams): {
29
35
  x: number;
30
36
  y: number;
31
37
  };
32
- protected _getTheme(): any;
33
- protected _mergeThemeToSpec(): void;
34
38
  protected getContainer(): IGroup;
35
- _compareSpec(): {
39
+ _compareSpec(spec: T, prevSpec: T): {
36
40
  change: boolean;
37
41
  reMake: boolean;
38
42
  reRender: boolean;
@@ -1 +1,2 @@
1
1
  export * from './base-component';
2
+ export * from './base-component-transformer';
@@ -1,3 +1,3 @@
1
- import type { IModelOption } from '../../model/interface';
1
+ import type { ITheme } from '../../theme';
2
2
  import { ComponentTypeEnum } from '../interface/type';
3
- export declare function getComponentThemeFromGlobalTheme(type: ComponentTypeEnum, option: Partial<IModelOption>, componentSpec: any): any;
3
+ export declare function getComponentThemeFromGlobalTheme(type: ComponentTypeEnum, chartTheme: ITheme, componentSpec: any, chartSpec: any): any;
@@ -1,18 +1,20 @@
1
1
  import { BaseComponent } from '../base/base-component';
2
- import type { IComponentOption } from '../interface';
3
2
  import { ComponentTypeEnum } from '../interface/type';
4
3
  import { Brush as BrushComponent } from '@visactor/vrender-components';
5
- import type { IModelRenderOption } from '../../model/interface';
4
+ import type { Maybe } from '@visactor/vutils';
5
+ import type { IModelRenderOption, IModelSpecInfo } from '../../model/interface';
6
6
  import type { IRegion } from '../../region/interface';
7
7
  import type { IGraphic } from '@visactor/vrender-core';
8
8
  import type { ISeries } from '../../series/interface';
9
9
  import type { IElement } from '@visactor/vgrammar-core';
10
10
  import type { BrushInteractiveRangeAttr, IBrush, IBrushSpec } from './interface';
11
- export declare class Brush extends BaseComponent<IBrushSpec> implements IBrush {
11
+ export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseComponent<T> implements IBrush {
12
12
  layoutType: 'none';
13
13
  static type: ComponentTypeEnum;
14
14
  type: ComponentTypeEnum;
15
15
  name: string;
16
+ static specKey: string;
17
+ specKey: string;
16
18
  layoutZIndex: number;
17
19
  protected _brushComponents: BrushComponent[];
18
20
  protected _relativeRegions: IRegion[];
@@ -39,7 +41,7 @@ export declare class Brush extends BaseComponent<IBrushSpec> implements IBrush {
39
41
  private _cacheInteractiveRangeAttrs;
40
42
  private _needEnablePickable;
41
43
  init(): void;
42
- static createComponent(spec: any, options: IComponentOption): Brush[];
44
+ static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
43
45
  created(): void;
44
46
  protected _extendDataInBrush(elementsMap: {
45
47
  [brushName: string]: {
@@ -52,6 +54,8 @@ export declare class Brush extends BaseComponent<IBrushSpec> implements IBrush {
52
54
  protected _getBrushInteractiveAttr(region: IRegion): BrushInteractiveRangeAttr;
53
55
  protected _updateBrushComponent(region: IRegion, componentIndex: number): void;
54
56
  protected _createBrushComponent(region: IRegion, componentIndex: number): void;
57
+ private _handleBrushChange;
58
+ private _emitEvent;
55
59
  private _transformBrushedMarkAttr;
56
60
  private _reconfigItem;
57
61
  private _reconfigLinkedItem;
@@ -64,7 +68,7 @@ export declare class Brush extends BaseComponent<IBrushSpec> implements IBrush {
64
68
  onRender(ctx: IModelRenderOption): void;
65
69
  changeRegions(regions: IRegion[]): void;
66
70
  protected _getNeedClearVRenderComponents(): IGraphic[];
67
- _compareSpec(): {
71
+ _compareSpec(spec: T, prevSpec: T): {
68
72
  change: boolean;
69
73
  reMake: boolean;
70
74
  reRender: boolean;
@@ -2,9 +2,9 @@ import type { Dict, IBoundsLike } from '@visactor/vutils';
2
2
  import type { IModelLayoutOption, IModelRenderOption } from '../../model/interface';
3
3
  import type { IRegion } from '../../region/interface';
4
4
  import { BaseComponent } from '../base/base-component';
5
- import type { IPadding, Maybe, StringOrNumber } from '../../typings';
5
+ import type { IPadding, StringOrNumber } from '../../typings';
6
6
  import type { IComponentOption } from '../interface';
7
- import type { ICrossHair, CrossHairTrigger, ICartesianCrosshairSpec, IPolarCrosshairSpec, ICrosshairTheme, ICrosshairCategoryFieldSpec } from './interface';
7
+ import type { ICrossHair, CrossHairTrigger, ICartesianCrosshairSpec, IPolarCrosshairSpec, ICrosshairCategoryFieldSpec } from './interface';
8
8
  import type { IAxis } from '../axis/interface';
9
9
  export type IBound = {
10
10
  x1: number;
@@ -31,6 +31,8 @@ export interface IHair {
31
31
  };
32
32
  }
33
33
  export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec | IPolarCrosshairSpec> extends BaseComponent<T> implements ICrossHair {
34
+ static specKey: string;
35
+ specKey: string;
34
36
  layoutType: 'none';
35
37
  gridZIndex: number;
36
38
  labelZIndex: number;
@@ -38,7 +40,6 @@ export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec |
38
40
  enable: boolean;
39
41
  showDefault: boolean;
40
42
  triggerOff: CrossHairTrigger | 'none';
41
- protected _theme: Maybe<ICrosshairTheme>;
42
43
  get enableRemain(): boolean;
43
44
  private _limitBounds;
44
45
  constructor(spec: T, options: IComponentOption);
@@ -50,7 +51,7 @@ export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec |
50
51
  protected _showDefaultCrosshair(): void;
51
52
  setAttrFromSpec(): void;
52
53
  created(): void;
53
- _compareSpec(): {
54
+ _compareSpec(spec: T, prevSpec: T): {
54
55
  change: boolean;
55
56
  reMake: boolean;
56
57
  reRender: boolean;
@@ -1,3 +1,4 @@
1
+ import type { Maybe } from '@visactor/vutils';
1
2
  import type { IComponentOption } from '../interface';
2
3
  import { ComponentTypeEnum } from '../interface/type';
3
4
  import type { ICartesianCrosshairSpec } from './interface';
@@ -5,9 +6,9 @@ import { BaseCrossHair } from './base';
5
6
  import type { IGraphic } from '@visactor/vrender-core';
6
7
  import type { IAxis } from '../axis/interface';
7
8
  import type { StringOrNumber } from '../../typings';
9
+ import type { IModelSpecInfo } from '../../model/interface';
8
10
  export declare class CartesianCrossHair<T extends ICartesianCrosshairSpec = ICartesianCrosshairSpec> extends BaseCrossHair<T> {
9
11
  static specKey: string;
10
- specKey: string;
11
12
  static type: ComponentTypeEnum;
12
13
  type: ComponentTypeEnum;
13
14
  name: string;
@@ -23,7 +24,7 @@ export declare class CartesianCrossHair<T extends ICartesianCrosshairSpec = ICar
23
24
  private _yRightLabel;
24
25
  private _currValueX;
25
26
  private _currValueY;
26
- static createComponent(spec: any, options: IComponentOption): CartesianCrossHair<any> | CartesianCrossHair<ICartesianCrosshairSpec>[];
27
+ static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
27
28
  constructor(spec: T, options: IComponentOption);
28
29
  protected _showDefaultCrosshairBySpec(): void;
29
30
  private _defaultCrosshair;
@@ -2,10 +2,11 @@ import type { IComponentOption } from '../interface';
2
2
  import { ComponentTypeEnum } from '../interface/type';
3
3
  import type { IPolarCrosshairSpec } from './interface';
4
4
  import { BaseCrossHair } from './base';
5
+ import type { Maybe } from '@visactor/vutils';
5
6
  import type { IGraphic } from '@visactor/vrender-core';
7
+ import type { IModelSpecInfo } from '../../model/interface';
6
8
  export declare class PolarCrossHair<T extends IPolarCrosshairSpec = IPolarCrosshairSpec> extends BaseCrossHair<T> {
7
9
  static specKey: string;
8
- specKey: string;
9
10
  static type: ComponentTypeEnum;
10
11
  type: ComponentTypeEnum;
11
12
  name: string;
@@ -19,7 +20,7 @@ export declare class PolarCrossHair<T extends IPolarCrosshairSpec = IPolarCrossh
19
20
  private _radiusLabelCrosshair;
20
21
  private _angleCrosshair;
21
22
  private _angleLabelCrosshair;
22
- static createComponent(spec: any, options: IComponentOption): PolarCrossHair<any> | PolarCrossHair<IPolarCrosshairSpec>[];
23
+ static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
23
24
  constructor(spec: T, options: IComponentOption);
24
25
  protected _showDefaultCrosshairBySpec(): void;
25
26
  private _defaultCrosshair;
@@ -1,10 +1,9 @@
1
1
  import type { Tag } from '@visactor/vrender-components';
2
2
  import type { IBoundsLike } from '@visactor/vutils';
3
3
  import type { Datum } from '../../typings';
4
- import type { IChart } from '../../chart/interface';
5
4
  import type { ICrosshairTheme } from './interface';
6
- import type { IModelOption } from '../../model/interface';
5
+ import type { ITheme } from '../../theme';
7
6
  export declare function limitTagInBounds(shape: Tag, bounds: IBoundsLike): void;
8
7
  export declare function getDatumByValue(data: Datum[], value: number, startField: string, endField?: string): Datum | null;
9
- export declare const getCartesianCrosshairTheme: (option: Partial<IModelOption>, chart: IChart) => ICrosshairTheme;
10
- export declare const getPolarCrosshairTheme: (option: Partial<IModelOption>, chart: IChart) => ICrosshairTheme;
8
+ export declare const getCartesianCrosshairTheme: (chartTheme: ITheme, chartSpec: any) => ICrosshairTheme;
9
+ export declare const getPolarCrosshairTheme: (chartTheme: ITheme, chartSpec: any) => ICrosshairTheme;
@@ -1,24 +1,26 @@
1
1
  import { BaseComponent } from '../base/base-component';
2
2
  import { ComponentTypeEnum } from '../interface/type';
3
- import type { IComponentOption } from '../interface';
4
3
  import type { IRegion } from '../../region/interface';
5
- import type { IModelRenderOption } from '../../model/interface';
4
+ import type { IModelRenderOption, IModelSpecInfo } from '../../model/interface';
6
5
  import type { EnableMarkType, ICustomMarkGroupSpec, ICustomMarkSpec } from '../../typings';
7
6
  import type { MarkTypeEnum } from '../../mark/interface';
7
+ import type { Maybe } from '@visactor/vutils';
8
8
  import type { IGraphic } from '@visactor/vrender-core';
9
- export declare class CustomMark extends BaseComponent<any> {
9
+ export declare class CustomMark<T = any> extends BaseComponent<any> {
10
10
  static type: ComponentTypeEnum;
11
11
  type: ComponentTypeEnum;
12
+ static specKey: string;
13
+ specKey: string;
12
14
  layoutType: 'none';
13
15
  layoutZIndex: number;
14
16
  layoutLevel: number;
15
17
  protected _spec: (ICustomMarkSpec<Exclude<EnableMarkType, MarkTypeEnum.group>> | ICustomMarkGroupSpec)[];
16
- static createComponent(spec: any, options: IComponentOption): CustomMark[];
18
+ static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
17
19
  created(): void;
18
20
  protected initMarks(): void;
19
21
  private _createExtensionMark;
20
22
  initEvent(): void;
21
- _compareSpec(): {
23
+ _compareSpec(spec: T, prevSpec: T): {
22
24
  change: boolean;
23
25
  reMake: boolean;
24
26
  reRender: boolean;
@@ -44,7 +44,7 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
44
44
  protected _zoomAttr: IRoamZoomSpec;
45
45
  protected _dragAttr: IRoamDragSpec;
46
46
  protected _scrollAttr: IRoamScrollSpec;
47
- setStartAndEnd(start: number, end: number): void;
47
+ setStartAndEnd(start: number | string, end: number | string, rangeMode?: ['percent' | 'value', 'percent' | 'value']): void;
48
48
  enableInteraction(): void;
49
49
  disableInteraction(): void;
50
50
  zoomIn(location?: {
@@ -85,14 +85,14 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
85
85
  init(option: IModelInitOption): void;
86
86
  protected _addTransformToSeries(): void;
87
87
  onRender(ctx: any): void;
88
- _compareSpec(): {
88
+ _compareSpec(spec: AdaptiveSpec<T, 'width' | 'height'>, prevSpec: AdaptiveSpec<T, 'width' | 'height'>): {
89
89
  change: boolean;
90
90
  reMake: boolean;
91
91
  reRender: boolean;
92
92
  reSize: boolean;
93
93
  reCompile: boolean;
94
94
  };
95
- reInit(theme?: any): void;
95
+ reInit(spec?: AdaptiveSpec<T, 'width' | 'height'>): void;
96
96
  changeRegions(): void;
97
97
  protected update(ctx: IComponentOption): void;
98
98
  protected resize(ctx: IComponentOption): void;
@@ -0,0 +1,9 @@
1
+ import type { AdaptiveSpec } from '../../../typings';
2
+ import { BaseComponentSpecTransformer } from '../../base';
3
+ import type { IDataZoomSpec, IDataZoomTheme } from './interface';
4
+ export declare class DataZoomSpecTransformer<T extends IDataZoomSpec = IDataZoomSpec, K extends IDataZoomTheme = IDataZoomTheme> extends BaseComponentSpecTransformer<AdaptiveSpec<T, 'width' | 'height'>, K> {
5
+ protected _mergeThemeToSpec(spec: AdaptiveSpec<T, 'width' | 'height'>, chartSpec: any): {
6
+ spec: AdaptiveSpec<T, 'width' | 'height'>;
7
+ theme: K;
8
+ };
9
+ }
@@ -1,3 +1,4 @@
1
+ import type { Maybe } from '@visactor/vutils';
1
2
  import type { IComponentOption } from '../../interface';
2
3
  import { ComponentTypeEnum } from '../../interface/type';
3
4
  import { DataFilterBaseComponent } from '../data-filter-base-component';
@@ -6,10 +7,16 @@ import type { IRectGraphicAttribute, ISymbolGraphicAttribute, IGraphic } from '@
6
7
  import type { Datum, ILayoutType } from '../../../typings';
7
8
  import type { ILinearScale, IBaseScale } from '@visactor/vscale';
8
9
  import type { IDataZoomSpec } from './interface';
10
+ import type { IModelSpecInfo } from '../../../model/interface';
11
+ import { DataZoomSpecTransformer } from './data-zoom-transformer';
9
12
  export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends DataFilterBaseComponent<T> {
10
13
  static type: ComponentTypeEnum;
14
+ static readonly transformerConstructor: any;
11
15
  type: ComponentTypeEnum;
12
16
  name: string;
17
+ readonly transformerConstructor: typeof DataZoomSpecTransformer;
18
+ static specKey: string;
19
+ specKey: string;
13
20
  layoutZIndex: number;
14
21
  layoutLevel: number;
15
22
  layoutType: ILayoutType;
@@ -19,11 +26,10 @@ export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends D
19
26
  protected _middleHandlerSize: number;
20
27
  protected _startHandlerSize: number;
21
28
  protected _endHandlerSize: number;
22
- static createComponent(spec: any, options: IComponentOption): DataZoom<any> | DataZoom<IDataZoomSpec>[];
29
+ static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
23
30
  constructor(spec: T, options: IComponentOption);
24
31
  created(): void;
25
32
  setAttrFromSpec(): void;
26
- protected _prepareSpecBeforeMergingTheme(originalSpec: T): T;
27
33
  onLayoutEnd(ctx: any): void;
28
34
  protected _initValueScale(): void;
29
35
  protected _updateScaleRange(): void;
@@ -47,6 +53,10 @@ export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends D
47
53
  visible: boolean;
48
54
  icon: ISymbolGraphicAttribute;
49
55
  background: any;
56
+ } | {
57
+ visible: boolean;
58
+ icon?: undefined;
59
+ background?: undefined;
50
60
  };
51
61
  endHandlerStyle: ISymbolGraphicAttribute;
52
62
  startTextStyle: unknown;
@@ -1,2 +1,3 @@
1
1
  export * from './data-zoom';
2
2
  export * from './interface';
3
+ export * from './data-zoom-transformer';
@@ -3,8 +3,8 @@ import type { IAreaMarkSpec, ILineMarkSpec, IRectMarkSpec, ISymbolMarkSpec, ITex
3
3
  import type { IComponentSpec } from '../../base/interface';
4
4
  import type { IComponent } from '../../interface';
5
5
  import type { IFilterMode } from '../constant';
6
- import type { IDataFilterComponentSpec } from '../interface';
7
- export type IDataZoom = IComponent;
6
+ import type { IDataFilterComponent, IDataFilterComponentSpec } from '../interface';
7
+ export type IDataZoom = IComponent & IDataFilterComponent;
8
8
  export interface IDataZoomStyle {
9
9
  showDetail?: 'auto' | boolean;
10
10
  middleHandler?: {
@@ -45,7 +45,7 @@ export interface IRoamSpec {
45
45
  rate?: number;
46
46
  }
47
47
  export interface IDataFilterComponent extends IComponent {
48
- setStartAndEnd: (start: number, end: number) => void;
48
+ setStartAndEnd: (start: number | string, end: number | string, rangeMode: ['percent' | 'value', 'percent' | 'value']) => void;
49
49
  enableInteraction: () => void;
50
50
  disableInteraction: () => void;
51
51
  zoomIn: (location?: {
@@ -1,3 +1,4 @@
1
+ import type { Maybe } from '@visactor/vutils';
1
2
  import type { IComponentOption } from '../../interface';
2
3
  import { ComponentTypeEnum } from '../../interface/type';
3
4
  import { DataFilterBaseComponent } from '../data-filter-base-component';
@@ -6,15 +7,18 @@ import { ScrollBar as ScrollBarComponent } from '@visactor/vrender-components';
6
7
  import type { IGraphic } from '@visactor/vrender-core';
7
8
  import type { IScrollBarSpec } from './interface';
8
9
  import type { ILayoutType } from '../../../typings/layout';
10
+ import type { IModelSpecInfo } from '../../../model/interface';
9
11
  export declare class ScrollBar<T extends IScrollBarSpec = IScrollBarSpec> extends DataFilterBaseComponent<T> {
10
12
  static type: ComponentTypeEnum;
11
13
  type: ComponentTypeEnum;
12
14
  name: string;
15
+ static specKey: string;
16
+ specKey: string;
13
17
  layoutZIndex: number;
14
18
  layoutLevel: number;
15
19
  layoutType: ILayoutType;
16
20
  protected _component: ScrollBarComponent;
17
- static createComponent(spec: any, options: IComponentOption): ScrollBar<any> | ScrollBar<IScrollBarSpec>[];
21
+ static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
18
22
  constructor(spec: T, options: IComponentOption);
19
23
  setAttrFromSpec(): void;
20
24
  onLayoutEnd(ctx: any): void;
@@ -1,6 +1,6 @@
1
- import type { IModelOption } from '../../model/interface';
2
1
  import { type IOrientType } from '../../typings';
3
2
  import type { ComponentTypeEnum } from '../interface';
3
+ import type { ITheme } from '../../theme';
4
4
  export interface IDataFilterWithNewDomainOption {
5
5
  getNewDomain: () => any[];
6
6
  isContinuous: () => boolean;
@@ -20,4 +20,4 @@ export interface IDataFilterComputeDomainOption {
20
20
  };
21
21
  }
22
22
  export declare const dataFilterComputeDomain: (data: Array<any>, op: IDataFilterComputeDomainOption) => any[];
23
- export declare const getDataFilterTheme: (orient: IOrientType, type: ComponentTypeEnum, option: Partial<IModelOption>) => any;
23
+ export declare const getDataFilterTheme: (orient: IOrientType, type: ComponentTypeEnum, chartTheme: ITheme) => any;
@@ -1,12 +1,12 @@
1
1
  import type { IPoint } from '../../typings/coordinate';
2
2
  import { Projection } from './projection';
3
- import type { IEffect, IModelLayoutOption, IModelRenderOption } from '../../model/interface';
4
- import type { IComponentOption } from '../interface';
3
+ import type { IEffect, IModelLayoutOption, IModelRenderOption, IModelSpecInfo } from '../../model/interface';
5
4
  import { ComponentTypeEnum } from '../interface/type';
6
5
  import { BaseComponent } from '../base/base-component';
7
6
  import type { IGeoRegionSpec, IRegion } from '../../region/interface';
8
7
  import type { IGeoCoordinate, IGeoCoordinateSpec, IProjectionSpec } from './interface';
9
- import type { IChartSpec, StringOrNumber } from '../../typings';
8
+ import type { StringOrNumber } from '../../typings';
9
+ import type { Maybe } from '@visactor/vutils';
10
10
  import type { IGraphic } from '@visactor/vrender-core';
11
11
  export declare function projectionName(key: string, id: number): string;
12
12
  export declare class GeoCoordinate extends BaseComponent<IGeoRegionSpec> implements IGeoCoordinate {
@@ -29,10 +29,7 @@ export declare class GeoCoordinate extends BaseComponent<IGeoRegionSpec> impleme
29
29
  }>;
30
30
  private _actualScale;
31
31
  getZoom(): number;
32
- private _evaluated;
33
- private _lastHeight;
34
- private _lastWidth;
35
- static createComponent(spec: IChartSpec, options: IComponentOption): IGeoCoordinate[];
32
+ static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
36
33
  effect: IEffect;
37
34
  setAttrFromSpec(): void;
38
35
  created(): void;
@@ -36,7 +36,7 @@ import type { ITooltipSpec, ITooltipTheme } from './tooltip';
36
36
  import { Tooltip, registerTooltip } from './tooltip';
37
37
  import type { ILabelSpec, ITotalLabelTheme } from './label';
38
38
  import { Label, registerLabel } from './label';
39
- import { TotalLabel, registerTotalLabel } from './label/totalLabel';
39
+ import { TotalLabel, registerTotalLabel } from './label/total-label';
40
40
  import { registerPoptip } from './poptip/index';
41
41
  import type { IComponentTheme } from './interface';
42
42
  import type { IAxisCommonTheme, IAxisItemTheme, IBandAxisTheme } from './axis/interface';
@@ -1,14 +1,16 @@
1
- import type { IComponentOption } from '../interface';
2
1
  import { ComponentTypeEnum } from '../interface/type';
3
2
  import { BaseComponent } from '../base/base-component';
4
3
  import type { IRegion } from '../../region/interface';
5
- import type { IIndicator, IIndicatorSpec, IIndicatorTheme } from './interface';
4
+ import type { IIndicator, IIndicatorSpec } from './interface';
6
5
  import type { Maybe } from '../../typings';
6
+ import type { IModelSpecInfo } from '../../model/interface';
7
7
  import type { IGraphic } from '@visactor/vrender-core';
8
8
  export declare class Indicator<T extends IIndicatorSpec> extends BaseComponent<T> implements IIndicator {
9
9
  static type: ComponentTypeEnum;
10
10
  type: ComponentTypeEnum;
11
11
  name: string;
12
+ static specKey: string;
13
+ specKey: string;
12
14
  layoutType: 'none';
13
15
  layoutZIndex: number;
14
16
  layoutLevel: number;
@@ -19,8 +21,7 @@ export declare class Indicator<T extends IIndicatorSpec> extends BaseComponent<T
19
21
  private _content;
20
22
  private _indicatorComponent;
21
23
  private _cacheAttrs;
22
- protected _theme: Maybe<IIndicatorTheme>;
23
- static createComponent(spec: any, options: IComponentOption): import("../interface").IComponent[];
24
+ static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
24
25
  created(): void;
25
26
  setAttrFromSpec(): void;
26
27
  onRender(ctx: any): void;
@@ -1,10 +1,11 @@
1
1
  import type { ISeriesFilter } from '../../region/interface';
2
2
  import type { IAnimate } from '../../animation/interface';
3
- import type { ILayoutModel, IModelOption } from '../../model/interface';
3
+ import type { ILayoutModel, IModelConstructor, IModelOption, IModelSpecInfo } from '../../model/interface';
4
4
  import type { IRegion } from '../../region/interface';
5
5
  import type { ISeries } from '../../series/interface';
6
- import type { StringOrNumber } from '../../typings';
6
+ import type { Maybe, StringOrNumber } from '../../typings';
7
7
  import type { IGraphic } from '@visactor/vrender-core';
8
+ import type { IChartSpecInfo } from '../../chart/interface';
8
9
  export interface IComponentOption extends IModelOption {
9
10
  getAllRegions: () => IRegion[];
10
11
  getRegionsInIndex: (index?: number[]) => IRegion[];
@@ -28,9 +29,10 @@ export interface IComponent extends ILayoutModel {
28
29
  getVRenderComponents: () => IGraphic[];
29
30
  clear: () => void;
30
31
  }
31
- export interface IComponentConstructor {
32
+ export interface IComponentConstructor extends IModelConstructor {
32
33
  type: string;
33
34
  specKey?: string;
34
- createComponent: (spec: any, options: IComponentOption) => IComponent | IComponent[] | undefined;
35
+ getSpecInfo: (chartSpec: any, chartSpecInfo?: IChartSpecInfo) => Maybe<IModelSpecInfo[]>;
36
+ createComponent: (specInfo: IModelSpecInfo, options: IComponentOption) => IComponent;
35
37
  new (spec: any, options: IComponentOption): IComponent;
36
38
  }
@@ -33,3 +33,11 @@ export declare enum ComponentTypeEnum {
33
33
  poptip = "poptip",
34
34
  customMark = "customMark"
35
35
  }
36
+ export declare enum SimplifiedComponentTypeEnum {
37
+ axis = "axis",
38
+ legend = "legend",
39
+ crosshair = "crosshair"
40
+ }
41
+ export declare const axisComponentTypes: ComponentTypeEnum[];
42
+ export declare const legendComponentTypes: ComponentTypeEnum[];
43
+ export declare const crosshairComponentTypes: ComponentTypeEnum[];
@@ -5,7 +5,7 @@ import type { IRegion } from '../../region/interface';
5
5
  import type { IModelRenderOption } from '../../model/interface';
6
6
  import type { ILabelSpec } from './interface';
7
7
  import type { IGraphic } from '@visactor/vrender-core';
8
- export declare abstract class BaseLabelComponent<T extends ILabelSpec = ILabelSpec> extends BaseComponent<T> {
8
+ export declare abstract class BaseLabelComponent<T = any> extends BaseComponent<T> {
9
9
  static type: ComponentTypeEnum;
10
10
  type: ComponentTypeEnum;
11
11
  name: string;
@@ -25,7 +25,7 @@ export declare abstract class BaseLabelComponent<T extends ILabelSpec = ILabelSp
25
25
  hover: boolean;
26
26
  select: boolean;
27
27
  };
28
- _compareSpec(): {
28
+ _compareSpec(spec: T, prevSpec: T): {
29
29
  change: boolean;
30
30
  reMake: boolean;
31
31
  reRender: boolean;
@@ -1,2 +1,4 @@
1
1
  export * from './interface';
2
2
  export * from './label';
3
+ export * from './total-label';
4
+ export * from './label-transformer';
@@ -1,9 +1,9 @@
1
1
  import type { BaseLabelAttrs } from '@visactor/vrender-components';
2
2
  import type { ConvertToMarkStyleSpec, Datum, ITextMarkSpec } from '../../typings';
3
3
  import type { IComponentSpec } from '../base/interface';
4
- import type { ISeries } from '../..';
5
4
  import type { IRichTextCharacter } from '@visactor/vrender-core';
6
5
  import type { ILabelMark } from '../../mark/label';
6
+ import type { ISeries } from '../../series';
7
7
  export interface ILabelFormatMethodContext {
8
8
  series?: ISeries;
9
9
  }
@@ -38,6 +38,6 @@ export interface ITotalLabelTheme extends Pick<ILabelSpec, 'visible' | 'interact
38
38
  style?: ITextMarkSpec;
39
39
  }
40
40
  export type TransformedLabelSpec = ILabelSpec & {
41
- styleHandler: (mark?: ILabelMark) => void;
41
+ getStyleHandler: (series: ISeries) => (mark?: ILabelMark) => void;
42
42
  };
43
43
  export {};
@@ -0,0 +1,8 @@
1
+ import type { IChartSpec } from '../../typings';
2
+ import { BaseComponentSpecTransformer } from '../base';
3
+ export declare class LabelSpecTransformer<T extends IChartSpec = any, K = any> extends BaseComponentSpecTransformer<T, K> {
4
+ protected _initTheme(spec: T, chartSpec: any): {
5
+ spec: T;
6
+ theme: K;
7
+ };
8
+ }