DateTimePeriod Class
A date-time period that is used to select a predefined range in the Range Filter and Date Filter items.
Declaration
export class DateTimePeriod extends TypedSerializableModel
Remarks
The DateTimePeriod objects are predefined date-time periods in Range Filter and Date Filter items. The RangeFilterItem.dateTimePeriods and DateFilterItem.dateTimePeriods properties provide access to the collections of DateTimePeriod objects.
Use the DateTimePeriod static methods to create a predefined period. To create a custom period, instantiate the DateTimePeriod class and perform the following steps:
- Specify the boundaries. Create the FixedDateTimePeriodLimit or FlowDateTimePeriodLimit class objects and assign them to the DateTimePeriod.start and DateTimePeriod.end properties.
Note
If you do not specify DateTimePeriod.start/DateTimePeriod.end, the selection begins from the start/end of the visible range.
- Specify the period name. Assign a string to the DateTimePeriod.name property.
Inherited Members
constructor
Initializes a new instance of the DateTimePeriod
class.
Declaration
constructor(
modelJson?: any,
serializer?: DxDesigner.Analytics.Utils.ModelSerializer
)
Parameters
Name | Type | Description |
---|---|---|
modelJson | any | A JSON object used for a dashboard deserialization. Do not pass this parameter directly. |
serializer | DxDesigner.Analytics.Utils.ModelSerializer | An object used for a dashboard deserialization. Do not pass this parameter directly. |
Properties
argumentInterval Property
Declaration
argumentInterval: ko.Observable<DateTimeGroupInterval>
Property Value
Type |
---|
Observable<DateTimeGroupInterval> |
end Property
Declaration
end: LimitContainer
Property Value
Type |
---|
LimitContainer |
name Property
Specifies the name of the date-time period.
Declaration
name: ko.Observable<string>
Property Value
Type | Description |
---|---|
Observable<string> | A string that specifies the name of the date-time period. |
Remarks
You can assign the name value to the RangeFilterItem.defaultDateTimePeriodName property to specify the default selected range for the Range Filter.
start Property
Declaration
start: LimitContainer
Property Value
Type |
---|
LimitContainer |
Methods
format(value) Method
Declaration
format(
value: Date
): any
Parameters
Name | Type |
---|---|
value | Date |
Returns
Type |
---|
any |
getDateFormat Method
Declaration
getDateFormat(): string
Returns
Type |
---|
string |
getDateTimeValue Method
Declaration
getDateTimeValue(): IRange
Returns
Type |
---|
IRange |
getInfo Method
For internal use.
Declaration
getInfo(): DxDesigner.Analytics.Utils.ISerializationInfoArray
Returns
Type | Description |
---|---|
DxDesigner.Analytics.Utils.ISerializationInfoArray |
|