@visactor/vchart-types 1.6.2 → 1.6.4
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 +3 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/types/chart/base-chart.d.ts +1 -1
- package/types/compile/mark/compilable-mark.d.ts +1 -2
- package/types/component/axis/cartesian/axis.d.ts +3 -0
- package/types/component/legend/base-legend.d.ts +1 -1
- package/types/component/legend/continuous/legend.d.ts +1 -1
- package/types/component/tooltip/handler/dom/model/shape-model.d.ts +1 -0
- package/types/core/vchart.d.ts +1 -0
- package/types/data/transforms/sankey.d.ts +3 -6
- package/types/mark/base/base-mark.d.ts +3 -3
- package/types/series/sankey/sankey.d.ts +8 -2
|
@@ -82,7 +82,7 @@ export declare class BaseChart extends CompilableBase implements IChart {
|
|
|
82
82
|
onLayoutStart(option: IChartLayoutOption): void;
|
|
83
83
|
onLayoutEnd(option: IChartLayoutOption): void;
|
|
84
84
|
onEvaluateEnd(option: IChartEvaluateOption): void;
|
|
85
|
-
getLayoutElements(): (
|
|
85
|
+
getLayoutElements(): (ISeries | IComponent | IRegion)[];
|
|
86
86
|
getRegionsInIndex: (index?: number[]) => IRegion[];
|
|
87
87
|
getAllRegions: () => IRegion[];
|
|
88
88
|
getRegionsInIds: (ids: number[]) => IRegion[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IGroupMark, IMark, MarkAnimationSpec, MarkFunctionCallback, Nil, TransformSpec } from '@visactor/vgrammar-core';
|
|
2
2
|
import type { DataView } from '@visactor/vdataset';
|
|
3
3
|
import { GrammarItem } from '../grammar-item';
|
|
4
|
-
import type { Maybe,
|
|
4
|
+
import type { Maybe, StringOrNumber } from '../../typings';
|
|
5
5
|
import type { IMarkProgressiveConfig, IMarkStateStyle, MarkType } from '../../mark/interface';
|
|
6
6
|
import type { IModel } from '../../model/interface';
|
|
7
7
|
import { MarkStateManager } from './mark-state-manager';
|
|
@@ -95,7 +95,6 @@ export declare abstract class CompilableMark extends GrammarItem implements ICom
|
|
|
95
95
|
compileAnimation(): void;
|
|
96
96
|
compileContext(): void;
|
|
97
97
|
compileSignal(): void;
|
|
98
|
-
protected _computeAttribute(key: string, state: StateValueType): (datum: Datum, opt: IAttributeOpt) => any;
|
|
99
98
|
protected compileCommonAttributeCallback(key: string, state: string): MarkFunctionCallback<any>;
|
|
100
99
|
protected compileTransform(): void;
|
|
101
100
|
protected _lookupGrammar(id: string): IMark;
|
|
@@ -34,6 +34,9 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
|
|
|
34
34
|
getOrient(): IOrientType;
|
|
35
35
|
get layoutOrient(): IOrientType;
|
|
36
36
|
set layoutOrient(v: IOrientType);
|
|
37
|
+
protected _autoIndentOnce: boolean;
|
|
38
|
+
protected _hasAutoIndent: boolean;
|
|
39
|
+
set autoIndentOnce(v: boolean);
|
|
37
40
|
protected _scales: IBaseScale[];
|
|
38
41
|
getScales(): IBaseScale[];
|
|
39
42
|
protected _theme: ICartesianAxisCommonTheme;
|
|
@@ -16,7 +16,7 @@ export declare abstract class BaseLegend<T extends ILegendCommonSpec> extends Ba
|
|
|
16
16
|
protected _visible: boolean;
|
|
17
17
|
get visible(): boolean;
|
|
18
18
|
protected _position: 'start' | 'middle' | 'end';
|
|
19
|
-
get position(): "
|
|
19
|
+
get position(): "start" | "middle" | "end";
|
|
20
20
|
get layoutOrient(): IOrientType;
|
|
21
21
|
set layoutOrient(v: IOrientType);
|
|
22
22
|
protected _legendData: CompilableData;
|
|
@@ -12,7 +12,7 @@ export declare class ContinuousLegend<T extends IColorLegendSpec | ISizeLegendSp
|
|
|
12
12
|
protected _theme: IColorLegendTheme;
|
|
13
13
|
private _field;
|
|
14
14
|
private _legendType;
|
|
15
|
-
static createComponent(spec: any, options: IComponentOption): ContinuousLegend<any
|
|
15
|
+
static createComponent(spec: any, options: IComponentOption): ILegend[] | ContinuousLegend<any>;
|
|
16
16
|
constructor(spec: T, options: IComponentOption);
|
|
17
17
|
setAttrFromSpec(): void;
|
|
18
18
|
init(option: IModelInitOption): void;
|
package/types/core/vchart.d.ts
CHANGED
|
@@ -10,12 +10,9 @@ export interface ISankeyOpt extends SankeyOptions {
|
|
|
10
10
|
y1: number;
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
export declare const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} | {
|
|
17
|
-
nodes: import("@visactor/vgrammar-sankey").HierarchyNodeDatum[];
|
|
18
|
-
} | {
|
|
13
|
+
export declare const collectHierarchyField: (set: Set<any>, data: any[], field: string) => void;
|
|
14
|
+
export declare const sankeyFormat: (data: any[]) => SankeyData[];
|
|
15
|
+
export declare const sankeyLayout: (data: SankeyData[], op: ISankeyOpt) => {
|
|
19
16
|
nodes: import("@visactor/vgrammar-sankey").SankeyNodeElement[];
|
|
20
17
|
links: import("@visactor/vgrammar-sankey").SankeyLinkElement[];
|
|
21
18
|
columns: import("@visactor/vgrammar-sankey").SankeyNodeElement[][];
|
|
@@ -25,12 +25,12 @@ export declare class BaseMark<T extends ICommonSpec> extends CompilableMark impl
|
|
|
25
25
|
protected _filterAttribute<U extends keyof T>(attr: U, style: MarkInputStyle<T[U]>, state: StateValueType, level: number, isUserLevel: boolean, stateStyle?: IMarkStateStyle<T>): StyleConvert<T[U]>;
|
|
26
26
|
setReferer<U extends keyof T>(mark: IMarkRaw<T>, styleKey?: U, state?: StateValueType, stateStyle?: IMarkStateStyle<T>): void;
|
|
27
27
|
setPostProcess<U extends keyof T>(key: U, postProcessFunc: any, state?: StateValueType): void;
|
|
28
|
-
getAttribute<U extends keyof T>(key: U, datum: Datum, state?: StateValueType, opt?: IAttributeOpt):
|
|
28
|
+
getAttribute<U extends keyof T>(key: U, datum: Datum, state?: StateValueType, opt?: IAttributeOpt): any;
|
|
29
29
|
setAttribute<U extends keyof T>(attr: U, style: MarkInputStyle<T[U]>, state?: StateValueType, level?: number, stateStyle?: IMarkStateStyle<T>): void;
|
|
30
30
|
protected _getDefaultStyle(): IMarkStyle<T>;
|
|
31
31
|
protected _styleConvert<U extends keyof T>(style?: MarkInputStyle<T[U]>): StyleConvert<T[U]> | undefined;
|
|
32
|
-
protected _computeAttribute<U extends keyof T>(key: U,
|
|
33
|
-
protected _computeStateAttribute<U extends keyof T>(stateStyle: any, key: U,
|
|
32
|
+
protected _computeAttribute<U extends keyof T>(key: U, datum: Datum, state: StateValueType, opt: IAttributeOpt): any;
|
|
33
|
+
protected _computeStateAttribute<U extends keyof T>(stateStyle: any, key: U, datum: Datum, state: StateValueType, opt: IAttributeOpt): any;
|
|
34
34
|
private _initStyle;
|
|
35
35
|
private _initSpecStyle;
|
|
36
36
|
private _computeGradientAttr;
|
|
@@ -21,6 +21,7 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
|
|
|
21
21
|
protected _linksSeriesData?: SeriesData;
|
|
22
22
|
private _viewBox;
|
|
23
23
|
protected _categoryField: string;
|
|
24
|
+
private _colorScale;
|
|
24
25
|
getCategoryField(): string;
|
|
25
26
|
setCategoryField(f: string): string;
|
|
26
27
|
protected _valueField: string;
|
|
@@ -46,13 +47,18 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
|
|
|
46
47
|
protected _handleNodeRelatedClick: (element: IElement) => void;
|
|
47
48
|
protected _handleLinkRelatedClick: (element: IGlyphElement) => void;
|
|
48
49
|
protected initTooltip(): void;
|
|
49
|
-
|
|
50
|
+
_setNodeOrdinalColorScale(): void;
|
|
50
51
|
getNodeList(): any;
|
|
51
52
|
_getNodeNameFromData(datum: Datum): any;
|
|
52
53
|
extractNamesFromTree(tree: any, categoryName: string): Set<unknown>;
|
|
53
54
|
getDimensionField(): string[];
|
|
54
55
|
getMeasureField(): string[];
|
|
55
|
-
|
|
56
|
+
getRawDataStatisticsByField(field: string, isNumeric?: boolean): {
|
|
57
|
+
values?: any[];
|
|
58
|
+
min?: number;
|
|
59
|
+
max?: number;
|
|
60
|
+
};
|
|
61
|
+
private _collectByField;
|
|
56
62
|
onLayoutEnd(ctx: any): void;
|
|
57
63
|
getDefaultShapeType(): string;
|
|
58
64
|
protected _noAnimationDataKey(datum: Datum, index: number): unknown | undefined;
|