AttributeStatistics
对用户传入的待查询图层,进行属性统计展示。
<mapgis-attribute-statistics></mapgis-attribute-statistics>
基本用法
传入图层ID
传入统计参数
API
属性
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|---|---|---|---|---|
| layer | 图层对象,可以是webclient-common库的图层对象或者子图层对象,监听属性 | zondy.layer.Layer | zondy.layer.Sublayer | ||
| layerId | 图层Id,传入图层Id来查找图层,监听属性 | string | ||
| sublayerId | 子图层Id,通过图层Id和子图层Id来查找子图层,监听属性 | string | ||
| groupField | 分组字段 | string | ||
| groupMode | 分组模式,unique:一值一类;range:分段分类 | string | ||
| rangeNum | 分组模式为分段分类时的分段数量 | number | 5 | |
| statisticsFields | 统计字段 | array | [] | |
| statisticsType | 统计方式,同zondy.enum.StatisticType | string | ||
| statisticsFieldColorRange | 统计字段在图表上的颜色区间 | array | ['#ff0000', '#0000ff'] |
事件
| 事件名称 | 说明 | 回调参数 | 版本 |
|---|---|---|---|
| layerChange | 统计图层变化 |
方法
| 名称 | 描述 | 版本 |
|---|---|---|
| statistics | 统计 | |
| clearState | 清除状态 |
