@visactor/vchart-types 1.12.3 → 1.12.4-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/types/component/axis/base-axis.d.ts +1 -1
- package/types/component/axis/cartesian/axis.d.ts +3 -2
- package/types/component/axis/cartesian/linear-axis.d.ts +5 -1
- package/types/component/axis/interface/spec.d.ts +5 -1
- package/types/component/axis/mixin/linear-axis-mixin.d.ts +7 -1
- package/types/component/axis/mixin/util/break-data.d.ts +4 -0
- package/types/component/crosshair/cartesian.d.ts +1 -0
- package/types/util/array.d.ts +1 -0
|
@@ -5,7 +5,7 @@ import type { IOrientType, IPolarOrientType, StringOrNumber, CoordinateType } fr
|
|
|
5
5
|
import { BaseComponent } from '../base/base-component';
|
|
6
6
|
import { CompilableData } from '../../compile/data';
|
|
7
7
|
import type { IAxis, ICommonAxisSpec, ITick } from './interface';
|
|
8
|
-
import type
|
|
8
|
+
import { type IComponentOption } from '../interface';
|
|
9
9
|
import type { ISeries } from '../../series/interface';
|
|
10
10
|
import type { ITransformOptions } from '@visactor/vdataset';
|
|
11
11
|
import { DataView } from '@visactor/vdataset';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type IBoundsLike, type Maybe } from '@visactor/vutils';
|
|
2
2
|
import type { IEffect, IModelInitOption, IModelSpecInfo } from '../../../model/interface';
|
|
3
3
|
import type { ICartesianSeries } from '../../../series/interface';
|
|
4
4
|
import type { IRegion } from '../../../region/interface';
|
|
@@ -72,6 +72,7 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
|
|
|
72
72
|
values: any[];
|
|
73
73
|
}[]): StringOrNumber[];
|
|
74
74
|
abstract valueToPosition(value: any): number;
|
|
75
|
+
protected getNewScaleRange(): number[];
|
|
75
76
|
protected updateScaleRange(): boolean;
|
|
76
77
|
init(option: IModelInitOption): void;
|
|
77
78
|
setAttrFromSpec(): void;
|
|
@@ -95,7 +96,7 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
|
|
|
95
96
|
getBoundsInRect(rect: ILayoutRect): IBoundsLike;
|
|
96
97
|
positionToData(pos: number, isViewPos?: boolean): any;
|
|
97
98
|
private _getTitleLimit;
|
|
98
|
-
|
|
99
|
+
protected _getUpdateAttribute(ignoreGrid: boolean): any;
|
|
99
100
|
protected getLabelItems(length: number): any[];
|
|
100
101
|
protected initEvent(): void;
|
|
101
102
|
protected _updateAxisLayout: () => void;
|
|
@@ -4,7 +4,8 @@ import { CartesianAxis } from './axis';
|
|
|
4
4
|
import type { IAxisHelper, ICartesianLinearAxisSpec } from './interface';
|
|
5
5
|
import { ComponentTypeEnum } from '../../interface/type';
|
|
6
6
|
import { LinearAxisMixin } from '../mixin/linear-axis-mixin';
|
|
7
|
-
|
|
7
|
+
import { ICartesianTickDataOpt } from '@visactor/vrender-components';
|
|
8
|
+
export interface CartesianLinearAxis<T extends ICartesianLinearAxisSpec = ICartesianLinearAxisSpec> extends Pick<LinearAxisMixin, 'setExtraAttrFromSpec' | 'computeLinearDomain' | 'valueToPosition' | 'setScaleNice' | '_domain' | 'transformScaleDomain' | 'setExtendDomain' | '_break'>, CartesianAxis<T> {
|
|
8
9
|
}
|
|
9
10
|
export declare class CartesianLinearAxis<T extends ICartesianLinearAxisSpec = ICartesianLinearAxisSpec> extends CartesianAxis<T> {
|
|
10
11
|
static type: ComponentTypeEnum;
|
|
@@ -19,6 +20,9 @@ export declare class CartesianLinearAxis<T extends ICartesianLinearAxisSpec = IC
|
|
|
19
20
|
protected _scales: LinearScale[] | LogScale[];
|
|
20
21
|
setAttrFromSpec(): void;
|
|
21
22
|
protected initScales(): void;
|
|
23
|
+
protected _tickTransformOption(): ICartesianTickDataOpt;
|
|
24
|
+
protected _getUpdateAttribute(ignoreGrid: boolean): any;
|
|
25
|
+
protected getNewScaleRange(): number[];
|
|
22
26
|
protected computeDomain(data: {
|
|
23
27
|
min: number;
|
|
24
28
|
max: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AxisItem, AxisItemStateStyle } from '@visactor/vrender-components';
|
|
1
|
+
import type { AxisBreakProps, AxisItem, AxisItemStateStyle } from '@visactor/vrender-components';
|
|
2
2
|
import type { IAnimationSpec } from '../../../animation/spec';
|
|
3
3
|
import type { Datum, IFormatMethod, IPadding, IRectMarkSpec, IRichTextFormatMethod, IRuleMarkSpec, ISymbolMarkSpec, ITextMarkSpec, StringOrNumber } from '../../../typings';
|
|
4
4
|
import type { IComponentSpec } from '../../base/interface';
|
|
@@ -15,6 +15,9 @@ export interface ICommonAxisSpec extends Omit<IComponentSpec, 'orient' | 'center
|
|
|
15
15
|
sampling?: boolean;
|
|
16
16
|
forceInitTick?: boolean;
|
|
17
17
|
}
|
|
18
|
+
export type ILinearAxisBreakSpec = Omit<AxisBreakProps, 'rawRange'> & {
|
|
19
|
+
gap?: number | string;
|
|
20
|
+
};
|
|
18
21
|
export interface ILinearAxisSpec {
|
|
19
22
|
min?: number;
|
|
20
23
|
max?: number;
|
|
@@ -32,6 +35,7 @@ export interface ILinearAxisSpec {
|
|
|
32
35
|
max?: number;
|
|
33
36
|
};
|
|
34
37
|
tooltipFilterRange?: number | [number, number];
|
|
38
|
+
breaks?: ILinearAxisBreakSpec[];
|
|
35
39
|
}
|
|
36
40
|
export interface IBandAxisSpec {
|
|
37
41
|
trimPadding?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LinearScale } from '@visactor/vscale';
|
|
2
|
-
import type { IAxisLocationCfg, ITick } from '../interface';
|
|
2
|
+
import type { IAxisLocationCfg, ILinearAxisBreakSpec, ITick } from '../interface';
|
|
3
3
|
import type { IEvent } from '../../../event/interface';
|
|
4
4
|
import type { IOrientType } from '../../../typings/space';
|
|
5
5
|
import type { IComponentOption } from '../../interface/common';
|
|
@@ -32,6 +32,12 @@ export interface LinearAxisMixin {
|
|
|
32
32
|
max: number;
|
|
33
33
|
values: any[];
|
|
34
34
|
}[];
|
|
35
|
+
_break: {
|
|
36
|
+
domain: [number, number][];
|
|
37
|
+
scope: [number, number][];
|
|
38
|
+
breakDomains: [number, number][];
|
|
39
|
+
breaks: ILinearAxisBreakSpec[];
|
|
40
|
+
};
|
|
35
41
|
event: IEvent;
|
|
36
42
|
_orient: IOrientType;
|
|
37
43
|
_option: IComponentOption;
|
|
@@ -39,6 +39,7 @@ export declare class CartesianCrossHair<T extends ICartesianCrosshairSpec = ICar
|
|
|
39
39
|
private _layoutVertical;
|
|
40
40
|
private _layoutHorizontal;
|
|
41
41
|
protected _parseFieldInfo(): void;
|
|
42
|
+
private _parseAndSetCrosshair;
|
|
42
43
|
private _updateCrosshair;
|
|
43
44
|
private _updateCrosshairLabel;
|
|
44
45
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
package/types/util/array.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { array, last as peek, maxInArray as maxInArr, minInArray as minInArr } from '@visactor/vutils';
|
|
2
2
|
export declare function shallowCompare<T, U>(arrA: T | T[], arrB: U | U[]): boolean;
|
|
3
|
+
export declare function combineArray(arr: number[][]): number[];
|
|
3
4
|
export { array, peek, maxInArr, minInArr };
|