本文簡要介紹 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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
