Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Esri Developer

ArcGIS API for PythonAPI Reference

arcgis.apps.dashboard module

TheDashboard is the main entry point into the Dashboard module.Deprecated asArcGIS Dashboards Classic is retiring.

Dashboard

classarcgis.apps.dashboard.Dashboard

Deprecated since version 2.0.1.

Creates aDashboard Object.

Returns:

Dashboard object

propertyheader
Returns:

Header object

propertylayout
Returns:

Layout of the dashboard

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 theDashboard.

description

Optional string. Description for the Dashboard.

summary

Optional string. Summary of the Dashboard.

tags

Optional string. Comma separated tags.

gis

OptionalGIS to publish dashboard.By default uses active gis.

overwrite

Optional Boolean.Overwrite existing dashboard.

propertyside_panel
Returns:

SidePanel object

propertytheme

Details

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

Creates a dashboard Details element.

Parameter

Description

item

Required PortalItem object. Item object shouldbe aFeatureLayer .

name

Optional string. Name of the element.

layer

Optional integer. Layer index for theFeatureLayerCollectionitem. 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 featuresto display.

propertymax_features
Returns:

Max Features to display for feature data.

propertyno_data
Returns:

NoDataProperties Object

propertyshow_attachment
Returns:

True if attachment is enabled else False.

propertyshow_content
Returns:

True if content is enabled else False.

propertyshow_last_update
Returns:

True if show last update is enabled else False.

propertyshow_media
Returns:

True if media is enabled else False.

propertyshow_title
Returns:

True if title is enabled else False.

EmbeddedContent

classarcgis.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 contentor 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 inminutes. It is only applicable forcontent_type = ‘image’

item

Optional PortalItem . To show content fromportal.

layer

Optional integer. Layer number when item isa mapwidget.

propertycontent_type
Returns:

Content type of the embedded content.

propertymax_features
Returns:

Max Features to display for feature data.

propertyno_data
Returns:

NoDataProperties Object

propertyrefresh_interval
Returns:

Refresh interval for image content.

propertyurl
Returns:

Url of the embedded content.

Gauge

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

Creates a dashboard Gauge widget.

Parameter

Description

item

Required PortalItem object. Item object canbe aFeatureLayer or a MapWidget.

name

Optional string. Name of the gauge widget.

layer

Optional integer. Layer number when item isa mapwidget.

title

Optional string. Title or Caption for thewidget.

description

Optional string. Description for the widget.

propertydata
Returns:

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

propertygauge_options
Returns:

Gauge options object. Set gauge properties.

propertymax_features
Returns:

Maximum features for widget.

propertyno_data
Returns:

Nodata Object, set various nodata properties

propertyshow_last_update
Returns:

Show last update or not.

Header

classarcgis.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 toheader position.

size

Optional string. Define size of header fromsmall, medium, large.Default is medium.

logo_image_url

Optional url string. Define a logo image.

logo_url

Optional url string. Define a hyperlink forthe logo image.

background_image_url

Optional url string. Add a background imageto 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 positionwhen 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 modelduring training. If set toTrue the best modelbased on validation loss will be saved duringtraining.

menu_links

Optional list of tuples. Each tuple containsstring label and string url.

add_selector(selector)

Add Number Selector, Category Selector or Date Picker widget.

propertybackground_color
Returns:

Background color HEX code.

propertybackground_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

propertybackground_image_url
Returns:

Background image url.

propertylogo_image_url
Returns:

Logo Image Url

propertylogo_url
Returns:

Logo image hyperlink

propertymargin
Returns:

Header margin, True or False

propertymenu_links
Returns:

List of menu links.

propertysign_out_link
Returns:

Sign out link enabled or disabled.

propertysize

Return size of the header. small, medium or large

Returns:

String

propertysubtitle
Returns:

Subtitle of the header. A string.

propertytext_color
Returns:

None for default text color else HEX code.

propertytitle
Returns:

Returns title of the header

Indicator

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

Creates a dashboard Indicator widget.

Parameter

Description

item

Required PortalItem object. Item object canbe aFeatureLayer or a MapWidget.

name

Optional string. Name of the Indicatorwidget.

title

Optional string. Title or Caption for thewidget.

layer

Optional integer. Layer number when item isa mapwidget.

description

Optional string. Description for the widget.

propertydata
Returns:

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

propertymax_features
Returns:

Maximum features for widget.

propertyreference
Returns:

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

propertyshow_last_update
Returns:

Show last update or not.

IndicatorData

classarcgis.apps.dashboard.IndicatorData
add_filter(field,join,condition,**kwargs)

Add filters associated with widget. The filters are applied to thelayer used in the initialization of the Indicator widget. PleaseseeFilter datafor detailed description of how filtering works with dashboard elements.

Parameter

Description

field

The layer’s attribute field name that will be usedto limit the features visualized in the widget.

join

SpecifyAND orOR to indicate whether therewill be one or multiple filter conditions.

condition

The operator used to evaluate the attributes andreturn the subset of results. The operatorsavailable change depending upon the type of theattribute field. SeeFilter condition componentsfor details on what conditions apply to anattribute field based on its contents.

In addition to explicitly named parameters,theadd_filter() method supports anoptional key word argument when the condition isequal,not equalgreater than,greater than or equal,less than, orless than or equal

kwargs

Description

value

The specific value or values to use to determinewhich 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)
propertyfactor
Returns:

value conversion factor.

propertyfilters
Returns:

filters associated with widget

propertyoffset
Returns:

value conversion offset.

propertystatistic
Returns:

statistic for data.

propertyvalue_field
Returns:

value field for data.

propertyvalue_type
Returns:

value type of data.

ReferenceData

classarcgis.apps.dashboard.ReferenceData
propertyfactor
Returns:

value conversion factor.

propertyfixed_value
Returns:

fixed value of reference.

propertyoffset
Returns:

value conversion offset.

propertyreference_field
Returns:

reference field name.

propertyreference_type
Returns:

reference type of reference.

propertystatistic
Returns:

statistic for reference.

List

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

Creates a dashboard List widget.

Parameter

Description

item

Required PortalItem object. Item object canbe aFeatureLayer or a MapWidget.

name

Optional string. Name of the List widget.

layer

Optional integer. Layer number when item isa mapwidget.

title

Optional string. Title or Caption for thewidget.

description

Optional string. Description for the widget.

propertyevents
Returns:

list of events attached to the widget.

propertylist_icon
Returns:

use icon for list or not.

propertylist_text
Returns:

list text.

propertymax_features
Returns:

max number of features to display.

propertyno_data
Returns:

Nodata Object, set various nodata properties

propertyselection_color
Returns:

selection color.

propertyselection_mode
Returns:

selection mode.

propertyselection_text_color
Returns:

selection text color.

propertyseperator_color
Returns:

Separator color.

propertyshow_last_update
Returns:

show last update or not.

MapLegend

classarcgis.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 thisMap widget is displayed.This map widget needs to be a part of thefinal 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

classarcgis.apps.dashboard.PieChart(item,name='PieChart',layer=0,categories_from='groupByValues',title='',description='')

Creates a dashboard Pie Chart widget.

Parameter

Description

item

Required PortalItem object. Item object canbe a Table Layer or a MapWidget.

name

Optional string. Name of the pie chartwidget.

layer

Optional integer. Layer number when item isa mapwidget.

categories_from

Optional string. Select from groupByValues,features or fields.

title

Optional string. Title or Caption for thewidget.

description

Optional string. Description for the widget.

propertydata
Returns:

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

propertyevents
Returns:

List of events attached to the widget.

propertylabels
Returns:

Show labels or not.

propertylegend
Returns:

Legend Object, set Visibility and placement

propertymax_features
Returns:

Maximum number of features to display.

propertyno_data
Returns:

Nodata Object, set various nodata properties

propertyoutline
Returns:

Outline Object, set various outline properties

propertypie
Returns:

Pie Object, set various pie properties

propertyshow_last_update
Returns:

Show last update or not.

propertyslices
Returns:

Slices Object, set various slices properties

RichText

classarcgis.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 bedisplayed 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.

propertyno_data
Returns:

Nodata Object, set various nodata properties

propertytext
Returns:

Text field for rich text

propertytype
Returns:

Widget type.

SerialChart

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

Creates a dashboard Serial Chart widget.

Parameter

Description

item

Required PortalItem object. Item object canbe aFeatureLayer or a MapWidget.

name

Optional string. Name of the serial chartwidget.

layer

Optional integer. Layer number when item isa mapwidget.

categories_from

Optional string. Select from groupByValues,features or fields.

title

Optional string. Title or Caption for thewidget.

description

Optional string. Description for the widget.

propertycategory_axis
Returns:

Returns Category Axis Properties object.

propertydata
Returns:

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

propertyevents
Returns:

List of events attached to the widget.

propertyfont_size
Returns:

Font Size

propertylegend
Returns:

Legend Object, set Visibility and placement

propertyno_data
Returns:

NoDataProperties Object

propertyorientation
Returns:

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

propertyscroll
Returns:

True if scroll is enabled else False.

propertyvalue_axis
Returns:

Value Axis Properties object.

SidePanel

classarcgis.apps.dashboard.SidePanel(title=None,description=None)

Creates a dashboard Side Panel widget.

Parameter

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.

propertyallow_sliding
Returns:

True or False for sliding enabled or disabled.

propertybackground_color
Returns:

Background color of the side panel widget.

propertydescription
Returns:

Description of the widget.

propertytext_color
Returns:

Text color of the side panel.

propertytitle
Returns:

Title of the widget.

DatePicker

classarcgis.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 rangeselector.

operator

Optional String. Operator for non rangedatepicker.

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” isFalse 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

classarcgis.apps.dashboard.CategorySelector

Creates a Category Selector widget for Side Panel or Header.

propertyselector
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 shouldcontain 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 PortalItem . 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 PortalItem .Dropdown values will be populated from this.

category_field

Optional String. This string denotes thefield to pick the values from.

max_features

Optional Integer.Set max features to display.

NumberSelector

classarcgis.apps.dashboard.NumberSelector(range=False,display_type='spinner',label='Selectanumber',**kwargs)

Creates a Number Selector widget for Side Panel or Header.

Parameter

Description

range

Optional boolean. True to create a rangeselector.

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.

propertyplaceholder_text
Returns:

Text for left place holder in range type or default place holder.

propertyright_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.

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 fornon-range selector.

lower_default

Optional integer. Set the lower defaultvalue for range selector.

upper_default

Optional integer. Set the upper defaultvalue 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 PortalItem . 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.

add_row

classarcgis.apps.dashboard.add_row(elements,height=1)

Creates a Row Layout.

Parameter

Description

elements

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

height

Optional int. Height of the row.

add_column

classarcgis.apps.dashboard.add_column(elements,width=1)

Creates a Column Layout.

Parameter

Description

elements

Required List. Widgets that will be added tothe 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 ourbrowser deprecation post for more details.


[8]ページ先頭

©2009-2025 Movatter.jp