@advt-gpt-chart/package 2.1.0 → 2.1.1
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 +24 -8
- package/dist/Chart/ChartBase/transformed.d.ts +0 -1
- package/dist/Chart/ChartCodeRender/type.d.ts +1 -2
- package/dist/Chart/ChartControllers/TimeRange/types.d.ts +0 -2
- package/dist/Chart/ChartControllers/utils.d.ts +0 -14
- package/dist/Chart/ChartWrapper/ChartHeader.d.ts +1 -3
- package/dist/Chart/ChartWrapper/ChartWrapper.d.ts +1 -1
- package/dist/Chart/ChartWrapper/style.d.ts +5 -4
- package/dist/Chart/ChartWrapper/utils.d.ts +0 -2
- package/dist/Chart/DataSource/useChartDataQuery.d.ts +1 -1
- package/dist/Chart/Dataset/types.d.ts +0 -9
- package/dist/Chart/Dataset/useDataset.d.ts +4 -12
- package/dist/Charts/Indicator/styles.d.ts +2 -6
- package/dist/GPTVis/hooks/useChartStore.d.ts +0 -1
- package/dist/index.es.js +108745 -130931
- package/dist/index.es.js.gz +0 -0
- package/dist/index.umd.js +956 -1549
- package/dist/index.umd.js.gz +0 -0
- package/dist/locale/en-US.d.ts +0 -14
- package/dist/locale/zh-CN.d.ts +0 -14
- package/dist/locale/zh-TW.d.ts +0 -14
- package/dist/types/chart.d.ts +0 -25
- package/dist/utils/downloadAsImage.d.ts +1 -1
- package/dist/utils/useTools.d.ts +3 -4
- package/dist/version.d.ts +1 -1
- package/package.json +105 -107
- package/dist/Chart/ChartControllers/DataFormat/DataFormat.d.ts +0 -6
- package/dist/Chart/ChartControllers/DataFormat/styles.d.ts +0 -3
- package/dist/Chart/ChartControllers/DataFormat/types.d.ts +0 -0
- package/dist/Chart/ChartControllers/DataFormat/utils.d.ts +0 -12
- package/dist/Chart/ChartWrapper/ChartMenu.d.ts +0 -2
- package/dist/Chart/ChartWrapper/contants.d.ts +0 -4
|
@@ -23,7 +23,7 @@ export declare const getPolarLegendSpec: (seriesField: string | boolean | undefi
|
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
export declare const getCartesianLegend: (xField?: string, seriesField?: string | boolean) => any;
|
|
26
|
-
export declare const getPolarTooltipSpec: ({ categoryField, valueField, seriesField, showPercent }: PolarTooltipOptions) => {
|
|
26
|
+
export declare const getPolarTooltipSpec: ({ categoryField, valueField, seriesField, showPercent, }: PolarTooltipOptions) => {
|
|
27
27
|
mark: {
|
|
28
28
|
title: {
|
|
29
29
|
value: (datum: any) => any;
|
|
@@ -43,6 +43,18 @@ export declare const getPolarTooltipSpec: ({ categoryField, valueField, seriesFi
|
|
|
43
43
|
} | undefined;
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
+
export declare const getDefaultTooltip: (seriesField: string | boolean | undefined) => {
|
|
47
|
+
mark: {
|
|
48
|
+
title: {
|
|
49
|
+
visible: boolean;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
dimension: {
|
|
53
|
+
title: {
|
|
54
|
+
visible: boolean;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
46
58
|
export declare const getLineStyle: () => {
|
|
47
59
|
line: {
|
|
48
60
|
style: {
|
|
@@ -66,20 +78,24 @@ export declare const getLineStyle: () => {
|
|
|
66
78
|
};
|
|
67
79
|
};
|
|
68
80
|
export declare const getCartesianAxesSpec: (options: CartesianOptions) => ICartesianAxisSpec[];
|
|
69
|
-
export declare const getCartesianTootipSpec: ({ xField, yField, seriesField }: CartesianTooltipOptions) => {
|
|
81
|
+
export declare const getCartesianTootipSpec: ({ xField, yField, seriesField, }: CartesianTooltipOptions) => {
|
|
70
82
|
mark: {
|
|
71
|
-
|
|
72
|
-
content: {
|
|
73
|
-
key: (datum: any) => any;
|
|
83
|
+
title: {
|
|
74
84
|
value: (datum: any) => any;
|
|
75
85
|
};
|
|
86
|
+
content: {
|
|
87
|
+
key: (datum: any) => string | undefined;
|
|
88
|
+
value: (datum: any) => any;
|
|
89
|
+
} | undefined;
|
|
76
90
|
};
|
|
77
91
|
dimension: {
|
|
78
|
-
|
|
79
|
-
content: {
|
|
80
|
-
key: (datum: any) => any;
|
|
92
|
+
title: {
|
|
81
93
|
value: (datum: any) => any;
|
|
82
94
|
};
|
|
95
|
+
content: {
|
|
96
|
+
key: (datum: any) => string | undefined;
|
|
97
|
+
value: (datum: any) => any;
|
|
98
|
+
} | undefined;
|
|
83
99
|
};
|
|
84
100
|
};
|
|
85
101
|
export {};
|
|
@@ -3,7 +3,7 @@ import type { FC } from 'react';
|
|
|
3
3
|
import type { Components, ExtraProps } from 'react-markdown';
|
|
4
4
|
import { ChartType, DataItem } from '../../types';
|
|
5
5
|
import { TimeGrainType } from '../../utils';
|
|
6
|
-
import {
|
|
6
|
+
import { FieldInfoItem } from '../Dataset/types';
|
|
7
7
|
import { DataSource } from '../DataSource/types';
|
|
8
8
|
export type WithChartCodeOptions = {
|
|
9
9
|
/**
|
|
@@ -46,7 +46,6 @@ export interface ChartJson {
|
|
|
46
46
|
dataSource?: DataSource;
|
|
47
47
|
columns?: FieldInfoItem[];
|
|
48
48
|
timeGrain?: TimeGrainType;
|
|
49
|
-
dataFormat?: DataFormat;
|
|
50
49
|
}
|
|
51
50
|
/**
|
|
52
51
|
* 图表组件字典
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
|
2
2
|
import { TimeGrainType } from '../../../utils';
|
|
3
|
-
import { DataFormat } from '../../Dataset/types';
|
|
4
3
|
import { FilterItemType } from '../Filter/types';
|
|
5
4
|
export type CustomTimeRange = {
|
|
6
5
|
from?: Dayjs;
|
|
@@ -43,7 +42,6 @@ export type QueryData = {
|
|
|
43
42
|
dimensions?: OptionType[];
|
|
44
43
|
filters?: FilterItemType[];
|
|
45
44
|
timeGrain?: TimeGrainType;
|
|
46
|
-
dataFormat?: DataFormat;
|
|
47
45
|
};
|
|
48
46
|
export interface TableData {
|
|
49
47
|
columns: Array<{
|
|
@@ -9,22 +9,8 @@ export declare function handleMetricInfo(metricInfo: any, chartJson: ChartJson,
|
|
|
9
9
|
}[];
|
|
10
10
|
matchedDimensions: any;
|
|
11
11
|
dimOptions: any;
|
|
12
|
-
dataFormat: {
|
|
13
|
-
[x: string]: {
|
|
14
|
-
formatType: any;
|
|
15
|
-
decimalPlaces: any;
|
|
16
|
-
suffix: string;
|
|
17
|
-
};
|
|
18
|
-
} | null;
|
|
19
12
|
} | null;
|
|
20
13
|
export declare function handleDeaultSelectedDisabledOptions(dimensionId: string, derivationMethod: any): {
|
|
21
14
|
defaultSelected: boolean;
|
|
22
15
|
defaultDisabled: boolean;
|
|
23
16
|
};
|
|
24
|
-
export declare const getDataFormat: (metricName: string, info: any) => {
|
|
25
|
-
[x: string]: {
|
|
26
|
-
formatType: any;
|
|
27
|
-
decimalPlaces: any;
|
|
28
|
-
suffix: string;
|
|
29
|
-
};
|
|
30
|
-
} | null;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export interface ChartHeaderProps {
|
|
2
|
-
isFullScreen?: boolean;
|
|
3
2
|
theme?: string;
|
|
4
|
-
setFullScreen: (fullscreen: boolean) => void;
|
|
5
3
|
}
|
|
6
|
-
declare function ChartHeader({ theme
|
|
4
|
+
declare function ChartHeader({ theme }: ChartHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
7
5
|
export { ChartHeader };
|
|
@@ -5,5 +5,5 @@ export interface ChartContainerProps {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
chartStyle?: React.CSSProperties;
|
|
7
7
|
}
|
|
8
|
-
declare const _default: React.MemoExoticComponent<({ className, chartStyle, components }: ChartContainerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
declare const _default: React.MemoExoticComponent<({ className, chartStyle, components, }: ChartContainerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
9
9
|
export default _default;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const StyleChart: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
3
|
theme: string;
|
|
3
|
-
style?:
|
|
4
|
+
style?: React.CSSProperties;
|
|
4
5
|
}>> & string;
|
|
5
|
-
export declare const StyleChartHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<
|
|
6
|
+
export declare const StyleChartHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
6
7
|
theme?: string;
|
|
7
8
|
}>> & string;
|
|
8
|
-
export declare const GlobalDropdownStyle:
|
|
9
|
+
export declare const GlobalDropdownStyle: React.NamedExoticComponent<import("styled-components").ExecutionProps & object>;
|
|
@@ -20,6 +20,4 @@ export declare function chartAdvisor(chartJson: ChartJson): Promise<{
|
|
|
20
20
|
dataSource?: import("../DataSource/types").DataSource;
|
|
21
21
|
columns?: import("../Dataset/types").FieldInfoItem[];
|
|
22
22
|
timeGrain?: import("../../utils").TimeGrainType;
|
|
23
|
-
dataFormat?: import("../Dataset/types").DataFormat;
|
|
24
23
|
}>;
|
|
25
|
-
export declare function exportToExcel(data: any[], fileName: string): void;
|
|
@@ -10,6 +10,6 @@ type DrillByQueryData = QueryChartData & {
|
|
|
10
10
|
};
|
|
11
11
|
export declare const useChartDataQuery: (dataSourceType: DataSourceType) => {
|
|
12
12
|
queryChartDataFromDatasource: (queryData: QueryData, isInit?: Boolean) => Promise<void>;
|
|
13
|
-
queryDrillByChartData: ({ queryData, setDrillLoading, setDrillError }: DrillByQueryData) => Promise<void>;
|
|
13
|
+
queryDrillByChartData: ({ queryData, setDrillLoading, setDrillError, }: DrillByQueryData) => Promise<void>;
|
|
14
14
|
};
|
|
15
15
|
export {};
|
|
@@ -21,12 +21,3 @@ export type FieldInfoItem = {
|
|
|
21
21
|
type?: FieldDataType | VFieldDataType | string;
|
|
22
22
|
role?: string;
|
|
23
23
|
};
|
|
24
|
-
export interface MetricFormat {
|
|
25
|
-
formatType: string;
|
|
26
|
-
decimalPlaces?: number;
|
|
27
|
-
prefix?: string;
|
|
28
|
-
suffix?: string;
|
|
29
|
-
}
|
|
30
|
-
export type DataFormat = {
|
|
31
|
-
[metricName: string]: MetricFormat;
|
|
32
|
-
};
|
|
@@ -34,8 +34,8 @@ export declare const transform2Dataset: (chartJson: ChartJson) => {
|
|
|
34
34
|
}[];
|
|
35
35
|
foldData: Record<string, any>[];
|
|
36
36
|
isMetricFolded: boolean;
|
|
37
|
-
foldKey: string
|
|
38
|
-
foldValue: string
|
|
37
|
+
foldKey: string;
|
|
38
|
+
foldValue: string;
|
|
39
39
|
isColumnMegred: boolean;
|
|
40
40
|
megreColumnName: string | undefined;
|
|
41
41
|
};
|
|
@@ -51,11 +51,6 @@ export declare const transform2FoldData: (data: Record<string, any>[], dimension
|
|
|
51
51
|
foldKey: string;
|
|
52
52
|
foldValue: string;
|
|
53
53
|
isMetricFolded: boolean;
|
|
54
|
-
} | {
|
|
55
|
-
foldData: Record<string, any>[];
|
|
56
|
-
isMetricFolded: boolean;
|
|
57
|
-
foldKey?: undefined;
|
|
58
|
-
foldValue?: undefined;
|
|
59
54
|
};
|
|
60
55
|
export declare const transform2FillAndMegreData: (data: any[] | undefined, fieldInfo: FieldInfoItem[] | undefined, chartJson: ChartJson) => {
|
|
61
56
|
data: {
|
|
@@ -82,11 +77,8 @@ export declare const generateTimeSeries: (startTime: any, endTime: any, timeGrai
|
|
|
82
77
|
export declare const filledDataByTimeSeries: (sortedData: Record<string, any>[] | undefined, timeSeries: string[], timeGrain: TimeGrainType, timeField: string, metrics?: string[]) => Record<string, any>[];
|
|
83
78
|
export declare const getTimeGrainInterval: (timeGrain: string, sortedData: any[], timeField: string) => number;
|
|
84
79
|
export declare function formatTime2TimeGrain(timeGrain: TimeGrainType, value: Dayjs | number): string;
|
|
85
|
-
export declare const
|
|
80
|
+
export declare const uptateDataSet: (preJson: ChartJson, newJson: ChartJson, dataset: Dataset) => {
|
|
86
81
|
dataset: Dataset;
|
|
87
|
-
|
|
88
|
-
} | {
|
|
89
|
-
isShouldUpdate: boolean;
|
|
90
|
-
dataset?: undefined;
|
|
82
|
+
isChanged: boolean;
|
|
91
83
|
};
|
|
92
84
|
export {};
|
|
@@ -3,11 +3,7 @@ interface StyleProps {
|
|
|
3
3
|
fontSize?: number;
|
|
4
4
|
}
|
|
5
5
|
export declare const IndicatorStyle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyleProps>> & string;
|
|
6
|
-
export declare const CardStyle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("antd").FlexProps<import("antd/es/_util/type").AnyObject> & {
|
|
7
|
-
children?: React.ReactNode | undefined;
|
|
8
|
-
} & import("react").RefAttributes<HTMLElement>, "ref"> & {
|
|
6
|
+
export declare const CardStyle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("antd").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>, "ref"> & {
|
|
9
7
|
ref?: ((instance: HTMLElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLElement> | null | undefined;
|
|
10
|
-
}, StyleProps>> & string & Omit<import("react").ForwardRefExoticComponent<import("antd").FlexProps<import("antd/es/_util/type").AnyObject> & {
|
|
11
|
-
children?: React.ReactNode | undefined;
|
|
12
|
-
} & import("react").RefAttributes<HTMLElement>>, keyof import("react").Component<any, {}, any>>;
|
|
8
|
+
}, StyleProps>> & string & Omit<import("react").ForwardRefExoticComponent<import("antd").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, keyof import("react").Component<any, {}, any>>;
|
|
13
9
|
export {};
|
|
@@ -36,7 +36,6 @@ export interface VizChartState {
|
|
|
36
36
|
setTheme: (theme: string) => void;
|
|
37
37
|
setLoading: (loading: boolean) => void;
|
|
38
38
|
setChartJson: (chartJson: ChartJson) => void;
|
|
39
|
-
updateChartJson: (key: keyof ChartJson, newObj: any) => void;
|
|
40
39
|
setDataset: (dataset: Dataset) => void;
|
|
41
40
|
setControllerConfig: (controller: ChartControllersState) => void;
|
|
42
41
|
setContextMenu: (contextMenu: ContextMenu) => void;
|