@visactor/vchart-types 1.12.4-alpha.0 → 1.12.4-alpha.2

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 (110) hide show
  1. package/package.json +3 -3
  2. package/tsconfig.tsbuildinfo +1 -1
  3. package/types/chart/base/base-chart.d.ts +2 -0
  4. package/types/chart/chart-meta/data.d.ts +1 -2
  5. package/types/chart/gauge/interface.d.ts +1 -1
  6. package/types/chart/interface/chart.d.ts +1 -0
  7. package/types/chart/mosaic/mosaic.d.ts +0 -1
  8. package/types/chart/pie/interface.d.ts +2 -2
  9. package/types/chart/polar/interface.d.ts +2 -0
  10. package/types/chart/treemap/interface.d.ts +1 -1
  11. package/types/chart/venn/interface.d.ts +2 -2
  12. package/types/compile/interface/compiler.d.ts +15 -0
  13. package/types/compile/mark/compilable-mark.d.ts +7 -39
  14. package/types/compile/mark/interface.d.ts +5 -25
  15. package/types/component/axis/base-axis.d.ts +2 -2
  16. package/types/component/axis/cartesian/axis.d.ts +2 -0
  17. package/types/component/axis/cartesian/interface/common.d.ts +1 -0
  18. package/types/component/axis/interface/spec.d.ts +1 -0
  19. package/types/component/axis/mixin/util/break-data.d.ts +1 -1
  20. package/types/component/axis/polar/axis.d.ts +1 -1
  21. package/types/component/axis/polar/interface/spec.d.ts +3 -1
  22. package/types/component/axis/util.d.ts +3 -0
  23. package/types/component/custom-mark/custom-mark.d.ts +1 -4
  24. package/types/component/data-zoom/data-filter-base-component.d.ts +3 -0
  25. package/types/component/data-zoom/data-zoom/data-zoom.d.ts +0 -3
  26. package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +0 -3
  27. package/types/component/geo/geo-coordinate.d.ts +7 -0
  28. package/types/component/interface/common.d.ts +1 -1
  29. package/types/component/interface/index.d.ts +0 -1
  30. package/types/component/label/base-label.d.ts +1 -2
  31. package/types/component/label/interface.d.ts +2 -2
  32. package/types/component/label/label.d.ts +0 -1
  33. package/types/component/label/total-label.d.ts +1 -1
  34. package/types/component/label/util.d.ts +5 -5
  35. package/types/component/legend/util.d.ts +2 -2
  36. package/types/component/marker/base-marker.d.ts +4 -1
  37. package/types/component/marker/interface.d.ts +9 -2
  38. package/types/component/marker/utils.d.ts +4 -4
  39. package/types/component/player/player.d.ts +1 -3
  40. package/types/component/title/interface/spec.d.ts +3 -3
  41. package/types/component/title/interface/theme.d.ts +1 -1
  42. package/types/component/tooltip/constant.d.ts +5 -4
  43. package/types/component/tooltip/interface/common.d.ts +1 -1
  44. package/types/component/tooltip/interface/spec.d.ts +23 -3
  45. package/types/component/tooltip/interface/theme.d.ts +2 -2
  46. package/types/component/tooltip/processor/base.d.ts +4 -6
  47. package/types/component/tooltip/tooltip.d.ts +13 -6
  48. package/types/component/tooltip/utils/common.d.ts +6 -4
  49. package/types/component/tooltip/utils/get-spec.d.ts +4 -4
  50. package/types/component/tooltip/utils/get-value.d.ts +1 -2
  51. package/types/component/tooltip/utils/index.d.ts +0 -1
  52. package/types/component/util.d.ts +3 -0
  53. package/types/constant/layout.d.ts +1 -0
  54. package/types/core/vchart.d.ts +2 -1
  55. package/types/data/initialize.d.ts +1 -2
  56. package/types/data/transforms/pie.d.ts +3 -0
  57. package/types/interaction/interaction.d.ts +2 -0
  58. package/types/interaction/interface.d.ts +2 -0
  59. package/types/mark/interface/common.d.ts +10 -0
  60. package/types/model/base-model.d.ts +2 -2
  61. package/types/model/interface.d.ts +14 -0
  62. package/types/model/tooltip-helper.d.ts +8 -6
  63. package/types/plugin/chart/media-query/media-query.d.ts +1 -0
  64. package/types/plugin/chart/plugin-service.d.ts +2 -0
  65. package/types/plugin/components/axis-sync/zero-align-transform.d.ts +1 -0
  66. package/types/plugin/components/tooltip-handler/base.d.ts +1 -16
  67. package/types/plugin/components/tooltip-handler/dom/dom-tooltip-handler.d.ts +0 -1
  68. package/types/plugin/components/tooltip-handler/interface/style.d.ts +1 -2
  69. package/types/plugin/components/tooltip-handler/utils/position.d.ts +3 -5
  70. package/types/region/interface.d.ts +3 -1
  71. package/types/series/area/area.d.ts +2 -0
  72. package/types/series/bar/bar.d.ts +4 -4
  73. package/types/series/bar/interface.d.ts +5 -1
  74. package/types/series/base/base-series.d.ts +8 -7
  75. package/types/series/base/tooltip-helper.d.ts +30 -6
  76. package/types/series/box-plot/box-plot.d.ts +1 -0
  77. package/types/series/box-plot/tooltip-helper.d.ts +2 -2
  78. package/types/series/cartesian/cartesian.d.ts +1 -1
  79. package/types/series/correlation/correlation.d.ts +1 -0
  80. package/types/series/dot/dot.d.ts +0 -1
  81. package/types/series/dot/tooltip-helper.d.ts +8 -2
  82. package/types/series/funnel/funnel.d.ts +2 -0
  83. package/types/series/funnel/interface.d.ts +3 -1
  84. package/types/series/gauge/interface.d.ts +1 -1
  85. package/types/series/gauge/pointer-tooltip-helper.d.ts +6 -0
  86. package/types/series/heatmap/tooltip-helper.d.ts +2 -3
  87. package/types/series/interface/common.d.ts +1 -9
  88. package/types/series/interface/tooltip-helper.d.ts +5 -4
  89. package/types/series/link/tooltip-helper.d.ts +5 -2
  90. package/types/series/liquid/tooltip-helper.d.ts +4 -5
  91. package/types/series/map/map.d.ts +1 -0
  92. package/types/series/mixin/line-mixin.d.ts +2 -2
  93. package/types/series/pie/interface.d.ts +3 -3
  94. package/types/series/pie/pie.d.ts +1 -0
  95. package/types/series/polar/animation.d.ts +9 -11
  96. package/types/series/progress/linear/tooltip-helper.d.ts +2 -3
  97. package/types/series/radar/animation.d.ts +0 -3
  98. package/types/series/range-area/tooltip-helper.d.ts +1 -3
  99. package/types/series/range-column/tooltip-helper.d.ts +1 -2
  100. package/types/series/sankey/interface.d.ts +1 -0
  101. package/types/series/sankey/sankey.d.ts +2 -2
  102. package/types/series/sankey/tooltip-helper.d.ts +3 -3
  103. package/types/series/waterfall/waterfall.d.ts +1 -0
  104. package/types/typings/spec/common.d.ts +10 -5
  105. package/types/typings/tooltip/position.d.ts +1 -0
  106. package/types/typings/tooltip/shape.d.ts +0 -1
  107. package/types/typings/tooltip/tooltip.d.ts +7 -0
  108. package/types/util/array.d.ts +1 -1
  109. package/types/util/math.d.ts +1 -0
  110. package/types/util/scale.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  import type { Options } from './constants';
2
- import type { Maybe, ILayoutPoint, RenderMode } from '../../../typings';
2
+ import type { Maybe, RenderMode } from '../../../typings';
3
3
  import type { TooltipData, ITooltipActual, TooltipActiveType, ITooltipHandler, ITooltipPositionActual } from '../../../typings/tooltip';
4
4
  import type { IGroup } from '@visactor/vrender-core';
5
5
  import type { Compiler } from '../../../compile/compiler';
@@ -25,34 +25,19 @@ export declare abstract class BaseTooltipHandler extends BasePlugin implements I
25
25
  protected _attributes?: ITooltipAttributes | null;
26
26
  protected _chartContainer: Maybe<HTMLElement>;
27
27
  protected _compiler: Compiler;
28
- protected _isTooltipPaused: boolean;
29
- protected _isPointerEscaped: boolean;
30
- protected _cachePointerTimer: number;
31
- protected _cachePointerPosition: ILayoutPoint;
32
- protected _cacheTooltipPosition: ILayoutPoint;
33
- protected _cacheTooltipSize: IContainerSize;
34
28
  protected _container: Maybe<IGroup | HTMLElement>;
35
29
  protected _isReleased: boolean;
36
30
  onAdd(service: IComponentPluginService<any>): void;
37
31
  showTooltip: (activeType: TooltipActiveType, data: TooltipData, params: TooltipHandlerParams) => TooltipResult;
38
32
  protected changeTooltip: ChangeTooltipFunc;
39
- protected _changeTooltip: ChangeTooltipFunc;
40
33
  protected changeTooltipPosition: ChangeTooltipPositionFunc;
41
- protected _changeTooltipPosition: ChangeTooltipPositionFunc;
42
34
  hideTooltip(params: TooltipHandlerParams): TooltipResult;
43
35
  release(): void;
44
- protected _clearAllCache(): void;
45
36
  protected abstract _updateTooltip(visible: boolean, params: TooltipHandlerParams): void;
46
37
  protected abstract _removeTooltip(): void;
47
- protected _throttle(callback: any): (...args: unknown[]) => unknown;
48
38
  protected _getDefaultOption(): Options;
49
39
  protected _getActualTooltipPosition: (actualTooltip: ITooltipActual, params: TooltipHandlerParams, tooltipBoxSize: IContainerSize | undefined) => ITooltipPositionActual;
50
40
  protected _getTooltipBoxSize(actualTooltip: ITooltipActual, changePositionOnly: boolean): IContainerSize | undefined;
51
- protected _getPointerPositionRelativeToTooltipParent(params: TooltipHandlerParams): {
52
- x: any;
53
- y: any;
54
- };
55
- protected _isPointerMovingToTooltip(params: TooltipHandlerParams): boolean;
56
41
  protected _getParentElement(spec: ITooltipSpec): HTMLElement;
57
42
  getTooltipContainer(): HTMLElement | IGroup;
58
43
  protected _initFromSpec(): void;
@@ -27,6 +27,5 @@ export declare class DomTooltipHandler extends BaseTooltipHandler {
27
27
  isTooltipShown(): boolean;
28
28
  reInit(): void;
29
29
  protected _updatePosition({ x, y }: ITooltipPositionActual): void;
30
- protected _initEvent(el: HTMLElement): void;
31
30
  }
32
31
  export declare const registerDomTooltipHandler: () => void;
@@ -1,10 +1,9 @@
1
1
  import type { TooltipAttributes } from '@visactor/vrender-components';
2
- import type { ITextAttribute, IFillStyle, RichTextWordBreak } from '@visactor/vrender-core';
2
+ import type { ITextAttribute, IFillStyle } from '@visactor/vrender-core';
3
3
  export interface ITooltipTextStyle extends Partial<ITextAttribute & IFillStyle> {
4
4
  spacing?: number;
5
5
  multiLine?: boolean;
6
6
  maxWidth?: number;
7
- wordBreak?: RichTextWordBreak;
8
7
  autoWidth?: boolean;
9
8
  }
10
9
  export interface ITooltipAttributes extends TooltipAttributes {
@@ -2,11 +2,9 @@ import type { IDimensionData } from '../../../../event';
2
2
  import { type ILayoutPoint } from '../../../../typings';
3
3
  import type { IFixedTooltipPositionPattern, IGlobalTooltipPositionPattern, TooltipFixedPosition } from '../../../../typings/tooltip/position';
4
4
  export declare const getActualTooltipPositionValue: (position: number | ((event: MouseEvent) => number), event: MouseEvent) => number;
5
- export type TooltipHorizontalPositionType = 'left' | 'right' | 'center' | 'centerLeft' | 'centerRight';
6
- export type TooltipVerticalPositionType = 'top' | 'bottom' | 'center' | 'centerTop' | 'centerBottom';
7
- export declare const positionType: Record<TooltipFixedPosition, [TooltipHorizontalPositionType, TooltipVerticalPositionType]>;
8
- export declare const getHorizontalPositionType: (position: TooltipFixedPosition, defaultCase?: TooltipHorizontalPositionType) => TooltipHorizontalPositionType;
9
- export declare const getVerticalPositionType: (position: TooltipFixedPosition, defaultCase?: TooltipVerticalPositionType) => TooltipVerticalPositionType;
5
+ export type TooltipPositionType = -2 | -1 | 0 | 1 | 2;
6
+ export declare const positionType: Record<TooltipFixedPosition, [TooltipPositionType, TooltipPositionType]>;
7
+ export declare const getPositionType: (position: TooltipFixedPosition, dim: 'x' | 'y', defaultCase?: TooltipPositionType) => TooltipPositionType;
10
8
  export declare const getCartesianCrosshairRect: (dimensionData: IDimensionData, layoutStartPoint: ILayoutPoint) => {
11
9
  visible: boolean;
12
10
  start: {
@@ -53,7 +53,9 @@ export interface IRegionSpec extends ILayoutItemSpec {
53
53
  }
54
54
  export interface IGeoRegionSpec extends IRegionSpec {
55
55
  coordinate?: 'geo';
56
- roam?: boolean;
56
+ roam?: boolean | {
57
+ blank?: boolean;
58
+ };
57
59
  longitudeField?: string;
58
60
  latitudeField?: string;
59
61
  projection?: Partial<Omit<IProjectionSpec, 'name'>>;
@@ -22,6 +22,8 @@ export declare class AreaSeries<T extends IAreaSeriesSpec = IAreaSeriesSpec> ext
22
22
  initMarkStyle(): void;
23
23
  initAreaMarkStyle(): void;
24
24
  initAnimation(): void;
25
+ protected _isAreaVisible(): boolean;
26
+ protected _isLineVisible(): boolean;
25
27
  protected initTooltip(): void;
26
28
  viewDataStatisticsUpdate(d: DataView): void;
27
29
  compile(): void;
@@ -1,6 +1,6 @@
1
1
  import type { IBaseScale } from '@visactor/vscale';
2
2
  import { CartesianSeries } from '../cartesian/cartesian';
3
- import type { IMark, IMarkProgressiveConfig } from '../../mark/interface';
3
+ import type { IMark } from '../../mark/interface';
4
4
  import { MarkTypeEnum } from '../../mark/interface/type';
5
5
  import type { Datum, DirectionType } from '../../typings';
6
6
  import type { IBarSeriesSpec } from './interface';
@@ -27,7 +27,7 @@ export declare class BarSeries<T extends IBarSeriesSpec = IBarSeriesSpec> extend
27
27
  protected _barBackgroundMark: IRectMark;
28
28
  protected _barBackgroundViewData: SeriesData;
29
29
  initMark(): void;
30
- protected _initBarBackgroundMark(progressive?: IMarkProgressiveConfig): void;
30
+ protected _initBarBackgroundMark(): void;
31
31
  initMarkStyle(): void;
32
32
  initLabelMarkStyle(textMark: ITextMark): void;
33
33
  protected initTooltip(): void;
@@ -40,8 +40,8 @@ export declare class BarSeries<T extends IBarSeriesSpec = IBarSeriesSpec> extend
40
40
  protected _dataToPosX1(datum: Datum): number;
41
41
  protected _dataToPosY(datum: Datum): number;
42
42
  protected _dataToPosY1(datum: Datum): number;
43
- protected _getBarXStart: (datum: Datum, scale: IBaseScale) => any;
44
- protected _getBarXEnd: (datum: Datum, scale: IBaseScale) => any;
43
+ protected _getBarXStart: (datum: Datum, scale: IBaseScale, useWholeRange?: boolean) => any;
44
+ protected _getBarXEnd: (datum: Datum, scale: IBaseScale, useWholeRange?: boolean) => any;
45
45
  protected _getBarYStart: (datum: Datum, scale: IBaseScale) => any;
46
46
  protected _getBarYEnd: (datum: Datum, scale: IBaseScale) => any;
47
47
  initBandRectMarkStyle(): void;
@@ -7,7 +7,11 @@ import type { ILabelSpec, IMultiLabelSpec } from '../../component/label';
7
7
  import type { IDataSamping, IMarkProgressiveConfig } from '../../mark/interface';
8
8
  import type { SeriesMarkNameEnum } from '../interface/type';
9
9
  import type { Functional } from '@visactor/vrender-components';
10
+ import type { IRectGraphicAttribute } from '@visactor/vrender-core';
11
+ import type { Datum } from '../../typings';
12
+ import type { ISeriesMarkAttributeContext } from '../../compile/mark';
10
13
  type BarMarks = 'bar';
14
+ export type IStackCornerRadiusCallback = (attr: IRectGraphicAttribute, datum: Datum, ctx: ISeriesMarkAttributeContext) => number | number[];
11
15
  export interface IBarSeriesSpec extends ICartesianSeriesSpec, IAnimationSpec<BarMarks, BarAppearPreset>, IMarkProgressiveConfig, IDataSamping {
12
16
  type: 'bar';
13
17
  xField?: string | string[];
@@ -22,7 +26,7 @@ export interface IBarSeriesSpec extends ICartesianSeriesSpec, IAnimationSpec<Bar
22
26
  barMaxWidth?: number | string;
23
27
  barGapInGroup?: number | string | (number | string)[];
24
28
  barMinHeight?: number;
25
- stackCornerRadius?: number | number[];
29
+ stackCornerRadius?: number | number[] | IStackCornerRadiusCallback;
26
30
  }
27
31
  export interface IBarBackgroundSpec {
28
32
  fieldLevel?: number;
@@ -1,11 +1,11 @@
1
1
  import { DataView } from '@visactor/vdataset';
2
2
  import type { DataSet, ITransformOptions } from '@visactor/vdataset';
3
3
  import type { IRegion } from '../../region/interface';
4
- import type { IMark } from '../../mark/interface';
5
- import type { CoordinateType, IInvalidType, IPoint, DataKeyType, Datum, Maybe, ISeriesSpec, IGroup, ILayoutType, ILayoutPoint, ILayoutRect } from '../../typings';
4
+ import type { ICompileMarkConfig, IMark } from '../../mark/interface';
5
+ import type { CoordinateType, IInvalidType, IPoint, DataKeyType, Datum, Maybe, ISeriesSpec, IExtensionMarkSpec, IExtensionGroupMarkSpec, EnableMarkType, IGroup, ILayoutType, ILayoutPoint, ILayoutRect } from '../../typings';
6
6
  import { BaseModel } from '../../model/base-model';
7
7
  import type { ISeriesOption, ISeries, ISeriesMarkInitOption, ISeriesStackData, ISeriesTooltipHelper, SeriesMarkMap, ISeriesMarkInfo, ISeriesSpecInfo, ISeriesStackDataLeaf, ISeriesStackDataMeta, ISeriesSeriesInfo } from '../interface';
8
- import type { IModelEvaluateOption, IModelRenderOption } from '../../model/interface';
8
+ import type { IModelEvaluateOption, IModelRenderOption, IUpdateSpecResult } from '../../model/interface';
9
9
  import type { AddVChartPropertyContext } from '../../data/transforms/add-property';
10
10
  import type { IBaseInteractionSpec } from '../../interaction/interface';
11
11
  import type { StatisticOperations } from '../../data/transforms/dimension-statistics';
@@ -15,6 +15,7 @@ import type { ISeriesMarkAttributeContext } from '../../compile/mark';
15
15
  import { STATE_VALUE_ENUM } from '../../compile/mark';
16
16
  import { BaseSeriesSpecTransformer } from './base-series-transformer';
17
17
  import type { EventType } from '@visactor/vgrammar-core';
18
+ import type { ILabelSpec } from '../../component/label/interface';
18
19
  export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseModel<T> implements ISeries {
19
20
  readonly specKey: string;
20
21
  readonly type: string;
@@ -169,9 +170,9 @@ export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseMode
169
170
  protected initEvent(): void;
170
171
  protected _releaseEvent(): void;
171
172
  protected initTooltip(): void;
172
- _compareSpec(spec: T, prevSpec: T, ignoreCheckKeys?: {
173
- [key: string]: true;
174
- }): {
173
+ _compareExtensionMarksSpec(newMarks: (IExtensionMarkSpec<Exclude<EnableMarkType, 'group'>> | IExtensionGroupMarkSpec)[], prevMarks: (IExtensionMarkSpec<Exclude<EnableMarkType, 'group'>> | IExtensionGroupMarkSpec)[], compareResult: IUpdateSpecResult): void;
174
+ _compareLabelSpec(newLabels: ILabelSpec[], prevLabels: ILabelSpec[], compareResult: IUpdateSpecResult): void;
175
+ _compareSpec(spec: T, prevSpec: T, ignoreCheckKeys?: Record<string, boolean>): {
175
176
  change: boolean;
176
177
  reMake: boolean;
177
178
  reRender: boolean;
@@ -201,7 +202,7 @@ export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseMode
201
202
  getMeasureField(): string[];
202
203
  protected onMarkPositionUpdate(): void;
203
204
  protected onMarkTreePositionUpdate(marks: IMark[]): void;
204
- protected _createMark<M extends IMark>(markInfo: ISeriesMarkInfo, option?: ISeriesMarkInitOption): NonNullable<M>;
205
+ protected _createMark<M extends IMark>(markInfo: ISeriesMarkInfo, option?: ISeriesMarkInitOption, config?: ICompileMarkConfig): NonNullable<M>;
205
206
  protected _getDataIdKey(): string | ((datum: Datum) => string);
206
207
  protected _getSeriesDataKey(datum: Datum): string;
207
208
  addViewDataFilter(option: ITransformOptions): void;
@@ -1,17 +1,25 @@
1
- import type { TooltipHandlerParams } from '../../component/tooltip/interface';
2
- import type { ITooltipPattern, ShapeType, TooltipActiveType } from '../../typings';
1
+ import type { ISeriesTooltipSpec, ITooltipSpec, TooltipHandlerParams } from '../../component/tooltip/interface';
2
+ import type { ITooltipActual, ITooltipLineActual, ITooltipLinePattern, ITooltipPattern, MaybeArray, ShapeType, TooltipActiveType, TooltipContentProperty, TooltipData, TooltipPatternProperty } from '../../typings';
3
3
  import type { ISeries, ISeriesTooltipHelper } from '../interface';
4
- import { BaseTooltipHelper } from '../../model/tooltip-helper';
5
- import type { IDimensionInfo } from '../../event/events/dimension/interface';
6
4
  import type { Datum } from '@visactor/vgrammar-core';
5
+ import type { IMark } from '../../mark/interface/common';
7
6
  interface ISeriesCacheInfo {
8
7
  seriesFields: string[];
9
8
  dimensionFields: string[];
10
9
  measureFields: string[];
11
10
  type: string;
12
11
  }
13
- export declare class BaseSeriesTooltipHelper extends BaseTooltipHelper implements ISeriesTooltipHelper {
12
+ export declare class BaseSeriesTooltipHelper implements ISeriesTooltipHelper {
14
13
  series: ISeries;
14
+ spec: ISeriesTooltipSpec | undefined;
15
+ activeType: TooltipActiveType[];
16
+ activeTriggerSet: {
17
+ mark: Set<IMark>;
18
+ group: Set<IMark>;
19
+ };
20
+ ignoreTriggerSet: {
21
+ mark: Set<IMark>;
22
+ };
15
23
  protected _seriesCacheInfo: ISeriesCacheInfo;
16
24
  constructor(series: ISeries);
17
25
  updateTooltipSpec(): void;
@@ -28,6 +36,22 @@ export declare class BaseSeriesTooltipHelper extends BaseTooltipHelper implement
28
36
  dimensionTooltipTitleCallback: (datum: Datum, params?: TooltipHandlerParams) => string | undefined;
29
37
  groupTooltipTitleCallback: (datum: Datum, params?: TooltipHandlerParams) => string | undefined;
30
38
  groupTooltipKeyCallback: (datum: Datum, params?: TooltipHandlerParams) => string | undefined;
31
- getDefaultTooltipPattern(activeType: TooltipActiveType, dimensionInfo?: IDimensionInfo[]): ITooltipPattern | null;
39
+ getHasShape: (isContent: boolean) => boolean;
40
+ protected getShapeAttrs(activeType: TooltipActiveType, isContent: boolean, chartTooltipSpec?: ITooltipSpec): {
41
+ shapeType: TooltipContentProperty<string>;
42
+ shapeFill: TooltipContentProperty<string>;
43
+ shapeStroke: TooltipContentProperty<string>;
44
+ shapeHollow: TooltipContentProperty<boolean>;
45
+ shapeLineWidth: TooltipContentProperty<number>;
46
+ shapeSize: any;
47
+ hasShape: boolean;
48
+ };
49
+ protected enableByType(activeType: TooltipActiveType): boolean;
50
+ protected getDefaultContentList(activeType: TooltipActiveType): MaybeArray<TooltipPatternProperty<MaybeArray<ITooltipLinePattern>>>;
51
+ protected getContentList(activeType: TooltipActiveType, spec: ITooltipPattern, shapeAttrs: Record<string, TooltipContentProperty<any>>, data?: TooltipData, datum?: Datum[], params?: TooltipHandlerParams): ITooltipLineActual[];
52
+ protected getTitleResult(activeType: TooltipActiveType, titleSpec: TooltipPatternProperty<ITooltipLinePattern>, shapeAttrs: Record<string, TooltipContentProperty<any>>, data?: TooltipData, params?: TooltipHandlerParams): ITooltipLineActual;
53
+ getTooltipData(activeType: TooltipActiveType, chartTooltipSpec?: ITooltipSpec, data?: TooltipData, datum?: Datum[], params?: TooltipHandlerParams): ITooltipActual | null;
54
+ protected getDefaultTitlePattern(activeType: TooltipActiveType): ITooltipLinePattern;
55
+ protected getDefaultContentPattern(activeType: TooltipActiveType): ITooltipLinePattern;
32
56
  }
33
57
  export {};
@@ -45,6 +45,7 @@ export declare class BoxPlotSeries<T extends IBoxPlotSeriesSpec = IBoxPlotSeries
45
45
  initMarkStyle(): void;
46
46
  initBoxPlotMarkStyle(): void;
47
47
  initData(): void;
48
+ compileData(): void;
48
49
  init(option: IModelInitOption): void;
49
50
  private _getMarkWidth;
50
51
  onLayoutEnd(ctx: any): void;
@@ -1,9 +1,9 @@
1
1
  import type { ISeriesTooltipHelper } from '../interface';
2
2
  import { BaseSeriesTooltipHelper } from '../base/tooltip-helper';
3
- import type { Datum, ITooltipPattern, TooltipActiveType } from '../../typings';
3
+ import type { Datum, ITooltipLinePattern, TooltipActiveType } from '../../typings';
4
4
  import { BOX_PLOT_TOOLTIP_KEYS } from '../../constant/box-plot';
5
5
  export declare class BoxPlotSeriesTooltipHelper extends BaseSeriesTooltipHelper implements ISeriesTooltipHelper {
6
- getDefaultTooltipPattern(activeType: TooltipActiveType): ITooltipPattern | null;
6
+ protected getDefaultContentList(activeType: TooltipActiveType): ITooltipLinePattern[];
7
7
  getContentKey: (contentType: BOX_PLOT_TOOLTIP_KEYS) => (datum: any) => string;
8
8
  getContentValue: (contentType: BOX_PLOT_TOOLTIP_KEYS) => (datum: any) => any;
9
9
  shapeColorCallback: (datum: Datum) => any;
@@ -31,7 +31,7 @@ export declare abstract class CartesianSeries<T extends ICartesianSeriesSpec = I
31
31
  protected _specXField: string[];
32
32
  protected _specYField: string[];
33
33
  protected _direction: DirectionType;
34
- get direction(): "vertical" | "horizontal";
34
+ get direction(): "horizontal" | "vertical";
35
35
  protected _scaleX: IBaseScale;
36
36
  get scaleX(): IBaseScale;
37
37
  setScaleX(s: IBaseScale): void;
@@ -36,6 +36,7 @@ export declare class CorrelationSeries<T extends ICorrelationSeriesSpec = ICorre
36
36
  protected _viewDataTransform: SeriesData;
37
37
  setAttrFromSpec(): void;
38
38
  protected initData(): void;
39
+ compileData(): void;
39
40
  protected _statisticViewData(): void;
40
41
  initMark(): void;
41
42
  initMarkStyle(): void;
@@ -29,7 +29,6 @@ export declare class DotSeries<T extends IDotSeriesSpec = IDotSeriesSpec> extend
29
29
  protected _gridBackground?: IFillMarkSpec;
30
30
  setGridBackground(gridBackground: IFillMarkSpec): void;
31
31
  initData(): void;
32
- setSeriesField(field: string): void;
33
32
  getStatisticFields(): {
34
33
  key: string;
35
34
  operations: Array<'max' | 'min' | 'values'>;
@@ -1,6 +1,12 @@
1
1
  import type { ISeriesTooltipHelper } from '../interface';
2
2
  import { BaseSeriesTooltipHelper } from '../base/tooltip-helper';
3
- import type { ITooltipPattern, TooltipActiveType } from '../../typings';
3
+ import type { Datum, ITooltipActual, ITooltipLinePattern, MaybeArray, TooltipActiveType, TooltipData, TooltipPatternProperty } from '../../typings';
4
+ import type { ITooltipSpec } from '../../component/tooltip/interface/spec';
5
+ import type { TooltipHandlerParams } from '../../component/tooltip/interface/common';
4
6
  export declare class DotSeriesTooltipHelper extends BaseSeriesTooltipHelper implements ISeriesTooltipHelper {
5
- getDefaultTooltipPattern(activeType: TooltipActiveType): ITooltipPattern | null;
7
+ protected enableByType(activeType: TooltipActiveType): boolean;
8
+ protected getDefaultTitlePattern(activeType: TooltipActiveType): ITooltipLinePattern;
9
+ shapeTypeCallback: () => string;
10
+ protected getDefaultContentList(): MaybeArray<TooltipPatternProperty<MaybeArray<ITooltipLinePattern>>>;
11
+ getTooltipData(activeType: TooltipActiveType, chartTooltipSpec?: ITooltipSpec, data?: TooltipData, datum?: Datum[], params?: TooltipHandlerParams): ITooltipActual | null;
6
12
  }
@@ -40,8 +40,10 @@ export declare class FunnelSeries<T extends IFunnelSeriesSpec = IFunnelSeriesSpe
40
40
  label?: ITextMark;
41
41
  line?: IRuleMark;
42
42
  };
43
+ protected _minLabelLineWidth: number;
43
44
  setAttrFromSpec(): void;
44
45
  initData(): void;
46
+ compileData(): void;
45
47
  getStatisticFields(): {
46
48
  key: string;
47
49
  operations: Array<'max' | 'min' | 'values'>;
@@ -36,7 +36,9 @@ export interface IFunnelOuterLabelSpec extends IMarkSpec<IComposedTextMarkSpec>
36
36
  spaceWidth?: number;
37
37
  alignLabel?: boolean;
38
38
  style?: ITextMarkSpec;
39
- line?: IMarkSpec<IRuleMarkSpec>;
39
+ line?: {
40
+ minLength?: number;
41
+ } & IMarkSpec<IRuleMarkSpec>;
40
42
  }
41
43
  export interface IFunnelSeriesTheme {
42
44
  [SeriesMarkNameEnum.funnel]?: Partial<IMarkTheme<IPolygonMarkSpec>>;
@@ -15,7 +15,7 @@ export interface IGaugePointerSeriesSpec extends IProgressLikeSeriesSpec, IAnima
15
15
  [SeriesMarkNameEnum.pointer]?: IMarkSpec<IPathMarkSpec | IRectMarkSpec> & PointerMarkSpec;
16
16
  }
17
17
  export type PointerMarkSpec = {
18
- type: 'path' | 'rect';
18
+ type?: 'path' | 'rect';
19
19
  width?: number;
20
20
  height?: number;
21
21
  innerPadding?: number;
@@ -0,0 +1,6 @@
1
+ import type { ISeriesTooltipHelper } from '../interface';
2
+ import { BaseSeriesTooltipHelper } from '../base/tooltip-helper';
3
+ import type { TooltipActiveType } from '../../typings';
4
+ export declare class GaugePointerTooltipHelper extends BaseSeriesTooltipHelper implements ISeriesTooltipHelper {
5
+ protected enableByType(activeType: TooltipActiveType): boolean;
6
+ }
@@ -1,6 +1,5 @@
1
- import type { ITooltipPattern, TooltipActiveType } from '../../typings';
1
+ import type { TooltipActiveType } from '../../typings';
2
2
  import { BaseSeriesTooltipHelper } from '../base/tooltip-helper';
3
- import type { IDimensionInfo } from '../../event/events/dimension/interface';
4
3
  export declare class HeatmapSeriesTooltipHelper extends BaseSeriesTooltipHelper {
5
- getDefaultTooltipPattern(activeType: TooltipActiveType, dimensionInfo?: IDimensionInfo[]): ITooltipPattern | null;
4
+ protected enableByType(activeType: TooltipActiveType): boolean;
6
5
  }
@@ -5,12 +5,10 @@ import type { IBaseModelSpecTransformerResult, IModelConstructor, IModelMarkInfo
5
5
  import type { IRegion } from '../../region/interface';
6
6
  import type { RenderMode } from '../../typings/spec/common';
7
7
  import type { ISeries } from './series';
8
- import type { IMarkOption, IMarkProgressiveConfig } from '../../mark/interface';
8
+ import type { IMarkOption } from '../../mark/interface';
9
9
  import type { ISeriesSpec, StringOrNumber } from '../../typings';
10
10
  import type { TransformedLabelSpec } from '../../component/label';
11
11
  import type { SeriesMarkNameEnum, SeriesTypeEnum } from './type';
12
- import type { ICustomPath2D } from '@visactor/vrender-core';
13
- import type { MarkClip } from '../../compile/mark';
14
12
  export interface ISeriesSeriesInfo {
15
13
  key: string;
16
14
  originalKey: any;
@@ -63,17 +61,11 @@ export interface ISeriesMarkInitOption extends Partial<IMarkOption> {
63
61
  depend?: IGrammarItem | IGrammarItem[];
64
62
  key?: string | ((datum: any) => string);
65
63
  groupKey?: string;
66
- morph?: boolean;
67
- defaultMorphElementKey?: string;
68
64
  dataView?: DataView | false;
69
65
  dataProductId?: string;
70
66
  seriesId?: number;
71
- progressive?: IMarkProgressiveConfig;
72
- support3d?: boolean;
73
- customShape?: (datum: any[], attrs: any, path: ICustomPath2D) => ICustomPath2D;
74
67
  stateSort?: (stateA: string, stateB: string) => number;
75
68
  componentType?: string;
76
- clip?: MarkClip;
77
69
  }
78
70
  export interface ISeriesMarkInfo extends IModelMarkInfo {
79
71
  name: SeriesMarkNameEnum | string;
@@ -1,10 +1,11 @@
1
- import type { ITooltipPattern, ShapeType, TooltipActiveType, TooltipContentCallback } from '../../typings';
1
+ import type { Datum, ITooltipActual, ShapeType, TooltipActiveType, TooltipContentCallback, TooltipData } from '../../typings';
2
2
  import type { ISeries } from './series';
3
- import type { ITooltipHelper } from '../../model/tooltip-helper';
4
- import type { IDimensionInfo } from '../../event/events/dimension/interface';
3
+ import type { ITooltipHelper } from '../../model/interface';
4
+ import type { ITooltipSpec } from '../../component/tooltip/interface/spec';
5
+ import type { TooltipHandlerParams } from '../../component/tooltip/interface/common';
5
6
  export interface ISeriesTooltipHelper extends ITooltipHelper {
6
7
  series: ISeries;
7
- getDefaultTooltipPattern: (activeType: TooltipActiveType, dimensionInfo?: IDimensionInfo[]) => ITooltipPattern | null;
8
+ getTooltipData: (activeType: TooltipActiveType, chartTooltipSpec?: ITooltipSpec, allData?: TooltipData, datum?: Datum[], params?: TooltipHandlerParams) => ITooltipActual | null;
8
9
  markTooltipKeyCallback: TooltipContentCallback<string>;
9
10
  markTooltipValueCallback: TooltipContentCallback<string>;
10
11
  shapeTypeCallback: TooltipContentCallback<ShapeType>;
@@ -1,6 +1,9 @@
1
1
  import type { ISeriesTooltipHelper } from '../interface';
2
2
  import { BaseSeriesTooltipHelper } from '../base/tooltip-helper';
3
- import type { ITooltipPattern, TooltipActiveType } from '../../typings';
3
+ import type { ITooltipLinePattern, TooltipActiveType } from '../../typings';
4
4
  export declare class LinkSeriesTooltipHelper extends BaseSeriesTooltipHelper implements ISeriesTooltipHelper {
5
- getDefaultTooltipPattern(activeType: TooltipActiveType): ITooltipPattern | null;
5
+ protected enableByType(activeType: TooltipActiveType): boolean;
6
+ protected getDefaultTitlePattern(activeType: TooltipActiveType): ITooltipLinePattern;
7
+ shapeTypeCallback: () => string;
8
+ protected getDefaultContentList(): ITooltipLinePattern[];
6
9
  }
@@ -1,9 +1,8 @@
1
1
  import type { ISeriesTooltipHelper } from '../interface';
2
2
  import { BaseSeriesTooltipHelper } from '../base/tooltip-helper';
3
- import type { Datum, ITooltipPattern, TooltipActiveType } from '../../typings';
3
+ import type { Datum } from '../../typings';
4
4
  export declare class LiquidSeriesTooltipHelper extends BaseSeriesTooltipHelper implements ISeriesTooltipHelper {
5
- getDefaultTooltipPattern(activeType: TooltipActiveType): ITooltipPattern | null;
6
- getContentKey: () => (datum: any) => string;
7
- getContentValue: () => (datum: any) => any;
8
- getLiquidFillColor: (datum: Datum) => any;
5
+ markTooltipKeyCallback: (datum: any) => string;
6
+ markTooltipValueCallback: (datum: any) => any;
7
+ shapeStrokeCallback: (datum: Datum) => any;
9
8
  }
@@ -30,6 +30,7 @@ export declare class MapSeries<T extends IMapSeriesSpec = IMapSeriesSpec> extend
30
30
  private _labelMark;
31
31
  setAttrFromSpec(): void;
32
32
  initData(): void;
33
+ compileData(): void;
33
34
  initMark(): void;
34
35
  initMarkStyle(): void;
35
36
  initLabelMarkStyle(labelMark: ILabelMark): void;
@@ -1,6 +1,6 @@
1
1
  import type { ISeriesOption } from '../interface/common';
2
2
  import type { ISeries } from '../interface/series';
3
- import type { IMark, IMarkProgressiveConfig } from '../../mark/interface';
3
+ import type { ICompileMarkConfig, IMark, IMarkProgressiveConfig } from '../../mark/interface';
4
4
  import type { ILineMark } from '../../mark/line';
5
5
  import type { ISymbolMark } from '../../mark/symbol';
6
6
  import type { ITextMark } from '../../mark/text';
@@ -39,7 +39,7 @@ export interface LineLikeSeriesMixin extends ISeries {
39
39
  _fieldX?: string[];
40
40
  _fieldY?: string[];
41
41
  _fieldZ?: string[];
42
- _createMark: (markInfo: ISeriesMarkInfo, option?: ISeriesMarkInitOption) => IMark;
42
+ _createMark: (markInfo: ISeriesMarkInfo, option?: ISeriesMarkInitOption, config?: ICompileMarkConfig) => IMark;
43
43
  _getInvalidDefined: () => boolean;
44
44
  _getInvalidConnectType: () => IInvalidType;
45
45
  getLayoutRect: () => ILayoutRect;
@@ -6,7 +6,7 @@ import type { IPolarSeriesSpec, IPolarSeriesTheme } from '../polar/interface';
6
6
  import type { PieAppearPreset } from './animation/animation';
7
7
  import type { ILabelSpec, IMultiLabelSpec } from '../../component/label';
8
8
  import type { ICustomPath2D, ILineGraphicAttribute, ITextGraphicAttribute } from '@visactor/vrender-core';
9
- import type { ILayoutRect } from '../../typings/layout';
9
+ import type { ILayoutRect, IPercent } from '../../typings/layout';
10
10
  import type { IPointLike } from '@visactor/vutils';
11
11
  export type PieMarks = 'pie' | 'label' | 'labelLine';
12
12
  export type IBasePieSeriesSpec = Omit<IPieSeriesSpec, 'type'> & {
@@ -16,8 +16,8 @@ export interface IPieSeriesSpec extends IPolarSeriesSpec, IAnimationSpec<PieMark
16
16
  type: 'pie';
17
17
  categoryField: string;
18
18
  valueField: string;
19
- centerX?: number;
20
- centerY?: number;
19
+ centerX?: number | IPercent;
20
+ centerY?: number | IPercent;
21
21
  centerOffset?: number;
22
22
  radius?: number;
23
23
  outerRadius?: number;
@@ -34,6 +34,7 @@ export declare class BasePieSeries<T extends IBasePieSeriesSpec> extends PolarSe
34
34
  protected _buildMarkAttributeContext(): void;
35
35
  setAttrFromSpec(): void;
36
36
  initData(): void;
37
+ compileData(): void;
37
38
  initMark(): void;
38
39
  private startAngleScale;
39
40
  private endAngleScale;
@@ -1,6 +1,6 @@
1
1
  import type { EasingType } from '@visactor/vrender-core';
2
+ import type { IPointLike } from '@visactor/vutils';
2
3
  import { ACustomAnimate, TagPointsUpdate } from '@visactor/vrender-core';
3
- import type { IPolarAxisHelper } from '../../component/axis';
4
4
  export declare class PolarPointUpdate extends ACustomAnimate<{
5
5
  x: number;
6
6
  y: number;
@@ -10,18 +10,17 @@ export declare class PolarPointUpdate extends ACustomAnimate<{
10
10
  private _fromRadius;
11
11
  private _toAngle;
12
12
  private _toRadius;
13
- private _pointToCoord;
14
- private _coordToPoint;
13
+ private _center;
14
+ private _prevCenter;
15
15
  constructor(from: {
16
16
  x: number;
17
17
  y: number;
18
+ center: IPointLike;
18
19
  }, to: {
19
20
  x: number;
20
21
  y: number;
21
- }, duration: number, easing: EasingType, params: {
22
- pointToCoord: IPolarAxisHelper['pointToCoord'];
23
- coordToPoint: IPolarAxisHelper['coordToPoint'];
24
- });
22
+ center: IPointLike;
23
+ }, duration: number, easing: EasingType, params: any);
25
24
  getEndProps(): Record<string, any>;
26
25
  onBind(): void;
27
26
  onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
@@ -29,13 +28,12 @@ export declare class PolarPointUpdate extends ACustomAnimate<{
29
28
  export declare class PolarTagPointsUpdate extends TagPointsUpdate {
30
29
  private points;
31
30
  private interpolatePoints;
32
- private _pointToCoord;
33
- private _coordToPoint;
31
+ private _center;
32
+ private _prevCenter;
34
33
  constructor(from: any, to: any, duration: number, easing: EasingType, params?: {
35
34
  newPointAnimateType?: 'grow' | 'appear';
36
- pointToCoord: IPolarAxisHelper['pointToCoord'];
37
- coordToPoint: IPolarAxisHelper['coordToPoint'];
38
35
  });
39
36
  onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
37
+ private _interpolationSinglePoint;
40
38
  private polarPointInterpolation;
41
39
  }
@@ -1,7 +1,6 @@
1
1
  import { BaseSeriesTooltipHelper } from '../../base/tooltip-helper';
2
2
  import type { ISeriesTooltipHelper } from '../../interface';
3
- import type { ITooltipPattern, TooltipActiveType } from '../../../typings';
4
- import type { IDimensionInfo } from '../../../event/events/dimension/interface';
3
+ import type { TooltipActiveType } from '../../../typings';
5
4
  export declare class LinearProgressSeriesTooltipHelper extends BaseSeriesTooltipHelper implements ISeriesTooltipHelper {
6
- getDefaultTooltipPattern(activeType: TooltipActiveType, dimensionInfo?: IDimensionInfo[]): ITooltipPattern | null;
5
+ protected enableByType(activeType: TooltipActiveType): boolean;
7
6
  }
@@ -1,12 +1,9 @@
1
1
  import type { Datum, IAnimationTypeConfig, IElement } from '@visactor/vgrammar-core';
2
2
  import type { IPoint, Maybe } from '../../typings';
3
- import type { IPolarAxisHelper } from '../../component/axis';
4
3
  export interface IRadarAnimationParams {
5
4
  center: () => Maybe<IPoint>;
6
5
  radius: () => number;
7
6
  startAngle: number;
8
- pointToCoord: IPolarAxisHelper['pointToCoord'];
9
- coordToPoint: IPolarAxisHelper['coordToPoint'];
10
7
  }
11
8
  export type RadarAppearPreset = 'grow' | 'fadeIn' | 'clipIn';
12
9
  export declare const radarFadeAnimation: (animationType: 'in' | 'out') => {
@@ -1,7 +1,5 @@
1
1
  import type { ISeriesTooltipHelper } from '../interface';
2
2
  import { BaseSeriesTooltipHelper } from '../base/tooltip-helper';
3
- import type { ITooltipPattern, TooltipActiveType } from '../../typings';
4
- import type { IDimensionInfo } from '../../event/events/dimension/interface';
5
3
  export declare class RangeAreaSeriesTooltipHelper extends BaseSeriesTooltipHelper implements ISeriesTooltipHelper {
6
- getDefaultTooltipPattern(activeType: TooltipActiveType, dimensionInfo?: IDimensionInfo[]): ITooltipPattern | null;
4
+ protected _getMeasureData: (datum: any) => string;
7
5
  }
@@ -1,6 +1,5 @@
1
1
  import type { ISeriesTooltipHelper } from '../interface';
2
2
  import { BaseSeriesTooltipHelper } from '../base/tooltip-helper';
3
- import type { ITooltipPattern, TooltipActiveType } from '../../typings';
4
3
  export declare class RangeColumnSeriesTooltipHelper extends BaseSeriesTooltipHelper implements ISeriesTooltipHelper {
5
- getDefaultTooltipPattern(activeType: TooltipActiveType): ITooltipPattern | null;
4
+ protected _getMeasureData: (datum: any) => string;
6
5
  }
@@ -18,6 +18,7 @@ export interface ISankeySeriesSpec extends Omit<ISeriesSpec, 'data'>, IAnimation
18
18
  targetField?: string;
19
19
  direction?: DirectionType;
20
20
  nodeAlign?: 'left' | 'right' | 'center' | 'justify' | 'start' | 'end';
21
+ crossNodeAlign?: 'start' | 'end' | 'middle';
21
22
  inverse?: boolean;
22
23
  nodeGap?: number;
23
24
  nodeWidth?: string | number | ((node: SankeyNodeElement) => number);