Skip to main content

DashboardItem Class

Serves as the base class for dashboard items.

Declaration

export abstract class DashboardItem extends TypedSerializableModel implements IDashboardComponent, ICustomPropertiesProvider

Remarks

Dashboard items are UI elements used to display data within the Dashboard. The DashboardItem class provides basic functionality for all types of dashboard items. All dashboard items can be divided into the following groups:

  • data-aware dashboard items that display data from the dashboard data source (DataItem class descendants);
  • static dashboard items that can display images (for instance, ImageItem);
  • a group / tab container used to arrange dashboard items within a dashboard (GroupItem / TabContainerItem).

The Dashboard.items property provides access to a collection of items within a dashboard.

You can identify a specific dashboard item using its component name (the DashboardItem.componentName property).

To specify or obtain the parent group / tab container for the current dashboard item, use the DashboardItem.parentContainer property.

For examples on how to create a dashboard item, see the corresponding DashboardItem descendant’s description.

Implements

IDashboardComponent
ICustomPropertiesProvider

Inherited Members

constructor

Initializes a new instance of the DashboardItem class.

Declaration

constructor(
    dashboardItemJSON?: any,
    serializer?: DevExpress.Analytics.Utils.ModelSerializer,
    info?: DevExpress.Dashboard.Metadata.IDashboardSerializationInfoArray
)

Parameters

Name Type Description
dashboardItemJSON any

A JSON object used for dashboard deserialization. Do not pass this parameter directly.

serializer ModelSerializer

An object used for dashboard deserialization. Do not pass this parameter directly.

info IDashboardSerializationInfoArray

An array of objects that provide serialization info.

Properties

componentName Property

Specifies the component name of the dashboard item.

Declaration

componentName: ko.Observable<string>

Property Value

Type Description
Observable<string>

A string that is the component name of the dashboard item.

Remarks

The dashboard item’s component name is used in code to identify the dashboard item object. For example, you can use this name when calling the ViewerApiExtension.setMasterFilter or ViewerApiExtension.performDrillDown methods.

The name is displayed in the dashboard item caption. It does not have to be unique.

The componentName identifies a dashboard item in a dashboard container. It has to be unique in the dashboard. Do not change a component name for the created dashboard items on the client side.

customProperties Property

Gets custom properties available for the current dashboard item.

Declaration

customProperties: DevExpress.Dashboard.Model.CustomProperties

Property Value

Type Description
CustomProperties

A CustomProperties object that provides access to the item’s custom properties.

Remarks

Tip

Documentation: Custom Properties

See Also

name Property

Specifies the dashboard item’s name, displayed in the caption.

Declaration

name: ko.Observable<string>

Property Value

Type Description
Observable<string>

A string that specifies the name of the dashboard item.

Remarks

The Name is displayed in the dashboard item caption. It does not have to be unique.

The componentName identifies a dashboard item in a dashboard container. It has to be unique in the dashboard.

parentContainer Property

Specifies the dashboard item container (a group or a tab page) that stores the current item.

Declaration

parentContainer: ko.Observable<string>

Property Value

Type Description
Observable<string>

The component name of the dashboard item group / tab page that stores the current item.

showCaption Property

Declaration

showCaption: ko.Observable<boolean>

Property Value

Type
Observable<boolean>

Methods

dispose Method

Disposes of all resources associated with this DashboardItem.

Declaration

dispose(): void

getInfo Method

Declaration

getInfo(): DevExpress.Analytics.Utils.ISerializationInfoArray

Returns

Type
ISerializationInfoArray

getUniqueNamePrefix Method

Declaration

getUniqueNamePrefix(): string

Returns

Type
string