arcgis.apps.dashboard module¶
The Dashboard
is the main entry point into the Dashboard module.
Dashboard¶
-
class
arcgis.apps.dashboard.
Dashboard
¶ 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
¶
-
property
Details¶
-
class
arcgis.apps.dashboard.
Details
(item, name='Details', layer=0, title='', description='', max_features_displayed=50)¶ Creates a dashboard Details widget.
Argument
Description
item
Required Portal Item object. Item object can be a Feature Layer or a MapWidget.
name
Optional string. Name of the widget.
layer
Optional integer. Layer number when item is a mapwidget.
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_media
¶ - Returns
True if media is enabled else False.
-
property
show_title
¶ - Returns
True if title is enabled else False.
-
property
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.
-
property
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.
-
property
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.
Argument
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-width fit-height fit-both repeat
background_image_position
Optional string. Define the image position when using fit-width or fit-height. Allowed options: fit-height: left, center, right fit-width: top, middle, bottom
signout_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.
-
add_selector
(selector)¶ Add Number Selector, Category Selector or Date Picker widget.
-
property
background_color
¶ - Returns
Background color HEX code.
-
property
background_image_placement
¶ - Returns
Background image position.
If fit-height then left, right, center If fit-width then top, bottom, middle fit-both, repeat then None
-
property
background_image_url
¶ - Returns
Background image url.
-
property
logo_image_url
¶ - Returns
Logo Image Url
-
property
logo_url
¶ - Returns
Logo image hyperlink
-
property
margin
¶ - Returns
Header margin, True or False
- Returns
List of menu links.
-
property
sign_out_link
¶ - Returns
Sign out link enabled or disabled.
-
property
size
¶ Return size of the header. small, medium or large :return: string
-
property
subtitle
¶ - Returns
Subtitle of the header. A string.
-
property
text_color
¶ - Returns
None for default text color else HEX code.
-
property
title
¶ - Returns
Returns title of the header
-
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.
-
property
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.
-
property
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 Feature 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
-
property
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.
-
property
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.
-
property
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.
-
property
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.
-
property
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.