Skip to main content

DataItem Class

Serves as the base class for data items - measures and dimensions.

#Declaration

TypeScript
export abstract class DataItem extends TypedSerializableModel implements IDashboardComponent

#Remarks

DataItem serves as a base class and exposes the following descendants:

#Implements

IDashboardComponent

#Inherited Members

See Also

#constructor

Initializes a new instance of the DataItem class.

#Declaration

TypeScript
constructor(
    dataItemJSON?: any,
    serializer?: DevExpress.Analytics.Utils.IModelSerializer
)

#Parameters

Name Type
dataItemJSON any
serializer IModelSerializer

#Properties

#dataMember Property

#Declaration

TypeScript
dataMember: ko.Observable<string>

#Property Value

Type
Observable<string>

#dateTimeFormat Property

Provides access to the format settings for date-time values.

#Declaration

TypeScript
dateTimeFormat: DevExpress.Dashboard.Model.DataItemDateTimeFormat

#Property Value

Type Description
DataItemDateTimeFormat

A DataItemDateTimeFormat object that contains format settings for date-time values.

#Remarks

The dateTimeFormat property allows you to select format types for dimension date-time values displayed for different group intervals (like Year, Month, Year-Quarter, etc.). The returned DataItemDateTimeFormat object exposes a number of properties, each defining a format type that corresponds to a particular group interval. Use the Dimension.DateTimeGroupInterval property to specify the actual group interval.

Date-time fields can originate measures as well. If such a measure calculates a maximum or minimum summary, the resulting values are of the date-time type. These values are formatted using the DataItemDateTimeFormat.DateFormat setting. All other settings provided by the DateTimeFormat property are ignored for measures.

Actual formatting patterns are defined by the current system locale (or the client’s locale, when a dashboard is shown on the web).

If the DataItem does not correspond to a date-time data member, the DateTimeFormat options are not in effect.

#name Property

#Declaration

TypeScript
name: ko.Observable<string>

#Property Value

Type
Observable<string>

#numericFormat Property

#Declaration

TypeScript
numericFormat: DevExpress.Dashboard.Model.DataItemNumericFormat

#Property Value

Type
DataItemNumericFormat

#showGrandTotals Property

#Declaration

TypeScript
showGrandTotals: ko.Observable<boolean>

#Property Value

Type
Observable<boolean>

#showTotals Property

#Declaration

TypeScript
showTotals: ko.Observable<boolean>

#Property Value

Type
Observable<boolean>

#showValues Property

#Declaration

TypeScript
showValues: ko.Observable<boolean>

#Property Value

Type
Observable<boolean>

#typesMap Property

#Declaration

TypeScript
static typesMap: {
    Integer: string;
    Long: string;
    Float: string;
    Double: string;
    Decimal: string;
    DateTime: string;
    Text: string;
    String: string;
    Bool: string;
    Boolean: string;
    Enum: string;
}

#Property Value

Name Type
Bool string
Boolean string
DateTime string
Decimal string
Double string
Enum string
Float string
Integer string
Long string
String string
Text string

#uniqueName Property

#Declaration

TypeScript
uniqueName: ko.Observable<string>

#Property Value

Type
Observable<string>

#Methods

#getInfo Method

For internal use.

#Declaration

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

#Returns

Type Description
ISerializationInfoArray

An array of objects that provide serialization info.

#getUniqueNamePrefix Method

#Declaration

TypeScript
getUniqueNamePrefix(): string

#Returns

Type
string

#grabFrom(dataItem) Method

#Declaration

TypeScript
grabFrom(
    dataItem: DataItem
): void

#Parameters

Name Type
dataItem DataItem

#isDefinitionEquals(dataItem) Method

#Declaration

TypeScript
isDefinitionEquals(
    dataItem: DataItem
): boolean

#Parameters

Name Type
dataItem DataItem

#Returns

Type
boolean