@tachybase/plugin-block-charts 0.23.22 → 0.23.40

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.
@@ -2,5 +2,25 @@ import { RenderProps } from '../chart';
2
2
  import { AntdChart } from './antd';
3
3
  export declare class GroupedTable extends AntdChart {
4
4
  constructor();
5
- getProps({ data, fieldProps, general, advanced, ctx }: RenderProps): any;
5
+ /**
6
+ * transform 数据格式化配置
7
+ * config 图表配置, general.categoryField(同参数 general) 分类字段 advanced.columns 数据表列配置(同参数 advanced)
8
+ * service 网络请求, service.data 返回数据, (同参数 data)
9
+ * measures 度量配置
10
+ * fieldProps 度量和维度构造的列配置, interface 维度类型, transformer 维度转换器 label 显示名称
11
+ * dimensions 维度配置
12
+ * query 图表查询条件, measures 度量配置, dimensions 维度配置, filters 过滤条件, orders 排序条件, limit 限制条数
13
+ */
14
+ getProps({ data, fieldProps, advanced, ctx }: RenderProps): {
15
+ bordered: boolean;
16
+ size: string;
17
+ pagination: boolean;
18
+ scroll: {
19
+ x: string;
20
+ };
21
+ rowKey: (record: any) => any;
22
+ expandRowByClick: boolean;
23
+ dataSource: any;
24
+ columns: any;
25
+ };
6
26
  }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 根据 groupField 动态分组数据,并对数字类型字段进行累加,同时构造唯一 key
3
+ * @param datas 原始数据
4
+ * @param groupField 分组字段数组
5
+ * @returns 分组后的嵌套结构
6
+ */
7
+ export declare function getGroupData(datas: any[], groupField: string[]): any;
@@ -0,0 +1,9 @@
1
+ interface IOptions {
2
+ fieldProps: {
3
+ [key: string]: any;
4
+ };
5
+ dataIndex: string;
6
+ render: Function | undefined;
7
+ }
8
+ export declare function renderText(text: string | number | null | undefined, record: Record<string, any>, options: IOptions): string | number;
9
+ export {};