@visactor/vchart-types 1.15.5-alpha.8 → 2.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/package.json +3 -3
  2. package/tsconfig.tsbuildinfo +1 -1
  3. package/types/animation/animate-manager.d.ts +2 -4
  4. package/types/animation/interface.d.ts +86 -2
  5. package/types/animation/spec.d.ts +27 -3
  6. package/types/animation/utils.d.ts +3 -4
  7. package/types/chart/base/base-chart.d.ts +10 -7
  8. package/types/chart/funnel/util.d.ts +2 -0
  9. package/types/chart/interface/chart.d.ts +3 -4
  10. package/types/chart/interface/common.d.ts +2 -9
  11. package/types/chart/sankey/sankey.d.ts +1 -1
  12. package/types/compile/compilable-base.d.ts +1 -1
  13. package/types/compile/compiler.d.ts +35 -25
  14. package/types/compile/data/compilable-data.d.ts +7 -7
  15. package/types/compile/data/interface.d.ts +4 -1
  16. package/types/compile/grammar-item.d.ts +7 -13
  17. package/types/compile/interface/compilable-item.d.ts +22 -28
  18. package/types/compile/interface/compiler.d.ts +13 -4
  19. package/types/compile/mark/index.d.ts +0 -1
  20. package/types/compile/mark/interface.d.ts +42 -33
  21. package/types/compile/mark/mark-state-manager.d.ts +11 -13
  22. package/types/compile/mark/util.d.ts +1 -1
  23. package/types/compile/state-manager.d.ts +11 -0
  24. package/types/compile/util.d.ts +14 -0
  25. package/types/component/axis/base-axis.d.ts +5 -3
  26. package/types/component/axis/cartesian/axis.d.ts +1 -1
  27. package/types/component/axis/cartesian/time-axis.d.ts +1 -0
  28. package/types/component/axis/interface/common.d.ts +8 -0
  29. package/types/component/base/base-component.d.ts +1 -2
  30. package/types/component/brush/brush.d.ts +12 -10
  31. package/types/component/crosshair/base.d.ts +25 -36
  32. package/types/component/crosshair/cartesian.d.ts +5 -28
  33. package/types/component/crosshair/interface/common.d.ts +67 -2
  34. package/types/component/crosshair/interface/index.d.ts +0 -2
  35. package/types/component/crosshair/interface/spec.d.ts +8 -4
  36. package/types/component/crosshair/polar.d.ts +6 -22
  37. package/types/component/crosshair/utils/cartesian.d.ts +5 -26
  38. package/types/component/crosshair/utils/polar.d.ts +18 -11
  39. package/types/component/data-zoom/data-filter-base-component.d.ts +4 -4
  40. package/types/component/data-zoom/data-zoom/data-zoom.d.ts +1 -1
  41. package/types/component/data-zoom/interface.d.ts +11 -0
  42. package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +1 -2
  43. package/types/component/geo/geo-coordinate.d.ts +2 -2
  44. package/types/component/geo/interface.d.ts +1 -1
  45. package/types/component/label/base-label.d.ts +5 -0
  46. package/types/component/label/interface.d.ts +4 -3
  47. package/types/component/label/label.d.ts +5 -3
  48. package/types/component/label/util.d.ts +9 -10
  49. package/types/component/legend/util.d.ts +3 -3
  50. package/types/component/marker/base-marker.d.ts +1 -1
  51. package/types/component/tooltip/processor/interface.d.ts +1 -1
  52. package/types/component/tooltip/processor/util.d.ts +1 -1
  53. package/types/component/tooltip/tooltip.d.ts +3 -3
  54. package/types/constant/data.d.ts +1 -0
  55. package/types/constant/event.d.ts +53 -2
  56. package/types/core/factory.d.ts +28 -3
  57. package/types/core/index.d.ts +2 -1
  58. package/types/core/interface.d.ts +13 -4
  59. package/types/core/vchart.d.ts +6 -6
  60. package/types/data/transforms/treemap.d.ts +5 -6
  61. package/types/data/transforms/venn.d.ts +10 -0
  62. package/types/data/transforms/waterfall.d.ts +1 -0
  63. package/types/event/events/base.d.ts +1 -2
  64. package/types/event/index.d.ts +1 -0
  65. package/types/event/interface.d.ts +6 -9
  66. package/types/index-harmony-simple.d.ts +2 -1
  67. package/types/index.d.ts +0 -1
  68. package/types/interaction/config.d.ts +13 -0
  69. package/types/interaction/index.d.ts +9 -1
  70. package/types/interaction/interaction.d.ts +17 -25
  71. package/types/interaction/interface/common.d.ts +22 -0
  72. package/types/interaction/interface/spec.d.ts +53 -0
  73. package/types/interaction/interface/trigger.d.ts +87 -0
  74. package/types/interaction/triggers/base.d.ts +28 -0
  75. package/types/interaction/triggers/dimension-hover.d.ts +22 -0
  76. package/types/interaction/triggers/element-active-by-legend.d.ts +21 -0
  77. package/types/interaction/triggers/element-active.d.ts +20 -0
  78. package/types/interaction/triggers/element-highlight-by-graphic-name.d.ts +13 -0
  79. package/types/interaction/triggers/element-highlight-by-group.d.ts +23 -0
  80. package/types/interaction/triggers/element-highlight-by-key.d.ts +9 -0
  81. package/types/interaction/triggers/element-highlight-by-legend.d.ts +22 -0
  82. package/types/interaction/triggers/element-highlight-by-name.d.ts +24 -0
  83. package/types/interaction/triggers/element-highlight.d.ts +25 -0
  84. package/types/interaction/triggers/element-select-by-graphic-name.d.ts +8 -0
  85. package/types/interaction/triggers/element-select.d.ts +24 -0
  86. package/types/interaction/triggers/enum.d.ts +8 -0
  87. package/types/interaction/triggers/util.d.ts +12 -0
  88. package/types/interaction/zoom/zoomable.d.ts +1 -0
  89. package/types/layout/interface.d.ts +2 -2
  90. package/types/layout/layout-item.d.ts +2 -3
  91. package/types/mark/arc.d.ts +2 -2
  92. package/types/mark/area.d.ts +2 -0
  93. package/types/mark/base/base-line.d.ts +16 -2
  94. package/types/mark/base/base-mark.d.ts +131 -13
  95. package/types/mark/box-plot.d.ts +11 -5
  96. package/types/mark/cell.d.ts +5 -2
  97. package/types/mark/component.d.ts +11 -3
  98. package/types/mark/glyph.d.ts +29 -0
  99. package/types/mark/group.d.ts +10 -6
  100. package/types/mark/index.d.ts +3 -1
  101. package/types/mark/interface/common.d.ts +61 -9
  102. package/types/mark/interface/enum.d.ts +6 -0
  103. package/types/mark/interface/index.d.ts +1 -0
  104. package/types/mark/interface/mark.d.ts +18 -1
  105. package/types/mark/interface/type.d.ts +1 -0
  106. package/types/mark/label.d.ts +4 -3
  107. package/types/mark/link-path.d.ts +35 -5
  108. package/types/mark/liquid.d.ts +47 -5
  109. package/types/mark/ripple.d.ts +39 -4
  110. package/types/mark/rule.d.ts +3 -0
  111. package/types/mark/symbol.d.ts +4 -4
  112. package/types/mark/text.d.ts +4 -2
  113. package/types/mark/transform/data-sampling.d.ts +10 -0
  114. package/types/mark/transform/filter.d.ts +1 -0
  115. package/types/mark/transform/map.d.ts +1 -0
  116. package/types/mark/transform/symbol-overlap.d.ts +14 -0
  117. package/types/mark/utils/common.d.ts +4 -0
  118. package/types/mark/utils/glyph.d.ts +2 -0
  119. package/types/mark/utils/index.d.ts +2 -0
  120. package/types/mark/utils/line.d.ts +3 -0
  121. package/types/model/base-model.d.ts +8 -8
  122. package/types/model/interface.d.ts +4 -8
  123. package/types/model/layout-model.d.ts +2 -2
  124. package/types/plugin/components/tooltip-handler/base.d.ts +2 -2
  125. package/types/plugin/components/tooltip-handler/utils/position.d.ts +2 -4
  126. package/types/plugin/other.d.ts +3 -3
  127. package/types/region/interface.d.ts +0 -2
  128. package/types/region/region.d.ts +3 -9
  129. package/types/series/area/animation.d.ts +1 -1
  130. package/types/series/area/area.d.ts +1 -1
  131. package/types/series/bar/animation.d.ts +1 -1
  132. package/types/series/bar/bar.d.ts +3 -3
  133. package/types/series/base/base-series.d.ts +26 -42
  134. package/types/series/base/tooltip-helper.d.ts +1 -2
  135. package/types/series/box-plot/box-plot.d.ts +3 -3
  136. package/types/series/cartesian/cartesian.d.ts +1 -1
  137. package/types/series/circle-packing/animation.d.ts +1 -1
  138. package/types/series/circle-packing/circle-packing.d.ts +1 -1
  139. package/types/series/correlation/animation.d.ts +1 -1
  140. package/types/series/correlation/correlation.d.ts +3 -4
  141. package/types/series/dot/dot.d.ts +2 -2
  142. package/types/series/funnel/funnel.d.ts +3 -2
  143. package/types/series/funnel/tooltip-helper.d.ts +1 -1
  144. package/types/series/gauge/animation.d.ts +1 -1
  145. package/types/series/gauge/gauge-pointer.d.ts +4 -1
  146. package/types/series/gauge/gauge.d.ts +2 -2
  147. package/types/series/geo/geo.d.ts +2 -2
  148. package/types/series/heatmap/animation.d.ts +1 -1
  149. package/types/series/heatmap/heatmap.d.ts +4 -1
  150. package/types/series/interface/common.d.ts +1 -4
  151. package/types/series/interface/series.d.ts +6 -1
  152. package/types/series/line/animation.d.ts +1 -1
  153. package/types/series/line/line.d.ts +1 -1
  154. package/types/series/link/link.d.ts +5 -2
  155. package/types/series/liquid/animation.d.ts +1 -1
  156. package/types/series/liquid/liquid.d.ts +4 -1
  157. package/types/series/map/interface.d.ts +10 -0
  158. package/types/series/mixin/line-mixin.d.ts +5 -5
  159. package/types/series/pictogram/pictogram.d.ts +15 -19
  160. package/types/series/pie/animation/animation.d.ts +4 -3
  161. package/types/series/pie/animation/centerOffset.d.ts +1 -1
  162. package/types/series/pie/interface.d.ts +2 -2
  163. package/types/series/pie/pie.d.ts +8 -6
  164. package/types/series/polar/progress-like/animation.d.ts +1 -1
  165. package/types/series/polar/progress-like/progress-like.d.ts +1 -2
  166. package/types/series/progress/circular/circular.d.ts +4 -1
  167. package/types/series/progress/linear/animation.d.ts +1 -1
  168. package/types/series/progress/linear/linear.d.ts +4 -1
  169. package/types/series/radar/animation.d.ts +11 -9
  170. package/types/series/radar/radar.d.ts +2 -2
  171. package/types/series/range-column/animation.d.ts +1 -1
  172. package/types/series/rose/animation.d.ts +1 -1
  173. package/types/series/sankey/animation.d.ts +1 -1
  174. package/types/series/sankey/sankey.d.ts +11 -12
  175. package/types/series/sankey/tooltip-helper.d.ts +1 -1
  176. package/types/series/scatter/animation.d.ts +1 -1
  177. package/types/series/sunburst/animation/enter.d.ts +1 -1
  178. package/types/series/sunburst/animation/exit.d.ts +1 -1
  179. package/types/series/sunburst/animation/preset.d.ts +1 -1
  180. package/types/series/sunburst/animation/utils.d.ts +2 -2
  181. package/types/series/sunburst/sunburst.d.ts +1 -1
  182. package/types/series/treemap/animation.d.ts +1 -1
  183. package/types/series/treemap/treemap.d.ts +1 -2
  184. package/types/series/venn/animation.d.ts +1 -1
  185. package/types/series/venn/venn.d.ts +2 -1
  186. package/types/series/waterfall/animation.d.ts +1 -1
  187. package/types/series/waterfall/waterfall.d.ts +2 -2
  188. package/types/series/word-cloud/animation.d.ts +1 -1
  189. package/types/series/word-cloud/base.d.ts +1 -1
  190. package/types/series/word-cloud/interface.d.ts +1 -1
  191. package/types/typings/common.d.ts +13 -0
  192. package/types/typings/spec/common.d.ts +37 -36
  193. package/types/typings/visual.d.ts +9 -2
  194. package/types/util/array.d.ts +1 -0
  195. package/types/util/index.d.ts +1 -0
  196. package/types/util/mark.d.ts +5 -0
  197. package/types/util/math.d.ts +1 -1
@@ -1,8 +1,22 @@
1
+ import type { IGraphic } from '@visactor/vrender-core';
1
2
  import type { IMarkSpec } from '../../typings';
2
3
  import type { IArc3dMarkSpec, IArcMarkSpec, IAreaMarkSpec, IBoxPlotMarkSpec, ICellMarkSpec, ICommonSpec, IComposedTextMarkSpec, IGroupMarkSpec, IImageMarkSpec, ILineMarkSpec, ILinkPathMarkSpec, IPathMarkSpec, IPolygonMarkSpec, IPyramid3dMarkSpec, IRect3dMarkSpec, IRectMarkSpec, IRippleMarkSpec, IRuleMarkSpec, ISymbolMarkSpec } from '../../typings/visual';
3
4
  import type { IMark, IMarkRaw } from './common';
4
5
  import type { MarkType } from './type';
5
- export type IComponentMark = IMarkRaw<ICommonSpec>;
6
+ export interface IComponentMark extends IMarkRaw<ICommonSpec> {
7
+ renderInner: () => void;
8
+ getComponent: () => IGraphic;
9
+ setAttributeTransform: (t: (attrs: any) => any) => any;
10
+ }
11
+ export interface IGlyphMark<T extends ICommonSpec = ICommonSpec, C = any> extends IMarkRaw<T> {
12
+ setGlyphConfig: (cfg: C) => void;
13
+ getGlyphConfig: () => C;
14
+ getSubMarks: () => Record<string, {
15
+ type: MarkType;
16
+ defaultAttributes?: any;
17
+ }>;
18
+ getPositionChannels: () => string[];
19
+ }
6
20
  export interface ILabelMark extends ITextMark {
7
21
  skipEncode: boolean;
8
22
  getRule: () => string;
@@ -42,3 +56,6 @@ export interface IGroupMark extends IMarkRaw<IGroupMarkSpec> {
42
56
  getMarkInId: (id: number) => IMark | undefined;
43
57
  getMarkInName: (name: string) => IMark[] | undefined;
44
58
  }
59
+ export interface ILinkPathConfig {
60
+ direction?: 'horizontal' | 'vertical' | 'LR' | 'RL' | 'TB' | 'BL' | 'radial';
61
+ }
@@ -20,6 +20,7 @@ export declare const enum MarkTypeEnum {
20
20
  ripple = "ripple",
21
21
  liquid = "liquid",
22
22
  component = "component",
23
+ dataLabel = "dataLabel",
23
24
  label = "label",
24
25
  pictogram = "pictogram"
25
26
  }
@@ -1,7 +1,7 @@
1
1
  import type { IMark } from './interface/common';
2
2
  import { MarkTypeEnum } from './interface/type';
3
3
  import { TextMark } from './text';
4
- import type { ILabelMark } from './interface/mark';
4
+ import type { IComponentMark, ILabelMark } from './interface/mark';
5
5
  export declare class LabelMark extends TextMark implements ILabelMark {
6
6
  static readonly type = MarkTypeEnum.text;
7
7
  static readonly constructorType = MarkTypeEnum.label;
@@ -13,7 +13,8 @@ export declare class LabelMark extends TextMark implements ILabelMark {
13
13
  getTarget(): IMark;
14
14
  setTarget(target: IMark): void;
15
15
  private _component;
16
- getComponent(): IMark;
17
- setComponent(component: IMark): void;
16
+ getComponent(): IComponentMark;
17
+ setComponent(component: IComponentMark): void;
18
+ render(): void;
18
19
  }
19
20
  export declare const registerLabelMark: () => void;
@@ -1,12 +1,42 @@
1
- import { BaseMark } from './base/base-mark';
2
1
  import type { ILinkPathMarkSpec } from '../typings/visual';
3
- import type { ILinkPathMark, IMarkStyle } from './interface';
2
+ import type { ILinkPathConfig, ILinkPathMark, IMarkStyle } from './interface';
4
3
  import { MarkTypeEnum } from './interface/type';
5
- import type { IGroupMark } from '@visactor/vgrammar-core';
6
- export declare class LinkPathMark extends BaseMark<ILinkPathMarkSpec> implements ILinkPathMark {
4
+ import { GlyphMark } from './glyph';
5
+ import type { IGlyph } from '@visactor/vrender-core';
6
+ import type { Datum } from '../typings/common';
7
+ export declare const getHorizontalPath: (options: ILinkPathMarkSpec, ratio?: number) => string;
8
+ export declare const getVerticalPath: (options: ILinkPathMarkSpec, ratio?: number) => string;
9
+ export declare class LinkPathMark extends GlyphMark<ILinkPathMarkSpec, ILinkPathConfig> implements ILinkPathMark {
7
10
  static readonly type = MarkTypeEnum.linkPath;
8
11
  readonly type = MarkTypeEnum.linkPath;
9
12
  protected _getDefaultStyle(): IMarkStyle<ILinkPathMarkSpec>;
10
- protected _initProduct(group?: string | IGroupMark): void;
13
+ protected _subMarks: {
14
+ back: {
15
+ type: string;
16
+ defaultAttributes: {
17
+ zIndex: number;
18
+ };
19
+ };
20
+ front: {
21
+ type: string;
22
+ defaultAttributes: {
23
+ zIndex: number;
24
+ };
25
+ };
26
+ };
27
+ protected _positionChannels: string[];
28
+ protected _channelEncoder: {
29
+ backgroundStyle: (val: any) => {
30
+ back: any;
31
+ };
32
+ };
33
+ protected _positionEncoder: (glyphAttrs: any, datum: Datum, g: IGlyph) => {
34
+ back: {
35
+ path: string;
36
+ };
37
+ front: {
38
+ path: string;
39
+ };
40
+ };
11
41
  }
12
42
  export declare const registerLinkPathMark: () => void;
@@ -1,13 +1,55 @@
1
- import type { ILiquidMarkSpec } from '../typings';
2
1
  import type { IMarkStyle } from './interface';
3
2
  import { MarkTypeEnum } from './interface/type';
4
- import { BaseMark } from './base';
5
3
  import type { ILiquidMark } from '../series/liquid/liquid';
6
- import type { IGroupMark } from '@visactor/vgrammar-core';
7
- export declare class LiquidMark extends BaseMark<ILiquidMarkSpec> implements ILiquidMark {
4
+ import { GlyphMark } from './glyph';
5
+ import { type IGlyph } from '@visactor/vrender-core';
6
+ import type { IPointLike } from '@visactor/vutils';
7
+ import type { ILiquidMarkSpec } from '../typings/visual';
8
+ import type { Datum } from '../typings/common';
9
+ export declare class LiquidMark extends GlyphMark<ILiquidMarkSpec> implements ILiquidMark {
8
10
  static readonly type = MarkTypeEnum.liquid;
9
11
  readonly type = MarkTypeEnum.liquid;
10
12
  protected _getDefaultStyle(): IMarkStyle<ILiquidMarkSpec>;
11
- protected _initProduct(group?: string | IGroupMark): void;
13
+ protected _subMarks: {
14
+ wave0: {
15
+ type: string;
16
+ defaultAttributes: {
17
+ curveType: string;
18
+ fillOpacity: number;
19
+ };
20
+ };
21
+ wave1: {
22
+ type: string;
23
+ defaultAttributes: {
24
+ curveType: string;
25
+ fillOpacity: number;
26
+ };
27
+ };
28
+ wave2: {
29
+ type: string;
30
+ defaultAttributes: {
31
+ curveType: string;
32
+ fillOpacity: number;
33
+ };
34
+ };
35
+ };
36
+ protected _positionChannels: string[];
37
+ protected _positionEncoder: (glyphAttrs: any, datum: Datum, g: IGlyph) => {
38
+ wave0: {
39
+ x: number;
40
+ y: number;
41
+ points: IPointLike[];
42
+ };
43
+ wave1: {
44
+ x: number;
45
+ y: number;
46
+ points: IPointLike[];
47
+ };
48
+ wave2: {
49
+ x: number;
50
+ y: number;
51
+ points: IPointLike[];
52
+ };
53
+ };
12
54
  }
13
55
  export declare const registerLiquidMark: () => void;
@@ -1,12 +1,47 @@
1
- import { BaseMark } from './base/base-mark';
2
1
  import type { IRippleMarkSpec } from '../typings/visual';
3
2
  import type { IMarkStyle, IRippleMark } from './interface';
4
3
  import { MarkTypeEnum } from './interface/type';
5
- import type { IGroupMark } from '@visactor/vgrammar-core';
6
- export declare class RippleMark extends BaseMark<IRippleMarkSpec> implements IRippleMark {
4
+ import { GlyphMark } from './glyph';
5
+ import type { Datum } from '../typings/common';
6
+ import { type IGlyph } from '@visactor/vrender-core';
7
+ export declare class RippleMark extends GlyphMark<IRippleMarkSpec> implements IRippleMark {
7
8
  static readonly type = MarkTypeEnum.ripple;
8
9
  readonly type = MarkTypeEnum.ripple;
9
10
  protected _getDefaultStyle(): IMarkStyle<IRippleMarkSpec>;
10
- protected _initProduct(group?: string | IGroupMark): void;
11
+ protected _subMarks: {
12
+ ripple0: {
13
+ type: string;
14
+ defaultAttributes: {
15
+ fillOpacity: number;
16
+ };
17
+ };
18
+ ripple1: {
19
+ type: string;
20
+ defaultAttributes: {
21
+ fillOpacity: number;
22
+ };
23
+ };
24
+ ripple2: {
25
+ type: string;
26
+ defaultAttributes: {
27
+ fillOpacity: number;
28
+ };
29
+ };
30
+ };
31
+ protected _positionChannels: string[];
32
+ protected _positionEncoder: (glyphAttrs: any, datum: Datum, g: IGlyph) => {
33
+ ripple0: {
34
+ size: any;
35
+ fillOpacity: number;
36
+ };
37
+ ripple1: {
38
+ size: any;
39
+ fillOpacity: number;
40
+ };
41
+ ripple2: {
42
+ size: any;
43
+ fillOpacity: number;
44
+ };
45
+ };
11
46
  }
12
47
  export declare const registerRippleMark: () => void;
@@ -2,9 +2,12 @@ import type { IRuleMarkSpec } from '../typings/visual';
2
2
  import { BaseMark } from './base/base-mark';
3
3
  import type { IMarkStyle, IRuleMark } from './interface';
4
4
  import { MarkTypeEnum } from './interface/type';
5
+ import type { IGraphic, ILineGraphicAttribute } from '@visactor/vrender-core';
5
6
  export declare class RuleMark extends BaseMark<IRuleMarkSpec> implements IRuleMark {
6
7
  static readonly type = MarkTypeEnum.rule;
7
8
  readonly type = MarkTypeEnum.rule;
8
9
  protected _getDefaultStyle(): IMarkStyle<IRuleMarkSpec>;
10
+ protected _transformGraphicAttributes(g: IGraphic, attrs: any, groupAttrs?: any): any;
11
+ protected _createGraphic(attrs?: ILineGraphicAttribute): IGraphic;
9
12
  }
10
13
  export declare const registerRuleMark: () => void;
@@ -2,11 +2,11 @@ import type { ISymbolMarkSpec } from '../typings/visual';
2
2
  import { BaseMark } from './base/base-mark';
3
3
  import type { IMarkStyle, ISymbolMark } from './interface';
4
4
  import { MarkTypeEnum } from './interface/type';
5
- export declare class BaseSymbolMark<T extends ISymbolMarkSpec> extends BaseMark<T> {
6
- protected _getDefaultStyle(): IMarkStyle<T>;
7
- }
8
- export declare class SymbolMark extends BaseSymbolMark<ISymbolMarkSpec> implements ISymbolMark {
5
+ import type { IGraphic } from '@visactor/vrender-core';
6
+ export declare class SymbolMark extends BaseMark<ISymbolMarkSpec> implements ISymbolMark {
9
7
  static readonly type = MarkTypeEnum.symbol;
10
8
  readonly type = MarkTypeEnum.symbol;
9
+ protected _getDefaultStyle(): IMarkStyle<ISymbolMarkSpec>;
10
+ protected _transformGraphicAttributes(g: IGraphic, attrs: any, groupAttrs?: any): any;
11
11
  }
12
12
  export declare const registerSymbolMark: () => void;
@@ -3,6 +3,7 @@ import { BaseMark } from './base/base-mark';
3
3
  import type { IMarkOption, IMarkStyle } from './interface';
4
4
  import { MarkTypeEnum } from './interface';
5
5
  import type { ITextMark, ITextSpec } from './interface/mark';
6
+ import type { IGraphic, IRichTextGraphicAttribute, ITextGraphicAttribute } from '@visactor/vrender-core';
6
7
  export declare class TextMark extends BaseMark<IComposedTextMarkSpec> implements ITextMark {
7
8
  static readonly type = MarkTypeEnum.text;
8
9
  readonly type = MarkTypeEnum.text;
@@ -10,7 +11,8 @@ export declare class TextMark extends BaseMark<IComposedTextMarkSpec> implements
10
11
  getTextType(): "text" | "rich";
11
12
  constructor(name: string, option: IMarkOption);
12
13
  protected _getDefaultStyle(): IMarkStyle<IComposedTextMarkSpec>;
13
- initStyleWithSpec(spec: ITextSpec<IComposedTextMarkSpec>, key?: string): void;
14
- compileEncode(): void;
14
+ initStyleWithSpec(spec: ITextSpec<IComposedTextMarkSpec>): void;
15
+ protected _transformGraphicAttributes(g: IGraphic, attrs: any, groupAttrs?: any): any;
16
+ protected _createGraphic(attrs?: ITextGraphicAttribute | IRichTextGraphicAttribute): IGraphic;
15
17
  }
16
18
  export declare const registerTextMark: () => void;
@@ -0,0 +1,10 @@
1
+ import type { Datum } from '../../typings/common';
2
+ export declare const dataSampling: (options: {
3
+ size: number | (() => number);
4
+ factor?: number;
5
+ skipfirst?: boolean;
6
+ yfield?: string;
7
+ groupBy?: string;
8
+ mode?: 'lttb' | 'min' | 'max' | 'average' | 'sum';
9
+ }, upstreamData: Datum[]) => Datum[];
10
+ export declare const registerDataSamplingTransform: () => void;
@@ -0,0 +1 @@
1
+ export declare const registerMarkFilterTransform: () => void;
@@ -0,0 +1 @@
1
+ export declare const registerMarkMapTransform: () => void;
@@ -0,0 +1,14 @@
1
+ import type { IMarkGraphic } from '../interface';
2
+ export declare const OVERLAP_HIDE_KEY: string;
3
+ export declare const transform: (options: {
4
+ direction: number;
5
+ delta?: number;
6
+ deltaMul?: number;
7
+ radius?: boolean;
8
+ hideMode?: number;
9
+ forceUpdate?: boolean;
10
+ forceUpdateStamp?: number;
11
+ groupBy?: string;
12
+ sort?: boolean;
13
+ }, upstreamData: IMarkGraphic[]) => IMarkGraphic[];
14
+ export declare const registerSymbolOverlapTransform: () => void;
@@ -1,5 +1,9 @@
1
1
  import { MarkTypeEnum } from '../interface/type';
2
+ import type { Datum } from '../../typings';
3
+ import type { GroupedData } from '../interface/common';
2
4
  export declare const MultiDatumMark: string[];
3
5
  export declare function isMultiDatumMark(type: MarkTypeEnum): boolean;
4
6
  export declare function curveTypeTransform(type: string, direction: string): string;
5
7
  export declare function is3DMark(type: MarkTypeEnum): boolean;
8
+ export declare function groupData<T>(data: T[], groupBy: (datum: Datum, index: number) => string, sort?: (a: T, b: T) => number): GroupedData<T>;
9
+ export declare const runEncoder: (styles: Record<string, (datum: Datum) => any>, datum: Datum, attrs?: any) => any;
@@ -0,0 +1,2 @@
1
+ import type { IMarkGraphic } from '../interface/common';
2
+ export declare const addRuntimeState: (g: IMarkGraphic, stateName: string, attrs: any, keepCurrentStates?: boolean, hasAnimation?: boolean) => void;
@@ -1 +1,3 @@
1
1
  export * from './common';
2
+ export * from './line';
3
+ export * from './glyph';
@@ -0,0 +1,3 @@
1
+ import type { IColorStop } from '@visactor/vrender-core';
2
+ export declare const isStopsEqual: (prev: IColorStop[], next: IColorStop[]) => boolean;
3
+ export declare const isSegmentAttrEqual: (prev: any, next: any, key: string) => boolean;
@@ -3,12 +3,12 @@ import type { IEffect, IModel, IModelInitOption, IModelOption, IModelRenderOptio
3
3
  import type { CoordinateType } from '../typings/coordinate';
4
4
  import type { ICompileMarkConfig, IMark, IMarkOption, IMarkRaw, IMarkStyle } from '../mark/interface';
5
5
  import type { Datum, StateValueType, ConvertToMarkStyleSpec, ICommonSpec, StringOrNumber, IRect, ILayoutRect } from '../typings';
6
- import type { CompilableData } from '../compile/data/compilable-data';
7
- import type { IGroupMark } from '@visactor/vgrammar-core';
8
6
  import { MarkSet } from '../mark/mark-set';
9
7
  import type { ILayoutItem } from '../layout/interface';
10
8
  import { CompilableBase } from '../compile/compilable-base';
11
9
  import { BaseModelSpecTransformer } from './base-model-transformer';
10
+ import type { IGroup } from '@visactor/vrender-core';
11
+ import type { ICompilableData } from '../compile/data/interface';
12
12
  export declare abstract class BaseModel<T extends IModelSpec> extends CompilableBase implements IModel {
13
13
  readonly transformerConstructor: typeof BaseModelSpecTransformer;
14
14
  protected _spec: T;
@@ -21,8 +21,8 @@ export declare abstract class BaseModel<T extends IModelSpec> extends Compilable
21
21
  userId: StringOrNumber | undefined;
22
22
  readonly event: IEvent;
23
23
  readonly effect: IEffect;
24
- protected _data: CompilableData;
25
- getData(): CompilableData;
24
+ protected _data: ICompilableData;
25
+ getData(): ICompilableData;
26
26
  protected _layout?: ILayoutItem;
27
27
  get layout(): ILayoutItem;
28
28
  readonly specKey: string;
@@ -42,8 +42,8 @@ export declare abstract class BaseModel<T extends IModelSpec> extends Compilable
42
42
  init(option: IModelInitOption): void;
43
43
  afterInit(): void;
44
44
  getVisible(): boolean;
45
- onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect, ctx: any): void;
46
- onLayoutEnd(ctx: any): void;
45
+ onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect): void;
46
+ onLayoutEnd(): void;
47
47
  onEvaluateEnd(ctx: IModelEvaluateOption): void;
48
48
  abstract onRender(ctx: IModelRenderOption): void;
49
49
  onDataUpdate(): void;
@@ -68,10 +68,10 @@ export declare abstract class BaseModel<T extends IModelSpec> extends Compilable
68
68
  setAttrFromSpec(): void;
69
69
  protected _convertMarkStyle<T extends ICommonSpec = ICommonSpec>(style: Partial<IMarkStyle<T> | ConvertToMarkStyleSpec<T>>): Partial<IMarkStyle<T> | ConvertToMarkStyleSpec<T>>;
70
70
  setMarkStyle<T extends ICommonSpec>(mark: IMarkRaw<T>, style?: Partial<IMarkStyle<T> | ConvertToMarkStyleSpec<T>>, state?: StateValueType, level?: number): void;
71
- initMarkStyleWithSpec(mark?: IMark, spec?: any, key?: string): void;
71
+ initMarkStyleWithSpec(mark?: IMark, spec?: any): void;
72
72
  protected stateKeyToSignalName(key: string, opt?: string): string;
73
73
  compileData(): void;
74
- compileMarks(group?: string | IGroupMark): void;
74
+ compileMarks(group?: IGroup): void;
75
75
  protected _createMark<T extends IMark>(markInfo: IModelMarkInfo, option?: Partial<IMarkOption>, config?: ICompileMarkConfig): T;
76
76
  protected _getDataIdKey(): string | ((datum: Datum) => string) | undefined;
77
77
  getColorScheme(): import("..").IThemeColorScheme;
@@ -3,7 +3,6 @@ import type { DataSet, DataView } from '@visactor/vdataset';
3
3
  import type { IEvent, IEventDispatcher } from '../event/interface';
4
4
  import type { IMark, IMarkRaw, IMarkStyle, MarkTypeEnum } from '../mark/interface';
5
5
  import type { RenderMode } from '../typings/spec/common';
6
- import type { IData } from '@visactor/vgrammar-core';
7
6
  import type { StringOrNumber } from '../typings/common';
8
7
  import type { IGroupMarkSpec, ConvertToMarkStyleSpec, ICommonSpec } from '../typings/visual';
9
8
  import type { IRect } from '../typings/space';
@@ -11,7 +10,6 @@ import type { IPoint, CoordinateType } from '../typings/coordinate';
11
10
  import type { ITheme } from '../theme/interface';
12
11
  import type { StateValueType } from '../typings/spec';
13
12
  import type { ICompilable, ICompilableInitOption } from '../compile/interface';
14
- import type { ICompilableData } from '../compile/data/interface';
15
13
  import type { IGlobalScale } from '../scale/interface';
16
14
  import type { IChart, IChartSpecInfo, IChartSpecTransformerOption } from '../chart/interface';
17
15
  import type { IThemeColorScheme } from '../theme/color-scheme/interface';
@@ -22,6 +20,7 @@ import type { SeriesTypeEnum } from '../series/interface';
22
20
  import type { ITooltipSpec } from '../component/tooltip/interface';
23
21
  import type { TooltipActiveType } from '../typings';
24
22
  import type { IVChart } from '../core/interface';
23
+ import type { ICompilableData } from '../compile/data/interface';
25
24
  export interface IModelInitOption {
26
25
  }
27
26
  export interface IModelLayoutOption {
@@ -53,9 +52,6 @@ export interface IUpdateSpecResult {
53
52
  export interface IUpdateDataResult {
54
53
  reAnimate?: boolean;
55
54
  }
56
- export interface IModelProduct {
57
- srData: IData;
58
- }
59
55
  export interface IModel extends ICompilable {
60
56
  readonly modelType: string;
61
57
  readonly type: string;
@@ -84,11 +80,11 @@ export interface IModel extends ICompilable {
84
80
  getSpec?: () => any;
85
81
  getSpecIndex: () => number;
86
82
  getSpecPath: () => Array<string | number>;
87
- onLayoutStart: (layoutRect: IRect, viewRect: ILayoutRect, ctx: IModelLayoutOption) => void;
88
- onLayoutEnd: (ctx: IModelLayoutOption) => void;
83
+ onLayoutStart: (layoutRect: IRect, viewRect: ILayoutRect) => void;
84
+ onLayoutEnd: () => void;
89
85
  getColorScheme: () => IThemeColorScheme | undefined;
90
86
  setMarkStyle: <T extends ICommonSpec>(mark?: IMarkRaw<T>, style?: Partial<IMarkStyle<T> | ConvertToMarkStyleSpec<T>>, state?: StateValueType, level?: number) => void;
91
- initMarkStyleWithSpec: (mark?: IMark, spec?: any, key?: string) => void;
87
+ initMarkStyleWithSpec: (mark?: IMark, spec?: any) => void;
92
88
  getSpecInfo: () => IModelSpecInfo;
93
89
  }
94
90
  export interface ILayoutModel extends IModel {
@@ -19,8 +19,8 @@ export declare abstract class LayoutModel<T extends IModelSpec> extends BaseMode
19
19
  protected _layoutStartPos: IPoint;
20
20
  protected _isLayout: boolean;
21
21
  initLayout(): void;
22
- onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect, ctx: any): void;
23
- onLayoutEnd(ctx: any): void;
22
+ onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect): void;
23
+ onLayoutEnd(): void;
24
24
  afterSetLayoutStartPoint(_pos: ILayoutPoint): void;
25
25
  protected _forceLayout(): void;
26
26
  getLayoutStartPoint(): IPoint;
@@ -19,7 +19,7 @@ export declare abstract class BaseTooltipHandler extends BasePlugin implements I
19
19
  protected _option: ITooltipHandlerOptions;
20
20
  protected _chartOption: IChartOption;
21
21
  protected _env: RenderMode;
22
- get env(): "node" | "desktop-browser" | "mobile-browser" | "worker" | "miniApp" | "wx" | "tt" | "harmony" | "desktop-miniApp" | "lynx";
22
+ get env(): "desktop-browser" | "mobile-browser" | "node" | "worker" | "miniApp" | "wx" | "tt" | "harmony" | "desktop-miniApp" | "lynx";
23
23
  protected _component: Tooltip;
24
24
  protected _chartContainer: Maybe<HTMLElement>;
25
25
  protected _compiler: ICompiler;
@@ -37,7 +37,7 @@ export declare abstract class BaseTooltipHandler extends BasePlugin implements I
37
37
  protected _getDefaultOption(): ITooltipHandlerOptions;
38
38
  protected _getActualTooltipPosition: (actualTooltip: ITooltipActual, params: TooltipHandlerParams, tooltipBoxSize: IContainerSize | undefined) => ITooltipPositionActual;
39
39
  protected _getParentElement(spec: ITooltipSpec): HTMLElement;
40
- getTooltipContainer(): HTMLElement | IGroup;
40
+ getTooltipContainer(): IGroup | HTMLElement;
41
41
  protected _initFromSpec(): void;
42
42
  reInit(): void;
43
43
  }
@@ -8,12 +8,10 @@ export declare const getPositionType: (position: TooltipFixedPosition, dim: 'x'
8
8
  export declare const getCartesianCrosshairRect: (dimensionData: IDimensionData, layoutStartPoint: ILayoutPoint) => {
9
9
  visible: boolean;
10
10
  start: {
11
- x: number;
12
- y: number;
11
+ [x: string]: number;
13
12
  };
14
13
  end: {
15
- x: number;
16
- y: number;
14
+ [x: string]: number;
17
15
  };
18
16
  };
19
17
  export declare const isGlobalTooltipPositionPattern: (obj: any) => obj is IGlobalTooltipPositionPattern;
@@ -1,6 +1,6 @@
1
1
  import { registerHtmlAttributePlugin, registerReactAttributePlugin } from '@visactor/vrender-core';
2
- import { registerDragPlugin, registerGesturePlugin } from '@visactor/vgrammar-core';
3
2
  export declare const register3DPlugin: () => void;
4
3
  export declare const registerAnimate: () => void;
5
- export { registerReactAttributePlugin, registerHtmlAttributePlugin, registerDragPlugin, registerGesturePlugin };
6
- export declare const registerMorph: () => void;
4
+ export declare const registerDragPlugin: () => void;
5
+ export declare const registerGesturePlugin: () => void;
6
+ export { registerReactAttributePlugin, registerHtmlAttributePlugin };
@@ -2,7 +2,6 @@ import type { IMark, IGroupMark } from '../mark/interface';
2
2
  import type { ILayoutModel, IModelConstructor, IModelOption, IModelSpecInfo } from '../model/interface';
3
3
  import type { ISeries, SeriesType } from '../series/interface';
4
4
  import type { CoordinateType } from '../typings/coordinate';
5
- import type { IInteraction } from '../interaction/interface';
6
5
  import type { IProjectionSpec } from '../component/geo/interface';
7
6
  import type { ConvertToMarkStyleSpec, IRectMarkSpec } from '../typings/visual';
8
7
  import type { IAnimate } from '../animation/interface';
@@ -10,7 +9,6 @@ import type { StringOrNumber } from '../typings';
10
9
  import type { ILayoutItemSpec } from '../layout/interface';
11
10
  export interface IRegion extends ILayoutModel {
12
11
  animate?: IAnimate;
13
- interaction: IInteraction;
14
12
  getStackInverse: () => boolean;
15
13
  getStackSort: () => boolean;
16
14
  getMaxWidth: () => number | undefined;
@@ -1,14 +1,13 @@
1
- import type { IGroupMark as IVGrammarGroupMark } from '@visactor/vgrammar-core';
2
1
  import type { ISeries } from '../series/interface';
3
2
  import type { IModelOption } from '../model/interface';
4
3
  import type { CoordinateType } from '../typings/coordinate';
5
4
  import type { IRegion, IRegionSpec, IRegionSpecInfo } from './interface';
6
- import type { IInteraction, ITrigger } from '../interaction/interface';
7
5
  import type { IAnimate } from '../animation/interface';
8
6
  import type { ILayoutType, StringOrNumber } from '../typings';
9
7
  import { LayoutModel } from '../model/layout-model';
10
8
  import { RegionSpecTransformer } from './region-transformer';
11
9
  import type { IGroupMark, IRectMark } from '../mark/interface/mark';
10
+ import type { IGroup } from '@visactor/vrender-core';
12
11
  export declare class Region<T extends IRegionSpec = IRegionSpec> extends LayoutModel<T> implements IRegion {
13
12
  static type: string;
14
13
  static readonly transformerConstructor: typeof RegionSpecTransformer;
@@ -21,7 +20,6 @@ export declare class Region<T extends IRegionSpec = IRegionSpec> extends LayoutM
21
20
  layoutType: ILayoutType;
22
21
  layoutZIndex: number;
23
22
  animate?: IAnimate;
24
- interaction: IInteraction;
25
23
  getSpecInfo: () => IRegionSpecInfo;
26
24
  getMaxWidth(): number;
27
25
  setMaxWidth(value: number): void;
@@ -35,7 +33,6 @@ export declare class Region<T extends IRegionSpec = IRegionSpec> extends LayoutM
35
33
  getStackSort(): boolean;
36
34
  protected _backgroundMark?: IRectMark;
37
35
  protected _foregroundMark?: IRectMark;
38
- protected _trigger: ITrigger;
39
36
  constructor(spec: T, ctx: IModelOption);
40
37
  protected _getClipDefaultValue(): boolean;
41
38
  created(): void;
@@ -73,10 +70,7 @@ export declare class Region<T extends IRegionSpec = IRegionSpec> extends LayoutM
73
70
  initSeriesDataflow(): void;
74
71
  seriesDataFilterOver: () => void;
75
72
  release(): void;
76
- createTrigger(): void;
77
- initTrigger(): void;
78
- initInteraction(): void;
79
- compileMarks(group?: string | IVGrammarGroupMark): void;
73
+ compileMarks(group?: IGroup): void;
80
74
  compile(): void;
81
75
  getBoundsInRect: () => {
82
76
  x1: number;
@@ -84,5 +78,5 @@ export declare class Region<T extends IRegionSpec = IRegionSpec> extends LayoutM
84
78
  x2: number;
85
79
  y2: number;
86
80
  };
87
- onLayoutEnd(ctx: any): void;
81
+ onLayoutEnd(): void;
88
82
  }
@@ -1,4 +1,4 @@
1
- import type { IAnimationTypeConfig } from '@visactor/vgrammar-core';
1
+ import type { IAnimationTypeConfig } from '../../animation/interface';
2
2
  import type { AreaAppearPreset, IAreaAnimationParams } from './interface';
3
3
  export declare function areaPresetAnimation(params: IAreaAnimationParams, preset: AreaAppearPreset | boolean): IAnimationTypeConfig;
4
4
  export declare const registerAreaSeriesAnimation: () => void;
@@ -28,7 +28,7 @@ export declare class AreaSeries<T extends IAreaSeriesSpec = IAreaSeriesSpec> ext
28
28
  compile(): void;
29
29
  getDefaultShapeType(): string;
30
30
  getActiveMarks(): IMark[];
31
- onLayoutEnd(ctx: any): void;
31
+ onLayoutEnd(): void;
32
32
  getSeriesStyle(datum: Datum): (attribute: string) => any;
33
33
  }
34
34
  export declare const registerAreaSeries: () => void;
@@ -1,5 +1,5 @@
1
- import type { IAnimationTypeConfig } from '@visactor/vgrammar-core';
2
1
  import type { BarAppearPreset, IBarAnimationParams } from './interface';
2
+ import type { IAnimationTypeConfig } from '../../animation/interface';
3
3
  export declare const barGrowIn: (params: IBarAnimationParams, isOverall?: boolean) => IAnimationTypeConfig;
4
4
  export declare const barGrowOut: (params: IBarAnimationParams, isOverall?: boolean) => IAnimationTypeConfig;
5
5
  export declare function barPresetAnimation(params: IBarAnimationParams, preset: BarAppearPreset | boolean): IAnimationTypeConfig;
@@ -8,9 +8,9 @@ import type { IAxisHelper } from '../../component/axis/cartesian/interface';
8
8
  import type { IModelInitOption } from '../../model/interface';
9
9
  import type { SeriesMarkMap } from '../interface';
10
10
  import { SeriesMarkNameEnum, SeriesTypeEnum } from '../interface/type';
11
- import { SeriesData } from '../base/series-data';
12
11
  import { DataView } from '@visactor/vdataset';
13
12
  import { BarSeriesSpecTransformer } from './bar-transformer';
13
+ import type { ICompilableData } from '../../compile/data';
14
14
  export declare const DefaultBandWidth = 6;
15
15
  export declare class BarSeries<T extends IBarSeriesSpec = IBarSeriesSpec> extends CartesianSeries<T> {
16
16
  static readonly type: string;
@@ -23,7 +23,7 @@ export declare class BarSeries<T extends IBarSeriesSpec = IBarSeriesSpec> extend
23
23
  protected _bandPosition: number;
24
24
  protected _barMark: IRectMark;
25
25
  protected _barBackgroundMark: IRectMark;
26
- protected _barBackgroundViewData: SeriesData;
26
+ protected _barBackgroundViewData: ICompilableData;
27
27
  initMark(): void;
28
28
  protected _initBarBackgroundMark(): void;
29
29
  initMarkStyle(): void;
@@ -61,7 +61,7 @@ export declare class BarSeries<T extends IBarSeriesSpec = IBarSeriesSpec> extend
61
61
  protected _getBarBackgroundPositionYEncoder: () => (datum: Datum) => number;
62
62
  protected _setBarBackgroundPositionYEncoder: (encoder: (datum: Datum) => number) => void;
63
63
  dataToBarBackgroundPositionY(datum: Datum, scaleDepth?: number): number;
64
- onLayoutEnd(ctx: any): void;
64
+ onLayoutEnd(): void;
65
65
  compile(): void;
66
66
  getDefaultShapeType(): string;
67
67
  getActiveMarks(): IMark[];