@visactor/vchart-types 1.13.1 → 1.13.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 (171) hide show
  1. package/package.json +1 -1
  2. package/tsconfig.tsbuildinfo +1 -1
  3. package/types/animation/utils.d.ts +2 -2
  4. package/types/chart/base/base-chart.d.ts +1 -2
  5. package/types/chart/common/interface.d.ts +5 -4
  6. package/types/chart/gauge/interface.d.ts +2 -2
  7. package/types/chart/interface/common.d.ts +2 -2
  8. package/types/chart/polar/interface.d.ts +1 -1
  9. package/types/chart/sequence/interface.d.ts +2 -1
  10. package/types/compile/compilable-base.d.ts +2 -3
  11. package/types/compile/compiler.d.ts +8 -8
  12. package/types/compile/interface/compilable-item.d.ts +63 -5
  13. package/types/compile/interface/compiler.d.ts +4 -20
  14. package/types/compile/mark/compilable-mark.d.ts +4 -5
  15. package/types/compile/mark/interface.d.ts +19 -7
  16. package/types/compile/mark/mark-data.d.ts +2 -2
  17. package/types/compile/mark/mark-state-manager.d.ts +2 -2
  18. package/types/component/axis/base-axis.d.ts +1 -1
  19. package/types/component/axis/interface/common.d.ts +2 -2
  20. package/types/component/axis/polar/interface/common.d.ts +1 -1
  21. package/types/component/crosshair/interface/cartesian.d.ts +1 -1
  22. package/types/component/crosshair/interface/common.d.ts +1 -1
  23. package/types/component/crosshair/interface/polar.d.ts +1 -1
  24. package/types/component/crosshair/interface/theme.d.ts +1 -1
  25. package/types/component/data-zoom/data-zoom/interface.d.ts +1 -2
  26. package/types/component/data-zoom/scroll-bar/interface.d.ts +1 -2
  27. package/types/component/interface/theme.d.ts +13 -9
  28. package/types/component/label/interface.d.ts +14 -2
  29. package/types/component/label/label.d.ts +2 -15
  30. package/types/component/label/util.d.ts +1 -2
  31. package/types/component/legend/interface.d.ts +5 -2
  32. package/types/component/legend/util.d.ts +2 -2
  33. package/types/component/marker/base-marker.d.ts +1 -1
  34. package/types/component/marker/interface.d.ts +3 -4
  35. package/types/component/marker/mark-line/interface/spec.d.ts +1 -1
  36. package/types/component/marker/mark-point/interface/theme.d.ts +1 -1
  37. package/types/component/player/interface/theme.d.ts +1 -2
  38. package/types/component/poptip/interface.d.ts +1 -1
  39. package/types/component/title/interface/theme.d.ts +1 -1
  40. package/types/component/tooltip/interface/theme.d.ts +1 -1
  41. package/types/core/factory.d.ts +1 -1
  42. package/types/core/interface.d.ts +6 -7
  43. package/types/core/vchart.d.ts +3 -3
  44. package/types/data/transforms/aggregation.d.ts +2 -29
  45. package/types/data/transforms/dimension-statistics.d.ts +1 -13
  46. package/types/data/transforms/hierarchy-dimension-statistics.d.ts +1 -1
  47. package/types/data/transforms/interface.d.ts +47 -0
  48. package/types/data/transforms/regression.d.ts +1 -4
  49. package/types/event/events/dimension/interface.d.ts +1 -1
  50. package/types/event/interface.d.ts +1 -2
  51. package/types/interaction/interface.d.ts +1 -5
  52. package/types/mark/arc-3d.d.ts +1 -2
  53. package/types/mark/arc.d.ts +1 -2
  54. package/types/mark/area.d.ts +1 -2
  55. package/types/mark/box-plot.d.ts +1 -2
  56. package/types/mark/cell.d.ts +1 -2
  57. package/types/mark/component.d.ts +1 -2
  58. package/types/mark/group.d.ts +1 -9
  59. package/types/mark/image.d.ts +1 -2
  60. package/types/mark/interface/common.d.ts +1 -1
  61. package/types/mark/interface/index.d.ts +1 -0
  62. package/types/mark/interface/mark.d.ts +44 -0
  63. package/types/mark/label.d.ts +2 -11
  64. package/types/mark/line.d.ts +1 -2
  65. package/types/mark/link-path.d.ts +1 -2
  66. package/types/mark/path.d.ts +1 -2
  67. package/types/mark/polygon/polygon.d.ts +1 -2
  68. package/types/mark/polygon/pyramid-3d.d.ts +1 -2
  69. package/types/mark/rect-3d.d.ts +1 -2
  70. package/types/mark/rect.d.ts +1 -2
  71. package/types/mark/ripple.d.ts +1 -2
  72. package/types/mark/rule.d.ts +1 -2
  73. package/types/mark/symbol.d.ts +1 -2
  74. package/types/mark/text.d.ts +2 -8
  75. package/types/model/interface.d.ts +5 -5
  76. package/types/plugin/chart/interface.d.ts +1 -2
  77. package/types/plugin/chart/media-query/interface/common.d.ts +2 -2
  78. package/types/plugin/components/tooltip-handler/base.d.ts +3 -3
  79. package/types/region/interface.d.ts +1 -2
  80. package/types/region/region.d.ts +1 -2
  81. package/types/scale/global-scale.d.ts +1 -1
  82. package/types/scale/interface.d.ts +1 -1
  83. package/types/series/area/animation.d.ts +1 -5
  84. package/types/series/area/area.d.ts +1 -2
  85. package/types/series/area/interface.d.ts +7 -4
  86. package/types/series/bar/animation.d.ts +1 -8
  87. package/types/series/bar/bar.d.ts +1 -3
  88. package/types/series/bar/interface.d.ts +10 -4
  89. package/types/series/base/base-series.d.ts +2 -3
  90. package/types/series/box-plot/box-plot.d.ts +1 -1
  91. package/types/series/cartesian/cartesian.d.ts +2 -2
  92. package/types/series/cartesian/interface.d.ts +1 -1
  93. package/types/series/circle-packing/animation.d.ts +1 -2
  94. package/types/series/circle-packing/circle-packing.d.ts +1 -1
  95. package/types/series/circle-packing/interface.d.ts +2 -1
  96. package/types/series/correlation/animation.d.ts +1 -5
  97. package/types/series/correlation/correlation.d.ts +1 -2
  98. package/types/series/correlation/interface.d.ts +7 -4
  99. package/types/series/dot/dot.d.ts +1 -1
  100. package/types/series/funnel/3d/funnel-3d.d.ts +1 -1
  101. package/types/series/funnel/funnel.d.ts +1 -5
  102. package/types/series/funnel/interface.d.ts +1 -1
  103. package/types/series/gauge/gauge.d.ts +2 -0
  104. package/types/series/gauge/interface.d.ts +1 -2
  105. package/types/series/heatmap/animation.d.ts +1 -1
  106. package/types/series/heatmap/heatmap.d.ts +1 -3
  107. package/types/series/heatmap/interface.d.ts +2 -2
  108. package/types/series/index.d.ts +7 -3
  109. package/types/series/interface/common.d.ts +2 -3
  110. package/types/series/interface/series.d.ts +6 -9
  111. package/types/series/interface/theme.d.ts +1 -1
  112. package/types/series/line/animation.d.ts +1 -5
  113. package/types/series/line/interface.d.ts +7 -4
  114. package/types/series/link/link.d.ts +1 -1
  115. package/types/series/liquid/animation.d.ts +1 -11
  116. package/types/series/liquid/interface.d.ts +12 -2
  117. package/types/series/map/interface.d.ts +1 -1
  118. package/types/series/map/map.d.ts +1 -2
  119. package/types/series/mixin/interface.d.ts +14 -0
  120. package/types/series/mixin/line-mixin.d.ts +3 -18
  121. package/types/series/pictogram/pictogram.d.ts +8 -7
  122. package/types/series/pie/3d/pie-3d.d.ts +1 -1
  123. package/types/series/pie/animation/animation.d.ts +1 -5
  124. package/types/series/pie/animation/centerOffset.d.ts +1 -4
  125. package/types/series/pie/interface.d.ts +9 -2
  126. package/types/series/pie/pie.d.ts +1 -4
  127. package/types/series/polar/progress-like/animation.d.ts +1 -4
  128. package/types/series/polar/progress-like/interface.d.ts +4 -0
  129. package/types/series/polar/progress-like/progress-like.d.ts +1 -2
  130. package/types/series/progress/circular/interface.d.ts +1 -2
  131. package/types/series/progress/linear/animation.d.ts +1 -5
  132. package/types/series/progress/linear/interface.d.ts +4 -1
  133. package/types/series/radar/animation.d.ts +2 -8
  134. package/types/series/radar/interface.d.ts +11 -4
  135. package/types/series/range-column/animation.d.ts +1 -5
  136. package/types/series/range-column/interface.d.ts +6 -2
  137. package/types/series/range-column/range-column.d.ts +1 -1
  138. package/types/series/rose/animation.d.ts +1 -5
  139. package/types/series/rose/interface.d.ts +7 -3
  140. package/types/series/rose/rose.d.ts +1 -3
  141. package/types/series/sankey/animation.d.ts +1 -7
  142. package/types/series/sankey/interface.d.ts +7 -2
  143. package/types/series/sankey/sankey.d.ts +2 -3
  144. package/types/series/scatter/animation.d.ts +1 -5
  145. package/types/series/scatter/interface.d.ts +7 -3
  146. package/types/series/scatter/scatter.d.ts +1 -2
  147. package/types/series/sunburst/interface.d.ts +1 -1
  148. package/types/series/sunburst/sunburst.d.ts +1 -1
  149. package/types/series/treemap/animation.d.ts +1 -2
  150. package/types/series/treemap/interface.d.ts +3 -2
  151. package/types/series/treemap/tooltip-helper.d.ts +1 -1
  152. package/types/series/treemap/treemap.d.ts +2 -3
  153. package/types/series/util/label-mark.d.ts +1 -1
  154. package/types/series/util/utils.d.ts +1 -1
  155. package/types/series/venn/animation.d.ts +1 -2
  156. package/types/series/venn/interface.d.ts +3 -2
  157. package/types/series/venn/venn.d.ts +3 -4
  158. package/types/series/waterfall/animation.d.ts +3 -3
  159. package/types/series/waterfall/interface.d.ts +3 -3
  160. package/types/series/waterfall/waterfall.d.ts +2 -4
  161. package/types/series/word-cloud/animation.d.ts +1 -8
  162. package/types/series/word-cloud/base.d.ts +1 -3
  163. package/types/series/word-cloud/interface.d.ts +9 -1
  164. package/types/theme/interface.d.ts +1 -1
  165. package/types/typings/params.d.ts +1 -1
  166. package/types/typings/spec/chart.d.ts +26 -26
  167. package/types/typings/spec/common.d.ts +10 -9
  168. package/types/typings/spec/index.d.ts +1 -1
  169. package/types/typings/spec/media-query.d.ts +3 -2
  170. package/types/typings/visual.d.ts +3 -3
  171. package/types/util/data.d.ts +1 -1
@@ -5,9 +5,8 @@ import type { IComposedTextMarkSpec, IFormatMethod, IRectMarkSpec, IRichTextForm
5
5
  import type { IComponentSpec } from '../base/interface';
6
6
  import type { Datum } from '@visactor/vrender-components';
7
7
  import type { ICartesianSeries, IGeoSeries, IPolarSeries } from '../../series/interface';
8
- import type { IOptionAggr, IOptionAggrField, IOptionSeries, IOptionWithCoordinates } from '../../data/transforms/aggregation';
9
- import type { IOptionRegr } from '../../data/transforms/regression';
10
- import type { VChart } from '../../vchart-all';
8
+ import type { IOptionAggr, IOptionAggrField, IOptionRegr, IOptionSeries, IOptionWithCoordinates } from '../../data/transforms/interface';
9
+ import type { IVChart } from '../../core/interface';
11
10
  export type IMarkerSupportSeries = ICartesianSeries | IPolarSeries | IGeoSeries;
12
11
  export type IPolarPoint = {
13
12
  angle: number;
@@ -114,7 +113,7 @@ export type IMarkProcessOptions = {
114
113
  processData?: DataView;
115
114
  };
116
115
  export type IMarkerAttributeContext = {
117
- vchart: VChart;
116
+ vchart: IVChart;
118
117
  relativeSeries: IMarkerSupportSeries;
119
118
  startRelativeSeries: IMarkerSupportSeries;
120
119
  endRelativeSeries: IMarkerSupportSeries;
@@ -3,7 +3,7 @@ import type { IAggrType, IMarkerPositionsSpec, IDataPointSpec, IMarkerSpec, IDat
3
3
  import type { IRegressType } from '../../mark-area/interface';
4
4
  import type { IMarkLineTheme } from './theme';
5
5
  import type { Datum, ILineMarkSpec, IPoint } from '../../../../typings';
6
- import type { BaseMarkerAnimation, MarkCommonLineAnimationType } from '@visactor/vrender-components/es/marker/type';
6
+ import type { BaseMarkerAnimation, MarkCommonLineAnimationType } from '@visactor/vrender-components';
7
7
  export type IMarkLine = IComponent;
8
8
  export type IMarkLineSpec = (IMarkerSpec & (IMarkLineXSpec | IMarkLineYSpec | IMarkLineXYSpec | IMarkLineXYY1Spec | IMarkLineYXX1Spec | IMarkLineAngleSpec | IMarkLineRadiusSpec | IMarkLineAngRadRad1Spec | IMarkLineRadAngAng1Spec | IMarkLineAngRadSpec | IMarkLineCoordinateSpec | IMarkerPositionsSpec) & IMarkLineTheme & BaseMarkerAnimation<MarkCommonLineAnimationType>) | (IStepMarkLineSpec & BaseMarkerAnimation<MarkCommonLineAnimationType>);
9
9
  export interface IMarkLineXSpec extends IMarkerCrossSeriesSpec {
@@ -2,7 +2,7 @@ import type { IImageGraphicAttribute, IRichTextGraphicAttribute, IGroupGraphicAt
2
2
  import type { IMarkPointItemPosition } from '@visactor/vrender-components';
3
3
  import type { ILineMarkSpec, ISymbolMarkSpec } from '../../../../typings';
4
4
  import type { IMarkerLabelSpec, IMarkerRef, IMarkerState, IMarkerSymbol } from '../../interface';
5
- import type { IRegion } from 'src/region';
5
+ import type { IRegion } from '../../../../region/interface';
6
6
  export type IOffsetCallback = (region: IRegion) => number;
7
7
  export interface IItemContent extends IMarkerRef {
8
8
  type?: 'symbol' | 'text' | 'image' | 'richText';
@@ -1,6 +1,5 @@
1
- import type { ControllerLayout, OrientType } from '@visactor/vrender-components';
1
+ import type { ControllerLayout, OrientType, BaseGraphicAttributes } from '@visactor/vrender-components';
2
2
  import type { ISymbolMarkSpec, IRectMarkSpec } from '../../../typings';
3
- import type { BaseGraphicAttributes } from '@visactor/vrender-components';
4
3
  import type { ILayoutItemSpec } from '../../../layout/interface';
5
4
  export interface IPlayerTheme extends ILayoutItemSpec {
6
5
  visible?: boolean;
@@ -1,6 +1,6 @@
1
1
  import type { PopTipAttributes } from '@visactor/vrender-components';
2
2
  import type { IColorKey } from '../../theme/color-scheme/interface';
3
- import type { ITokenKey } from '../../theme/token';
3
+ import type { ITokenKey } from '../../theme/token/interface';
4
4
  export interface IPoptipTheme extends Omit<PopTipAttributes, 'titleStyle' | 'contentStyle' | 'panel'> {
5
5
  titleStyle?: Partial<Omit<PopTipAttributes['titleStyle'], 'fill' | 'fontSize'>> & {
6
6
  fill?: PopTipAttributes['titleStyle']['fill'] | IColorKey;
@@ -1,6 +1,6 @@
1
1
  import type { ILayoutItemSpec } from '../../../layout/interface';
2
2
  import type { IColorKey } from '../../../theme/color-scheme/interface';
3
- import type { ITokenKey } from '../../../theme/token';
3
+ import type { ITokenKey } from '../../../theme/token/interface';
4
4
  import type { StringOrNumber } from '../../../typings';
5
5
  import type { TextAlign, TextBaseLine } from '../../../typings/visual';
6
6
  export interface ITitleTextTheme {
@@ -1,7 +1,7 @@
1
1
  import type { ITextAttribute } from '@visactor/vrender-core';
2
2
  import type { ILayoutNumber, ITooltipShapePattern, StringOrNumber, TextAlign, TextBaseLine } from '../../../typings';
3
3
  import type { Padding } from '@visactor/vrender-components';
4
- import type { ITokenKey } from '../../../theme/token';
4
+ import type { ITokenKey } from '../../../theme/token/interface';
5
5
  export interface ITooltipTextTheme<ColorType = string> {
6
6
  fontFamily?: string;
7
7
  fontSize?: number | ITokenKey;
@@ -64,5 +64,5 @@ export declare class Factory {
64
64
  static getComponentPlugins(): IComponentPluginConstructor[];
65
65
  static getComponentPluginInType(type: string): IComponentPluginConstructor;
66
66
  static registerFormatter(func: typeof Factory['_formatter']): void;
67
- static getFormatter(): (text: string | number | number[] | string[], datum: any, formatter: string | string[]) => any;
67
+ static getFormatter(): (text: string | number | string[] | number[], datum: any, formatter: string | string[]) => any;
68
68
  }
@@ -1,20 +1,19 @@
1
- import type { DataSet } from '@visactor/vdataset';
2
- import type { IParserOptions } from '@visactor/vdataset';
1
+ import type { DataSet, IParserOptions } from '@visactor/vdataset';
3
2
  import type { Datum, IDataValues, IInitOption, IMarkStateSpec, IPoint, IRegionQuerier, IShowTooltipOption, ISpec, ITooltipHandler, Maybe, MaybeArray, StringOrNumber } from '../typings';
4
3
  import type { IMorphConfig } from '../animation/spec';
5
4
  import type { IBoundsLike } from '@visactor/vutils';
6
5
  import type { EventCallback, EventParams, EventQuery, EventType } from '../event/interface';
7
6
  import type { IMark } from '../mark/interface';
8
7
  import type { ISeries } from '../series/interface/series';
9
- import type { ITheme } from '../theme';
8
+ import type { ITheme } from '../theme/interface';
10
9
  import type { IComponent } from '../component/interface';
11
10
  import type { LayoutCallBack } from '../layout/interface';
12
- import type { Compiler } from '../compile/compiler';
13
11
  import type { DimensionIndexOption, IChart, IChartSpecInfo } from '../chart/interface';
14
- import type { Stage } from '@visactor/vrender-core';
12
+ import type { IStage } from '@visactor/vrender-core';
15
13
  import type { IContainerSize } from '@visactor/vrender-components';
16
14
  import type { IBaseScale } from '@visactor/vscale';
17
15
  import type { IUpdateSpecResult } from '../model/interface';
16
+ import type { ICompiler } from '../compile/interface';
18
17
  export type DataLinkSeries = {
19
18
  seriesId?: StringOrNumber;
20
19
  seriesIndex?: number;
@@ -82,9 +81,9 @@ export interface IVChart {
82
81
  getImageBuffer: () => void;
83
82
  setLayout: (layout: LayoutCallBack) => void;
84
83
  reLayout: () => void;
85
- getCompiler: () => Compiler;
84
+ getCompiler: () => ICompiler;
86
85
  getChart: () => Maybe<IChart>;
87
- getStage: () => Stage;
86
+ getStage: () => IStage;
88
87
  getCanvas: () => HTMLCanvasElement | undefined;
89
88
  getContainer: () => Maybe<HTMLElement>;
90
89
  getComponents: () => IComponent[];
@@ -8,7 +8,7 @@ import type { IComponentConstructor } from '../component/interface';
8
8
  import type { EventCallback, EventParams, EventQuery, EventType } from '../event/interface';
9
9
  import type { IParserOptions, Transform } from '@visactor/vdataset';
10
10
  import { DataSet, DataView } from '@visactor/vdataset';
11
- import type { Stage } from '@visactor/vrender-core';
11
+ import type { IStage } from '@visactor/vrender-core';
12
12
  import type { GeoSourceType } from '../typings/geo';
13
13
  import type { GeoSourceOption } from '../series/map/geo-source';
14
14
  import type { IMark, MarkConstructor } from '../mark/interface';
@@ -172,7 +172,7 @@ export declare class VChart implements IVChart {
172
172
  reLayout(): void;
173
173
  getCompiler(): Compiler;
174
174
  getChart(): IChart;
175
- getStage(): Stage;
175
+ getStage(): IStage;
176
176
  getCanvas(): HTMLCanvasElement | undefined;
177
177
  getContainer(): Maybe<HTMLElement>;
178
178
  getComponents(): import("../component/interface").IComponent[];
@@ -201,7 +201,7 @@ export declare class VChart implements IVChart {
201
201
  }): void;
202
202
  private _initChartPlugin;
203
203
  private _chartPluginApply;
204
- protected _getMode(): (typeof RenderModeEnum)["desktop-browser"] | "desktop-browser" | "mobile-browser" | "node" | "worker" | "miniApp" | "wx" | "tt" | "harmony" | "desktop-miniApp" | "lynx";
204
+ protected _getMode(): "node" | (typeof RenderModeEnum)["desktop-browser"] | "desktop-browser" | "mobile-browser" | "worker" | "miniApp" | "wx" | "tt" | "harmony" | "desktop-miniApp" | "lynx";
205
205
  protected _getChartOption(type: string): IChartOption;
206
206
  }
207
207
  export declare const registerVChartCore: () => void;
@@ -1,33 +1,6 @@
1
1
  import type { DataView } from '@visactor/vdataset';
2
- import type { IAggrType, IDataPointSpec, IMarkerSupportSeries } from '../../component/marker/interface';
3
- import type { CoordinateType, Datum, StringOrNumber } from '../../typings';
4
- export type IOption = {
5
- field: string;
6
- };
7
- export type IOptionAggrField = {
8
- field: string;
9
- aggrType: IAggrType;
10
- };
11
- export type IOptionPos = IOptionAggrField | string | number | StringOrNumber[];
12
- export type IOptionSeries = {
13
- getRelativeSeries: () => IMarkerSupportSeries;
14
- getStartRelativeSeries: () => IMarkerSupportSeries;
15
- getEndRelativeSeries: () => IMarkerSupportSeries;
16
- };
17
- export type IOptionCallback = (relativeSeriesData: any, startRelativeSeriesData: any, endRelativeSeriesData: any, relativeSeries: IMarkerSupportSeries, startRelative: IMarkerSupportSeries, endRelative: IMarkerSupportSeries) => IOptionPos;
18
- export type IOptionAggr = {
19
- x?: IOptionPos | IOptionCallback;
20
- y?: IOptionPos | IOptionCallback;
21
- angle?: IOptionPos | IOptionCallback;
22
- radius?: IOptionPos | IOptionCallback;
23
- areaName?: string | IOptionCallback;
24
- getRefRelativeSeries?: () => IMarkerSupportSeries;
25
- } & IOptionSeries;
26
- export type IOptionWithCoordinates = {
27
- coordinates: ((seriesData: Datum[], relativeSeries: IMarkerSupportSeries) => IDataPointSpec[] | IDataPointSpec) | IDataPointSpec | IDataPointSpec[];
28
- getSeriesByIdOrIndex: (seriesUserId: StringOrNumber, seriesIndex: number) => IMarkerSupportSeries;
29
- coordinateType: CoordinateType;
30
- } & IOptionSeries;
2
+ import type { StringOrNumber } from '../../typings';
3
+ import type { IOption, IOptionAggr, IOptionCallback, IOptionWithCoordinates } from './interface';
31
4
  export declare const markerMin: (_data: Array<DataView>, opt: IOption) => number;
32
5
  export declare const markerMax: (_data: Array<DataView>, opt: IOption) => number;
33
6
  export declare function markerSum(_data: Array<DataView>, opt: IOption): number;
@@ -1,19 +1,7 @@
1
1
  import type { IFieldsMeta } from '../../typings/spec';
2
2
  import type { DataView } from '@visactor/vdataset';
3
3
  import type { Datum } from '../../typings';
4
- export type StatisticOperations = Array<'max' | 'min' | 'values' | 'array-max' | 'array-min' | 'allValid'>;
5
- export interface IStatisticsOption {
6
- fields: {
7
- key: string;
8
- operations: StatisticOperations;
9
- filter?: (fv: any) => boolean;
10
- customize?: {
11
- max: number;
12
- min: number;
13
- } | any[];
14
- }[];
15
- target?: 'parser' | 'latest';
16
- }
4
+ import type { IStatisticsOption, StatisticOperations } from './interface';
17
5
  export declare const dimensionStatistics: (data: Array<DataView>, op: IStatisticsOption) => {};
18
6
  export declare const dimensionStatisticsOfSimpleData: (latestData: Datum[], fields: {
19
7
  key: string;
@@ -1,3 +1,3 @@
1
- import type { IStatisticsOption } from './dimension-statistics';
2
1
  import type { DataView } from '@visactor/vdataset';
2
+ import type { IStatisticsOption } from './interface';
3
3
  export declare const hierarchyDimensionStatistics: (data: Array<DataView>, op: IStatisticsOption) => {};
@@ -0,0 +1,47 @@
1
+ import type { IAggrType, IDataPointSpec, IMarkerSupportSeries } from '../../component/marker/interface';
2
+ import type { Datum, StringOrNumber } from '../../typings/common';
3
+ import type { CoordinateType } from '../../typings/coordinate';
4
+ export type StatisticOperations = Array<'max' | 'min' | 'values' | 'array-max' | 'array-min' | 'allValid'>;
5
+ export interface IStatisticsOption {
6
+ fields: {
7
+ key: string;
8
+ operations: StatisticOperations;
9
+ filter?: (fv: any) => boolean;
10
+ customize?: {
11
+ max: number;
12
+ min: number;
13
+ } | any[];
14
+ }[];
15
+ target?: 'parser' | 'latest';
16
+ }
17
+ export type IOption = {
18
+ field: string;
19
+ };
20
+ export type IOptionAggrField = {
21
+ field: string;
22
+ aggrType: IAggrType;
23
+ };
24
+ export type IOptionPos = IOptionAggrField | string | number | StringOrNumber[];
25
+ export type IOptionSeries = {
26
+ getRelativeSeries: () => IMarkerSupportSeries;
27
+ getStartRelativeSeries: () => IMarkerSupportSeries;
28
+ getEndRelativeSeries: () => IMarkerSupportSeries;
29
+ };
30
+ export type IOptionCallback = (relativeSeriesData: any, startRelativeSeriesData: any, endRelativeSeriesData: any, relativeSeries: IMarkerSupportSeries, startRelative: IMarkerSupportSeries, endRelative: IMarkerSupportSeries) => IOptionPos;
31
+ export type IOptionAggr = {
32
+ x?: IOptionPos | IOptionCallback;
33
+ y?: IOptionPos | IOptionCallback;
34
+ angle?: IOptionPos | IOptionCallback;
35
+ radius?: IOptionPos | IOptionCallback;
36
+ areaName?: string | IOptionCallback;
37
+ getRefRelativeSeries?: () => IMarkerSupportSeries;
38
+ } & IOptionSeries;
39
+ export type IOptionWithCoordinates = {
40
+ coordinates: ((seriesData: Datum[], relativeSeries: IMarkerSupportSeries) => IDataPointSpec[] | IDataPointSpec) | IDataPointSpec | IDataPointSpec[];
41
+ getSeriesByIdOrIndex: (seriesUserId: StringOrNumber, seriesIndex: number) => IMarkerSupportSeries;
42
+ coordinateType: CoordinateType;
43
+ } & IOptionSeries;
44
+ export type IOptionRegr = {
45
+ fieldX: string;
46
+ fieldY: string;
47
+ };
@@ -1,6 +1,3 @@
1
1
  import type { DataView } from '@visactor/vdataset';
2
- export type IOptionRegr = {
3
- fieldX: string;
4
- fieldY: string;
5
- };
2
+ import type { IOptionRegr } from './interface';
6
3
  export declare function markerRegression(_data: Array<DataView>, opt: IOptionRegr): any[];
@@ -1,7 +1,7 @@
1
1
  import type { BaseEventParams } from '../../interface';
2
2
  import type { ISeries } from '../../../series/interface';
3
3
  import type { Datum } from '../../../typings';
4
- import type { IAxis } from '../../../component/axis';
4
+ import type { IAxis } from '../../../component/axis/interface';
5
5
  export declare enum DimensionEventEnum {
6
6
  dimensionHover = "dimensionHover",
7
7
  dimensionClick = "dimensionClick"
@@ -3,7 +3,6 @@ import type { IElement } from '@visactor/vgrammar-core';
3
3
  import type { IChart } from '../chart/interface';
4
4
  import type { IModel } from '../model/interface';
5
5
  import type { IMark, MarkType } from '../mark/interface';
6
- import type { VChart } from '../core/vchart';
7
6
  import type { DimensionEventParams } from './events/dimension/interface';
8
7
  import type { Datum, IPoint, StringOrNumber } from '../typings';
9
8
  import type { ChartEvent, Event_Bubble_Level, Event_Source_Type, VGRAMMAR_HOOK_EVENT } from '../constant/event';
@@ -148,7 +147,7 @@ export type EventParamsDefinition = {
148
147
  [key: string]: ExtendEventParam;
149
148
  };
150
149
  export interface IEventDispatcher {
151
- globalInstance: VChart;
150
+ globalInstance: IVChart;
152
151
  register: <Evt extends EventType>(eType: Evt, handler: EventHandler<EventParamsDefinition[Evt]>) => this;
153
152
  unregister: <Evt extends EventType>(eType: Evt, handler?: EventHandler<EventParamsDefinition[Evt]>) => this;
154
153
  dispatch: <Evt extends EventType>(eType: Evt, params?: EventParamsDefinition[Evt], level?: EventBubbleLevel) => this;
@@ -3,7 +3,7 @@ import type { IMark } from '../mark/interface';
3
3
  import type { RenderMode } from '../typings/spec/common';
4
4
  import type { BaseEventParams, IEventDispatcher, EventType } from '../event/interface';
5
5
  import type { IModel } from '../model/interface';
6
- import type { StateValue } from '../compile/mark';
6
+ import type { StateValue } from '../compile/mark/interface';
7
7
  import type { StringOrNumber } from '../typings/common';
8
8
  export interface IInteraction {
9
9
  registerMark: (state: StateValue, mark: IMark) => void;
@@ -53,10 +53,6 @@ export interface ISelectSpec extends IBaseInteractionSpec {
53
53
  trigger?: Trigger;
54
54
  triggerOff?: Trigger | number;
55
55
  }
56
- export interface ITriggerSpec {
57
- hover?: IHoverSpec | boolean;
58
- select?: ISelectSpec | boolean;
59
- }
60
56
  export type IElementActiveSpec = IBaseInteractionSpec & Pick<ElementActiveSpec, 'type' | 'trigger' | 'triggerOff' | 'state'>;
61
57
  export type IElementSelectSpec = IBaseInteractionSpec & Pick<ElementSelectSpec, 'type' | 'trigger' | 'triggerOff' | 'state' | 'isMultiple' | 'reverseState'>;
62
58
  export type IElementHighlightSpec = IBaseInteractionSpec & Pick<ElementHighlightSpec, 'type' | 'blurState' | 'highlightState' | 'triggerOff' | 'trigger'>;
@@ -1,8 +1,7 @@
1
1
  import type { IArc3dMarkSpec } from '../typings';
2
2
  import { BaseArcMark } from './arc';
3
- import type { IMarkRaw } from './interface';
3
+ import type { IArc3dMark } from './interface';
4
4
  import { MarkTypeEnum } from './interface/type';
5
- export type IArc3dMark = IMarkRaw<IArc3dMarkSpec>;
6
5
  export declare class Arc3dMark extends BaseArcMark<IArc3dMarkSpec> implements IArc3dMark {
7
6
  static readonly type = MarkTypeEnum.arc3d;
8
7
  readonly type: MarkTypeEnum;
@@ -1,8 +1,7 @@
1
1
  import type { IArcMarkSpec, Datum, StateValueType } from '../typings';
2
2
  import { BaseMark } from './base/base-mark';
3
- import type { IMarkOption, IMarkRaw, IMarkStyle } from './interface';
3
+ import type { IArcMark, IMarkOption, IMarkRaw, IMarkStyle } from './interface';
4
4
  import { MarkTypeEnum } from './interface/type';
5
- export type IArcMark = IMarkRaw<IArcMarkSpec>;
6
5
  export declare class BaseArcMark<T extends IArcMarkSpec> extends BaseMark<T> implements IMarkRaw<T> {
7
6
  readonly type: MarkTypeEnum;
8
7
  _unCompileChannel: {
@@ -1,8 +1,7 @@
1
1
  import type { IAreaMarkSpec } from '../typings/visual';
2
2
  import { BaseLineMark } from './base/base-line';
3
- import type { IMarkRaw, IMarkStyle } from './interface';
3
+ import type { IAreaMark, IMarkStyle } from './interface';
4
4
  import { MarkTypeEnum } from './interface/type';
5
- export type IAreaMark = IMarkRaw<IAreaMarkSpec>;
6
5
  export declare class AreaMark extends BaseLineMark<IAreaMarkSpec> implements IAreaMark {
7
6
  static readonly type = MarkTypeEnum.area;
8
7
  readonly type = MarkTypeEnum.area;
@@ -1,9 +1,8 @@
1
1
  import type { IBoxPlotMarkSpec } from '../typings/visual';
2
2
  import { BaseMark } from './base/base-mark';
3
3
  import type { IGroupMark } from '@visactor/vgrammar-core';
4
- import type { IMarkRaw, IMarkStyle } from './interface';
4
+ import type { IBoxPlotMark, IMarkStyle } from './interface';
5
5
  import { MarkTypeEnum } from './interface/type';
6
- export type IBoxPlotMark = IMarkRaw<IBoxPlotMarkSpec>;
7
6
  export declare class BoxPlotMark extends BaseMark<IBoxPlotMarkSpec> implements IBoxPlotMark {
8
7
  static readonly type = MarkTypeEnum.boxPlot;
9
8
  readonly type = MarkTypeEnum.boxPlot;
@@ -1,8 +1,7 @@
1
1
  import type { ICellMarkSpec } from '../typings';
2
- import type { IMarkRaw, IMarkStyle } from './interface';
2
+ import type { ICellMark, IMarkStyle } from './interface';
3
3
  import { MarkTypeEnum } from './interface/type';
4
4
  import { BaseSymbolMark } from './symbol';
5
- export type ICellMark = IMarkRaw<ICellMarkSpec>;
6
5
  export declare class CellMark extends BaseSymbolMark<ICellMarkSpec> implements ICellMark {
7
6
  static readonly type = MarkTypeEnum.cell;
8
7
  readonly type = MarkTypeEnum.cell;
@@ -1,9 +1,8 @@
1
1
  import type { IGroupMark } from '@visactor/vgrammar-core';
2
2
  import type { ICommonSpec } from '../typings';
3
3
  import { BaseMark } from './base/base-mark';
4
- import type { IMarkOption, IMarkRaw } from './interface';
4
+ import type { IComponentMark, IMarkOption } from './interface';
5
5
  import { MarkTypeEnum } from './interface/type';
6
- export type IComponentMark = IMarkRaw<ICommonSpec>;
7
6
  export declare class ComponentMark extends BaseMark<ICommonSpec> implements IComponentMark {
8
7
  static readonly type = MarkTypeEnum.component;
9
8
  type: string;
@@ -1,18 +1,10 @@
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 { IMark, IMarkRaw, IMarkStyle, MarkType } from './interface';
4
+ import type { IGroupMark, IMark, IMarkStyle, MarkType } from './interface';
5
5
  import { MarkTypeEnum } from './interface/type';
6
6
  import type { IGroupMark as IVGrammarGroupMark } from '@visactor/vgrammar-core';
7
7
  import type { IMarkCompileOption } from '../compile/mark';
8
- export interface IGroupMark extends IMarkRaw<IGroupMarkSpec> {
9
- addMark: (m: IMark) => boolean;
10
- removeMark: (m: IMark) => boolean;
11
- getMarks: () => IMark[];
12
- getMarkInType: (type: MarkType) => IMark[];
13
- getMarkInId: (id: number) => IMark | undefined;
14
- getMarkInName: (name: string) => IMark[];
15
- }
16
8
  export declare class GroupMark extends BaseMark<IGroupMarkSpec> implements IGroupMark {
17
9
  static readonly type = MarkTypeEnum.group;
18
10
  readonly type = MarkTypeEnum.group;
@@ -1,8 +1,7 @@
1
1
  import type { IImageMarkSpec } from '../typings/visual';
2
2
  import { BaseMark } from './base/base-mark';
3
- import type { IMarkRaw, IMarkStyle } from './interface';
3
+ import type { IImageMark, IMarkStyle } from './interface';
4
4
  import { MarkTypeEnum } from './interface/type';
5
- export type IImageMark = IMarkRaw<IImageMarkSpec>;
6
5
  export declare class ImageMark extends BaseMark<IImageMarkSpec> implements IImageMark {
7
6
  static readonly type = MarkTypeEnum.image;
8
7
  readonly type = MarkTypeEnum.image;
@@ -3,7 +3,7 @@ import type { ICommonSpec, VisualType, ValueType, FunctionType } from '../../typ
3
3
  import type { IModel } from '../../model/interface';
4
4
  import type { IBaseScale } from '@visactor/vscale';
5
5
  import type { MarkType } from './type';
6
- import type { ICompilableMark, ICompilableMarkOption, IModelMarkAttributeContext, StateValueType } from '../../compile/mark';
6
+ import type { ICompilableMark, ICompilableMarkOption, IModelMarkAttributeContext, StateValueType } from '../../compile/mark/interface';
7
7
  import type { StringOrNumber } from '../../typings';
8
8
  import type { IMarkConfig } from '@visactor/vgrammar-core';
9
9
  import type { ICustomPath2D } from '@visactor/vrender-core';
@@ -1,2 +1,3 @@
1
1
  export * from './common';
2
2
  export * from './type';
3
+ export * from './mark';
@@ -0,0 +1,44 @@
1
+ import type { IMarkSpec } from '../../typings';
2
+ 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
+ import type { IMark, IMarkRaw } from './common';
4
+ import type { MarkType } from './type';
5
+ export type IComponentMark = IMarkRaw<ICommonSpec>;
6
+ export interface ILabelMark extends ITextMark {
7
+ skipEncode: boolean;
8
+ getRule: () => string;
9
+ setRule: (rule: string) => void;
10
+ getTarget: () => IMark;
11
+ setTarget: (target: IMark) => void;
12
+ getComponent: () => IComponentMark;
13
+ setComponent: (component: IComponentMark) => void;
14
+ }
15
+ export type ITextMark = IMarkRaw<IComposedTextMarkSpec> & {
16
+ getTextType: () => 'text' | 'rich';
17
+ };
18
+ export type ITextSpec<T> = IMarkSpec<T> & {
19
+ textType?: 'rich' | 'text';
20
+ };
21
+ export type IArc3dMark = IMarkRaw<IArc3dMarkSpec>;
22
+ export type IPolygonMark = IMarkRaw<IPolygonMarkSpec>;
23
+ export type IPyramid3dMark = IMarkRaw<IPyramid3dMarkSpec>;
24
+ export type IArcMark = IMarkRaw<IArcMarkSpec>;
25
+ export type IAreaMark = IMarkRaw<IAreaMarkSpec>;
26
+ export type IBoxPlotMark = IMarkRaw<IBoxPlotMarkSpec>;
27
+ export type ICellMark = IMarkRaw<ICellMarkSpec>;
28
+ export type IImageMark = IMarkRaw<IImageMarkSpec>;
29
+ export type ILineMark = IMarkRaw<ILineMarkSpec>;
30
+ export type ILinkPathMark = IMarkRaw<ILinkPathMarkSpec>;
31
+ export type IPathMark = IMarkRaw<IPathMarkSpec>;
32
+ export type IRect3dMark = IMarkRaw<IRect3dMarkSpec>;
33
+ export type IRectMark = IMarkRaw<IRectMarkSpec>;
34
+ export type IRippleMark = IMarkRaw<IRippleMarkSpec>;
35
+ export type IRuleMark = IMarkRaw<IRuleMarkSpec>;
36
+ export type ISymbolMark = IMarkRaw<ISymbolMarkSpec>;
37
+ export interface IGroupMark extends IMarkRaw<IGroupMarkSpec> {
38
+ addMark: (m: IMark) => boolean;
39
+ removeMark: (m: IMark) => boolean;
40
+ getMarks: () => IMark[];
41
+ getMarkInType: (type: MarkType) => IMark[];
42
+ getMarkInId: (id: number) => IMark | undefined;
43
+ getMarkInName: (name: string) => IMark[] | undefined;
44
+ }
@@ -1,7 +1,7 @@
1
- import type { IComponentMark } from './component';
2
1
  import type { IMark } from './interface/common';
3
2
  import { MarkTypeEnum } from './interface/type';
4
- import { ITextMark, TextMark } from './text';
3
+ import { TextMark } from './text';
4
+ import type { 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;
@@ -16,13 +16,4 @@ export declare class LabelMark extends TextMark implements ILabelMark {
16
16
  getComponent(): IMark;
17
17
  setComponent(component: IMark): void;
18
18
  }
19
- export interface ILabelMark extends ITextMark {
20
- skipEncode: boolean;
21
- getRule: () => string;
22
- setRule: (rule: string) => void;
23
- getTarget: () => IMark;
24
- setTarget: (target: IMark) => void;
25
- getComponent: () => IComponentMark;
26
- setComponent: (component: IComponentMark) => void;
27
- }
28
19
  export declare const registerLabelMark: () => void;
@@ -1,8 +1,7 @@
1
1
  import type { ILineMarkSpec } from '../typings/visual';
2
2
  import { BaseLineMark } from './base/base-line';
3
- import type { IMarkRaw, IMarkStyle } from './interface';
3
+ import type { ILineMark, IMarkStyle } from './interface';
4
4
  import { MarkTypeEnum } from './interface/type';
5
- export type ILineMark = IMarkRaw<ILineMarkSpec>;
6
5
  export declare class LineMark extends BaseLineMark<ILineMarkSpec> implements ILineMark {
7
6
  static readonly type = MarkTypeEnum.line;
8
7
  readonly type = MarkTypeEnum.line;
@@ -1,9 +1,8 @@
1
1
  import { BaseMark } from './base/base-mark';
2
2
  import type { ILinkPathMarkSpec } from '../typings/visual';
3
- import type { IMarkRaw, IMarkStyle } from './interface';
3
+ import type { ILinkPathMark, IMarkStyle } from './interface';
4
4
  import { MarkTypeEnum } from './interface/type';
5
5
  import type { IGroupMark } from '@visactor/vgrammar-core';
6
- export type ILinkPathMark = IMarkRaw<ILinkPathMarkSpec>;
7
6
  export declare class LinkPathMark extends BaseMark<ILinkPathMarkSpec> implements ILinkPathMark {
8
7
  static readonly type = MarkTypeEnum.linkPath;
9
8
  readonly type = MarkTypeEnum.linkPath;
@@ -1,8 +1,7 @@
1
1
  import type { IPathMarkSpec } from '../typings/visual';
2
2
  import { BaseMark } from './base/base-mark';
3
- import type { IMarkRaw, IMarkStyle } from './interface';
3
+ import type { IMarkStyle, IPathMark } from './interface';
4
4
  import { MarkTypeEnum } from './interface/type';
5
- export type IPathMark = IMarkRaw<IPathMarkSpec>;
6
5
  export declare class PathMark extends BaseMark<IPathMarkSpec> implements IPathMark {
7
6
  static readonly type = MarkTypeEnum.path;
8
7
  readonly type = MarkTypeEnum.path;
@@ -1,8 +1,7 @@
1
1
  import type { IPolygonMarkSpec } from '../../typings/visual';
2
2
  import { BasePolygonMark } from './base-polygon';
3
- import type { IMarkRaw, IMarkStyle } from '../interface';
3
+ import type { IMarkStyle, IPolygonMark } from '../interface';
4
4
  import { MarkTypeEnum } from '../interface/type';
5
- export type IPolygonMark = IMarkRaw<IPolygonMarkSpec>;
6
5
  export declare class PolygonMark extends BasePolygonMark<IPolygonMarkSpec> implements IPolygonMark {
7
6
  static readonly type = MarkTypeEnum.polygon;
8
7
  readonly type = MarkTypeEnum.polygon;
@@ -1,8 +1,7 @@
1
1
  import type { IPyramid3dMarkSpec } from '../../typings/visual';
2
- import type { IMarkRaw } from '../interface';
3
2
  import { MarkTypeEnum } from '../interface/type';
4
3
  import { BasePolygonMark } from './base-polygon';
5
- export type IPyramid3dMark = IMarkRaw<IPyramid3dMarkSpec>;
4
+ import type { IPyramid3dMark } from '../interface/mark';
6
5
  export declare class Pyramid3dMark extends BasePolygonMark<IPyramid3dMarkSpec> implements IPyramid3dMark {
7
6
  static readonly type = MarkTypeEnum.pyramid3d;
8
7
  readonly type = MarkTypeEnum.pyramid3d;
@@ -1,8 +1,7 @@
1
1
  import type { IRect3dMarkSpec } from '../typings/visual';
2
2
  import { BaseMark } from './base/base-mark';
3
- import type { IMarkRaw, IMarkStyle } from './interface';
3
+ import type { IMarkStyle, IRect3dMark } from './interface';
4
4
  import { MarkTypeEnum } from './interface/type';
5
- export type IRect3dMark = IMarkRaw<IRect3dMarkSpec>;
6
5
  export declare class Rect3dMark extends BaseMark<IRect3dMarkSpec> implements IRect3dMark {
7
6
  static readonly type = MarkTypeEnum.rect3d;
8
7
  readonly type = MarkTypeEnum.rect3d;
@@ -1,8 +1,7 @@
1
1
  import type { IRectMarkSpec } from '../typings/visual';
2
2
  import { BaseMark } from './base/base-mark';
3
- import type { IMarkRaw, IMarkStyle } from './interface';
3
+ import type { IMarkStyle, IRectMark } from './interface';
4
4
  import { MarkTypeEnum } from './interface/type';
5
- export type IRectMark = IMarkRaw<IRectMarkSpec>;
6
5
  export declare class RectMark extends BaseMark<IRectMarkSpec> implements IRectMark {
7
6
  static readonly type = MarkTypeEnum.rect;
8
7
  readonly type = MarkTypeEnum.rect;
@@ -1,9 +1,8 @@
1
1
  import { BaseMark } from './base/base-mark';
2
2
  import type { IRippleMarkSpec } from '../typings/visual';
3
- import type { IMarkRaw, IMarkStyle } from './interface';
3
+ import type { IMarkStyle, IRippleMark } from './interface';
4
4
  import { MarkTypeEnum } from './interface/type';
5
5
  import type { IGroupMark } from '@visactor/vgrammar-core';
6
- export type IRippleMark = IMarkRaw<IRippleMarkSpec>;
7
6
  export declare class RippleMark extends BaseMark<IRippleMarkSpec> implements IRippleMark {
8
7
  static readonly type = MarkTypeEnum.ripple;
9
8
  readonly type = MarkTypeEnum.ripple;
@@ -1,8 +1,7 @@
1
1
  import type { IRuleMarkSpec } from '../typings/visual';
2
2
  import { BaseMark } from './base/base-mark';
3
- import type { IMarkRaw, IMarkStyle } from './interface';
3
+ import type { IMarkStyle, IRuleMark } from './interface';
4
4
  import { MarkTypeEnum } from './interface/type';
5
- export type IRuleMark = IMarkRaw<IRuleMarkSpec>;
6
5
  export declare class RuleMark extends BaseMark<IRuleMarkSpec> implements IRuleMark {
7
6
  static readonly type = MarkTypeEnum.rule;
8
7
  readonly type = MarkTypeEnum.rule;