本文简要介绍 python 语言中 arcgis.apps.dashboard.IndicatorData.add_filter 的用法。
用法:
add_filter(field, join, condition, **kwargs)关键字参数:
- value: 用于确定要包含的图层或表行的子集的特定值。
添加与小部件关联的过滤器。过滤器应用于指标小部件初始化中使用的层。请参阅Filter data,了解过滤如何与仪表板元素配合使用的详细说明。
Parameter
Description
field
图层的属性字段名称,将用于限制小部件中可视化的函数。
join
指定
AND或OR来指示是否有一个或多个过滤条件。condition
用于评估属性并返回结果子集的运算符。可用的运算符根据属性字段的类型而变化。请参阅Filter condition components,了解有关基于其内容的属性字段适用哪些条件的详细信息。
除了显式命名的参数之外,当条件为
equal、not equalgreater than、greater than or equal、less than或less than or equal时,add_filter()方法还支持可选关键字参数例子:
# Usage Example >>> indicator1 = Indicator(item=flyr_item) # Set attribute field to use for default statistic of `count` >>> indicator1.data.value_field = "ObjectId" # Add filter for ObjectID's greater than 1500 to data object >>> indicator1.data.add_filter(field="ObjectId", join="AND", condition="greater than", value=1500) >>> new_dash = Dashboard() # Set the dashboard layour to include the widget >>> new_dash.layout = add_row([indicator1]) >>> saved_dash = new_dash.save(title="Dashboard with Indicator", description="Dashboard with indicator widget based "on a hosted feature layer with one" "layer", summary="Single layer indicator created in API.", tags="python_api,dashboard,single_layer_hfl", overwrite=True)
相关用法
- Python arcgis.apps.hub.IndicatorManager.add用法及代码示例
- Python arcgis.apps.hub.Indicator.update用法及代码示例
- Python arcgis.apps.hub.Indicator.delete用法及代码示例
- Python arcgis.apps.hub.Initiative.update用法及代码示例
- Python arcgis.apps.hub.InitiativeManager.add用法及代码示例
- Python ArcGIS IntegratedMeshLayer用法及代码示例
- Python ArcGIS InitiativeManager.clone用法及代码示例
- Python ArcGIS Integration用法及代码示例
- Python arcgis.apps.hub.InitiativeManager.get用法及代码示例
- Python arcgis.apps.hub.Initiative.delete用法及代码示例
- Python ArcGIS ImageryLayer.thumbnail用法及代码示例
- Python ArcGIS Item.publish用法及代码示例
- Python ArcGIS ImageryLayer.draw_graph用法及代码示例
- Python ArcGIS Item.reassign_to用法及代码示例
- Python ArcGIS ImageryLayer.compute_stats_and_histograms用法及代码示例
- Python ArcGIS ImageryTileManager.export用法及代码示例
- Python ArcGIS ImageryLayer.plot_histograms用法及代码示例
- Python ArcGIS ImageryLayerCacheManager.delete_tiles用法及代码示例
- Python ArcGIS ImageryLayer.to_features用法及代码示例
- Python ArcGIS Item.share用法及代码示例
- Python ArcGIS Item.status用法及代码示例
- Python ArcGIS Item.delete_relationship用法及代码示例
- Python ArcGIS Item.download用法及代码示例
- Python ArcGIS ImageryTileManager.estimate_size用法及代码示例
- Python ArcGIS ImageryLayer.compute_cache_info用法及代码示例
注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 arcgis.apps.dashboard.IndicatorData.add_filter。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
