@visactor/vchart-types 1.11.2-alpha.5 → 1.11.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.
@@ -1,4 +1,4 @@
1
- import type { IChartSpec } from '../../typings';
1
+ import type { IChartSpec, ISeriesSpec } from '../../typings';
2
2
  import type { IChartSpecInfo, IChartSpecTransformer, IChartSpecTransformerOption } from '../interface';
3
3
  import type { IModelConstructor, IModelSpecInfo } from '../../model/interface';
4
4
  import type { IRegionConstructor } from '../../region/interface';
@@ -20,6 +20,7 @@ export declare class BaseChartSpecTransformer<T extends IChartSpec> implements I
20
20
  forEachSeriesInSpec<K>(chartSpec: T, callbackfn: (constructor: ISeriesConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K, chartSpecInfo?: IChartSpecInfo): K[];
21
21
  forEachComponentInSpec<K>(chartSpec: T, callbackfn: (constructor: IComponentConstructor, specInfo: IModelSpecInfo, chartSpecInfo?: IChartSpecInfo) => K, chartSpecInfo?: IChartSpecInfo): K[];
22
22
  transformSeriesSpec(spec: T): void;
23
+ protected _findBandAxisBySeries(seriesSpec: ISeriesSpec, seriesIndex: number, axesSpec: any): any;
23
24
  protected _applyAxisBandSize(axis: ICartesianBandAxisSpec, extend: number, barWidthSpec: {
24
25
  barMaxWidth: number | string;
25
26
  barMinWidth: number | string;
@@ -1,7 +1,8 @@
1
1
  import type { IPolarAxisSpec } from '../../component/axis/polar/interface';
2
2
  import type { IPolarCrosshairSpec } from '../../component/crosshair/interface';
3
- import type { IChartSpec } from '../../typings';
3
+ import type { IChartSpec, ILayoutRect, IPoint } from '../../typings';
4
4
  export interface IPolarChartSpec extends IChartSpec {
5
5
  axes?: IPolarAxisSpec[];
6
6
  crosshair?: IPolarCrosshairSpec | IPolarCrosshairSpec[];
7
+ layoutRadius?: 'auto' | number | ((layoutRect: ILayoutRect, center: IPoint) => number);
7
8
  }
@@ -1,4 +1,4 @@
1
- import type { ITickDataOpt } from '@visactor/vutils-extension';
1
+ import type { ITickDataOpt } from '@visactor/vrender-components';
2
2
  import type { IBaseScale } from '@visactor/vscale';
3
3
  import type { IGroup, IGraphic } from '@visactor/vrender-core';
4
4
  import type { IOrientType, IPolarOrientType, StringOrNumber, CoordinateType } from '../../typings';
@@ -11,7 +11,7 @@ import type { ILayoutRect, ILayoutType } from '../../../typings/layout';
11
11
  import type { IComponentOption } from '../../interface';
12
12
  import { ComponentTypeEnum } from '../../interface/type';
13
13
  import type { IAxis, ITick } from '../interface';
14
- import type { ICartesianTickDataOpt } from '@visactor/vutils-extension';
14
+ import type { ICartesianTickDataOpt } from '@visactor/vrender-components';
15
15
  import type { DataSet } from '@visactor/vdataset';
16
16
  import { AxisComponent } from '../base-axis';
17
17
  import type { IGraphic } from '@visactor/vrender-core';
@@ -2,7 +2,7 @@ import type { IBaseScale } from '@visactor/vscale';
2
2
  import type { IPolarAxis, IPolarAxisCommonSpec } from './interface';
3
3
  import type { IComponentOption } from '../../interface';
4
4
  import { ComponentTypeEnum } from '../../interface/type';
5
- import type { IPolarTickDataOpt } from '@visactor/vutils-extension';
5
+ import type { IPolarTickDataOpt } from '@visactor/vrender-components';
6
6
  import type { IPolarSeries } from '../../../series/interface';
7
7
  import type { IPoint, IPolarOrientType, IPolarPoint, StringOrNumber, ILayoutType } from '../../../typings';
8
8
  import type { Maybe } from '@visactor/vutils';
@@ -20,8 +20,14 @@ export declare abstract class PolarAxis<T extends IPolarAxisCommonSpec = IPolarA
20
20
  layoutType: ILayoutType;
21
21
  layoutZIndex: number;
22
22
  protected _tick: ITick | undefined;
23
- protected _center: IPoint | null;
24
- get center(): IPoint;
23
+ protected _center: {
24
+ x: string | number;
25
+ y: string | number;
26
+ } | null;
27
+ get center(): {
28
+ x: string | number;
29
+ y: string | number;
30
+ };
25
31
  protected _startAngle: number;
26
32
  get startAngle(): number;
27
33
  protected _endAngle: number;
@@ -58,6 +64,7 @@ export declare abstract class PolarAxis<T extends IPolarAxisCommonSpec = IPolarA
58
64
  coordToPoint: (point: IPolarPoint) => IPoint;
59
65
  pointToCoord: (point: IPoint) => IPolarPoint;
60
66
  center: () => IPoint;
67
+ layoutRadius: () => number;
61
68
  getScale: (depth: number) => IBaseScale;
62
69
  getAxisId: () => number;
63
70
  getSpec: () => T;
@@ -75,6 +82,7 @@ export declare abstract class PolarAxis<T extends IPolarAxisCommonSpec = IPolarA
75
82
  private _layoutAngleAxis;
76
83
  private _layoutRadiusAxis;
77
84
  protected _getRelatedAngleAxis(): IPolarAxis | undefined;
85
+ private computeLayoutRadius;
78
86
  private computeLayoutOuterRadius;
79
87
  private computeLayoutInnerRadius;
80
88
  private getRefLayoutRect;
@@ -25,6 +25,7 @@ export declare class PolarBandAxis<T extends IPolarBandAxisSpec = IPolarBandAxis
25
25
  coordToPoint: (point: import("../../../typings").IPolarPoint) => import("../../../typings").IPoint;
26
26
  pointToCoord: (point: import("../../../typings").IPoint) => import("../../../typings").IPolarPoint;
27
27
  center: () => import("../../../typings").IPoint;
28
+ layoutRadius: () => number;
28
29
  getScale: (depth: number) => import("@visactor/vscale").IBaseScale;
29
30
  getAxisId: () => number;
30
31
  getSpec: () => T;
@@ -11,6 +11,7 @@ export interface IPolarAxisHelper {
11
11
  coordToPoint: (point: IPolarPoint) => IPoint;
12
12
  pointToCoord: (point: IPoint) => IPolarPoint;
13
13
  center: () => IPoint;
14
+ layoutRadius: () => number;
14
15
  getScale: (depth?: number) => IBaseScale;
15
16
  getBandwidth?: (depth?: number) => number;
16
17
  getAxisId: () => number;
@@ -1,8 +1,9 @@
1
- import type { IPoint, IPolarOrientType } from '../../../../typings';
1
+ import type { ILayoutRect, IPoint, IPolarOrientType } from '../../../../typings';
2
2
  import type { IBandAxisSpec, IDomainLine, ILinearAxisSpec, ITitle, ILabel, ICommonAxisSpec } from '../../interface';
3
3
  import type { IPolarGrid } from './common';
4
4
  export type IPolarAxisSpec = IPolarLinearAxisSpec | IPolarBandAxisSpec;
5
5
  export type IPolarAxisCommonSpec = Omit<ICommonAxisSpec, 'center'> & {
6
+ layoutRadius?: 'auto' | number | ((layoutRect: ILayoutRect, center: IPoint) => number);
6
7
  inside?: boolean;
7
8
  orient: IPolarOrientType;
8
9
  grid?: IPolarGrid;
@@ -13,7 +14,10 @@ export type IPolarAxisCommonSpec = Omit<ICommonAxisSpec, 'center'> & {
13
14
  title?: ITitle;
14
15
  innerRadius?: number;
15
16
  outerRadius?: number;
16
- center?: IPoint;
17
+ center?: {
18
+ x: number | string;
19
+ y: number | string;
20
+ };
17
21
  startAngle?: number;
18
22
  endAngle?: number;
19
23
  };
@@ -6,4 +6,5 @@ export declare const getPolarAxisInfo: (spec: IPolarAxisCommonSpec, chartSpec: a
6
6
  endAngle: any;
7
7
  center: any;
8
8
  outerRadius: any;
9
+ layoutRadius: any;
9
10
  };
@@ -46,7 +46,6 @@ export declare class BasePieSeries<T extends IBasePieSeriesSpec> extends PolarSe
46
46
  getMeasureField(): string[];
47
47
  private viewDataLabelUpdate;
48
48
  protected generateRadiusStyle(spec: any): any;
49
- protected computeLayoutRadius(): number;
50
49
  computeCenter(datum: Datum): IPoint;
51
50
  getRadius(state?: StateValueType): number;
52
51
  getInnerRadius(state?: StateValueType): number;
@@ -1,7 +1,7 @@
1
1
  import type { ISeriesSpec } from '../../typings/spec/common';
2
2
  export interface IPolarSeriesSpec extends ISeriesSpec {
3
- centerX?: number;
4
- centerY?: number;
3
+ centerX?: number | string;
4
+ centerY?: number | string;
5
5
  outerRadius?: number;
6
6
  innerRadius?: number;
7
7
  startAngle?: number;
@@ -1,10 +1,9 @@
1
1
  import type { IBoundsLike } from '@visactor/vutils';
2
- import type { IPoint, IPolarPoint, Quadrant } from '../typings';
3
- import { isNumberClose, isGreater, isLess } from '@visactor/vutils';
4
- import { normalizeAngle, angleLabelOrientAttribute } from '@visactor/vutils-extension';
2
+ import type { IPoint, Quadrant } from '../typings';
3
+ import { isNumberClose, isGreater, isLess, normalizeAngle } from '@visactor/vutils';
4
+ import { angleLabelOrientAttribute } from '@visactor/vrender-components';
5
5
  export declare const isClose: typeof isNumberClose;
6
6
  export { isGreater, isLess, normalizeAngle, angleLabelOrientAttribute };
7
- export declare function polarToCartesian(point: IPolarPoint): IPoint;
8
7
  export declare function computeQuadrant(angle: number): Quadrant;
9
8
  export declare function normalizeStartEndAngle(start: number | null, end: number | null): {
10
9
  startAngle: number;
@@ -5,7 +5,7 @@ import type { ILayoutNumber, ILayoutRect, IPercent, IPercentOffset, ILayoutPaddi
5
5
  export declare function isValidOrient(orient: string): boolean;
6
6
  export declare function isPercent(v: any): v is IPercent;
7
7
  export declare function isPercentOffset(v: any): v is IPercentOffset;
8
- export declare function calcLayoutNumber(v: ILayoutNumber | undefined, size: number, callOp?: ILayoutRect): number;
8
+ export declare function calcLayoutNumber(v: ILayoutNumber | undefined, size: number, callOp?: ILayoutRect, defaultValue?: number): number;
9
9
  export declare function calcPadding(paddingSpec: ILayoutOrientPadding, rect: ILayoutRect, callOp: ILayoutRect): IPadding;
10
10
  export declare function boundsInRect(bounds: IBoundsLike, rect: ILayoutRect): ILayoutRect;
11
11
  export declare function normalizeLayoutPaddingSpec(spec: ILayoutPaddingSpec): ILayoutOrientPadding;