Back to Devexpress

DashboardItem Class

dashboard-js-devexpress-dot-dashboard-dot-model-10700cdc.md

latest7.5 KB
Original Source

DashboardItem Class

Serves as the base class for dashboard items.

Declaration

ts
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

disposed

itemType

Inheritance

SerializableModel TypedSerializableModel DashboardItem GroupItem

DashboardTabPage

TabContainerItem

DataDashboardItem

ImageItem

constructor

Initializes a new instance of the DashboardItem class.

Declaration

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

Parameters

NameTypeDescription
dashboardItemJSONany

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

ts
componentName: ko.Observable<string>

Property Value

TypeDescription
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

ts
customProperties: DevExpress.Dashboard.Model.CustomProperties

Property Value

TypeDescription
CustomProperties

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

|

Remarks

Tip

Documentation : Custom Properties

See Also

Create Custom Properties in the Web Dashboard

name Property

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

Declaration

ts
name: ko.Observable<string>

Property Value

TypeDescription
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

ts
parentContainer: ko.Observable<string>

Property Value

TypeDescription
Observable<string>

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

|

showCaption Property

Declaration

ts
showCaption: ko.Observable<boolean>

Property Value

Type
Observable<boolean>

Methods

dispose Method

Disposes of all resources associated with this DashboardItem.

Declaration

ts
dispose(): void

getInfo Method

Declaration

ts
getInfo(): DevExpress.Analytics.Utils.ISerializationInfoArray

Returns

Type
ISerializationInfoArray

getUniqueNamePrefix Method

Declaration

ts
getUniqueNamePrefix(): string

Returns

Type
string