Skip to main content

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:

Implements

IDashboardComponent

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
dataItemJSON any
serializer IModelSerializer

Properties

dataMember Property

Declaration

dataMember: ko.Observable<string>

Property Value

Type
Observable<string>

dateTimeFormat Property

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

Declaration

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

name: ko.Observable<string>

Property Value

Type
Observable<string>

numericFormat Property

Declaration

numericFormat: DevExpress.Dashboard.Model.DataItemNumericFormat

Property Value

Type
DataItemNumericFormat

showGrandTotals Property

Declaration

showGrandTotals: ko.Observable<boolean>

Property Value

Type
Observable<boolean>

showTotals Property

Declaration

showTotals: ko.Observable<boolean>

Property Value

Type
Observable<boolean>

showValues Property

Declaration

showValues: ko.Observable<boolean>

Property Value

Type
Observable<boolean>

typesMap Property

Declaration

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

uniqueName: ko.Observable<string>

Property Value

Type
Observable<string>

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
string

grabFrom(dataItem) Method

Declaration

grabFrom(
    dataItem: DataItem
): void

Parameters

Name Type
dataItem DataItem

isDefinitionEquals(dataItem) Method

Declaration

isDefinitionEquals(
    dataItem: DataItem
): boolean

Parameters

Name Type
dataItem DataItem

Returns

Type
boolean