@visactor/vchart-types 2.1.3 → 2.1.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/cartesian/axis.d.ts +12 -0
- package/types/component/axis/cartesian/interface/common.d.ts +1 -1
- package/types/series/bar/bar.d.ts +4 -0
- package/types/series/funnel/interface.d.ts +6 -1
- package/types/series/treemap/interface.d.ts +1 -1
- package/types/typings/spec/common.d.ts +4 -2
- package/types/util/spec/transform.d.ts +5 -2
|
@@ -15,6 +15,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';
|
|
18
|
+
type ContinuousBarBandwidthCache = {
|
|
19
|
+
scale: IBaseScale;
|
|
20
|
+
domainStart: number;
|
|
21
|
+
domainEnd: number;
|
|
22
|
+
rangeStart: number;
|
|
23
|
+
rangeEnd: number;
|
|
24
|
+
bandWidth: number;
|
|
25
|
+
};
|
|
18
26
|
export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec = ICartesianAxisCommonSpec> extends AxisComponent<T> implements IAxis {
|
|
19
27
|
static type: ComponentTypeEnum;
|
|
20
28
|
type: ComponentTypeEnum;
|
|
@@ -28,6 +36,7 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
|
|
|
28
36
|
layoutZIndex: number;
|
|
29
37
|
layoutLevel: number;
|
|
30
38
|
protected _dataSet: DataSet;
|
|
39
|
+
protected _continuousBarBandwidthCache?: ContinuousBarBandwidthCache;
|
|
31
40
|
protected _orient: IOrientType;
|
|
32
41
|
getOrient(): IOrientType;
|
|
33
42
|
protected getDefaultInteractive(): boolean;
|
|
@@ -77,6 +86,8 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
|
|
|
77
86
|
protected getSeriesStatisticsField(s: ICartesianSeries): string[];
|
|
78
87
|
protected _tickTransformOption(): ICartesianTickDataOpt;
|
|
79
88
|
protected axisHelper(): IAxisHelper;
|
|
89
|
+
protected _clearContinuousBarBandwidthCache: () => void;
|
|
90
|
+
protected _getContinuousBarBandwidth(depth?: number): number;
|
|
80
91
|
afterCompile(): void;
|
|
81
92
|
protected collectScale(): IBaseScale[];
|
|
82
93
|
protected collectSeriesField(depth: number, series: ICartesianSeries): string | string[];
|
|
@@ -104,3 +115,4 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
|
|
|
104
115
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
105
116
|
private _getLabelOverflowLimit;
|
|
106
117
|
}
|
|
118
|
+
export {};
|
|
@@ -31,7 +31,7 @@ export interface IAxisHelper {
|
|
|
31
31
|
dataToPosition: (values: any[], cfg?: IAxisLocationCfg) => number;
|
|
32
32
|
valueToPosition?: (value: any, cfg?: IAxisLocationCfg) => number;
|
|
33
33
|
getScale?: (depth: number) => IBaseScale;
|
|
34
|
-
getBandwidth?: (depth: number) => number;
|
|
34
|
+
getBandwidth?: (depth: number) => number | undefined;
|
|
35
35
|
setExtendDomain?: (key: string, value: number | undefined) => void;
|
|
36
36
|
getAxisType: () => string;
|
|
37
37
|
getAxisId: () => number;
|
|
@@ -26,6 +26,10 @@ export declare class BarSeries<T extends IBarSeriesSpec = IBarSeriesSpec> extend
|
|
|
26
26
|
protected _barBackgroundMark: IRectMark;
|
|
27
27
|
protected _barBackgroundViewData: ICompilableData;
|
|
28
28
|
protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
|
|
29
|
+
getStatisticFields(): {
|
|
30
|
+
key: string;
|
|
31
|
+
operations: import("../../data/transforms/interface").StatisticOperations;
|
|
32
|
+
}[];
|
|
29
33
|
initMark(): void;
|
|
30
34
|
protected _initBarBackgroundMark(): void;
|
|
31
35
|
initMarkStyle(): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Datum, IMarkSpec, IMarkTheme, ISeriesSpec, IOrientType, IPathMarkSpec, IPolygonMarkSpec, IRuleMarkSpec, ITextMarkSpec, IPercent, IComposedTextMarkSpec, IFormatMethod } from '../../typings';
|
|
1
|
+
import type { Datum, IMarkSpec, IMarkTheme, ISeriesSpec, IOrientType, IPathMarkSpec, IPolygonMarkSpec, IRuleMarkSpec, ISymbolMarkSpec, ITextMarkSpec, IPercent, IComposedTextMarkSpec, IFormatMethod } from '../../typings';
|
|
2
2
|
import type { IAnimationSpec } from '../../animation/spec';
|
|
3
3
|
import type { SeriesMarkNameEnum } from '../interface/type';
|
|
4
4
|
import type { ILabelSpec } from '../../component/label/interface';
|
|
@@ -49,5 +49,10 @@ export interface IFunnelSeriesTheme {
|
|
|
49
49
|
line?: Partial<IMarkTheme<IRuleMarkSpec>>;
|
|
50
50
|
};
|
|
51
51
|
[SeriesMarkNameEnum.transformLabel]?: Partial<IMarkTheme<ITextMarkSpec>>;
|
|
52
|
+
conversionArrow?: {
|
|
53
|
+
line?: Partial<IMarkTheme<IPolygonMarkSpec>>;
|
|
54
|
+
symbol?: Partial<IMarkTheme<ISymbolMarkSpec>>;
|
|
55
|
+
text?: Partial<IMarkTheme<ITextMarkSpec>>;
|
|
56
|
+
};
|
|
52
57
|
}
|
|
53
58
|
export {};
|
|
@@ -31,7 +31,7 @@ export interface ITreemapSeriesSpec extends Omit<ISeriesSpec, 'data'>, IAnimatio
|
|
|
31
31
|
padding?: TreemapOptions['labelPadding'];
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
export interface ITreemapSeriesTheme extends ICartesianSeriesTheme {
|
|
34
|
+
export interface ITreemapSeriesTheme extends Omit<ICartesianSeriesTheme, 'label'> {
|
|
35
35
|
gapWidth?: TreemapOptions['padding'];
|
|
36
36
|
nodePadding?: TreemapOptions['padding'];
|
|
37
37
|
[SeriesMarkNameEnum.leaf]?: Partial<IMarkTheme<IRectMarkSpec>>;
|
|
@@ -221,10 +221,11 @@ export interface IMarkStateTheme<T> extends Record<string, T> {
|
|
|
221
221
|
selected?: T;
|
|
222
222
|
selected_reverse?: T;
|
|
223
223
|
}
|
|
224
|
+
type ConvertToThemeMarkStyleSpec<T> = T extends Record<string, any> ? Partial<ConvertToMarkStyleSpec<T>> : never;
|
|
224
225
|
export type IMarkTheme<T> = {
|
|
225
226
|
visible?: boolean;
|
|
226
|
-
style?: T
|
|
227
|
-
state?: IMarkStateTheme<T
|
|
227
|
+
style?: ConvertToThemeMarkStyleSpec<T>;
|
|
228
|
+
state?: IMarkStateTheme<ConvertToThemeMarkStyleSpec<T>>;
|
|
228
229
|
interactive?: boolean;
|
|
229
230
|
};
|
|
230
231
|
export interface IPerformanceHook {
|
|
@@ -310,3 +311,4 @@ export type IRichTextFormatMethod<T extends any[]> = (...args: T) => {
|
|
|
310
311
|
text: IRichTextCharacter[];
|
|
311
312
|
} | IRichTextCharacter[];
|
|
312
313
|
export type IFormatMethod<T extends any[]> = (...args: T) => ReturnType<ITextFormatMethod<T>> | ReturnType<IRichTextFormatMethod<T>>;
|
|
314
|
+
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
interface IFunctionTransformRegistry {
|
|
2
|
+
getFunction: (key: string) => unknown;
|
|
3
|
+
}
|
|
2
4
|
export declare function specTransform(spec: unknown, special?: {
|
|
3
5
|
[key: string]: (v: unknown) => unknown;
|
|
4
6
|
}): unknown;
|
|
5
|
-
export declare function functionTransform(
|
|
7
|
+
export declare function functionTransform(value: unknown, registry: IFunctionTransformRegistry): any;
|
|
6
8
|
export declare function transformFunctionAttribute(att: unknown, ...args: unknown[]): any;
|
|
9
|
+
export {};
|