@advt-gpt-chart/package 0.0.23 → 0.0.31
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 +2 -2
- package/dist/Chart/ChartBase/transformed.d.ts +16 -117
- package/dist/Chart/ChartBase/types.d.ts +2 -1
- package/dist/Chart/ChartCodeRender/type.d.ts +2 -0
- package/dist/Chart/ChartCodeRender/visChart/ChartStoreContext.d.ts +1 -1
- package/dist/Chart/ChartControllers/TimeRange/types.d.ts +2 -1
- package/dist/Chart/ChartControllers/TimeRange/utils.d.ts +13 -2
- package/dist/Chart/ChartControllers/index.d.ts +2 -1
- package/dist/Chart/ChartEvents/ChartContextMenu/utils.d.ts +1 -1
- package/dist/Chart/ChartEvents/DrillBy/utils.d.ts +7 -0
- package/dist/Chart/ChartWrapper/utils.d.ts +2 -1
- package/dist/Chart/DataSource/useChartDataQuery.d.ts +1 -1
- package/dist/Chart/Dataset/types.d.ts +17 -1
- package/dist/Chart/Dataset/useDataset.d.ts +84 -0
- package/dist/GPTVis/hooks/{useStore.d.ts → useChartStore.d.ts} +5 -1
- package/dist/index.es.js +134534 -134335
- package/dist/index.es.js.gz +0 -0
- package/dist/index.umd.js +2944 -2931
- package/dist/index.umd.js.gz +0 -0
- package/dist/types/chart.d.ts +5 -1
- package/dist/types/config.d.ts +8 -1
- package/dist/utils/data.d.ts +6 -0
- package/dist/utils/date.d.ts +14 -3
- package/dist/utils/useTools.d.ts +8 -0
- package/dist/version.d.ts +1 -1
- package/package.json +8 -6
|
@@ -84,7 +84,7 @@ export declare const getCartesianTootipSpec: ({ xField, yField, seriesField, }:
|
|
|
84
84
|
value: (datum: any) => any;
|
|
85
85
|
};
|
|
86
86
|
content: {
|
|
87
|
-
key: () => string;
|
|
87
|
+
key: (datum: any) => string | undefined;
|
|
88
88
|
value: (datum: any) => any;
|
|
89
89
|
} | undefined;
|
|
90
90
|
};
|
|
@@ -93,7 +93,7 @@ export declare const getCartesianTootipSpec: ({ xField, yField, seriesField, }:
|
|
|
93
93
|
value: (datum: any) => any;
|
|
94
94
|
};
|
|
95
95
|
content: {
|
|
96
|
-
key: () => string;
|
|
96
|
+
key: (datum: any) => string | undefined;
|
|
97
97
|
value: (datum: any) => any;
|
|
98
98
|
} | undefined;
|
|
99
99
|
};
|
|
@@ -1,129 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
sdsm = "singleDemensionSingleMetric",
|
|
4
|
-
sdmm = "singleDemensionMultiMetric",
|
|
5
|
-
mdsm = "multiDemensionSingleMetric",
|
|
6
|
-
mdmm = "multiDemensionMultiMetric"
|
|
7
|
-
}
|
|
8
|
-
export declare function transform2CartesianData(data: DataItem[], options: {
|
|
9
|
-
id: string;
|
|
1
|
+
import { Dataset } from '../Dataset/types';
|
|
2
|
+
export interface CartesianParams {
|
|
10
3
|
xField: string;
|
|
11
4
|
yField: string;
|
|
12
5
|
metrics?: string[];
|
|
13
6
|
dimensions?: string[];
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
transformedData: DataItem[];
|
|
18
|
-
needFold: boolean;
|
|
19
|
-
needFoldFields: string[];
|
|
20
|
-
dsType: DSType;
|
|
21
|
-
metricsKey?: undefined;
|
|
22
|
-
} | {
|
|
23
|
-
data: DataItem[];
|
|
24
|
-
transformedData: DataItem[];
|
|
25
|
-
metricsKey: string;
|
|
26
|
-
needFold: boolean;
|
|
27
|
-
dsType: DSType;
|
|
28
|
-
needFoldFields?: undefined;
|
|
29
|
-
} | {
|
|
30
|
-
data: DataItem[];
|
|
31
|
-
transformedData: any[];
|
|
32
|
-
needFold: boolean;
|
|
33
|
-
dsType: DSType;
|
|
34
|
-
needFoldFields?: undefined;
|
|
35
|
-
metricsKey?: undefined;
|
|
36
|
-
} | {
|
|
37
|
-
data: DataItem[];
|
|
38
|
-
transformedData: DataItem[];
|
|
39
|
-
needFold: boolean;
|
|
40
|
-
needFoldFields?: undefined;
|
|
41
|
-
dsType?: undefined;
|
|
42
|
-
metricsKey?: undefined;
|
|
43
|
-
};
|
|
44
|
-
export declare function transformCartesianFoldData(data: DataItem[], options: {
|
|
45
|
-
id: string;
|
|
46
|
-
xField: string;
|
|
7
|
+
}
|
|
8
|
+
export interface AxesConfig {
|
|
9
|
+
xField: string | string[];
|
|
47
10
|
yField: string;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}): {
|
|
52
|
-
foldData: DataItem[];
|
|
53
|
-
seriesField: string | undefined;
|
|
54
|
-
foldKey?: undefined;
|
|
55
|
-
foldValue?: undefined;
|
|
56
|
-
} | {
|
|
57
|
-
foldData: any;
|
|
58
|
-
foldKey: string;
|
|
59
|
-
foldValue: string;
|
|
60
|
-
seriesField: string;
|
|
61
|
-
};
|
|
62
|
-
export declare function transform2PolarData(data: DataItem[], options: {
|
|
63
|
-
id: string;
|
|
11
|
+
seriesField?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PolarParams {
|
|
64
14
|
nameField: string;
|
|
65
15
|
valField: string;
|
|
66
|
-
metrics?: string[];
|
|
67
16
|
dimensions?: string[];
|
|
68
|
-
|
|
69
|
-
}):
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
needFoldFields?: undefined;
|
|
75
|
-
metricsKey?: undefined;
|
|
76
|
-
isOneDemension?: undefined;
|
|
77
|
-
} | {
|
|
78
|
-
data: DataItem[];
|
|
79
|
-
transformedData: DataItem[];
|
|
80
|
-
needFold: boolean;
|
|
81
|
-
needFoldFields: string[];
|
|
82
|
-
dsType: DSType;
|
|
83
|
-
metricsKey?: undefined;
|
|
84
|
-
isOneDemension?: undefined;
|
|
85
|
-
} | {
|
|
86
|
-
data: DataItem[];
|
|
87
|
-
transformedData: {
|
|
88
|
-
[key: string]: string | number;
|
|
89
|
-
}[];
|
|
90
|
-
metricsKey: string;
|
|
91
|
-
needFold: boolean;
|
|
92
|
-
dsType: DSType;
|
|
93
|
-
isOneDemension: boolean;
|
|
94
|
-
needFoldFields?: undefined;
|
|
95
|
-
} | {
|
|
96
|
-
data: DataItem[];
|
|
97
|
-
transformedData: {
|
|
98
|
-
[key: string]: string | number;
|
|
99
|
-
}[];
|
|
100
|
-
metricsKey: string;
|
|
101
|
-
needFold: boolean;
|
|
102
|
-
needFoldFields: string[];
|
|
103
|
-
dsType: DSType;
|
|
104
|
-
isOneDemension: boolean;
|
|
105
|
-
} | {
|
|
106
|
-
data: DataItem[];
|
|
107
|
-
transformedData: DataItem[];
|
|
108
|
-
needFold: boolean;
|
|
109
|
-
dsType?: undefined;
|
|
110
|
-
needFoldFields?: undefined;
|
|
111
|
-
metricsKey?: undefined;
|
|
112
|
-
isOneDemension?: undefined;
|
|
17
|
+
}
|
|
18
|
+
export declare function transfrom2CartesianAxes(dataset: Dataset | undefined, { xField, yField, dimensions }: CartesianParams): AxesConfig;
|
|
19
|
+
export declare function transfrom2PolarAxes(dataset: Dataset | undefined, { nameField, valField }: PolarParams): {
|
|
20
|
+
nameField: string;
|
|
21
|
+
valField: string;
|
|
22
|
+
seriesField: string;
|
|
113
23
|
};
|
|
114
|
-
export declare function
|
|
115
|
-
id: string;
|
|
24
|
+
export declare function transform2Indicator(dataset: Dataset, { nameField, valField }: PolarParams): {
|
|
116
25
|
nameField: string;
|
|
117
26
|
valField: string;
|
|
118
|
-
|
|
119
|
-
needFold?: boolean;
|
|
120
|
-
needFoldFields?: string[] | null;
|
|
121
|
-
}): {
|
|
122
|
-
foldData: DataItem[];
|
|
123
|
-
foldKey?: undefined;
|
|
124
|
-
foldValue?: undefined;
|
|
125
|
-
} | {
|
|
126
|
-
foldData: any;
|
|
127
|
-
foldKey: string;
|
|
128
|
-
foldValue: string;
|
|
27
|
+
seriesField: string;
|
|
129
28
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IChartSpec } from '@visactor/vchart';
|
|
2
2
|
import type { ComponentType } from 'react';
|
|
3
3
|
import { BaseChartProps, DataItem } from '../../types';
|
|
4
|
-
import { FieldInfoItem } from '../Dataset/types';
|
|
4
|
+
import { Dataset, FieldInfoItem } from '../Dataset/types';
|
|
5
5
|
import { DataSource } from '../DataSource/types';
|
|
6
6
|
export interface VChartBaseProps extends BaseChartProps {
|
|
7
7
|
VChart: ComponentType<any>;
|
|
@@ -14,6 +14,7 @@ export interface BaseVChartConfig<T = DataItem> {
|
|
|
14
14
|
chartName?: string;
|
|
15
15
|
chartTheme?: string;
|
|
16
16
|
dataSource?: DataSource;
|
|
17
|
+
dataset?: Dataset;
|
|
17
18
|
}
|
|
18
19
|
export interface BaseVChartProps extends BaseChartProps, BaseVChartConfig {
|
|
19
20
|
}
|
|
@@ -2,6 +2,7 @@ import type React from 'react';
|
|
|
2
2
|
import type { FC } from 'react';
|
|
3
3
|
import type { Components, ExtraProps } from 'react-markdown';
|
|
4
4
|
import { ChartType, DataItem } from '../../types';
|
|
5
|
+
import { TimeGrainType } from '../../utils';
|
|
5
6
|
import { FieldInfoItem } from '../Dataset/types';
|
|
6
7
|
import { DataSource } from '../DataSource/types';
|
|
7
8
|
export type WithChartCodeOptions = {
|
|
@@ -44,6 +45,7 @@ export interface ChartJson {
|
|
|
44
45
|
metrics?: string[];
|
|
45
46
|
dataSource?: DataSource;
|
|
46
47
|
columns?: FieldInfoItem[];
|
|
48
|
+
timeGrain?: TimeGrainType;
|
|
47
49
|
}
|
|
48
50
|
/**
|
|
49
51
|
* 图表组件字典
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { VizChartState } from '../../../GPTVis/hooks/
|
|
2
|
+
import { VizChartState } from '../../../GPTVis/hooks/useChartStore';
|
|
3
3
|
import { BaseChartProps } from '../../../types';
|
|
4
4
|
import { ChartJson } from '../type';
|
|
5
5
|
interface ChartStoreContextType {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
|
2
|
+
import { TimeGrainType } from '../../../utils';
|
|
2
3
|
import { FilterItemType } from '../Filter/types';
|
|
3
4
|
export type CustomTimeRange = {
|
|
4
5
|
from?: Dayjs;
|
|
@@ -40,7 +41,7 @@ export type QueryData = {
|
|
|
40
41
|
metrics?: OptionType[];
|
|
41
42
|
dimensions?: OptionType[];
|
|
42
43
|
filters?: FilterItemType[];
|
|
43
|
-
timeGrain?:
|
|
44
|
+
timeGrain?: TimeGrainType;
|
|
44
45
|
};
|
|
45
46
|
export interface TableData {
|
|
46
47
|
columns: Array<{
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TimeGrainType } from '../../../utils';
|
|
1
2
|
import { DataSource } from '../../DataSource/types';
|
|
2
3
|
import { AdvancedTimeRange, TimeRange } from './types';
|
|
3
4
|
export declare const timeRangeOptions: {
|
|
@@ -20,6 +21,11 @@ export declare const timeGrainOptions: {
|
|
|
20
21
|
label: string;
|
|
21
22
|
value: string;
|
|
22
23
|
}[];
|
|
24
|
+
export declare const DrillTimeGrainOptions: {
|
|
25
|
+
key: string;
|
|
26
|
+
label: string;
|
|
27
|
+
value: string;
|
|
28
|
+
}[];
|
|
23
29
|
export declare const previousBoundaryType: {
|
|
24
30
|
key: string;
|
|
25
31
|
label: string;
|
|
@@ -32,11 +38,16 @@ export declare const getRestrictedTimeGrainOptions: (periodUnit?: string) => {
|
|
|
32
38
|
label: string;
|
|
33
39
|
value: string;
|
|
34
40
|
}[];
|
|
41
|
+
export declare const getDrillDownTimeGrainOptions: (currentGrain: string) => {
|
|
42
|
+
key: string;
|
|
43
|
+
label: string;
|
|
44
|
+
value: string;
|
|
45
|
+
}[];
|
|
35
46
|
export declare const getDateString: (label: string, timeRange: TimeRange | undefined, formatMessage: any) => any;
|
|
36
47
|
export declare const getTimeDimension2TimeGrain: (timeDimension: {
|
|
37
48
|
dimensionName: string;
|
|
38
|
-
dimensionUnit:
|
|
39
|
-
}) =>
|
|
49
|
+
dimensionUnit: TimeGrainType;
|
|
50
|
+
}) => TimeGrainType;
|
|
40
51
|
export declare const getMql2TimeRange: (timeRange: TimeRange, dataSource: DataSource) => TimeRange | {
|
|
41
52
|
type: string;
|
|
42
53
|
custom: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TimeGrainType } from '../../utils/date';
|
|
1
2
|
import { DataSource } from '../DataSource/types';
|
|
2
3
|
import { FilterItemType } from './Filter/types';
|
|
3
4
|
import { OptionType, TimeRange } from './TimeRange/types';
|
|
@@ -9,7 +10,7 @@ export interface ChartControllersState {
|
|
|
9
10
|
timeRange?: TimeRange;
|
|
10
11
|
metrics: OptionType[];
|
|
11
12
|
dimensions: OptionType[];
|
|
12
|
-
timeGrain?:
|
|
13
|
+
timeGrain?: TimeGrainType;
|
|
13
14
|
filters?: FilterItemType[];
|
|
14
15
|
}
|
|
15
16
|
export declare function ChartControllers({ theme, dataSource }: ChartHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldInfoItem } from '../../Dataset/types';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function getRightClickInfo(rightClickValue: any[], fieldInfo: FieldInfoItem[] | undefined, metricTime: {
|
|
3
3
|
label: string;
|
|
4
4
|
value: string;
|
|
5
5
|
}): any[];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import VMind from '@visactor/vmind';
|
|
2
2
|
import { ChartType } from '../../types';
|
|
3
3
|
import { ChartJson } from '../ChartCodeRender/type';
|
|
4
|
+
export declare const vmind: VMind;
|
|
4
5
|
export declare function isChartTypeInTabs(chartTabs: {
|
|
5
6
|
[key: string]: any;
|
|
6
7
|
}[], chartType: ChartType): boolean;
|
|
7
8
|
export declare function isChartAdvisor(chartJson: ChartJson): boolean;
|
|
8
|
-
export declare const vmind: VMind;
|
|
9
9
|
export declare function chartAdvisor(chartJson: ChartJson): Promise<{
|
|
10
10
|
type: any;
|
|
11
11
|
data: import("../..").DataItem[];
|
|
@@ -19,4 +19,5 @@ export declare function chartAdvisor(chartJson: ChartJson): Promise<{
|
|
|
19
19
|
metrics?: string[];
|
|
20
20
|
dataSource?: import("../DataSource/types").DataSource;
|
|
21
21
|
columns?: import("../Dataset/types").FieldInfoItem[];
|
|
22
|
+
timeGrain?: import("../../utils").TimeGrainType;
|
|
22
23
|
}>;
|
|
@@ -9,7 +9,7 @@ type DrillByQueryData = QueryChartData & {
|
|
|
9
9
|
setDrillError: (error: any) => void;
|
|
10
10
|
};
|
|
11
11
|
export declare const useChartDataQuery: (dataSourceType: DataSourceType) => {
|
|
12
|
-
|
|
12
|
+
queryChartDataFromDatasource: (queryData: QueryData, isInit?: Boolean) => Promise<void>;
|
|
13
13
|
queryDrillByChartData: ({ queryData, setDrillLoading, setDrillError, }: DrillByQueryData) => Promise<void>;
|
|
14
14
|
};
|
|
15
15
|
export {};
|
|
@@ -1,7 +1,23 @@
|
|
|
1
|
+
export type DatasetType = 'dataSource' | 'static';
|
|
2
|
+
export type Dataset = {
|
|
3
|
+
type?: DatasetType;
|
|
4
|
+
data?: any[];
|
|
5
|
+
transfromData?: {
|
|
6
|
+
data?: any[];
|
|
7
|
+
foldData?: any[];
|
|
8
|
+
isMetricFolded?: boolean;
|
|
9
|
+
foldKey?: string;
|
|
10
|
+
foldValue?: string;
|
|
11
|
+
isColumnMegred?: boolean;
|
|
12
|
+
megreColumnName?: string;
|
|
13
|
+
};
|
|
14
|
+
fieldInfo?: FieldInfoItem[];
|
|
15
|
+
};
|
|
1
16
|
export type FieldDataType = 'BIGINT' | 'TIMESTAMP' | 'STRING';
|
|
17
|
+
export type VFieldDataType = 'date' | 'time' | 'string' | 'region' | 'numerical' | 'ratio' | 'count' | 'float' | 'int';
|
|
2
18
|
export type FieldInfoItem = {
|
|
3
19
|
fieldName?: string;
|
|
4
20
|
name?: string;
|
|
5
|
-
type?: FieldDataType | string;
|
|
21
|
+
type?: FieldDataType | VFieldDataType | string;
|
|
6
22
|
role?: string;
|
|
7
23
|
};
|
|
@@ -0,0 +1,84 @@
|
|
|
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
|
+
transfromData?: undefined;
|
|
27
|
+
data?: undefined;
|
|
28
|
+
} | {
|
|
29
|
+
fieldInfo: FieldInfoItem[];
|
|
30
|
+
type: DatasetType;
|
|
31
|
+
transfromData: {
|
|
32
|
+
data: {
|
|
33
|
+
[x: string]: any;
|
|
34
|
+
}[];
|
|
35
|
+
foldData: Record<string, any>[];
|
|
36
|
+
isMetricFolded: boolean;
|
|
37
|
+
foldKey: string;
|
|
38
|
+
foldValue: string;
|
|
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
|
+
export declare const transform2FillAndMegreData: (data: any[] | undefined, fieldInfo: FieldInfoItem[] | undefined, chartJson: ChartJson) => {
|
|
56
|
+
data: {
|
|
57
|
+
[x: string]: any;
|
|
58
|
+
}[];
|
|
59
|
+
isColumnMegred: boolean;
|
|
60
|
+
megreColumnName: string | undefined;
|
|
61
|
+
};
|
|
62
|
+
export declare const mergeDataByDimensions: (data: Record<string, any>[], fieldInfo: FieldInfoItem[], type: ChartType, dimensions?: string[]) => {
|
|
63
|
+
data: {
|
|
64
|
+
[x: string]: any;
|
|
65
|
+
}[];
|
|
66
|
+
isColumnMegred: boolean;
|
|
67
|
+
megreColumnName: string;
|
|
68
|
+
} | {
|
|
69
|
+
data: {
|
|
70
|
+
[x: string]: any;
|
|
71
|
+
}[];
|
|
72
|
+
isColumnMegred?: undefined;
|
|
73
|
+
megreColumnName?: undefined;
|
|
74
|
+
};
|
|
75
|
+
export declare const transform2FillData: (data: Record<string, any>[], { fieldInfo, dimensions, metrics, timeGrain }: Params) => Record<string, any>[];
|
|
76
|
+
export declare const generateTimeSeries: (startTime: any, endTime: any, timeGrain: any) => string[];
|
|
77
|
+
export declare const filledDataByTimeSeries: (sortedData: Record<string, any>[] | undefined, timeSeries: string[], timeGrain: TimeGrainType, timeField: string, metrics?: string[]) => Record<string, any>[];
|
|
78
|
+
export declare const getTimeGrainInterval: (timeGrain: string, sortedData: any[], timeField: string) => number;
|
|
79
|
+
export declare function formatTime2TimeGrain(timeGrain: TimeGrainType, value: Dayjs | number): string;
|
|
80
|
+
export declare const uptateDataSet: (preJson: ChartJson, newJson: ChartJson, dataset: Dataset) => {
|
|
81
|
+
dataset: Dataset;
|
|
82
|
+
isChanged: boolean;
|
|
83
|
+
};
|
|
84
|
+
export {};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { ChartJson } from '../../Chart/ChartCodeRender/type';
|
|
2
2
|
import { ChartControllersState } from '../../Chart/ChartControllers';
|
|
3
|
+
import { Dataset } from '../../Chart/Dataset/types';
|
|
3
4
|
import { DataSourceQueryInfo } from '../../Chart/DataSource/types';
|
|
4
5
|
import { BaseChartProps } from '../../types';
|
|
5
6
|
export interface ContextMenu {
|
|
6
7
|
visible: boolean;
|
|
7
8
|
clientX?: number;
|
|
8
9
|
clientY?: number;
|
|
9
|
-
|
|
10
|
+
rightClickValue?: any;
|
|
11
|
+
containsMergeKey?: boolean;
|
|
10
12
|
}
|
|
11
13
|
export interface DrillBy {
|
|
12
14
|
visible: boolean;
|
|
@@ -25,6 +27,7 @@ export interface VizChartState {
|
|
|
25
27
|
theme: string;
|
|
26
28
|
chartLoading?: boolean;
|
|
27
29
|
chartJson: ChartJson;
|
|
30
|
+
dataset: Dataset;
|
|
28
31
|
controllerConfig: ChartControllersState;
|
|
29
32
|
contextMenu: ContextMenu;
|
|
30
33
|
drillBy: DrillBy;
|
|
@@ -33,6 +36,7 @@ export interface VizChartState {
|
|
|
33
36
|
setTheme: (theme: string) => void;
|
|
34
37
|
setLoading: (loading: boolean) => void;
|
|
35
38
|
setChartJson: (chartJson: ChartJson) => void;
|
|
39
|
+
setDataset: (dataset: Dataset) => void;
|
|
36
40
|
setControllerConfig: (controller: ChartControllersState) => void;
|
|
37
41
|
setContextMenu: (contextMenu: ContextMenu) => void;
|
|
38
42
|
setChartDrillBy: (drillBy: DrillBy) => void;
|