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.
#Inheritance
#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 |
---|---|---|
dashboard |
any | A JSON object used for dashboard deserialization. Do not pass this parameter directly. |
serializer | Model |
An object used for dashboard deserialization. Do not pass this parameter directly. |
info | IDashboard |
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 |
---|---|
Custom |
A Custom |
#Remarks
Tip
Documentation: Custom Properties
#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
#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 |
---|
ISerialization |
#getUniqueNamePrefix Method
#Declaration
getUniqueNamePrefix(): string
#Returns
Type |
---|
string |