@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
@@ -0,0 +1,24 @@
1
+ import { BaseTrigger } from './base';
2
+ import type { IElementHighlightByNameOptions, ITrigger } from '../interface/trigger';
3
+ import type { BaseEventParams } from '../../event/interface';
4
+ import type { IMarkGraphic } from '../../mark/interface';
5
+ export declare class ElementHighlightByName extends BaseTrigger<IElementHighlightByNameOptions> implements ITrigger<IElementHighlightByNameOptions> {
6
+ static type: string;
7
+ type: string;
8
+ static defaultOptions: Partial<IElementHighlightByNameOptions>;
9
+ constructor(options?: IElementHighlightByNameOptions);
10
+ getStartState(): string;
11
+ getResetState(): string;
12
+ protected getEvents(): {
13
+ type: "none" | import("@visactor/vrender-core").GraphicEventType;
14
+ handler: (e: BaseEventParams) => void;
15
+ }[];
16
+ protected _filterByName(e: BaseEventParams): boolean;
17
+ protected _parseTargetKey(e: BaseEventParams): any;
18
+ start(itemKey: any): void;
19
+ resetAll(): void;
20
+ reset(g?: IMarkGraphic): void;
21
+ handleStart: (e: BaseEventParams) => void;
22
+ handleReset: (e: BaseEventParams) => void;
23
+ }
24
+ export declare const registerElementHighlightByName: () => void;
@@ -0,0 +1,25 @@
1
+ import type { IElementHighlightOptions, ITrigger } from '../interface/trigger';
2
+ import type { IMarkGraphic } from '../../mark/interface/common';
3
+ import { BaseTrigger } from './base';
4
+ import type { GraphicEventType } from '@visactor/vrender-core';
5
+ import type { BaseEventParams } from '../../event/interface';
6
+ export declare class ElementHighlight extends BaseTrigger<IElementHighlightOptions> implements ITrigger<IElementHighlightOptions> {
7
+ static type: string;
8
+ type: string;
9
+ static defaultOptions: Partial<IElementHighlightOptions>;
10
+ protected _lastGraphic?: IMarkGraphic;
11
+ constructor(options?: IElementHighlightOptions);
12
+ getStartState(): string;
13
+ getResetState(): string;
14
+ protected _resetType?: 'view' | 'self';
15
+ protected getEvents(): {
16
+ type: GraphicEventType;
17
+ handler: (e: BaseEventParams) => void;
18
+ }[];
19
+ resetAll: () => void;
20
+ handleStart: (e: BaseEventParams) => void;
21
+ handleReset: (e: BaseEventParams) => void;
22
+ start(markGraphic: IMarkGraphic): void;
23
+ reset(markGraphic: IMarkGraphic): void;
24
+ }
25
+ export declare const registerElementHighlight: () => void;
@@ -0,0 +1,8 @@
1
+ import type { IMarkGraphic } from '../../mark/interface/common';
2
+ import { ElementSelect } from './element-select';
3
+ export declare class ElementSelectByGraphicName extends ElementSelect {
4
+ static type: string;
5
+ type: string;
6
+ start(markGraphic: IMarkGraphic): void;
7
+ }
8
+ export declare const registerElementSelectByGraphicName: () => void;
@@ -0,0 +1,24 @@
1
+ import type { IElementSelectOptions, ITrigger } from '../interface/trigger';
2
+ import type { IMarkGraphic } from '../../mark/interface/common';
3
+ import { BaseTrigger } from './base';
4
+ import type { BaseEventParams } from '../../event/interface';
5
+ export declare class ElementSelect extends BaseTrigger<IElementSelectOptions> implements ITrigger<IElementSelectOptions> {
6
+ static type: string;
7
+ type: string;
8
+ static defaultOptions: Partial<IElementSelectOptions>;
9
+ protected _resetType: ('view' | 'self' | 'timeout')[];
10
+ private _timer?;
11
+ constructor(options?: IElementSelectOptions);
12
+ getStartState(): string;
13
+ getResetState(): string;
14
+ protected getEvents(): {
15
+ type: import("@visactor/vrender-core").GraphicEventType | import("@visactor/vrender-core").GraphicEventType[];
16
+ handler: (e: BaseEventParams) => void;
17
+ }[];
18
+ resetAll: () => void;
19
+ handleStart: (e: BaseEventParams) => void;
20
+ handleReset: (e: BaseEventParams) => void;
21
+ start(markGraphic: IMarkGraphic): void;
22
+ reset(markGraphic: IMarkGraphic): void;
23
+ }
24
+ export declare const registerElementSelect: () => void;
@@ -0,0 +1,8 @@
1
+ export declare const enum TRIGGER_TYPE_ENUM {
2
+ DIMENSION_HOVER = "dimension-hover",
3
+ ELEMENT_HIGHLIGHT = "element-highlight",
4
+ ELEMENT_SELECT = "element-select",
5
+ ELEMENT_ACTIVE = "element-active",
6
+ ELEMENT_HIGHLIGHT_BY_GRPHIC_NAME = "element-highlight-by-graphic-name",
7
+ ELEMENT_SELECT_BY_GRPHIC_NAME = "element-select-by-graphic-name"
8
+ }
@@ -0,0 +1,12 @@
1
+ import type { IMark, IMarkGraphic } from '../../mark/interface/common';
2
+ import type { IElementFilterOptions, IElementHighlightOptions, IElementSelectTriggerOff } from '../interface/trigger';
3
+ import type { GraphicEventType } from '@visactor/vrender-core';
4
+ import type { IBaseInteractionSpec } from '../interface/spec';
5
+ export declare const parseTriggerOffOfSelect: (triggerOff: IElementSelectTriggerOff | IElementSelectTriggerOff[]) => {
6
+ eventNames: GraphicEventType[];
7
+ resetType: ("self" | "view" | "timeout")[];
8
+ };
9
+ export declare const groupMarksByState: (marks: IMark[], states: string[]) => Record<string, number[]>;
10
+ export declare const filterMarksOfInteraction: (interactionSpec: IBaseInteractionSpec, marks: IMark[]) => IMark[];
11
+ export declare const generateFilterValue: (options: IElementFilterOptions) => (g: IMarkGraphic) => any;
12
+ export declare const highlightDefaultOptions: Partial<IElementHighlightOptions>;
@@ -7,6 +7,7 @@ export interface ITriggerOption {
7
7
  delayType: IDelayType;
8
8
  delayTime: number;
9
9
  realTime: boolean;
10
+ allowComponentZoom?: boolean;
10
11
  }
11
12
  export type ZoomEventParams = {
12
13
  zoomDelta: number;
@@ -76,8 +76,8 @@ export interface ILayoutItem {
76
76
  getLayoutRect: () => ILayoutRect;
77
77
  getLayout: () => IRect;
78
78
  getLastComputeOutBounds: () => IBoundsLike;
79
- onLayoutStart: (layoutRect: IRect, viewRect: ILayoutRect, ctx: any) => void;
80
- onLayoutEnd: (option: any) => void;
79
+ onLayoutStart: (layoutRect: IRect, viewRect: ILayoutRect) => void;
80
+ onLayoutEnd: () => void;
81
81
  setLayoutRect: (rect: Partial<ILayoutRect>, levelMap?: Partial<ILayoutRect>) => void;
82
82
  computeBoundsInRect: (rect: ILayoutRect) => ILayoutRect;
83
83
  setLayoutStartPosition: (pos: Partial<IPoint>) => void;
@@ -2,7 +2,6 @@ import type { ILayoutModel } from './../model/interface';
2
2
  import type { IRect, IPoint } from '../typings';
3
3
  import type { IBoundsLike } from '@visactor/vutils';
4
4
  import type { ILayoutItem, ILayoutItemInitOption, ILayoutItemSpec } from './interface';
5
- import type { IChartLayoutOption } from '../chart/interface/common';
6
5
  import type { ILayoutAlignSelf, ILayoutPoint, ILayoutRect } from '../typings/layout';
7
6
  export declare class LayoutItem implements ILayoutItem {
8
7
  protected _spec: ILayoutItemSpec;
@@ -51,8 +50,8 @@ export declare class LayoutItem implements ILayoutItem {
51
50
  constructor(model: ILayoutModel, option: ILayoutItemInitOption);
52
51
  private _setLayoutAttributeFromSpec;
53
52
  setAttrFromSpec(spec: ILayoutItemSpec, chartViewRect: ILayoutRect): void;
54
- onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect, ctx: any): void;
55
- onLayoutEnd(option: IChartLayoutOption): void;
53
+ onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect): void;
54
+ onLayoutEnd(): void;
56
55
  private _getAbsoluteSpecValue;
57
56
  absoluteLayoutInRect(layoutRect: IRect): void;
58
57
  setLayoutStartPosition(pos: Partial<IPoint>): void;
@@ -10,8 +10,8 @@ export declare class BaseArcMark<T extends IArcMarkSpec> extends BaseMark<T> imp
10
10
  };
11
11
  constructor(name: string, option: IMarkOption);
12
12
  protected _getDefaultStyle(): IMarkStyle<T>;
13
- protected computeOuterRadius: (key: string, datum: Datum, states: StateValueType, opt: any, superValue: number) => number;
14
- protected computeCenter: (key: 'x' | 'y', datum: Datum, states: StateValueType, opt: any, center: number) => number;
13
+ protected computeOuterRadius: (key: string, datum: Datum, states: StateValueType, superValue: number) => number;
14
+ protected computeCenter: (key: 'x' | 'y', datum: Datum, states: StateValueType, center: number) => number;
15
15
  }
16
16
  export declare class ArcMark extends BaseArcMark<IArcMarkSpec> implements IArcMark {
17
17
  static readonly type = MarkTypeEnum.arc;
@@ -6,6 +6,8 @@ export declare class AreaMark extends BaseLineMark<IAreaMarkSpec> implements IAr
6
6
  static readonly type = MarkTypeEnum.area;
7
7
  readonly type = MarkTypeEnum.area;
8
8
  protected _getDefaultStyle(): IMarkStyle<IAreaMarkSpec>;
9
+ protected _getSegmentAttributes(): string[];
9
10
  protected _getIgnoreAttributes(): string[];
11
+ _isValidPointChannel: (channel: string) => boolean;
10
12
  }
11
13
  export declare const registerAreaMark: () => void;
@@ -1,8 +1,22 @@
1
1
  import type { StateValueType } from '../../compile/mark';
2
2
  import type { ConvertToMarkStyleSpec, ILineLikeMarkSpec } from '../../typings/visual';
3
+ import type { IPointLike } from '@visactor/vutils';
3
4
  import { BaseMark } from './base-mark';
4
- import type { IMarkStyle } from '../interface';
5
+ import type { IMarkGraphic, IMarkStyle } from '../interface';
6
+ import type { Datum } from '../../typings/common';
7
+ import type { ILine } from '@visactor/vrender-core';
8
+ import type { IMarkSpec } from '../../typings/spec/common';
9
+ export declare const LINE_SEGMENT_ATTRIBUTES: string[];
5
10
  export declare abstract class BaseLineMark<T extends ILineLikeMarkSpec = ILineLikeMarkSpec> extends BaseMark<T> {
6
11
  protected abstract _getIgnoreAttributes(): string[];
7
- setStyle<T>(style: Partial<ConvertToMarkStyleSpec<T>> | Partial<IMarkStyle<T>>, state?: StateValueType, level?: number, stateStyle?: import("../interface").IMarkStateStyle<T>): void;
12
+ protected _getSegmentAttributes(): string[];
13
+ protected _segmentStyleKeys: string[];
14
+ initStyleWithSpec(spec: IMarkSpec<T>): void;
15
+ setStyle<T>(style: Partial<ConvertToMarkStyleSpec<T>> | Partial<IMarkStyle<T>>, state?: StateValueType, level?: number): void;
16
+ _isValidPointChannel: (channel: string) => boolean;
17
+ _getLineSegments(items: any[], points: IPointLike[]): any[];
18
+ _getPrevPoints(g: ILine): IPointLike[];
19
+ _runPointsEncoder(newStyles: Record<string, (datum: Datum) => any>, g: IMarkGraphic, attrs?: any): any;
20
+ _runEncoderOfGraphic(newStyles: Record<string, (datum: Datum) => any>, g: IMarkGraphic, attrs?: any): any;
21
+ protected _getDataByKey(data: Datum[]): import("../interface").GroupedData<Datum>;
8
22
  }
@@ -1,13 +1,84 @@
1
- import type { IAttributeOpt, IModelMarkAttributeContext } from '../../compile/mark/interface';
2
- import type { Datum, IMarkSpec, ICommonSpec, ValueType } from '../../typings';
3
- import type { IMarkRaw, IMarkStateStyle, IMarkStyle, IMarkOption, StyleConvert, MarkInputStyle } from '../interface';
4
- import { CompilableMark } from '../../compile/mark/compilable-mark';
5
- import type { StateValueType } from '../../compile/mark';
6
- export type ExChannelCall = (key: string | number | symbol, datum: Datum, states: StateValueType, opt: unknown, baseValue: unknown) => unknown;
7
- export declare class BaseMark<T extends ICommonSpec> extends CompilableMark implements IMarkRaw<T> {
1
+ import { type IModelMarkAttributeContext } from '../../compile/mark/interface';
2
+ import type { Datum, IMarkSpec, ICommonSpec, ValueType, StringOrNumber, Maybe } from '../../typings';
3
+ import type { DataView } from '@visactor/vdataset';
4
+ import { MarkTypeEnum } from '../interface';
5
+ import type { IMarkRaw, IMarkStateStyle, IMarkStyle, IMark, IMarkOption, StyleConvert, MarkInputStyle, GroupedData, IAttrs, IMarkGraphic, MarkType } from '../interface';
6
+ import { MarkStateManager } from '../../compile/mark';
7
+ import type { ICompilableMark, IMarkCompileOption, IMarkConfig, StateValueType } from '../../compile/mark';
8
+ import type { ICompilableInitOption } from '../../compile/interface';
9
+ import type { IGroupGraphicAttribute, IGroup } from '@visactor/vrender-core';
10
+ import { GrammarItem } from '../../compile/grammar-item';
11
+ import type { IModel } from '../../model/interface';
12
+ import type { ICompilableData } from '../../compile/data/interface';
13
+ import type { MarkAnimationSpec } from '../../animation/interface';
14
+ export type ExChannelCall = (key: string | number | symbol, datum: Datum, states: StateValueType, baseValue: unknown) => unknown;
15
+ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem implements IMarkRaw<T> {
16
+ readonly type: MarkType;
17
+ readonly name: string;
18
+ readonly key: ICompilableMark['key'];
19
+ protected _markConfig: IMarkConfig;
20
+ protected _isCommited?: boolean;
21
+ commit(render?: boolean, recursion?: boolean): void;
22
+ uncommit(): void;
23
+ isCommited(): boolean;
24
+ getMarkConfig(): IMarkConfig;
25
+ setMarkConfig(config: IMarkConfig): void;
26
+ protected _visible: boolean;
27
+ getVisible(): boolean;
28
+ setVisible(visible: boolean): void;
29
+ protected _userId: StringOrNumber;
30
+ getUserId(): StringOrNumber;
31
+ setUserId(userId: StringOrNumber): void;
32
+ readonly model: IModel;
33
+ protected _data: ICompilableData;
34
+ getDataView(): DataView | undefined;
35
+ setDataView(d?: DataView): void;
36
+ getData(): ICompilableData;
37
+ setData(d?: ICompilableData): void;
8
38
  stateStyle: IMarkStateStyle<T>;
39
+ state: MarkStateManager;
40
+ protected _unCompileChannel: {
41
+ [key in string]: boolean;
42
+ };
43
+ hasState(state: string): boolean;
44
+ getState(state: string): unknown;
45
+ protected _animationConfig: Partial<MarkAnimationSpec>;
46
+ getAnimationConfig(): Partial<MarkAnimationSpec>;
47
+ setAnimationConfig(config: Partial<MarkAnimationSpec>): void;
48
+ private _skipBeforeLayouted;
49
+ setSkipBeforeLayouted(skip: boolean): void;
50
+ protected _groupKey?: string;
51
+ setGroupKey(groupKey: string): void;
52
+ protected _stateSort?: (stateA: string, stateB: string) => number;
53
+ protected _product: Maybe<IGroup>;
54
+ getProduct(): IGroup;
55
+ protected initMarkData(option: ICompilableInitOption): void;
56
+ protected _compileProduct(option?: IMarkCompileOption): void;
57
+ protected _initProduct(group?: IGroup): void;
58
+ generateProductId(): string;
59
+ layout(layout: () => void): void;
60
+ compileData(): void;
61
+ compileEncode(): void;
62
+ compileState(): void;
63
+ compileAnimation(): void;
64
+ _context: any;
65
+ compileContext(extraContext?: any): void;
66
+ getContext(): any;
67
+ protected compileTransform(): void;
68
+ updateState(newState: Record<string, unknown>, noRender?: boolean): void;
69
+ getMarks(): IMark[];
70
+ runAnimationByState(state?: string): void;
71
+ stopAnimationByState(state?: string): void;
72
+ pauseAnimationByState(state?: string): void;
73
+ resumeAnimationByState(state?: string): void;
74
+ removeProduct(): void;
75
+ release(): void;
76
+ protected _simpleStyle: T;
77
+ setSimpleStyle(s: T): void;
78
+ getSimpleStyle(): T;
9
79
  protected _option: IMarkOption;
10
80
  protected _attributeContext: IModelMarkAttributeContext;
81
+ protected _encoderOfState: Record<string, Record<string, (datum: Datum) => any>>;
11
82
  _extensionChannel: {
12
83
  [key: string | number | symbol]: string[];
13
84
  };
@@ -16,17 +87,18 @@ export declare class BaseMark<T extends ICommonSpec> extends CompilableMark impl
16
87
  };
17
88
  constructor(name: string, option: IMarkOption);
18
89
  created(): void;
19
- initStyleWithSpec(spec: IMarkSpec<T>, key?: string): void;
90
+ initStyleWithSpec(spec: IMarkSpec<T>): void;
20
91
  protected _transformStyleValue<T>(styleConverter: StyleConvert<T>, transform: (value: ValueType<T>) => ValueType<T>): StyleConvert<any>;
21
92
  convertAngleToRadian(styleConverter: StyleConvert<number>): any;
22
93
  isUserLevel(level: number): boolean;
23
- setStyle<U extends keyof T>(style: Partial<IMarkStyle<T>>, state?: StateValueType, level?: number, stateStyle?: IMarkStateStyle<T>): void;
94
+ setStyle<U extends keyof T>(style: Partial<IMarkStyle<T>>, state?: StateValueType, level?: number): void;
24
95
  getStyle(key: string, state?: StateValueType): any;
25
- protected _filterAttribute<U extends keyof T>(attr: U, style: MarkInputStyle<T[U]>, state: StateValueType, level: number, isUserLevel: boolean, stateStyle?: IMarkStateStyle<T>): StyleConvert<T[U]>;
26
- setReferer<U extends keyof T>(mark: IMarkRaw<T>, styleKey?: U, state?: StateValueType, stateStyle?: IMarkStateStyle<T>): void;
96
+ protected _filterAttribute<U extends keyof T>(attr: U, style: MarkInputStyle<T[U]>, state: StateValueType, level: number, isUserLevel: boolean): StyleConvert<T[U]>;
97
+ setReferer<U extends keyof T>(mark: IMarkRaw<T>, styleKey?: U, state?: StateValueType): void;
27
98
  setPostProcess<U extends keyof T>(key: U, postProcessFunc: any, state?: StateValueType): void;
28
- getAttribute<U extends keyof T>(key: U, datum: Datum, state?: StateValueType, opt?: IAttributeOpt): any;
29
- setAttribute<U extends keyof T>(attr: U, style: MarkInputStyle<T[U]>, state?: StateValueType, level?: number, stateStyle?: IMarkStateStyle<T>): void;
99
+ getAttribute<U extends keyof T>(key: U, datum: Datum, state?: StateValueType): any;
100
+ getAttributesOfState(datum: Datum, state?: StateValueType): any;
101
+ setAttribute<U extends keyof T>(attr: U, style: MarkInputStyle<T[U]>, state?: StateValueType, level?: number): void;
30
102
  protected _getDefaultStyle(): IMarkStyle<T>;
31
103
  protected _styleConvert<U extends keyof T>(style?: MarkInputStyle<T[U]>): StyleConvert<T[U]> | undefined;
32
104
  protected _computeAttribute<U extends keyof T>(key: U, state: StateValueType): any;
@@ -35,4 +107,50 @@ export declare class BaseMark<T extends ICommonSpec> extends CompilableMark impl
35
107
  private _initSpecStyle;
36
108
  private _computeGradientAttr;
37
109
  private _computeBorderAttr;
110
+ protected _dataByGroup: GroupedData<Datum>;
111
+ protected _dataByKey: GroupedData<Datum>;
112
+ protected _graphicMap: Map<string, IMarkGraphic>;
113
+ protected _graphics: IMarkGraphic[];
114
+ protected _keyGetter: (datum: Datum) => string;
115
+ protected _groupKeyGetter: (datum: Datum) => string;
116
+ private renderContext?;
117
+ protected _getDataByKey(data: Datum[]): GroupedData<Datum>;
118
+ protected _getCommonContext(): {
119
+ markType: MarkTypeEnum;
120
+ markId: number;
121
+ modelId: number;
122
+ markUserId: StringOrNumber;
123
+ modelUserId: StringOrNumber;
124
+ };
125
+ reuse(mark: IMark): void;
126
+ getGraphics(): IMarkGraphic[];
127
+ protected _createGraphic(attrs?: any): IMarkGraphic;
128
+ protected _runGroupData(data: Datum[]): void;
129
+ protected _runJoin(data: Datum[]): void;
130
+ _runEncoderOfGraphic(styles: Record<string, (datum: Datum) => any>, g: IMarkGraphic, attrs?: any): any;
131
+ _runGroupEncoder(groupStyles: Record<string, (datum: Datum) => any>): any;
132
+ protected _transformGraphicAttributes(g: IMarkGraphic, attrs: any, groupAttrs?: any): any;
133
+ protected _separateNormalStyle(normalStyle: Partial<IAttrs<T>>, splitGroupEncoder?: boolean): {
134
+ updateStyles: Record<string, (datum: Datum) => any>;
135
+ groupStyles: Record<string, (datum: Datum) => any>;
136
+ };
137
+ protected _getEncoderByState: (stateName: string) => Record<string, (datum: Datum) => any>;
138
+ protected _setGraphicFromMarkConfig: (g: IMarkGraphic) => void;
139
+ protected _setStateOfGraphic: (g: IMarkGraphic) => void;
140
+ protected _runEncoder(splitGroupEncoder?: boolean): void;
141
+ protected _runState(): void;
142
+ protected _getAttrsFromConfig(attrs?: IGroupGraphicAttribute): IGroupGraphicAttribute;
143
+ protected _updateAttrsOfGroup(): void;
144
+ protected runBeforeTransform(data: Datum[]): Datum[];
145
+ protected _runMainTasks(): void;
146
+ render(): void;
147
+ updateMarkState(key: string): void;
148
+ protected _cleanExitGraphics(): void;
149
+ isProgressive(): boolean;
150
+ canAnimateAfterProgressive(): boolean;
151
+ isDoingProgressive(): boolean;
152
+ clearProgressive(): void;
153
+ restartProgressive(): void;
154
+ protected renderBeforeProgressive(): void;
155
+ renderProgressive(): void;
38
156
  }
@@ -1,12 +1,18 @@
1
- import type { IBoxPlotMarkSpec } from '../typings/visual';
2
- import { BaseMark } from './base/base-mark';
3
- import type { IGroupMark } from '@visactor/vgrammar-core';
1
+ import type { BoxPlotShaftShape, IBoxPlotMarkSpec } from '../typings/visual';
4
2
  import type { IBoxPlotMark, IMarkStyle } from './interface';
5
3
  import { MarkTypeEnum } from './interface/type';
6
- export declare class BoxPlotMark extends BaseMark<IBoxPlotMarkSpec> implements IBoxPlotMark {
4
+ import { GlyphMark } from './glyph';
5
+ export declare class BoxPlotMark extends GlyphMark<IBoxPlotMarkSpec, {
6
+ direction?: 'horizontal' | 'vertical';
7
+ shaftShape?: BoxPlotShaftShape;
8
+ }> implements IBoxPlotMark {
7
9
  static readonly type = MarkTypeEnum.boxPlot;
8
10
  readonly type = MarkTypeEnum.boxPlot;
11
+ protected _isHorizontal(): boolean;
12
+ setGlyphConfig(cfg: {
13
+ direction?: 'horizontal' | 'vertical';
14
+ shaftShape?: BoxPlotShaftShape;
15
+ }): void;
9
16
  protected _getDefaultStyle(): IMarkStyle<IBoxPlotMarkSpec>;
10
- protected _initProduct(group?: string | IGroupMark): void;
11
17
  }
12
18
  export declare const registerBoxPlotMark: () => void;
@@ -1,10 +1,13 @@
1
1
  import type { ICellMarkSpec } from '../typings';
2
2
  import type { ICellMark, IMarkStyle } from './interface';
3
3
  import { MarkTypeEnum } from './interface/type';
4
- import { BaseSymbolMark } from './symbol';
5
- export declare class CellMark extends BaseSymbolMark<ICellMarkSpec> implements ICellMark {
4
+ import type { IGraphic } from '@visactor/vrender-core';
5
+ import { BaseMark } from './base';
6
+ export declare class CellMark extends BaseMark<ICellMarkSpec> implements ICellMark {
6
7
  static readonly type = MarkTypeEnum.cell;
7
8
  readonly type = MarkTypeEnum.cell;
8
9
  protected _getDefaultStyle(): IMarkStyle<ICellMarkSpec>;
10
+ protected _createGraphic(attrs?: any): IGraphic;
11
+ protected _transformGraphicAttributes(g: IGraphic, attrs: any, groupAttrs?: any): any;
9
12
  }
10
13
  export declare const registerCellMark: () => void;
@@ -1,14 +1,22 @@
1
- import type { IGroupMark } from '@visactor/vgrammar-core';
2
1
  import type { ICommonSpec } from '../typings';
3
2
  import { BaseMark } from './base/base-mark';
4
- import type { IComponentMark, IMarkOption } from './interface';
3
+ import type { IComponentMark, IMarkOption, IMarkStyle } from './interface';
5
4
  import { MarkTypeEnum } from './interface/type';
5
+ import type { IGraphic, IGroupGraphicAttribute } from '@visactor/vrender-core';
6
6
  export declare class ComponentMark extends BaseMark<ICommonSpec> implements IComponentMark {
7
7
  static readonly type = MarkTypeEnum.component;
8
8
  type: string;
9
9
  private _componentType;
10
+ private _component;
10
11
  private _mode;
11
12
  constructor(name: string, option: IMarkOption);
12
- protected _initProduct(group?: string | IGroupMark): void;
13
+ protected _getDefaultStyle(): IMarkStyle<ICommonSpec>;
14
+ getComponent(): IGraphic<Partial<import("@visactor/vrender-core").IGraphicAttribute>>;
15
+ protected _getAttrsFromConfig(attrs?: IGroupGraphicAttribute): IGroupGraphicAttribute;
16
+ protected _attributesTransform: (attrs: any) => any;
17
+ setAttributeTransform(t: (attrs: any) => any): void;
18
+ renderInner(): void;
19
+ render(): void;
20
+ release(): void;
13
21
  }
14
22
  export declare const registerComponentMark: () => void;
@@ -0,0 +1,29 @@
1
+ import type { ICommonSpec } from '../typings/visual';
2
+ import { BaseMark } from './base/base-mark';
3
+ import type { IGlyph, IGlyphGraphicAttribute, IGraphic } from '@visactor/vrender-core';
4
+ import type { IGlyphMark } from './interface/mark';
5
+ import type { MarkType } from './interface/type';
6
+ import type { Datum } from '../typings/common';
7
+ import type { IMarkGraphic } from './interface/common';
8
+ export declare abstract class GlyphMark<T extends ICommonSpec = ICommonSpec, Cfg = any> extends BaseMark<T> implements IGlyphMark<T, Cfg> {
9
+ protected _defaultGlyphAttrs: T;
10
+ protected _subMarks: Record<string, {
11
+ type: MarkType;
12
+ defaultAttributes?: any;
13
+ }>;
14
+ getSubMarks(): Record<string, {
15
+ type: string;
16
+ defaultAttributes?: any;
17
+ }>;
18
+ protected _glyphConfig: Cfg;
19
+ setGlyphConfig(cfg: Cfg): void;
20
+ getGlyphConfig(): Cfg;
21
+ protected _positionChannels: string[];
22
+ getPositionChannels(): string[];
23
+ protected _positionEncoder: (glyphAttrs: any, datum: Datum, g: IGlyph) => Record<string, any>;
24
+ protected _channelEncoder: Record<string, (channelValue: any) => Record<string, any>>;
25
+ private _onGlyphAttributeUpdate;
26
+ protected _setStateOfGraphic: (g: IMarkGraphic) => void;
27
+ protected _createGraphic(attrs?: IGlyphGraphicAttribute): IGraphic;
28
+ }
29
+ export declare const registerGlyphMark: () => void;
@@ -1,18 +1,17 @@
1
1
  import type { Maybe } from '../typings';
2
2
  import type { IGroupMarkSpec } from '../typings/visual';
3
3
  import { BaseMark } from './base/base-mark';
4
- import type { IGroupMark, IMark, IMarkStyle, MarkType } from './interface';
4
+ import type { IGroupMark, IMark, IMarkGraphic, MarkType } from './interface';
5
5
  import { MarkTypeEnum } from './interface/type';
6
- import type { IGroupMark as IVGrammarGroupMark } from '@visactor/vgrammar-core';
7
- import type { IMarkCompileOption } from '../compile/mark';
6
+ import { type IMarkCompileOption } from '../compile/mark';
7
+ import type { IGroup, IGroupGraphicAttribute } from '@visactor/vrender-core';
8
8
  export declare class GroupMark extends BaseMark<IGroupMarkSpec> implements IGroupMark {
9
9
  static readonly type = MarkTypeEnum.group;
10
10
  readonly type = MarkTypeEnum.group;
11
11
  protected _marks: IMark[];
12
12
  getMarks(): IMark[];
13
- protected _product: Maybe<IVGrammarGroupMark>;
14
- getProduct: () => Maybe<IVGrammarGroupMark>;
15
- protected _getDefaultStyle(): IMarkStyle<IGroupMarkSpec>;
13
+ protected _product: Maybe<IGroup>;
14
+ getProduct: () => Maybe<IGroup>;
16
15
  protected isMarkExist(mark: IMark): boolean;
17
16
  addMark(mark: IMark): boolean;
18
17
  removeMark(mark: IMark): boolean;
@@ -21,5 +20,10 @@ export declare class GroupMark extends BaseMark<IGroupMarkSpec> implements IGrou
21
20
  getMarkInUserId(id: string | number): IMark;
22
21
  getMarkInName(name: string): IMark[];
23
22
  protected _compileProduct(option?: IMarkCompileOption): void;
23
+ protected _getAttrsFromConfig(attrs?: IGroupGraphicAttribute): IGroupGraphicAttribute;
24
+ getGraphics(): IMarkGraphic[];
25
+ protected _renderSelf(): void;
26
+ render(): void;
27
+ release(): void;
24
28
  }
25
29
  export declare const registerGroupMark: () => void;
@@ -15,7 +15,9 @@ import { BaseMark } from './base';
15
15
  import { PolygonMark, registerPolygonMark } from './polygon/polygon';
16
16
  import { Pyramid3dMark, registerPyramid3dMark } from './polygon/pyramid-3d';
17
17
  import { ImageMark, registerImageMark } from './image';
18
+ import { registerMarkFilterTransform } from './transform/filter';
19
+ import { registerMarkMapTransform } from './transform/map';
18
20
  export type { IBoxPlotMarkSpec, ILineMarkSpec, ISymbolMarkSpec, IGroupMarkSpec, IRuleMarkSpec, ITextMarkSpec, IAreaMarkSpec, IRect3dMarkSpec, IRectMarkSpec, IPathMarkSpec, IArcMarkSpec, IArc3dMarkSpec, ICommonSpec, IPolygonMarkSpec, IPyramid3dMarkSpec, ILinkPathMarkSpec, IRippleMarkSpec, ICellMarkSpec, ILiquidMarkSpec, ConvertToMarkStyleSpec } from '../typings/visual';
19
21
  export { LineMark, SymbolMark, GroupMark, RuleMark, TextMark, AreaMark, Rect3dMark, RectMark, PathMark, Arc3dMark, ArcMark, ComponentMark, PolygonMark, Pyramid3dMark, RippleMark, ImageMark, BaseMark };
20
- export { registerLineMark, registerSymbolMark, registerGroupMark, registerRuleMark, registerTextMark, registerAreaMark, registerRectMark, registerRect3dMark, registerPathMark, registerArcMark, registerArc3dMark, registerPolygonMark, registerPyramid3dMark, registerRippleMark, registerImageMark, registerComponentMark };
22
+ export { registerLineMark, registerSymbolMark, registerGroupMark, registerRuleMark, registerTextMark, registerAreaMark, registerRectMark, registerRect3dMark, registerPathMark, registerArcMark, registerArc3dMark, registerPolygonMark, registerPyramid3dMark, registerRippleMark, registerImageMark, registerComponentMark, registerMarkMapTransform, registerMarkFilterTransform };
21
23
  export declare const registerAllMarks: () => void;
@@ -2,11 +2,11 @@ import type { IGlobalScale } from '../../scale/interface';
2
2
  import type { ICommonSpec, VisualType, ValueType, FunctionType } from '../../typings/visual';
3
3
  import type { IModel } from '../../model/interface';
4
4
  import type { IBaseScale } from '@visactor/vscale';
5
- import type { MarkType } from './type';
6
- import type { ICompilableMark, ICompilableMarkOption, IModelMarkAttributeContext, StateValueType } from '../../compile/mark/interface';
7
- import type { StringOrNumber } from '../../typings';
8
- import type { IMarkConfig } from '@visactor/vgrammar-core';
9
- import type { ICustomPath2D } from '@visactor/vrender-core';
5
+ import type { MarkType, MarkTypeEnum } from './type';
6
+ import type { ICompilableMark, ICompilableMarkOption, IMarkConfig, IModelMarkAttributeContext, StateValueType } from '../../compile/mark/interface';
7
+ import type { Datum, StringOrNumber } from '../../typings';
8
+ import type { IGraphic } from '@visactor/vrender-core';
9
+ import type { IGroupMark } from './mark';
10
10
  export interface VisualScaleType {
11
11
  scale: IBaseScale;
12
12
  field: StringOrNumber;
@@ -33,22 +33,52 @@ export type IMarkStateStyle<T extends ICommonSpec> = Record<StateValueType, Part
33
33
  export type IMarkStyle<T extends ICommonSpec> = {
34
34
  [key in keyof T]: MarkInputStyle<T[key]>;
35
35
  };
36
+ export type DiffStateValues = 'update' | 'enter' | 'exit';
37
+ export interface IGraphicContext {
38
+ markType: MarkTypeEnum;
39
+ markId: number;
40
+ modelId: number;
41
+ markUserId?: number | string;
42
+ modelUserId?: number | string;
43
+ diffState?: DiffStateValues;
44
+ data?: Datum[];
45
+ uniqueKey?: string;
46
+ key?: string;
47
+ groupKey?: string;
48
+ states?: string[];
49
+ }
50
+ export interface IMarkGraphic extends IGraphic {
51
+ runtimeStateCache?: Record<string, any>;
52
+ context?: IGraphicContext;
53
+ }
36
54
  export interface IMarkRaw<T extends ICommonSpec> extends ICompilableMark {
37
55
  readonly stateStyle: IMarkStateStyle<T>;
38
- getAttribute: <U extends keyof T>(key: U, datum: any, state?: StateValueType, opt?: any) => unknown;
56
+ getAttributesOfState: (datum: Datum, state?: StateValueType) => Partial<T>;
57
+ getAttribute: <U extends keyof T>(key: U, datum: any, state?: StateValueType) => unknown;
39
58
  setAttribute: <U extends keyof T>(attr: U, style: StyleConvert<T[U]>, state?: StateValueType, level?: number) => void;
40
59
  setStyle: (style: Partial<IMarkStyle<T>>, state?: StateValueType, level?: number) => void;
41
- setReferer: (mark: IMarkRaw<T>, styleKey?: string, state?: StateValueType, stateStyle?: IMarkStateStyle<T>) => void;
42
- initStyleWithSpec: (spec: any, key?: string) => void;
60
+ setSimpleStyle: (s: T) => void;
61
+ getSimpleStyle: () => T;
62
+ setReferer: (mark: IMarkRaw<T>, styleKey?: string, state?: StateValueType) => void;
63
+ initStyleWithSpec: (spec: any) => void;
43
64
  created: () => void;
44
65
  setPostProcess: <U extends keyof T, A>(key: U, postProcessFunc: IAttrConfig<A, T>['postProcess'], state?: StateValueType) => void;
66
+ updateMarkState: (key: string) => void;
67
+ render: () => void;
68
+ getGraphics: () => IMarkGraphic[];
69
+ reuse: (mark: IMark) => void;
70
+ isProgressive: () => boolean;
71
+ isDoingProgressive: () => boolean;
72
+ clearProgressive: () => void;
73
+ restartProgressive: () => void;
74
+ renderProgressive: () => void;
75
+ canAnimateAfterProgressive: () => boolean;
45
76
  }
46
77
  export type IMark = IMarkRaw<ICommonSpec>;
47
78
  export interface ICompileMarkConfig extends IMarkConfig {
48
79
  morph?: boolean;
49
80
  morphElementKey?: string;
50
81
  support3d?: boolean;
51
- setCustomizedShape?: (datum: any[], attrs: any, path: ICustomPath2D) => ICustomPath2D;
52
82
  clip?: boolean;
53
83
  skipTheme?: boolean;
54
84
  }
@@ -59,6 +89,7 @@ export interface IMarkOption extends ICompilableMarkOption {
59
89
  seriesId?: number;
60
90
  componentType?: string;
61
91
  attributeContext?: IModelMarkAttributeContext;
92
+ parent?: IGroupMark | false;
62
93
  }
63
94
  export interface IMarkConstructor {
64
95
  type: MarkType;
@@ -85,3 +116,24 @@ export interface IMarkOverlap {
85
116
  pointDisMul?: number;
86
117
  markOverlap?: boolean;
87
118
  }
119
+ export type GroupedData<T> = {
120
+ keys: string[];
121
+ data: Map<string, T[]>;
122
+ };
123
+ export interface IProgressiveTransformResult<Output = any> {
124
+ unfinished: () => boolean;
125
+ output: () => Output;
126
+ progressiveOutput: () => Output;
127
+ progressiveRun: () => void;
128
+ release: () => void;
129
+ canAnimate?: () => boolean;
130
+ }
131
+ export type IMarkDataTransform<Options = any, Input = any, Output = any> = (options: Options, data: Input) => Output | IProgressiveTransformResult<Output>;
132
+ export interface ProgressiveContext {
133
+ currentIndex: number;
134
+ totalStep: number;
135
+ step: number;
136
+ data: any[];
137
+ groupKeys?: string[];
138
+ groupedData?: Map<string, any[]>;
139
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum DiffState {
2
+ enter = "enter",
3
+ update = "update",
4
+ exit = "exit",
5
+ unChange = "unChange"
6
+ }
@@ -1,3 +1,4 @@
1
1
  export * from './common';
2
2
  export * from './type';
3
3
  export * from './mark';
4
+ export * from './enum';