The Dashboard
is the main entry point into the Dashboard module.
Deprecated as ArcGIS Dashboards Classic is retiring.
Dashboard
- class arcgis.apps.dashboard.Dashboard
Deprecated since version 2.0.1.
Creates a
Dashboard
Object.- Returns:
Dashboard
object
- property header
- Returns:
Header
object
- save(title, description='', summary='', tags=None, gis=None, overwrite=False)
Deprecated since version 2.0.1.
Publishes a Dashboard Object.
Parameter
Description
title
Required string. Title or Caption for the Dashboard.
description
Optional string. Description for the Dashboard.
summary
Optional string. Summary of the Dashboard.
tags
Optional string. Comma separated tags.
gis
Optional
GIS
to publish dashboard. By default uses active gis.overwrite
Optional Boolean. Overwrite existing dashboard.
- property side_panel
- Returns:
SidePanel
object
Details
- class arcgis.apps.dashboard.Details(item, name='Details', layer=0, title='', description='', max_features_displayed=50)
Creates a dashboard Details element.
Parameter
Description
item
Required Portal
Item
object. Item object should be aFeatureLayer
.name
Optional string. Name of the element.
layer
Optional integer. Layer index for the
FeatureLayerCollection
item. Default value is 0title
Optional string. Title of the widget.
description
Optional string. Description of the widget.
max_features_displayed
Optional integer. Maximum number of features to display.
EmbeddedContent
- class arcgis.apps.dashboard.EmbeddedContent(url, name='EmbeddedContent', title='', description='', content_type='document', refresh_interval=0, item=None, layer=0)
Creates a dashboard Embedded Content Widget.
Parameter
Description
url
Required string. Url of the embedded content or field name if item is not None.
name
Optional string. Name of the widget.
title
Optional string. Title of the widget.
description
Optional string. Description of the widget.
content_type
Optional string. Type of the content. Choose from “document”, “image”, “video”.
refresh_interval
Optional integer. Interval to refresh in minutes. It is only applicable for content_type = ‘image’
item
Optional Portal
Item
. To show content from portal.layer
Optional integer. Layer number when item is a mapwidget.
Gauge
- class arcgis.apps.dashboard.Gauge(item, name='Gauge', layer=0, title='', description='')
Creates a dashboard Gauge widget.
Parameter
Description
item
Required Portal
Item
object. Item object can be aFeatureLayer
or a MapWidget.name
Optional string. Name of the gauge widget.
layer
Optional integer. Layer number when item is a mapwidget.
title
Optional string. Title or Caption for the widget.
description
Optional string. Description for the widget.
Header
- class arcgis.apps.dashboard.Header(title=None, subtitle=None, margin=True, size='medium', logo_image_url=None, logo_url=None, background_image_url=None, background_image_size='fit-width', background_image_position='left', signout_link=False, menu_links=None)
Creates a dashboard header widget.
Parameter
Description
title
Optional string. Title of the header.
subtitle
Optional string. Subtitle of the header.
margin
Optional boolean. Set True to add margin to header position.
size
Optional string. Define size of header from small, medium, large. Default is medium.
logo_image_url
Optional url string. Define a logo image.
logo_url
Optional url string. Define a hyperlink for the logo image.
background_image_url
Optional url string. Add a background image to the header.
background_image_size
Optional string. Select size of the image. Options:
fit-widthfit-heightfit-bothrepeatbackground_image_position
Optional string. Define the image position when using fit-width or fit-height. Allowed options:
fit-height: left, center, rightfit-width: top, middle, bottomsignout_link
Optional boolean. Parameter to save the best model during training. If set to True the best model based on validation loss will be saved during training.
menu_links
Optional list of tuples. Each tuple contains string label and string url.
- property background_image_placement
- Returns:
Background image position.
If fit-height then left, right, centerIf fit-width then top, bottom, middlefit-both, repeat then None
- Returns:
List of menu links.
Indicator
- class arcgis.apps.dashboard.Indicator(item, name='Indicator', layer=0, title='', description='')
Creates a dashboard Indicator widget.
Parameter
Description
item
Required Portal
Item
object. Item object can be aFeatureLayer
or a MapWidget.name
Optional string. Name of the Indicator widget.
title
Optional string. Title or Caption for the widget.
layer
Optional integer. Layer number when item is a mapwidget.
description
Optional string. Description for the widget.
IndicatorData
- class arcgis.apps.dashboard.IndicatorData
- add_filter(field, join, condition, **kwargs)
Add filters associated with widget. The filters are applied to the layer used in the initialization of the Indicator widget. Please see Filter data for detailed description of how filtering works with dashboard elements.
Parameter
Description
field
The layer’s attribute field name that will be used to limit the features visualized in the widget.
join
Specify AND or OR to indicate whether there will be one or multiple filter conditions.
condition
The operator used to evaluate the attributes and return the subset of results. The operators available change depending upon the type of the attribute field. See Filter condition components for details on what conditions apply to an attribute field based on its contents.
In addition to explicitly named parameters, the
add_filter()
method supports an optional key word argument when the condition is equal, not equal greater than, greater than or equal, less than, or less than or equalkwargs
Description
value
The specific value or values to use to determine which subset of layer or table rows to include.
# 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)
ReferenceData
List
- class arcgis.apps.dashboard.List(item, name='List', layer=0, title=None, description=None)
Creates a dashboard List widget.
Parameter
Description
item
Required Portal
Item
object. Item object can be aFeatureLayer
or a MapWidget.name
Optional string. Name of the List widget.
layer
Optional integer. Layer number when item is a mapwidget.
title
Optional string. Title or Caption for the widget.
description
Optional string. Description for the widget.
MapLegend
- class arcgis.apps.dashboard.MapLegend(map_widget, name='MapLegend', title='', description='')
Create a MapLegend widget for Dashboard
Parameter
Description
map_widget
Required web map widget. Legend for this Map widget is displayed. This map widget needs to be a part of the final Dashboard as well.
name
Optional String. Name of the widget.
title
Optional string. Title of the widget.
description
Optional string. Description of the widget.
PieChart
- class arcgis.apps.dashboard.PieChart(item, name='PieChart', layer=0, categories_from='groupByValues', title='', description='')
Creates a dashboard Pie Chart widget.
Parameter
Description
item
Required Portal
Item
object. Item object can be a Table Layer or a MapWidget.name
Optional string. Name of the pie chart widget.
layer
Optional integer. Layer number when item is a mapwidget.
categories_from
Optional string. Select from groupByValues, features or fields.
title
Optional string. Title or Caption for the widget.
description
Optional string. Description for the widget.
RichText
- class arcgis.apps.dashboard.RichText(html_text, name='RichText', title='', description='')
Creates a dashboard Rich Text widget.
Parameter
Description
html_text
Required HTML text. This text will be displayed in Rich Text format.
name
Optional String. Name of the widget.
title
Optional String. Title of the widget.
description
Optional String. Description of the widget.
SerialChart
- class arcgis.apps.dashboard.SerialChart(item, name='SerialChart', layer=0, categories_from='groupByValues', title='', description='')
Creates a dashboard Serial Chart widget.
Parameter
Description
item
Required Portal
Item
object. Item object can be aFeatureLayer
or a MapWidget.name
Optional string. Name of the serial chart widget.
layer
Optional integer. Layer number when item is a mapwidget.
categories_from
Optional string. Select from groupByValues, features or fields.
title
Optional string. Title or Caption for the widget.
description
Optional string. Description for the widget.
SidePanel
DatePicker
- class arcgis.apps.dashboard.DatePicker(range=False, operator='is', label='', **kwargs)
Creates a Date Selector widget for Side Panel or Header.
Parameter
Description
range
Optional boolean. True to create a range selector.
operator
Optional String. Operator for non range datepicker.
Options:
“is”, “is not”, “is before”,“is or is before”, “is after”,“is or is after”.label
Optional String. Label for the widget.
kwargs
If “range” is True, provide two parameters “min_value” and “max_value”. If “range” is False provide single parameter “value”.
Allowed values:
None, “Today”, or a fixed value in 24 hours format(year, month, day, hour, minutes)or(year, month, day)
CategorySelector
- class arcgis.apps.dashboard.CategorySelector
Creates a Category Selector widget for Side Panel or Header.
- property selector
- Returns:
Selector Properties Object, set label, preferred display, display threshold, operator etc.
- set_defined_values(key_value_pairs, value_type='string')
Set defined values for the dropdown.
Parameter
Description
key_value_pairs
Optional list of tuples. The tuple should contain labels and their corresponding values.
value_type
Optional String. The data type of the values in the tuple. “integer” or “string
- set_feature_options(item, line_item_text='', field_name=None, max_features=50)
Set feature values for dropdown.
Parameter
Description
item
Required Portal
Item
. Dropdown values will be populated from this.line_item_text
Optional String. This text will be displayed with options.
field_name
Optional String. Data from this field will be added to list.
max_features
Optional Integer. Set max features to display.
- set_group_by_values(item, category_field, max_features=50)
Set group by values for dropdown.
Parameter
Description
item
Required Portal
Item
. Dropdown values will be populated from this.category_field
Optional String. This string denotes the field to pick the values from.
max_features
Optional Integer. Set max features to display.
NumberSelector
- class arcgis.apps.dashboard.NumberSelector(range=False, display_type='spinner', label='Select a number', **kwargs)
Creates a Number Selector widget for Side Panel or Header.
Parameter
Description
range
Optional boolean. True to create a range selector.
display_type
Optional String. Display type can be from “spinner”, “slider”, “input”.
label
Optional string. Label for the selector.
Keyword Arguments
Parameter
Description
operator
Optional string for non-range input.
Allowed:
“equal”, “not equal”, “greater than”,“greater than or equal”, “less than”,“less than or equal”.Default: “equal”increment_factor
Optional int for slider and spinner input.
- property placeholder_text
- Returns:
Text for left place holder in range type or default place holder.
- set_defined_limits(lower_limit=0, upper_limit=100, **kwargs)
Set the item to pick values from for spinner and slider display type.
Parameter
Description
lower_limit
Optional integer. Set the lower limit.
upper_limit
Optional integer. Set the upper limit.
Keyword Arguments
Parameter
Description
default
Optional integer. Set default value for non-range selector.
lower_default
Optional integer. Set the lower default value for range selector.
upper_default
Optional integer. Set the upper default value for range selector.
- set_statistics_limits(item, field, default='min', layer_id=0)
Set the item to pick values from for spinner and slider display type.
Parameter
Description
item
Required Portal
Item
. Item to pick values from.field
Required String. Field from the Portal Item.
default
Optional String. Default value statistic. Options: “min”, “max”, “avg”
layer_id
Optional integer. Layer Id for the item.