@visactor/vchart-types 2.1.0-alpha.4 → 2.1.0-alpha.6
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/chart/base/base-chart.d.ts +1 -0
- package/types/component/axis/polar/band-axis.d.ts +2 -0
- package/types/component/indicator/util.d.ts +4 -3
- package/types/data/transforms/box-plot.d.ts +4 -1
- package/types/data/transforms/correlation-center.d.ts +10 -4
- package/types/data/transforms/correlation.d.ts +18 -15
- package/types/data/transforms/funnel.d.ts +10 -8
- package/types/data/transforms/lookup.d.ts +3 -3
- package/types/data/transforms/map.d.ts +8 -2
- package/types/data/transforms/sankey.d.ts +12 -4
- package/types/data/transforms/stack-split.d.ts +2 -1
- package/types/data/transforms/treemap.d.ts +5 -3
- package/types/data/transforms/venn.d.ts +4 -2
- package/types/data/transforms/waterfall.d.ts +4 -2
- package/types/series/dot/dot.d.ts +11 -0
- package/types/series/polar/progress-like/progress-like.d.ts +2 -0
- package/types/series/polar/rose-like/rose-like.d.ts +2 -0
|
@@ -135,6 +135,7 @@ export declare class BaseChart<T extends IChartSpec> extends CompilableBase impl
|
|
|
135
135
|
private _isComponentSpecKey;
|
|
136
136
|
private _isOnlyComponentSpecsChanged;
|
|
137
137
|
private _isOnlySeriesSpecsChanged;
|
|
138
|
+
private _isOnlyComponentOrSeriesSpecsChanged;
|
|
138
139
|
private _canSkipChartDataStages;
|
|
139
140
|
private _isComponentScaleDomainOnlyUpdate;
|
|
140
141
|
private _reRunStackDataFlow;
|
|
@@ -18,6 +18,7 @@ export declare class PolarBandAxis<T extends IPolarBandAxisSpec = IPolarBandAxis
|
|
|
18
18
|
};
|
|
19
19
|
protected _scale: BandScale;
|
|
20
20
|
protected _scales: BandScale[];
|
|
21
|
+
protected _updateData: () => void;
|
|
21
22
|
protected computeDomain(data: {
|
|
22
23
|
min: number;
|
|
23
24
|
max: number;
|
|
@@ -37,6 +38,7 @@ export declare class PolarBandAxis<T extends IPolarBandAxisSpec = IPolarBandAxis
|
|
|
37
38
|
getSpec: () => T;
|
|
38
39
|
};
|
|
39
40
|
protected initScales(): void;
|
|
41
|
+
reInit(spec?: T): void;
|
|
40
42
|
protected registerTicksTransform(): string;
|
|
41
43
|
transformScaleDomain(): void;
|
|
42
44
|
}
|
|
@@ -2,12 +2,13 @@ import type { IIndicatorItemSpec } from './interface';
|
|
|
2
2
|
export interface IIndicatorDatum {
|
|
3
3
|
type: 'title' | 'content';
|
|
4
4
|
index: number;
|
|
5
|
-
datum:
|
|
5
|
+
datum: unknown;
|
|
6
6
|
spec: IIndicatorItemSpec;
|
|
7
7
|
}
|
|
8
8
|
export interface IIndicatorMapper {
|
|
9
9
|
title: IIndicatorItemSpec;
|
|
10
10
|
content: IIndicatorItemSpec[];
|
|
11
|
-
datum: () =>
|
|
11
|
+
datum: () => unknown;
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export type IndicatorMapperOption = IIndicatorMapper | (() => IIndicatorMapper);
|
|
14
|
+
export declare const indicatorMapper: (data: Array<unknown>, op: IndicatorMapperOption) => IIndicatorDatum[];
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import type { DataView } from '@visactor/vdataset';
|
|
1
2
|
export interface IBoxPlotOutlierOpt {
|
|
2
3
|
dimensionField: string[];
|
|
3
4
|
outliersField: string;
|
|
4
5
|
seriesField?: string;
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
+
type BoxPlotOutlierOption = IBoxPlotOutlierOpt | (() => IBoxPlotOutlierOpt);
|
|
8
|
+
export declare const foldOutlierData: (data: Array<DataView>, op: BoxPlotOutlierOption) => Record<string, unknown>[];
|
|
9
|
+
export {};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
type CorrelationCenterOptionValue<T> = T | (() => T);
|
|
2
|
+
type CorrelationCenterData = Array<{
|
|
3
|
+
latestData: Array<Record<string, unknown>>;
|
|
4
|
+
}>;
|
|
5
|
+
export interface ICorrelationCenterOpt {
|
|
6
|
+
keyword: CorrelationCenterOptionValue<string>;
|
|
7
|
+
categoryField: CorrelationCenterOptionValue<string>;
|
|
8
|
+
}
|
|
9
|
+
export declare const correlationCenter: (data: CorrelationCenterData, options: ICorrelationCenterOpt) => Record<string, unknown> | [];
|
|
10
|
+
export {};
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
+
type CorrelationOptionValue<T> = T | (() => T);
|
|
1
2
|
export interface ICorrelationOpt {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
view: () => {
|
|
4
|
+
x0: number;
|
|
5
|
+
x1: number;
|
|
6
|
+
y0: number;
|
|
7
|
+
y1: number;
|
|
8
|
+
};
|
|
9
|
+
field: CorrelationOptionValue<string>;
|
|
10
|
+
radiusField?: CorrelationOptionValue<string | undefined>;
|
|
11
|
+
radiusRange?: CorrelationOptionValue<[number, number] | undefined>;
|
|
12
|
+
center?: CorrelationOptionValue<[string | number, string | number] | undefined>;
|
|
13
|
+
startAngle?: CorrelationOptionValue<number | undefined>;
|
|
14
|
+
endAngle?: CorrelationOptionValue<number | undefined>;
|
|
15
|
+
innerRadius?: CorrelationOptionValue<string | number | undefined>;
|
|
16
|
+
outerRadius?: CorrelationOptionValue<string | number | undefined>;
|
|
10
17
|
}
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
size: number;
|
|
15
|
-
datum: any;
|
|
16
|
-
}
|
|
17
|
-
export declare const correlation: (data: any, options: any) => any;
|
|
18
|
+
export type CircularRelationItem = Record<string, unknown>;
|
|
19
|
+
export declare const correlation: (data: unknown, options: ICorrelationOpt) => unknown;
|
|
20
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DataView } from '@visactor/vdataset';
|
|
2
|
+
type FunnelOptionValue<T> = T | (() => T);
|
|
2
3
|
export interface IFunnelOpt {
|
|
3
|
-
valueField: string
|
|
4
|
+
valueField: FunnelOptionValue<string>;
|
|
4
5
|
asTransformRatio: string;
|
|
5
6
|
asReachRatio: string;
|
|
6
7
|
asHeightRatio: string;
|
|
@@ -10,12 +11,12 @@ export interface IFunnelOpt {
|
|
|
10
11
|
asCurrentValue: string;
|
|
11
12
|
asLastValue: string;
|
|
12
13
|
asNextValue: string;
|
|
13
|
-
isCone?: boolean
|
|
14
|
-
heightVisual?: boolean
|
|
15
|
-
range?: {
|
|
16
|
-
min
|
|
17
|
-
max
|
|
18
|
-
}
|
|
14
|
+
isCone?: FunnelOptionValue<boolean | undefined>;
|
|
15
|
+
heightVisual?: FunnelOptionValue<boolean | undefined>;
|
|
16
|
+
range?: FunnelOptionValue<{
|
|
17
|
+
min?: number;
|
|
18
|
+
max?: number;
|
|
19
|
+
} | undefined>;
|
|
19
20
|
}
|
|
20
21
|
export declare const funnel: (originData: Array<DataView>, op: IFunnelOpt) => {
|
|
21
22
|
dataSet: import("@visactor/vdataset").DataSet;
|
|
@@ -43,4 +44,5 @@ export declare const funnel: (originData: Array<DataView>, op: IFunnelOpt) => {
|
|
|
43
44
|
export interface IFunnelTransformOpt {
|
|
44
45
|
asIsTransformLevel: string;
|
|
45
46
|
}
|
|
46
|
-
export declare const funnelTransform: (originData: Array<DataView>, op: IFunnelTransformOpt) =>
|
|
47
|
+
export declare const funnelTransform: (originData: Array<DataView>, op: IFunnelTransformOpt) => Record<string, unknown>[];
|
|
48
|
+
export {};
|
|
@@ -3,10 +3,10 @@ import type { Datum } from '../../typings';
|
|
|
3
3
|
export interface ILookUpOpt {
|
|
4
4
|
from: () => object[];
|
|
5
5
|
key: string;
|
|
6
|
-
fields: string;
|
|
6
|
+
fields: string | (() => string);
|
|
7
7
|
values?: string[];
|
|
8
8
|
as?: string[];
|
|
9
|
-
default?:
|
|
10
|
-
set?: (A: Datum, B
|
|
9
|
+
default?: unknown;
|
|
10
|
+
set?: (A: Datum, B?: Datum) => void;
|
|
11
11
|
}
|
|
12
12
|
export declare const lookup: (data: Array<DataView>, opt: ILookUpOpt) => DataView[];
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { GeoSourceType } from '../../typings/geo';
|
|
2
2
|
export interface IMapOpt {
|
|
3
|
-
nameMap: Record<string,
|
|
3
|
+
nameMap: Record<string, unknown>;
|
|
4
4
|
nameProperty: string;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
type MapFeature = {
|
|
7
|
+
properties?: Record<string, unknown>;
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
};
|
|
10
|
+
type MapOption = IMapOpt | (() => IMapOpt);
|
|
11
|
+
export declare const map: (data: GeoSourceType, opt: MapOption) => MapFeature[];
|
|
12
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type SankeyOptions, type SankeyData } from '@visactor/vlayouts';
|
|
2
2
|
export interface ISankeyOpt extends SankeyOptions {
|
|
3
3
|
targetField: string;
|
|
4
4
|
sourceField: string;
|
|
@@ -10,10 +10,18 @@ export interface ISankeyOpt extends SankeyOptions {
|
|
|
10
10
|
y1: number;
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
type SankeyLayoutOption = ISankeyOpt | (() => ISankeyOpt);
|
|
14
|
+
type SankeyFormatDatum = Record<string, unknown> & {
|
|
15
|
+
id?: 'links' | 'nodes';
|
|
16
|
+
values?: unknown;
|
|
17
|
+
latestData?: SankeyData[];
|
|
18
|
+
children?: SankeyFormatDatum[];
|
|
19
|
+
};
|
|
20
|
+
export declare const collectHierarchyField: <T>(set: Set<T>, data: SankeyFormatDatum[], field: string) => void;
|
|
21
|
+
export declare const sankeyFormat: (data: SankeyFormatDatum[]) => SankeyData[];
|
|
22
|
+
export declare const sankeyLayout: (data: SankeyData[], op: SankeyLayoutOption) => {
|
|
16
23
|
nodes: import("@visactor/vlayouts").SankeyNodeElement[];
|
|
17
24
|
links: import("@visactor/vlayouts").SankeyLinkElement[];
|
|
18
25
|
columns: import("@visactor/vlayouts").SankeyNodeElement[][];
|
|
19
26
|
}[];
|
|
27
|
+
export {};
|
|
@@ -3,4 +3,5 @@ import type { DataView } from '@visactor/vdataset';
|
|
|
3
3
|
export interface IStackOption {
|
|
4
4
|
fields: string[];
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export type StackOption = IStackOption | (() => IStackOption);
|
|
7
|
+
export declare const stackSplit: (data: Array<DataView>, op: StackOption) => ISeriesStackDataNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
1
|
+
import { type TreemapNodeElement, type TreemapOptions } from '@visactor/vlayouts';
|
|
2
|
+
interface ITreemapLayoutOptions extends TreemapOptions {
|
|
3
3
|
getViewBox: () => {
|
|
4
4
|
x0: number;
|
|
5
5
|
x1: number;
|
|
@@ -7,4 +7,6 @@ export declare const treemapLayout: (data: Array<any>, op: TreemapOptions & {
|
|
|
7
7
|
y1: number;
|
|
8
8
|
};
|
|
9
9
|
nameField: string;
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
|
+
export declare const treemapLayout: (data: Array<Record<string, unknown>>, op: ITreemapLayoutOptions | (() => ITreemapLayoutOptions)) => TreemapNodeElement[];
|
|
12
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
interface IVennLayoutOptions {
|
|
2
2
|
setField: string;
|
|
3
3
|
valueField: string;
|
|
4
4
|
getViewBox: () => {
|
|
@@ -7,4 +7,6 @@ export declare const vennLayout: (data: Array<any>, op: {
|
|
|
7
7
|
y0: number;
|
|
8
8
|
y1: number;
|
|
9
9
|
};
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
|
+
export declare const vennLayout: (data: Array<Record<string, unknown>>, op: IVennLayoutOptions | (() => IVennLayoutOptions)) => (import("@visactor/vlayouts").IVennCircleDatum<any> | import("@visactor/vlayouts").IVennOverlapDatum<any>)[];
|
|
12
|
+
export {};
|
|
@@ -17,7 +17,8 @@ export interface IWaterfallOpt {
|
|
|
17
17
|
stackInverse: boolean;
|
|
18
18
|
groupData: () => DataView;
|
|
19
19
|
}
|
|
20
|
-
export
|
|
20
|
+
export type WaterfallOption = IWaterfallOpt | (() => IWaterfallOpt);
|
|
21
|
+
export declare const waterfall: (lastData: Array<Datum>, op: WaterfallOption) => Datum[];
|
|
21
22
|
export interface IWaterfallFillEndOpt {
|
|
22
23
|
indexField: string;
|
|
23
24
|
valueField: string;
|
|
@@ -25,4 +26,5 @@ export interface IWaterfallFillEndOpt {
|
|
|
25
26
|
total: IWaterfallSeriesSpec['total'];
|
|
26
27
|
calculationMode: IWaterfallSeriesSpec['calculationMode'];
|
|
27
28
|
}
|
|
28
|
-
export
|
|
29
|
+
export type WaterfallFillEndOption = IWaterfallFillEndOpt | (() => IWaterfallFillEndOpt);
|
|
30
|
+
export declare const waterfallFillTotal: (data: Array<Datum>, op: WaterfallFillEndOption) => Datum[];
|
|
@@ -31,6 +31,17 @@ export declare class DotSeries<T extends IDotSeriesSpec = IDotSeriesSpec> extend
|
|
|
31
31
|
setHighLightSeriesGroup(field: string): void;
|
|
32
32
|
protected _gridBackground?: IFillMarkSpec;
|
|
33
33
|
setGridBackground(gridBackground: IFillMarkSpec): void;
|
|
34
|
+
protected _getSpecUpdatePolicy(): {
|
|
35
|
+
compileOnlyKeys: {
|
|
36
|
+
highLightSeriesGroup: true;
|
|
37
|
+
titleField: true;
|
|
38
|
+
subTitleField: true;
|
|
39
|
+
};
|
|
40
|
+
compileOnlySubKeys: {
|
|
41
|
+
grid: Record<"background", true>;
|
|
42
|
+
};
|
|
43
|
+
dataRelatedKeys?: Record<string, true>;
|
|
44
|
+
};
|
|
34
45
|
initData(): void;
|
|
35
46
|
getStatisticFields(): {
|
|
36
47
|
key: string;
|
|
@@ -4,11 +4,13 @@ import { PolarSeries } from '../polar';
|
|
|
4
4
|
import type { IContinuousTickData, IProgressLikeSeriesSpec } from './interface';
|
|
5
5
|
import type { IPolarAxis } from '../../../component/axis';
|
|
6
6
|
import type { SeriesMarkMap } from '../../interface';
|
|
7
|
+
import type { ISeriesSpecUpdatePolicy } from '../../base/base-series';
|
|
7
8
|
export declare abstract class ProgressLikeSeries<T extends IProgressLikeSeriesSpec> extends PolarSeries<T> {
|
|
8
9
|
static readonly mark: SeriesMarkMap;
|
|
9
10
|
protected _startAngle: number;
|
|
10
11
|
protected _endAngle: number;
|
|
11
12
|
protected _arcGroupMark: IGroupMark | null;
|
|
13
|
+
protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
|
|
12
14
|
setAttrFromSpec(): void;
|
|
13
15
|
getStackGroupFields(): string[];
|
|
14
16
|
getStackValueField(): string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { PolarSeries } from '../polar';
|
|
2
2
|
import type { IRoseLikeSeriesSpec } from './interface';
|
|
3
|
+
import type { ISeriesSpecUpdatePolicy } from '../../base/base-series';
|
|
3
4
|
export declare abstract class RoseLikeSeries<T extends IRoseLikeSeriesSpec> extends PolarSeries<T> {
|
|
5
|
+
protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
|
|
4
6
|
getStackGroupFields(): string[];
|
|
5
7
|
getStackValueField(): string;
|
|
6
8
|
getGroupFields(): string[];
|