@antv/data-wizard
Version:
A js/ts library for data processing
124 lines (123 loc) • 2.03 kB
TypeScript
import type { StringFieldInfo, NumberFieldInfo, DateFieldInfo, TypeSpecifics } from '../analyzer';
export declare type SeriesData =
/**
* 1D: basic type
* be like
* 1
*/
number | string | boolean | undefined | null
/**
* 1D: array
* be like
* [1, 2, 3]
*/
| any[]
/**
* 1D: object
* be like
* {a: 1, b: 2}
*/
| {
[key: string]: any;
};
export declare type FrameData =
/** 1D */
/**
* 1D: basic type
* be like
* 1
*/
number | string | boolean | undefined | null
/**
* 1D: array
* be like
* [1, 2, 3]
*/
| any[]
/**
* 1D: object
* be like
* {a: 1, b: 2}
*/
| {
[key: string]: any;
}
/** 2D */
/**
* 2D: array
* be like
* [
* [1, 2, 3],
* [4, 5, 6]
* ]
*/
| any[][]
/**
* 2D: object array
* be like
* [
* {a: 1, b: 2},
* {a: 3, b: 4},
* {a: 5, b: 6}
* ]
*/
| {
[key: string]: any;
}[]
/**
* 2D: array object
* be like
* {
* a: [1, 2, 3],
* b: [4, 5, 6]
* }
*/
| {
[key: string]: any[];
};
export declare type Axis = string | number;
export declare type Extra = {
indexes?: Axis[];
columns?: Axis[];
fillValue?: any;
/** When the columnType is empty, no data type is specified */
columnTypes?: (TypeSpecifics | '')[];
};
/**
* Fields Type
* @public
*/
export declare type FieldsInfo = Array<(StringFieldInfo | NumberFieldInfo | DateFieldInfo) & {
name: string;
}>;
export declare type GraphExtra = {
nodeKey?: string;
linkKey?: string;
sourceKey?: string;
targetKey?: string;
childrenKey?: string;
nodeIndexes?: Axis[];
nodeColumns?: Axis[];
linkIndexes?: Axis[];
linkColumns?: Axis[];
};
export declare type NodeData = {
id: string;
name?: string;
[key: string]: any;
};
export declare type LinkData = {
source: string;
target: string;
[key: string]: any;
};
export declare type GraphInput = TreeNode | {
[key: string]: any;
}[] | {
[key: string]: any[];
};
export declare type TreeNode = {
id: string;
children: TreeNode[];
[key: string]: any;
};