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
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.
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
clone(): sap.gantt.misc.AxisTimes
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. |
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. |