@advt-gpt-chart/package 3.2.9 → 3.3.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/ChartCodeRender/type.d.ts +2 -0
- package/dist/Chart/ChartControllers/IemsController/index.d.ts +6 -0
- package/dist/Chart/ChartWrapper/style.d.ts +1 -0
- package/dist/Chart/ChartWrapper/utils.d.ts +2 -0
- package/dist/Charts/{AgentCharts → Custom/AgentCharts}/DimensionAttribution/types.d.ts +1 -1
- package/dist/Charts/{AgentCharts → Custom/AgentCharts}/FactorAttribution/types.d.ts +1 -1
- package/dist/Charts/{AgentCharts → Custom/AgentCharts}/types.d.ts +1 -1
- package/dist/Charts/Custom/CapacityDemand/index.d.ts +3 -0
- package/dist/Charts/Custom/CapacityDemand/types.d.ts +34 -0
- package/dist/Charts/Custom/CapacityDemand/utils.d.ts +1 -0
- package/dist/Charts/PivotTable/columnTreeUtils.d.ts +16 -0
- package/dist/Charts/PivotTable/types.d.ts +4 -0
- package/dist/Charts/common/hooks/useDashLine.d.ts +2 -1
- package/dist/Charts/common/types.d.ts +5 -0
- package/dist/DataView/DataSource/iems.d.ts +2 -0
- package/dist/DataView/DataSource/types.d.ts +2 -1
- package/dist/GPTVis/hooks/formatChartJson.d.ts +2 -0
- package/dist/export.d.ts +7 -4
- package/dist/index.es.js +167107 -166935
- package/dist/index.es.js.gz +0 -0
- package/dist/index.umd.js +2109 -2094
- package/dist/index.umd.js.gz +0 -0
- package/dist/locale/en-US.d.ts +3 -0
- package/dist/locale/zh-CN.d.ts +3 -0
- package/dist/locale/zh-TW.d.ts +3 -0
- package/dist/types/chart.d.ts +8 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- /package/dist/Charts/{AgentCharts → Custom/AgentCharts}/AgentChartHeader.d.ts +0 -0
- /package/dist/Charts/{AgentCharts → Custom/AgentCharts}/AgentChartHeaderStyle.d.ts +0 -0
- /package/dist/Charts/{AgentCharts → Custom/AgentCharts}/DimensionAttribution/index.d.ts +0 -0
- /package/dist/Charts/{AgentCharts → Custom/AgentCharts}/FactorAttribution/index.d.ts +0 -0
- /package/dist/Charts/{AgentCharts → Custom/AgentCharts}/index.d.ts +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const StyleWrapperInner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
2
|
theme: string;
|
|
3
3
|
$hideChartHeader?: boolean;
|
|
4
|
+
$hideChartBorder?: boolean;
|
|
4
5
|
$minHeight?: string;
|
|
5
6
|
style?: any;
|
|
6
7
|
}>> & string;
|
|
@@ -24,6 +24,8 @@ export declare function chartAdvisor(chartJson: ChartJson): Promise<{
|
|
|
24
24
|
timeGrain?: import("../../utils").TimeGrainType;
|
|
25
25
|
dataFormat?: import("../../DataView/Dataset/types").DataFormat;
|
|
26
26
|
hideChartHeader?: boolean;
|
|
27
|
+
hideChartAction?: boolean;
|
|
28
|
+
hideChartBorder?: boolean;
|
|
27
29
|
series?: any[];
|
|
28
30
|
agent?: import("../ChartCodeRender/type").AgentConfig;
|
|
29
31
|
availableChartTypes?: string[];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { BaseChartProps } from '../../../types';
|
|
2
|
+
/** 容需分析数据项 */
|
|
3
|
+
export interface CapacityDemandDataItem {
|
|
4
|
+
/** 时间 */
|
|
5
|
+
time: string;
|
|
6
|
+
/** 需量 */
|
|
7
|
+
demand: number;
|
|
8
|
+
/** 容量 */
|
|
9
|
+
capacity: number;
|
|
10
|
+
/** 差值 */
|
|
11
|
+
differenceValue: number;
|
|
12
|
+
/** 是否预测值 */
|
|
13
|
+
isPrediction: boolean;
|
|
14
|
+
/** 需量预测数据 */
|
|
15
|
+
demandPrediction?: number | null;
|
|
16
|
+
}
|
|
17
|
+
/** 容需分析图表配置 */
|
|
18
|
+
export interface CapacityDemandConfig {
|
|
19
|
+
/** 数据 */
|
|
20
|
+
data: CapacityDemandDataItem[];
|
|
21
|
+
/** 摘要文本,显示在表格上方 */
|
|
22
|
+
summary?: string;
|
|
23
|
+
/** 主题 */
|
|
24
|
+
theme?: 'light' | 'dark';
|
|
25
|
+
/** 列配置 */
|
|
26
|
+
columns?: CapacityDemandDataItem[];
|
|
27
|
+
/** 数据格式 */
|
|
28
|
+
dataFormat?: string;
|
|
29
|
+
/** 时间粒度 */
|
|
30
|
+
timeGrain?: 'day' | 'hour' | 'minute' | 'second';
|
|
31
|
+
}
|
|
32
|
+
/** 容需分析图表属性 */
|
|
33
|
+
export interface CapacityDemandProps extends BaseChartProps, Partial<CapacityDemandConfig> {
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatCapacityDemandChartJson: any;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DataItem } from '../../types';
|
|
2
|
+
/** 隐藏指标映射:{ [dimensionKey]: { [dimensionValue]: [要隐藏的indicatorKey] } } */
|
|
3
|
+
type HideMap = Record<string, Record<string, string[]>>;
|
|
4
|
+
interface ComputeColumnTreeParams {
|
|
5
|
+
data: DataItem[];
|
|
6
|
+
metrics: string[];
|
|
7
|
+
cols: string[];
|
|
8
|
+
columnIndicatorHide?: HideMap;
|
|
9
|
+
autoHideColumnIndicators?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 计算最终的 columnTree 配置
|
|
13
|
+
* 合并自动检测(autoHideColumnIndicators)和手动指定(columnIndicatorHide)的隐藏规则
|
|
14
|
+
*/
|
|
15
|
+
export declare const computeColumnTree: (params: ComputeColumnTreeParams) => Record<string, any>[] | undefined;
|
|
16
|
+
export {};
|
|
@@ -14,6 +14,10 @@ export interface PivotTableConfig extends CommonGlobalConfig {
|
|
|
14
14
|
metrics?: string[];
|
|
15
15
|
rows?: string[];
|
|
16
16
|
cols?: string[];
|
|
17
|
+
/** 控制列维度值下隐藏的指标,不配置则默认全部显示 */
|
|
18
|
+
columnIndicatorHide?: Record<string, Record<string, string[]>>;
|
|
19
|
+
/** 开启后自动分析数据,隐藏全为 null/undefined 的指标列 */
|
|
20
|
+
autoHideColumnIndicators?: boolean;
|
|
17
21
|
spec?: Record<string, any>;
|
|
18
22
|
onTreeHierarchyStateChange?: (args: any, tableInstance?: any) => void;
|
|
19
23
|
onReady?: (tableInstance: any) => void;
|
|
@@ -17,7 +17,7 @@ import type { DashSegment } from '../types';
|
|
|
17
17
|
* });
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
export declare const useDashLine: ({ data, actualData, xField, yField, getFieldType, dashSegments, metrics, }: {
|
|
20
|
+
export declare const useDashLine: ({ data, actualData, xField, yField, getFieldType, dashSegments, metrics, seriesField, }: {
|
|
21
21
|
data: any[];
|
|
22
22
|
actualData?: any[];
|
|
23
23
|
xField: string;
|
|
@@ -25,6 +25,7 @@ export declare const useDashLine: ({ data, actualData, xField, yField, getFieldT
|
|
|
25
25
|
getFieldType?: (fieldName: string, value?: any) => GenericDataType | undefined;
|
|
26
26
|
dashSegments?: DashSegment[];
|
|
27
27
|
metrics?: string[];
|
|
28
|
+
seriesField?: string;
|
|
28
29
|
}) => {
|
|
29
30
|
processedData: any[];
|
|
30
31
|
style: any;
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
*
|
|
12
12
|
* // 多段虚线
|
|
13
13
|
* [{ from: '00:30', to: '00:45' }, { from: '01:00' }]
|
|
14
|
+
*
|
|
15
|
+
* // 只对指定指标生效
|
|
16
|
+
* [{ from: '2026-07', metrics: ['demand'] }]
|
|
14
17
|
* ```
|
|
15
18
|
*/
|
|
16
19
|
export interface DashSegment {
|
|
@@ -18,6 +21,8 @@ export interface DashSegment {
|
|
|
18
21
|
from: string | number;
|
|
19
22
|
/** 结束点(可选,不填则到末尾) */
|
|
20
23
|
to?: string | number;
|
|
24
|
+
/** 只对指定指标生效(可选,不填则对所有指标生效) */
|
|
25
|
+
metrics?: string[];
|
|
21
26
|
}
|
|
22
27
|
/**
|
|
23
28
|
* 阈值线配置
|
|
@@ -4,8 +4,9 @@ import { FieldInfoItem } from '../Dataset/types';
|
|
|
4
4
|
export declare const DataSourceTypes: {
|
|
5
5
|
METRIC: string;
|
|
6
6
|
SJ: string;
|
|
7
|
+
IEMS: string;
|
|
7
8
|
};
|
|
8
|
-
export type DataSourceType = 'metricInsight' | 'simpleJson';
|
|
9
|
+
export type DataSourceType = 'metricInsight' | 'simpleJson' | 'iems';
|
|
9
10
|
export type DataSource = {
|
|
10
11
|
type: DataSourceType;
|
|
11
12
|
url: string;
|
package/dist/export.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
/********** AgentCharts **********/
|
|
3
|
-
import { default as AgentCharts } from './Charts/AgentCharts';
|
|
4
|
-
import type { AgentChartsProps } from './Charts/AgentCharts/types';
|
|
5
2
|
/********** Vcharts chart **********/
|
|
6
3
|
import { default as Area } from './Charts/Area';
|
|
7
4
|
import { AreaProps } from './Charts/Area/types';
|
|
@@ -9,6 +6,12 @@ import { default as Bar } from './Charts/Bar';
|
|
|
9
6
|
import type { BarProps } from './Charts/Bar/types';
|
|
10
7
|
import { default as Composite } from './Charts/Composite';
|
|
11
8
|
import type { CompositeProps } from './Charts/Composite/types';
|
|
9
|
+
/********** AgentCharts **********/
|
|
10
|
+
import { default as AgentCharts } from './Charts/Custom/AgentCharts';
|
|
11
|
+
import type { AgentChartsProps } from './Charts/Custom/AgentCharts/types';
|
|
12
|
+
/********** CapacityDemand **********/
|
|
13
|
+
import { default as CapacityDemand } from './Charts/Custom/CapacityDemand';
|
|
14
|
+
import type { CapacityDemandProps } from './Charts/Custom/CapacityDemand/types';
|
|
12
15
|
import { default as Donut } from './Charts/Donut';
|
|
13
16
|
import type { DonutProps } from './Charts/Donut/types';
|
|
14
17
|
import { default as Funnel } from './Charts/Funnel';
|
|
@@ -41,7 +44,7 @@ import { default as Tabs } from './Charts/Tabs';
|
|
|
41
44
|
import type { TabsProps } from './Charts/Tabs/types';
|
|
42
45
|
/********** NTV **********/
|
|
43
46
|
import { VisText, type VisTextProps } from './Charts/Text';
|
|
44
|
-
export { AgentCharts, type AgentChartsProps, Area, type AreaProps, Bar, type BarProps, Composite, type CompositeProps, Donut, type DonutProps, Funnel, type FunnelProps, Gauge, type GaugeProps, Heatmap, type HeatmapProps, Indicator, type IndicatorProps, Line, type LineProps, Pie, type PieProps, PivotTable, type PivotTableProps, Radar, type RadarProps, Rank, type RankProps, Scatter, type ScatterProps, Table, type TableProps, Tabs, type TabsProps, VisText, type VisTextProps, };
|
|
47
|
+
export { AgentCharts, type AgentChartsProps, Area, type AreaProps, Bar, type BarProps, CapacityDemand, type CapacityDemandProps, Composite, type CompositeProps, Donut, type DonutProps, Funnel, type FunnelProps, Gauge, type GaugeProps, Heatmap, type HeatmapProps, Indicator, type IndicatorProps, Line, type LineProps, Pie, type PieProps, PivotTable, type PivotTableProps, Radar, type RadarProps, Rank, type RankProps, Scatter, type ScatterProps, Table, type TableProps, Tabs, type TabsProps, VisText, type VisTextProps, };
|
|
45
48
|
export declare const DEFAULT_CHART_COMPONENTS: Record<string, React.FC<any>>;
|
|
46
49
|
export declare const COMMON_CHART_COMPONENTS: Record<string, any>;
|
|
47
50
|
export declare const NTV_CHART_COMPONENTS: Record<string, any>;
|