The requested page is not available for the requested platform. You are viewing the content for Default platform.

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:

See Also

constructor

Initializes a new instance of the DataItem class.

Declaration

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

Optional Parameters

Name Type Default Description
dataItemJSON any null
serializer DxDesigner.Analytics.Utils.IModelSerializer null

Properties

dataMember Property

Declaration

dataMember: ko.Observable<string>

Property Value

Type Description
ko.Observable<string>

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<string>

numericFormat Property

Declaration

numericFormat: DataItemNumericFormat

Property Value

Type Description
DataItemNumericFormat

showGrandTotals Property

Declaration

showGrandTotals: ko.Observable<boolean>

Property Value

Type Description
ko.Observable<boolean>

showTotals Property

Declaration

showTotals: ko.Observable<boolean>

Property Value

Type Description
ko.Observable<boolean>

showValues Property

Declaration

showValues: ko.Observable<boolean>

Property Value

Type Description
ko.Observable<boolean>

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

Type Description
string
string
string
string
string
string
string
string
string

uniqueName Property

Declaration

uniqueName: ko.Observable<string>

Property Value

Type Description
ko.Observable<string>

Methods

getInfo Method

For internal use.

Declaration

getInfo(): DxDesigner.Analytics.Utils.ISerializationInfoArray

Returns

Type Description
DxDesigner.Analytics.Utils.ISerializationInfoArray

 

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