exportinterface FieldInfo = {
/** name of field */fieldName: string;
/** field type, eg: time / category / numerical */type: DataType;
/** field role */ role: ROLE;
/** alias of field */ alias?: string;
/** description of field */ description?: string;
};
exportenum DataType {
DATE = 'date',
TIME = 'time',
STRING = 'string',
REGION = 'region',
NUMERICAL = 'numerical',
RATIO = 'ratio',
COUNT = 'count',
FLOAT = 'float',
INT = 'int'}
exportenum ROLE {
DIMENSION = 'dimension',
MEASURE = 'measure'}
接口参数
getFieldInfo(dataset: Record<string, number | string>[]): FieldInfo[]