Class sap.gantt.misc.AxisTimesModule: sap/gantt/misc/AxisTime


The reusable functional class represents an instance of time-value linear coordinate mapping.

Constructor Summary
new sap.gantt.misc.AxisTimes(timeRange, viewRange, zoomRate, zoomOrigin, viewOffset, locale, oZoomStrategy)Creates and initializes an AxisTime class.
Method Summary
clone()Clones a new AxisTimes from the current one.
getCurrentTickTimeIntervalKey()Retrieves a key of the time interval level in array oZoomStrategy.
getCurrentTickTimeIntervalLevel()Retrieves an index of the time interval level in array oZoomStrategy.
getNowLabel()Retrieves an object containing the information of current time, its position, and label.
getTickTimeIntervalLabel(level, timeBoundary, viewBoundary)Retrieves an array of time ticks, each item containing date position and label, for the specified level within the given timeBoundary or viewBoundary.
getTimeRange()Retrieves the value of timeRange.
getViewOffset()Retrieves the value of viewOffset.
getViewRange()Retrieves the value of viewRange.
getZoomOrigin()Retrieves the value of zoomOrigin.
getZoomRate()Retrieves the value of zoomRate.
getZoomStrategy()Retrieves the value of oZoomStrategy.
setTimeRange(timeRange)Sets a new value of timeRange.
setViewOffset(viewOffset)Sets a new value of viewOffset.
setViewRange(viewRange)Sets a new value of viewRange.
setZoomOrigin(zoomOrigin)Sets a new value of zoomOrigin.
setZoomRate(zoomRate)Sets a new value of zoomRate.
timeToView(time)Given a date within the timeRange, this function returns the corresponding value within the viewRange.
viewToTime(value)Returns the date within the timeRange for the corresponding value within the viewRange.
Constructor Detail
new sap.gantt.misc.AxisTimes(timeRange, viewRange, zoomRate, zoomOrigin, viewOffset, locale, oZoomStrategy)
Creates and initializes an AxisTime class.
Parameters:
{array}timeRange The array must contain two or more dates that represent some ranges of data.
{array}viewRange The array must contain two or more values, to match the cardinality of timeRange, representing some ranges of values.
{number}zoomRate Zoom rate of the viewport area.
{number}zoomOrigin Zoom origin of the viewport area.
{number}viewOffset Offset of the viewport area.
{object}locale Settings for language, time zone, and daylight saving.
{array}oZoomStrategy Specifies the strategy to zoom in/out.
Method Detail
Clones a new AxisTimes from the current one.
Returns:
{sap.gantt.misc.AxisTimes} Reference to the newly created clone.
getCurrentTickTimeIntervalKey(): string
Retrieves a key of the time interval level in array oZoomStrategy.
Returns:
{string} Key of the time interval level in array oZoomStrategy.
getCurrentTickTimeIntervalLevel(): number
Retrieves an index of the time interval level in array oZoomStrategy.
Returns:
{number} Index of the time interval level in array oZoomStrategy.
getNowLabel(): object
Retrieves an object containing the information of current time, its position, and label.
Returns:
{object} Reference to an object containing the information of current time, its position, and label.
getTickTimeIntervalLabel(level, timeBoundary, viewBoundary): object
Retrieves an array of time ticks, each item containing date position and label, for the specified level within the given timeBoundary or viewBoundary.
Parameters:
{number}level Corresponding index in array oZoomStrategy.
{number}timeBoundary Time range within which time ticks are generated.
{number}viewBoundary View range within which time ticks are generated. Available only when timeBoundary isn't specified.
Returns:
{object} Reference to an array of time ticks, each item containing date, position, and label.
getTimeRange(): array
Retrieves the value of timeRange.
Returns:
{array} Value of timeRange.
getViewOffset(): number
Retrieves the value of viewOffset.
Returns:
{number} Value of viewOffset.
getViewRange(): array
Retrieves the value of viewRange.
Returns:
{array} Value of viewRange.
getZoomOrigin(): number
Retrieves the value of zoomOrigin.
Returns:
{number} Value of zoomOrigin.
getZoomRate(): number
Retrieves the value of zoomRate.
Returns:
{number} Value of zoomRate.
getZoomStrategy(): object
Retrieves the value of oZoomStrategy.
Returns:
{object} Value of oZoomStrategy.
setTimeRange(timeRange): sap.gantt.misc.AxisTimes
Sets a new value of timeRange.
Parameters:
{array}timeRange New value of timeRange.
Returns:
{sap.gantt.misc.AxisTimes} Reference to this in order to allow method chaining.
setViewOffset(viewOffset): sap.gantt.misc.AxisTimes
Sets a new value of viewOffset.
Parameters:
{number}viewOffset New value of viewOffset.
Returns:
{sap.gantt.misc.AxisTimes} Reference to this in order to allow method chaining.
setViewRange(viewRange): sap.gantt.misc.AxisTimes
Sets a new value of viewRange.
Parameters:
{array}viewRange New value of viewRange.
Returns:
{sap.gantt.misc.AxisTimes} Reference to this in order to allow method chaining.
setZoomOrigin(zoomOrigin): sap.gantt.misc.AxisTimes
Sets a new value of zoomOrigin.
Parameters:
{number}zoomOrigin New value of zoomOrigin.
Returns:
{sap.gantt.misc.AxisTimes} Reference to this in order to allow method chaining.
setZoomRate(zoomRate): sap.gantt.misc.AxisTimes
Sets a new value of zoomRate.
Parameters:
{number}zoomRate New value of zoomRate.
Returns:
{sap.gantt.misc.AxisTimes} Reference to this in order to allow method chaining.
timeToView(time): number
Given a date within the timeRange, this function returns the corresponding value within the viewRange.
Parameters:
{date}time Given date within the timeRange.
Returns:
{number} Value corresponding to the given date within the viewRange.
viewToTime(value): date
Returns the date within the timeRange for the corresponding value within the viewRange.
Parameters:
{number}value Given value within the viewRange.
Returns:
{date} Date corresponding to the given value within the timeRange.