>以一级循环表头为例,为大家讲解一下循环表头的配置方法; 多级表头的配置跟一级的配置方法一致; #### 要想通过实现图1.11中,“1月、2月、3月、4月、5月、6月”循环展示,而不是写死数据,需要进行如下配置: ![](https://img.kancloud.cn/41/5b/415b3cd0d0bc7c14877bd994a96b99b6_1542x784.png) ![](https://img.kancloud.cn/98/39/9839bbc97c6bcb878ffce400194b1ccf_803x35.png) ### **以配置图1.31为例,配置方法如下:** ``` 备注: 1、目前支持做表多级循环 ,最多3级动态的; 2、表头循环对应的列数据必须设置成“动态属性”; 3、表头循环对应的列数据之前的列必须设置成分组;(这个后期会优化) ; ``` (1)按图1.32将表格样式设计好;并把要使用的数据源添加上; ![](https://img.kancloud.cn/8d/9a/8d9a9c58e05903c7cba9a613385103de_999x425.png) ![](https://img.kancloud.cn/fd/59/fd5951266b303ad2c0260356e48b4011_809x31.png) (2)拖动相应字段,到表格中 ![](https://img.kancloud.cn/7e/20/7e20a593c383627caa27ab1e684b187b_1089x422.png) ![](https://img.kancloud.cn/65/cf/65cfaca8b29fee1d18279364733448f9_803x30.png) (3)设置字段的渲染方式: * 设置月份循环:将字段“聚合方式”设置成“分组”;“扩展方向”设置成“横向”; ![](https://img.kancloud.cn/be/61/be61b78252710e7bcb3e7dc0f922da40_1534x490.png) ![](https://img.kancloud.cn/e1/d7/e1d7c1d5ac15878ec52d411e8e8772bb_804x30.png) * 设置分组:将“区域”、“省份”设置成分组; ![](https://img.kancloud.cn/ef/95/ef956163fb11834ac8dd6835dd189859_1587x574.png) ![](https://img.kancloud.cn/95/58/955814b8b470b97276fd0bddb62f9eb1_805x31.png) * 设置数据:将销售额、捐赠、比例值设置成“动态属性”; ![](https://img.kancloud.cn/d7/78/d7783602bd4318cb160280e09d65955e_1551x528.png) ![](https://img.kancloud.cn/7c/c8/7cc832956b72fa94551847af8daf105d_803x30.png) (4)数据源格式可参考如下: ``` { "data": [ { "region": "华南", "province": "广东省", "moth":"1月", "sales_1": "1062789", "gift_1": "15346", "proportion_1": "15%" }, { "region": "华南", "province": "广东省", "moth":"2月", "sales_1": "1062789", "gift_1": "15346", "proportion_1": "15%" }, { "region": "华南", "province": "广东省", "moth":"3月", "sales_1": "1062789", "gift_1": "15346", "proportion_1": "15%" }, { "region": "华南", "province": "广东省", "moth":"4月", "sales_1": "1062789", "gift_1": "15346", "proportion_1": "15%" }, { "region": "华南", "province": "广东省", "moth":"5月", "sales_1": "1062789", "gift_1": "15346", "proportion_1": "15%" }, { "region": "华南", "province": "广东省", "moth":"6月", "sales_1": "1062789", "gift_1": "15346", "proportion_1": "15%" }, { "region": "华南", "province": "广西壮族自治区", "moth":"1月", "sales_1": "10000", "gift_1": "1000", "proportion_1": "10%" }, { "region": "华南", "province": "广西壮族自治区", "moth":"2月", "sales_1": "10000", "gift_1": "1000", "proportion_1": "10%" }, { "region": "华南", "province": "广西壮族自治区", "moth":"3月", "sales_1": "48887", "gift_1": "3960", "proportion_1": "10%" }, { "region": "华南", "province": "广西壮族自治区", "moth":"4月", "sales_1": "51484", "gift_1": "7440", "proportion_1": "10%" }, { "region": "华南", "province": "广西壮族自治区", "moth":"5月", "sales_1": "10000", "gift_1": "1000", "proportion_1": "10%" }, { "region": "华南", "province": "广西壮族自治区", "moth":"6月", "sales_1": "46388", "gift_1": "4000", "proportion_1": "10%" }] } ```