@advt-gpt-chart/package 3.2.1 → 3.2.3
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/dist/Chart/ChartBase/constants.d.ts +8 -19
- package/dist/Chart/ChartBase/transformed.d.ts +1 -1
- package/dist/Chart/ChartBase/types.d.ts +2 -2
- package/dist/Chart/ChartCodeRender/type.d.ts +2 -2
- package/dist/Chart/ChartControllers/ChartDetailData/index.d.ts +1 -1
- package/dist/Chart/ChartControllers/index.d.ts +1 -1
- package/dist/Chart/ChartEvents/ChartContextMenu/utils.d.ts +1 -1
- package/dist/Chart/ChartEvents/DrillBy/DrillByChart.d.ts +1 -1
- package/dist/Chart/ChartWrapper/ChartHeader.d.ts +1 -1
- package/dist/Chart/ChartWrapper/ChartMenu.d.ts +1 -1
- package/dist/Chart/ChartWrapper/utils.d.ts +4 -4
- package/dist/Charts/Area/index.d.ts +1 -2
- package/dist/Charts/Bar/index.d.ts +1 -2
- package/dist/Charts/Composite/index.d.ts +1 -2
- package/dist/Charts/Composite/transform.d.ts +13 -0
- package/dist/Charts/Composite/types.d.ts +14 -23
- package/dist/Charts/Composite/util.d.ts +29 -9
- package/dist/Charts/Donut/index.d.ts +1 -2
- package/dist/Charts/Funnel/index.d.ts +1 -2
- package/dist/Charts/Gauge/index.d.ts +1 -2
- package/dist/Charts/Heatmap/index.d.ts +1 -2
- package/dist/Charts/Line/index.d.ts +1 -2
- package/dist/Charts/Pie/index.d.ts +1 -2
- package/dist/Charts/Radar/index.d.ts +1 -2
- package/dist/Charts/Rank/index.d.ts +1 -2
- package/dist/Charts/Scatter/index.d.ts +1 -2
- package/dist/Charts/common/cartesianCommon.d.ts +34 -0
- package/dist/Charts/common/createChart.d.ts +7 -0
- package/dist/Charts/common/hooks/useDashLine.d.ts +3 -2
- package/dist/Charts/common/index.d.ts +3 -0
- package/dist/Charts/common/polarCommon.d.ts +44 -0
- package/dist/{Chart → DataView}/DataSource/types.d.ts +1 -1
- package/dist/DataView/Dataset/DataView.d.ts +40 -0
- package/dist/DataView/Dataset/constants.d.ts +15 -0
- package/dist/DataView/Dataset/index.d.ts +9 -0
- package/dist/DataView/Dataset/transforms.d.ts +95 -0
- package/dist/{Chart → DataView}/Dataset/types.d.ts +1 -0
- package/dist/DataView/data-set/data-set.d.ts +39 -0
- package/dist/DataView/data-set/index.d.ts +3 -0
- package/dist/DataView/data-set/transforms/format-transform.d.ts +9 -0
- package/dist/DataView/data-set/transforms/index.d.ts +3 -0
- package/dist/DataView/data-set/transforms/multi-dimension-transform.d.ts +3 -0
- package/dist/DataView/data-set/transforms/multi-metric-transform.d.ts +3 -0
- package/dist/DataView/data-set/types.d.ts +55 -0
- package/dist/GPTVis/hooks/useChartStore.d.ts +2 -2
- package/dist/components/CustomTimeRange/types.d.ts +1 -1
- package/dist/components/CustomTimeRange/utils.d.ts +1 -1
- package/dist/index.es.js +35414 -35547
- package/dist/index.es.js.gz +0 -0
- package/dist/index.umd.js +752 -752
- package/dist/index.umd.js.gz +0 -0
- package/dist/types/chart.d.ts +12 -12
- package/dist/utils/useTools.d.ts +5 -2
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/Chart/Dataset/useDataset.d.ts +0 -92
- package/dist/Charts/Composite/config.d.ts +0 -22
- package/dist/Charts/common/constants/index.d.ts +0 -0
- package/dist/Charts/common/tools/index.d.ts +0 -0
- /package/dist/{Chart → DataView}/DataSource/index.d.ts +0 -0
- /package/dist/{Chart → DataView}/DataSource/metricInsight.d.ts +0 -0
- /package/dist/{Chart → DataView}/DataSource/simpleJson.d.ts +0 -0
- /package/dist/{Chart → DataView}/DataSource/useChartDataQuery.d.ts +0 -0
package/dist/index.umd.js.gz
CHANGED
|
Binary file
|
package/dist/types/chart.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export declare function getChartCategory(chartType?: ChartType): ChartCategoryTy
|
|
|
47
47
|
export declare const handleChartTypeChange: (chartType: ChartType, preChartJson: ChartJson) => {
|
|
48
48
|
type: ChartType;
|
|
49
49
|
data: DataItem[];
|
|
50
|
-
dataset?: import("../
|
|
50
|
+
dataset?: import("../DataView/Dataset/types").Dataset;
|
|
51
51
|
chartId?: string;
|
|
52
52
|
chartName?: string;
|
|
53
53
|
xField?: string;
|
|
@@ -56,10 +56,10 @@ export declare const handleChartTypeChange: (chartType: ChartType, preChartJson:
|
|
|
56
56
|
valField?: string;
|
|
57
57
|
dimensions?: string[];
|
|
58
58
|
metrics?: string[];
|
|
59
|
-
dataSource?: import("../
|
|
60
|
-
columns?: import("../
|
|
59
|
+
dataSource?: import("../DataView/DataSource/types").DataSource;
|
|
60
|
+
columns?: import("../DataView/Dataset/types").FieldInfoItem[];
|
|
61
61
|
timeGrain?: TimeGrainType;
|
|
62
|
-
dataFormat?: import("../
|
|
62
|
+
dataFormat?: import("../DataView/Dataset/types").DataFormat;
|
|
63
63
|
hideChartHeader?: boolean;
|
|
64
64
|
series?: any[];
|
|
65
65
|
agent?: import("../Chart/ChartCodeRender/type").AgentConfig;
|
|
@@ -78,17 +78,17 @@ export declare const handleChartDataSourceChange: ({ metrics, dimensions, timeGr
|
|
|
78
78
|
dimensions: string[];
|
|
79
79
|
data: DataItem[];
|
|
80
80
|
type: ChartType;
|
|
81
|
-
dataset?: import("../
|
|
81
|
+
dataset?: import("../DataView/Dataset/types").Dataset;
|
|
82
82
|
chartId?: string;
|
|
83
83
|
chartName?: string;
|
|
84
84
|
xField?: string;
|
|
85
85
|
yField?: string;
|
|
86
86
|
nameField?: string;
|
|
87
87
|
valField?: string;
|
|
88
|
-
dataSource?: import("../
|
|
89
|
-
columns?: import("../
|
|
88
|
+
dataSource?: import("../DataView/DataSource/types").DataSource;
|
|
89
|
+
columns?: import("../DataView/Dataset/types").FieldInfoItem[];
|
|
90
90
|
timeGrain?: TimeGrainType;
|
|
91
|
-
dataFormat?: import("../
|
|
91
|
+
dataFormat?: import("../DataView/Dataset/types").DataFormat;
|
|
92
92
|
hideChartHeader?: boolean;
|
|
93
93
|
series?: any[];
|
|
94
94
|
agent?: import("../Chart/ChartCodeRender/type").AgentConfig;
|
|
@@ -105,17 +105,17 @@ export declare const transformQueryData2ChartJson: ({ metrics: dataMetrics, dime
|
|
|
105
105
|
dimensions: string[];
|
|
106
106
|
type: ChartType;
|
|
107
107
|
data: DataItem[];
|
|
108
|
-
dataset?: import("../
|
|
108
|
+
dataset?: import("../DataView/Dataset/types").Dataset;
|
|
109
109
|
chartId?: string;
|
|
110
110
|
chartName?: string;
|
|
111
111
|
xField?: string;
|
|
112
112
|
yField?: string;
|
|
113
113
|
nameField?: string;
|
|
114
114
|
valField?: string;
|
|
115
|
-
dataSource?: import("../
|
|
116
|
-
columns?: import("../
|
|
115
|
+
dataSource?: import("../DataView/DataSource/types").DataSource;
|
|
116
|
+
columns?: import("../DataView/Dataset/types").FieldInfoItem[];
|
|
117
117
|
timeGrain?: TimeGrainType;
|
|
118
|
-
dataFormat?: import("../
|
|
118
|
+
dataFormat?: import("../DataView/Dataset/types").DataFormat;
|
|
119
119
|
hideChartHeader?: boolean;
|
|
120
120
|
series?: any[];
|
|
121
121
|
agent?: import("../Chart/ChartCodeRender/type").AgentConfig;
|
package/dist/utils/useTools.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldInfoItem
|
|
1
|
+
import { FieldInfoItem } from '../DataView/Dataset/types';
|
|
2
2
|
import { DataItem } from '../types';
|
|
3
3
|
import { GenericDataType } from './data';
|
|
4
4
|
import { TimeGrainValue } from './date';
|
|
@@ -6,12 +6,15 @@ export declare const formatTimeTool: (value: string | number, formatStr?: string
|
|
|
6
6
|
export declare const getFieldTypeTool: (fieldInfo: FieldInfoItem[], fieldName: string, value?: any) => GenericDataType | undefined;
|
|
7
7
|
export declare const formatTimeValueTool: (fieldInfo: FieldInfoItem[], fieldName: string, value: any, formatStr?: string) => any;
|
|
8
8
|
export declare const formatTimestampTool: (fieldInfo: FieldInfoItem[] | undefined, fieldName: string, value: any) => any;
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const NO_SPACE_SUFFIXES: string[];
|
|
10
10
|
export declare const useTools: (data?: DataItem[]) => {
|
|
11
11
|
formatTime: (value: string | number, formatStr?: string) => string | number;
|
|
12
12
|
getFieldType: (fieldName: string, value?: any) => GenericDataType | undefined;
|
|
13
13
|
formatValue: (fieldName: string, value: any, formatTimeStr?: string) => any;
|
|
14
|
+
formatValueWithoutUnit: (fieldName: string, value: any, formatTimeStr?: string) => any;
|
|
14
15
|
getAxesType: (fieldName: string) => "linear" | "band";
|
|
16
|
+
createLabelFormatMethod: (axesConfig: any, isMetricFolded?: boolean) => (val: any, datum: any) => any;
|
|
17
|
+
getUnit: (fieldName: string) => string;
|
|
15
18
|
};
|
|
16
19
|
export declare const generateFieldInfoFromData: (data: DataItem[], targetFieldName?: string) => FieldInfoItem[];
|
|
17
20
|
export declare function estimateTimeGrain(data: any[], timeFieldNames: string[]): TimeGrainValue;
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const version = "3.2.
|
|
1
|
+
declare const version = "3.2.3";
|
|
2
2
|
export default version;
|
package/package.json
CHANGED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { Dayjs } from 'dayjs';
|
|
2
|
-
import { ChartType } from '../../types/chart';
|
|
3
|
-
import { TimeGrainType } from '../../utils/date';
|
|
4
|
-
import { ChartJson } from '../ChartCodeRender/type';
|
|
5
|
-
import { DataSource } from '../DataSource/types';
|
|
6
|
-
import { Dataset, DatasetType, FieldInfoItem } from './types';
|
|
7
|
-
type Params = {
|
|
8
|
-
columns?: Record<string, any>[];
|
|
9
|
-
metrics?: string[];
|
|
10
|
-
dimensions?: string[];
|
|
11
|
-
dataSource?: DataSource;
|
|
12
|
-
fieldInfo?: FieldInfoItem[];
|
|
13
|
-
timeGrain?: TimeGrainType;
|
|
14
|
-
};
|
|
15
|
-
export declare const SEPARATOR = ",";
|
|
16
|
-
export declare const FOLD_KEY_NAME = "fold-key";
|
|
17
|
-
export declare const MERGE_COLUMN_KEY_NAME = "megre-column-name";
|
|
18
|
-
export declare const getKeys: () => {
|
|
19
|
-
keyId: string;
|
|
20
|
-
FOLD_KEY: string;
|
|
21
|
-
MERGE_COLUMN_NAME: string;
|
|
22
|
-
};
|
|
23
|
-
export declare const transform2Dataset: (chartJson: ChartJson) => {
|
|
24
|
-
fieldInfo?: undefined;
|
|
25
|
-
type?: undefined;
|
|
26
|
-
transformData?: undefined;
|
|
27
|
-
data?: undefined;
|
|
28
|
-
} | {
|
|
29
|
-
fieldInfo: FieldInfoItem[];
|
|
30
|
-
type: DatasetType;
|
|
31
|
-
transformData: {
|
|
32
|
-
data: {
|
|
33
|
-
[x: string]: any;
|
|
34
|
-
}[];
|
|
35
|
-
foldData: Record<string, any>[];
|
|
36
|
-
isMetricFolded: boolean;
|
|
37
|
-
foldKey: string | undefined;
|
|
38
|
-
foldValue: string | undefined;
|
|
39
|
-
isColumnMegred: boolean;
|
|
40
|
-
megreColumnName: string | undefined;
|
|
41
|
-
};
|
|
42
|
-
data: import("../..").DataItem[];
|
|
43
|
-
};
|
|
44
|
-
export declare const getFileldInfo: (data: Record<string, any>[], { columns, metrics, dimensions }: Params) => FieldInfoItem[];
|
|
45
|
-
export declare const filterDataByFieldInfo: (data: Record<string, any>[], { metrics, dimensions }: {
|
|
46
|
-
metrics?: string[];
|
|
47
|
-
dimensions?: string[];
|
|
48
|
-
}) => Record<string, any>[];
|
|
49
|
-
export declare const transform2FoldData: (data: Record<string, any>[], dimensions?: string[], metrics?: string[]) => {
|
|
50
|
-
foldData: Record<string, any>[];
|
|
51
|
-
foldKey: string;
|
|
52
|
-
foldValue: string;
|
|
53
|
-
isMetricFolded: boolean;
|
|
54
|
-
} | {
|
|
55
|
-
foldData: Record<string, any>[];
|
|
56
|
-
isMetricFolded: boolean;
|
|
57
|
-
foldKey?: undefined;
|
|
58
|
-
foldValue?: undefined;
|
|
59
|
-
};
|
|
60
|
-
export declare const transform2FillAndMegreData: (data: any[] | undefined, fieldInfo: FieldInfoItem[] | undefined, chartJson: ChartJson) => {
|
|
61
|
-
data: {
|
|
62
|
-
[x: string]: any;
|
|
63
|
-
}[];
|
|
64
|
-
isColumnMegred: boolean;
|
|
65
|
-
megreColumnName: string | undefined;
|
|
66
|
-
};
|
|
67
|
-
export declare const mergeDataByDimensions: (data: Record<string, any>[], fieldInfo: FieldInfoItem[], type: ChartType, dimensions?: string[], metrics?: string[]) => {
|
|
68
|
-
data: {
|
|
69
|
-
[x: string]: any;
|
|
70
|
-
}[];
|
|
71
|
-
isColumnMegred: boolean;
|
|
72
|
-
megreColumnName: string;
|
|
73
|
-
} | {
|
|
74
|
-
data: {
|
|
75
|
-
[x: string]: any;
|
|
76
|
-
}[];
|
|
77
|
-
isColumnMegred?: undefined;
|
|
78
|
-
megreColumnName?: undefined;
|
|
79
|
-
};
|
|
80
|
-
export declare const transform2FillData: (data: Record<string, any>[], { fieldInfo, dimensions, metrics, timeGrain }: Params) => Record<string, any>[];
|
|
81
|
-
export declare const generateTimeSeries: (startTime: any, endTime: any, timeGrain: any) => string[];
|
|
82
|
-
export declare const filledDataByTimeSeries: (sortedData: Record<string, any>[] | undefined, timeSeries: string[], timeGrain: TimeGrainType, timeField: string, metrics?: string[]) => Record<string, any>[];
|
|
83
|
-
export declare const getTimeGrainInterval: (timeGrain: string, sortedData: any[], timeField: string) => number;
|
|
84
|
-
export declare function formatTime2TimeGrain(timeGrain: TimeGrainType, value: Dayjs | number): string;
|
|
85
|
-
export declare const checkUptateDataSet: (preJson: ChartJson, newJson: ChartJson, dataset: Dataset) => {
|
|
86
|
-
dataset: Dataset;
|
|
87
|
-
isShouldUpdate: boolean;
|
|
88
|
-
} | {
|
|
89
|
-
isShouldUpdate: boolean;
|
|
90
|
-
dataset?: undefined;
|
|
91
|
-
};
|
|
92
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { CompositeSeries } from './types';
|
|
2
|
-
interface SeriesSpec {
|
|
3
|
-
spec: any;
|
|
4
|
-
yField: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* 获取 Bar 图表的 spec
|
|
8
|
-
*/
|
|
9
|
-
export declare function getBarSpec(series: CompositeSeries): SeriesSpec;
|
|
10
|
-
/**
|
|
11
|
-
* 获取 Line 图表的 spec
|
|
12
|
-
*/
|
|
13
|
-
export declare function getLineSpec(series: CompositeSeries): SeriesSpec;
|
|
14
|
-
/**
|
|
15
|
-
* 获取 Area 图表的 spec
|
|
16
|
-
*/
|
|
17
|
-
export declare function getAreaSpec(series: CompositeSeries): SeriesSpec;
|
|
18
|
-
/**
|
|
19
|
-
* 根据 series type 获取对应的 spec
|
|
20
|
-
*/
|
|
21
|
-
export declare function getSeriesSpec(series: CompositeSeries): SeriesSpec;
|
|
22
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|