@advt-gpt-chart/package 3.1.9 → 3.2.0

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.
@@ -1,10 +1,42 @@
1
1
  import type { BaseChartProps, DataItem } from '../../types';
2
2
  import { CommonGlobalConfig } from '../../types/config';
3
3
  export type TableDataItem = DataItem & {};
4
+ export interface CellMergeConfig {
5
+ /** 列名或列索引 */
6
+ column: string | number;
7
+ /** 合并后显示的内容 */
8
+ content: string;
9
+ /**
10
+ * 合并类型(v3 扩展字段,v1 暂不实现)
11
+ * - 'all': 整列合并(v1 默认)
12
+ * - 'range': 范围合并(v2 支持)
13
+ * - 'group': 分组合并(v3 支持)
14
+ */
15
+ type?: 'all' | 'range' | 'group';
16
+ /**
17
+ * 合并范围(v2 扩展字段,v1 暂不实现)
18
+ * type 为 'range' 时使用
19
+ */
20
+ range?: {
21
+ startRow: number;
22
+ endRow: number;
23
+ };
24
+ /**
25
+ * 分组字段(v3 扩展字段,v1 暂不实现)
26
+ * type 为 'group' 时使用
27
+ */
28
+ groupBy?: string;
29
+ /**
30
+ * 自定义样式(v3 扩展字段,v1 暂不实现)
31
+ */
32
+ style?: any;
33
+ }
4
34
  export type TableConfig = CommonGlobalConfig & {
5
35
  data: TableDataItem[];
6
36
  metrics?: string[];
7
37
  dimensions?: string[];
8
38
  spec?: Record<string, any>;
39
+ /** 单元格合并配置 */
40
+ columnMerge?: CellMergeConfig[];
9
41
  };
10
42
  export type TableProps = BaseChartProps & Partial<TableConfig>;