arcgis.apps.dashboard module

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.

:return Dashboard object

property header
Returns

Header Object

property layout
Returns

Layout of the dashboard

save(title, description='', summary='', tags=None, gis=None, overwrite=False)

Publishes a Dashboard Object.

Argument

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

:return Side Panel Object

property theme

Details

class arcgis.apps.dashboard.Details(item, name='Details', layer=0, title='', description='', max_features_displayed=50)

Creates a dashboard Details element.

Argument

Description

item

Required Portal Item object. Item object should be a Feature Layer.

name

Optional string. Name of the element.

layer

Optional integer. Layer index for the Feature Layer Collection item. Default value is 0

title

Optional string. Title of the widget.

description

Optional string. Description of the widget.

max_features_displayed

Optional integer. Maximum number of features to display.

property max_features
Returns

Max Features to display for feature data.

property no_data
Returns

NoDataProperties Object

property show_attachment
Returns

True if attachment is enabled else False.

property show_content
Returns

True if content is enabled else False.

property show_last_update
Returns

True if show last update is enabled else False.

property show_media
Returns

True if media is enabled else False.

property show_title
Returns

True if title is enabled else False.

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.

Argument

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.

property content_type
Returns

Content type of the embedded content.

property max_features
Returns

Max Features to display for feature data.

property no_data
Returns

NoDataProperties Object

property refresh_interval
Returns

Refresh interval for image content.

property url
Returns

Url of the embedded content.

Gauge

class arcgis.apps.dashboard.Gauge(item, name='Gauge', layer=0, title='', description='')

Creates a dashboard Gauge widget.

Argument

Description

item

Required Portal Item object. Item object can be a Feature Layer 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.

property data
Returns

Gauge Data object. Set data properties, categories and values.

property gauge_options
Returns

Gauge options object. Set gauge properties.

property max_features
Returns

max features for widget.

property no_data
Returns

Nodata Object, set various nodata properties

property show_last_update
Returns

show last update or not.

Indicator

class arcgis.apps.dashboard.Indicator(item, name='Indicator', layer=0, title='', description='')

Creates a dashboard Indicator widget.

Argument

Description

item

Required Portal Item object. Item object can be a Feature Layer 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.

property data
Returns

Indicator Data object. Set data properties, categories and values.

property max_features
Returns

max features for widget.

property reference
Returns

Indicator reference object. Set data properties, categories and values.

property show_last_update
Returns

show last update or not.

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.

Argument

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 equal

kwargs

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)
property factor
Returns

value conversion factor.

property filters
Returns

filters associated with widget

property offset
Returns

value conversion offset.

property statistic
Returns

statistic for data.

property value_field
Returns

value field for data.

property value_type
Returns

value type of data.

ReferenceData

class arcgis.apps.dashboard.ReferenceData
property factor
Returns

value conversion factor.

property fixed_value
Returns

fixed value of reference.

property offset
Returns

value conversion offset.

property reference_field
Returns

reference field name.

property reference_type
Returns

reference type of reference.

property statistic
Returns

statistic for reference.

List

class arcgis.apps.dashboard.List(item, name='List', layer=0, title=None, description=None)

Creates a dashboard List widget.

Argument

Description

item

Required Portal Item object. Item object can be a Feature Layer 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.

property events
Returns

list of events attached to the widget.

property list_icon
Returns

use icon for list or not.

property list_text
Returns

list text.

property max_features
Returns

max number of features to display.

property no_data
Returns

Nodata Object, set various nodata properties

property selection_color
Returns

selection color.

property selection_mode
Returns

selection mode.

property selection_text_color
Returns

selection text color.

property seperator_color
Returns

seperator color.

property show_last_update
Returns

show last update or not.

MapLegend

class arcgis.apps.dashboard.MapLegend(map_widget, name='MapLegend', title='', description='')

Create a MapLegend widget for Dashboard

Argument

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.

Argument

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.

property data
Returns

Pie Chart Data object. Set data properties, categories and values.

property events
Returns

list of events attached to the widget.

property labels
Returns

show labels or not.

property legend
Returns

Legend Object, set Visibility and placement

property max_features
Returns

max number of features to display.

property no_data
Returns

Nodata Object, set various nodata properties

property outline
Returns

Outline Object, set various outline properties

property pie
Returns

Pie Object, set various pie properties

property show_last_update
Returns

show last update or not.

property slices
Returns

Slices Object, set various slices properties

RichText

class arcgis.apps.dashboard.RichText(html_text, name='RichText', title='', description='')

Creates a dashboard Rich Text widget.

Argument

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.

property no_data
Returns

Nodata Object, set various nodata properties

property text
Returns

text field for rich text

property type
Returns

widget type.

SerialChart

class arcgis.apps.dashboard.SerialChart(item, name='SerialChart', layer=0, categories_from='groupByValues', title='', description='')

Creates a dashboard Serial Chart widget.

Argument

Description

item

Required Portal Item object. Item object can be a Feature Layer 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.

property category_axis
Returns

Returns Category Axis Properties object.

property data
Returns

Serial Chart Data object. Set data properties, categories and values.

property events
Returns

list of events attached to the widget.

property font_size
Returns

Font Size

property legend
Returns

Legend Object, set Visibility and placement

property no_data
Returns

NoDataProperties Object

property orientation
Returns

Orientation of the serial chart, “horizontal” or “vertical”.

property scroll
Returns

True if scroll is enabled else False.

property value_axis
Returns

Value Axis Properties object.

SidePanel

class arcgis.apps.dashboard.SidePanel(title=None, description=None)

Creates a dashboard Side Panel widget.

Argument

Description

title

Optional string. Title of the header.

description

Optional string. Description of the widget.

add_selector(selector)

Add Number Selector, Category Selector or Date Picker widget.

property allow_sliding
Returns

True or False for sliding enabled or disabled.

property background_color
Returns

Background color of the side panel widget.

property description
Returns

Description of the widget.

property text_color
Returns

Text color of the side panel.

property title
Returns

Title of the widget.

DatePicker

class arcgis.apps.dashboard.DatePicker(range=False, operator='is', label='', **kwargs)

Creates a Date Selector widget for Side Panel or Header.

Argument

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.

Argument

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.

Argument

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.

Argument

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.

Argument

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

Argument

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.

property right_placeholder_text
Returns

Text for right place holder in range type.

set_defined_limits(lower_limit=0, upper_limit=100, **kwargs)

Set the item to pick values from for spinner and slider display type.

Argument

Description

lower_limit

Optional integer. Set the lower limit.

upper_limit

Optional integer. Set the upper limit.

Keyword Arguments

Argument

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.

Argument

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 Int. Layer Id for the item.

add_row

class arcgis.apps.dashboard.add_row(elements, height=1)

Creates a Row Layout.

Argument

Description

elements

Required List. Widgets that will be added to the row in the dashboard layout.

height

Optional int. Height of the row.

add_column

class arcgis.apps.dashboard.add_column(elements, width=1)

Creates a Column Layout.

Argument

Description

elements

Required List. Widgets that will be added to the column in the dashboard layout.

width

Optional int. Width of the Column.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.