@visactor/vchart-types 1.8.9 → 1.8.10

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.
@@ -1,5 +1,5 @@
1
1
  export type ChartType = keyof typeof ChartTypeEnum | string;
2
- export declare enum ChartTypeEnum {
2
+ export declare const enum ChartTypeEnum {
3
3
  common = "common",
4
4
  area = "area",
5
5
  line = "line",
@@ -131,15 +131,6 @@ export type STATE_CUSTOM = string;
131
131
  export type StateValueNot = STATE_HOVER_REVERSE | STATE_CUSTOM;
132
132
  export type StateValue = STATE_NORMAL | STATE_HOVER | STATE_CUSTOM;
133
133
  export type StateValueType = StateValue | StateValueNot;
134
- export declare enum STATE_LEVEL {
135
- NORMAL = 0,
136
- DIMENSION_SELECTED = 1,
137
- RELATIONAL_SELECTED = 2,
138
- SELECTED = 3,
139
- DIMENSION_HOVER = 4,
140
- RELATIONAL_HOVER = 5,
141
- HOVER = 6
142
- }
143
134
  export interface IAttributeOpt {
144
135
  element: IElement;
145
136
  mark: IElement['mark'];
@@ -3,7 +3,7 @@ import type { IEffect, IModelInitOption, IModelSpecInfo } from '../../../model/i
3
3
  import type { ICartesianSeries } from '../../../series/interface';
4
4
  import type { IRegion } from '../../../region/interface';
5
5
  import type { ICartesianAxisCommonSpec, IAxisHelper } from './interface';
6
- import type { IOrientType } from '../../../typings/space';
6
+ import type { IOrientType, IRect } from '../../../typings/space';
7
7
  import type { IBaseScale } from '@visactor/vscale';
8
8
  import type { StringOrNumber } from '../../../typings/common';
9
9
  import type { IPoint } from '../../../typings/coordinate';
@@ -50,6 +50,12 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
50
50
  height: number;
51
51
  _lastComputeOutBounds: IBoundsLike;
52
52
  };
53
+ protected _innerOffset: {
54
+ top: number;
55
+ bottom: number;
56
+ left: number;
57
+ right: number;
58
+ };
53
59
  constructor(spec: T, options: IComponentOption);
54
60
  static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
55
61
  static createComponent(specInfo: IModelSpecInfo, options: IComponentOption): IAxis;
@@ -69,6 +75,7 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
69
75
  protected updateScaleRange(): boolean;
70
76
  init(option: IModelInitOption): void;
71
77
  setAttrFromSpec(): void;
78
+ onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect, ctx: any): void;
72
79
  protected getSeriesStatisticsField(s: ICartesianSeries): string[];
73
80
  protected _tickTransformOption(coordinateType: CoordinateType): ICartesianTickDataOpt;
74
81
  protected _initData(): void;
@@ -1,10 +1,26 @@
1
- import type { IOrientType, IRectMarkSpec, StringOrNumber } from '../../../../typings';
1
+ import type { ILayoutNumber, IRectMarkSpec, StringOrNumber } from '../../../../typings';
2
2
  import type { IBandAxisSpec, ILinearAxisSpec, IGrid, ICommonAxisSpec } from '../../interface';
3
3
  import type { ICartesianDomainLine, ICartesianLabel, ITimeLayerType, ICartesianTitle, ICartesianAxisUnit } from './common';
4
4
  import type { AxisItemStateStyle } from '@visactor/vrender-components';
5
5
  export type ICartesianAxisSpec = ICartesianLinearAxisSpec | ICartesianBandAxisSpec | ICartesianTimeAxisSpec | ICartesianLogAxisSpec | ICartesianSymlogAxisSpec;
6
+ export type ICartesianVertical = {
7
+ orient: 'left' | 'right';
8
+ innerOffset?: {
9
+ top?: ILayoutNumber;
10
+ bottom?: ILayoutNumber;
11
+ };
12
+ };
13
+ export type ICartesianHorizontal = {
14
+ orient: 'top' | 'bottom';
15
+ innerOffset?: {
16
+ left?: ILayoutNumber;
17
+ right?: ILayoutNumber;
18
+ };
19
+ };
20
+ export type ICartesianZ = {
21
+ orient: 'z';
22
+ };
6
23
  export type ICartesianAxisCommonSpec = ICommonAxisSpec & {
7
- orient: IOrientType;
8
24
  grid?: IGrid;
9
25
  subGrid?: IGrid;
10
26
  domainLine?: ICartesianDomainLine;
@@ -19,7 +35,7 @@ export type ICartesianAxisCommonSpec = ICommonAxisSpec & {
19
35
  mode?: '2d' | '3d';
20
36
  depth?: number;
21
37
  unit?: ICartesianAxisUnit;
22
- };
38
+ } & (ICartesianVertical | ICartesianHorizontal | ICartesianZ);
23
39
  export interface ILinearAxisSync {
24
40
  axisId: StringOrNumber;
25
41
  zeroAlign?: boolean;
@@ -10,7 +10,7 @@ export declare function getDefaultCrosshairTriggerEventByMode(mode: RenderMode):
10
10
  hoverOut: string;
11
11
  clickOut: string;
12
12
  };
13
- export declare enum LayoutType {
13
+ export declare const enum LayoutType {
14
14
  ALL = 3,
15
15
  HORIZONTAL = 2,
16
16
  VERTICAL = 1,
@@ -1,4 +1,4 @@
1
- export declare enum IFilterMode {
1
+ export declare const enum IFilterMode {
2
2
  filter = "filter",
3
3
  axis = "axis"
4
4
  }
@@ -15,7 +15,7 @@ export declare function transformLegendTitleAttributes(title: ITitle): {
15
15
  visible?: boolean;
16
16
  style?: Omit<import("./interface").NoVisibleMarkStyle<import("../..").IRectMarkSpec>, "visible" | "width" | "height">;
17
17
  };
18
- text?: string | number | string[] | number[];
18
+ text?: string | number | number[] | string[];
19
19
  visible?: boolean;
20
20
  padding?: import("@visactor/vrender-components/es/core/type").Padding;
21
21
  maxWidth?: number;
@@ -18,7 +18,11 @@ export declare abstract class BaseMarker<T extends IMarkerSpec> extends BaseComp
18
18
  protected _layoutOffsetY: number;
19
19
  private _firstSeries;
20
20
  created(): void;
21
- private _getAllRelativeSeries;
21
+ protected _getAllRelativeSeries(): {
22
+ getRelativeSeries: () => ICartesianSeries;
23
+ getStartRelativeSeries: () => ICartesianSeries;
24
+ getEndRelativeSeries: () => ICartesianSeries;
25
+ };
22
26
  private _getFieldInfoFromSpec;
23
27
  protected _processSpecX(specX: IDataPos | IDataPosCallback): {
24
28
  getRelativeSeries: () => ICartesianSeries;
@@ -0,0 +1,5 @@
1
+ import type { ICartesianSeries } from '../../series/interface/series';
2
+ export interface IMarkerFilterOptions {
3
+ getRelativeSeries: () => ICartesianSeries;
4
+ }
5
+ export declare function markerFilter(data: Array<DataView>, options: IMarkerFilterOptions): DataView[];
@@ -17,7 +17,7 @@ export interface IDrillable {
17
17
  export declare class Drillable implements IDrillable {
18
18
  private _drillParams;
19
19
  private _drillInfo;
20
- private _getTriggerEvent;
20
+ private _getDrillTriggerEvent;
21
21
  private _hideTooltip;
22
22
  initDrillable(params: DrillParams): void;
23
23
  initDrillableData(dataSet: DataSet): void;
@@ -53,7 +53,7 @@ export declare class Zoomable implements IZoomable {
53
53
  private _gestureController;
54
54
  private _isGestureListener;
55
55
  initZoomable(evt: IEvent, mode?: RenderMode): void;
56
- private _getTriggerEvent;
56
+ private _getZoomTriggerEvent;
57
57
  private _zoomEventDispatch;
58
58
  private _getRegionOrSeriesLayout;
59
59
  private _bindZoomEventAsRegion;
@@ -89,7 +89,6 @@ export interface ILayoutItemSpec {
89
89
  alignSelf?: 'start' | 'end' | 'middle';
90
90
  orient?: IOrientType;
91
91
  padding?: ILayoutPaddingSpec;
92
- indent?: ILayoutPaddingSpec;
93
92
  noOuterPadding?: boolean;
94
93
  width?: ILayoutNumber;
95
94
  maxWidth?: ILayoutNumber;
@@ -1,5 +1,5 @@
1
1
  export type MarkType = keyof typeof MarkTypeEnum | string;
2
- export declare enum MarkTypeEnum {
2
+ export declare const enum MarkTypeEnum {
3
3
  group = "group",
4
4
  symbol = "symbol",
5
5
  rule = "rule",
@@ -33,7 +33,7 @@ export declare enum SeriesTypeEnum {
33
33
  heatmap = "heatmap",
34
34
  correlation = "correlation"
35
35
  }
36
- export declare enum SeriesMarkNameEnum {
36
+ export declare const enum SeriesMarkNameEnum {
37
37
  label = "label",
38
38
  point = "point",
39
39
  line = "line",
@@ -90,4 +90,3 @@ export declare enum SeriesMarkNameEnum {
90
90
  lineLabel = "lineLabel",
91
91
  areaLabel = "areaLabel"
92
92
  }
93
- export declare const seriesMarkNameSet: Set<string>;
@@ -6,13 +6,13 @@ import type { IAnimationSpec } from '../../animation/spec';
6
6
  import type { RangeColumnAppearPreset } from './animation';
7
7
  import type { ILabelSpec } from '../../component/label';
8
8
  import type { SeriesMarkNameEnum } from '../interface/type';
9
- export declare enum PositionEnum {
9
+ export declare const enum PositionEnum {
10
10
  middle = "middle",
11
11
  start = "start",
12
12
  end = "end",
13
13
  bothEnd = "bothEnd"
14
14
  }
15
- export declare enum minMaxPositionEnum {
15
+ export declare const enum minMaxPositionEnum {
16
16
  middle = "middle",
17
17
  start = "start",
18
18
  end = "end"
@@ -2,17 +2,8 @@ import type { ITextMarkSpec, IMarkSpec, ISeriesSpec } from '../../typings';
2
2
  import type { IAnimationSpec, IMarkAnimateSpec, IStateAnimateSpec } from '../../animation/spec';
3
3
  import type { SeriesMarkNameEnum } from '../interface/type';
4
4
  import type { WordcloudAppearPreset } from './animation';
5
- export declare enum WordCloudShapeEnum {
6
- triangleForward = "triangleForward",
7
- triangle = "triangle",
8
- diamond = "diamond",
9
- square = "square",
10
- star = "star",
11
- cardioid = "cardioid",
12
- circle = "circle",
13
- pentagon = "pentagon"
14
- }
15
- export type WordCloudShapeType = keyof typeof WordCloudShapeEnum;
5
+ import type { shapes } from '@visactor/vgrammar-wordcloud';
6
+ export type WordCloudShapeType = keyof typeof shapes;
16
7
  export type EllipsisType = {
17
8
  string?: string;
18
9
  limitLength?: number;
@@ -1,26 +1,5 @@
1
1
  import type { SymbolType } from '@visactor/vrender-core';
2
- export declare enum ShapeTypeEnum {
3
- circle = "circle",
4
- triangle = "triangle",
5
- triangleUp = "triangleUp",
6
- triangleLeft = "triangleLeft",
7
- triangleRight = "triangleRight",
8
- triangleDown = "triangleDown",
9
- thinTriangle = "thinTriangle",
10
- rect = "rect",
11
- diamond = "diamond",
12
- square = "square",
13
- arrowLeft = "arrowLeft",
14
- arrow2Left = "arrow2Left",
15
- arrowRight = "arrowRight",
16
- arrow2Right = "arrow2Right",
17
- cross = "cross",
18
- wedge = "wedge",
19
- star = "star",
20
- wye = "wye"
21
- }
22
2
  export type ShapeType = SymbolType;
23
- export declare const ShapeTypes: string[];
24
3
  export interface IShapeStyle {
25
4
  shape?: ShapeType;
26
5
  size?: number;
@@ -12,7 +12,7 @@ export interface IPadding {
12
12
  left?: number;
13
13
  right?: number;
14
14
  }
15
- export declare enum Direction {
15
+ export declare const enum Direction {
16
16
  vertical = "vertical",
17
17
  horizontal = "horizontal"
18
18
  }
@@ -5,7 +5,7 @@ export interface ITooltipPositionPattern {
5
5
  top?: number | ITooltipPositionCallback;
6
6
  bottom?: number | ITooltipPositionCallback;
7
7
  }
8
- export declare enum TooltipFixedPosition {
8
+ export declare const enum TooltipFixedPosition {
9
9
  top = "top",
10
10
  bottom = "bottom",
11
11
  left = "left",
@@ -20,7 +20,7 @@ export declare enum TooltipFixedPosition {
20
20
  rb = "rb",
21
21
  inside = "inside"
22
22
  }
23
- export declare enum TooltipPositionMode {
23
+ export declare const enum TooltipPositionMode {
24
24
  pointer = "pointer",
25
25
  mark = "mark"
26
26
  }