Skip to main content
A newer version of this page is available. .

DashboardItem Class

Serves as the base class for dashboard items.

Declaration

export abstract class DashboardItem extends TypedSerializableModel implements IDashboardComponent

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.

Inherited Members

constructor

Initializes a new instance of the DashboardItem class.

Declaration

constructor(
    dashboardItemJSON?: any,
    serializer?: DxDesigner.Analytics.Utils.ModelSerializer,
    info?: DxDesigner.Analytics.Utils.ISerializationInfoArray
)

Parameters

Name Type Description
dashboardItemJSON any

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

serializer DxDesigner.Analytics.Utils.ModelSerializer

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

info DxDesigner.Analytics.Utils.ISerializationInfoArray

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.

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

getUniqueNamePrefix Method

Declaration

getUniqueNamePrefix(): string

Returns

Type
string