DataItem Class

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

Declaration

export abstract class DataItem extends TypedSerializableModel implements IDashboardComponent

Remarks

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

Inherited Members

See Also

constructor

Initializes a new instance of the DataItem class.

Declaration

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

Parameters

Name Type Description
dataItemJSON any
serializer IModelSerializer

Properties

dataMember Property

Declaration

dataMember: ko.Observable<string>

Property Value

Type Description
ko.Observable

dateTimeFormat Property

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

Declaration

dateTimeFormat: 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

name: ko.Observable<string>

Property Value

Type Description
ko.Observable

numericFormat Property

Declaration

numericFormat: DataItemNumericFormat

Property Value

Type Description
DataItemNumericFormat

showGrandTotals Property

Declaration

showGrandTotals: ko.Observable<boolean>

Property Value

Type Description
ko.Observable

showTotals Property

Declaration

showTotals: ko.Observable<boolean>

Property Value

Type Description
ko.Observable

showValues Property

Declaration

showValues: ko.Observable<boolean>

Property Value

Type Description
ko.Observable

typesMap Property

Declaration

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

Property Value

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

uniqueName Property

Declaration

uniqueName: ko.Observable<string>

Property Value

Type Description
ko.Observable

Methods

getInfo Method

For internal use.

Declaration

getInfo(): DevExpress.Analytics.Utils.ISerializationInfoArray

Returns

Type Description
ISerializationInfoArray

An array of objects that provide serialization info.

getUniqueNamePrefix Method

Declaration

getUniqueNamePrefix(): string

Returns

Type Description
string

grabFrom(dataItem) Method

Declaration

grabFrom(dataItem: DataItem): void

Parameters

Name Type Description
dataItem DataItem

isDefinitionEquals(dataItem) Method

Declaration

isDefinitionEquals(dataItem: DataItem): boolean

Parameters

Name Type Description
dataItem DataItem

Returns

Type Description
boolean