Class sap.gantt.misc.AxisOrdinalModule: sap/gantt/misc/AxisOrdinal


The reusable functional class represents an instance of ordinal pattern coordinate mapping.

Constructor Summary
new sap.gantt.misc.AxisOrdinal(aAlementArray, aScaleArray, nViewBandWidth, nViewRangeStart, nViewRangeEnd, nZoomRate, nZoomOrigin, nPadding)Creates and initializes an AxisOrdinal class.
Method Summary
clone()Clones a new AxisOrdinal from the current one.
elementToView(element)Transforms an element to a position in the coordinate system
getElementArray()Retrieves the value of elementArray.
getScaleArray()Retrieves the value of scaleArray.
getViewBandWidth()Retrieves the value of viewBandWidth.
getViewRange()Retrieves the view range of the current viewport area.
getZoomOrigin()Retrieves the zoom origin.
getZoomRate()Retrieves the value of zoom rate.
setElements(elementArray, scaleArray)Sets a new value of elementArray with the corresponding scaleArray.
setViewBandWidth(viewBandWidth)Sets a new value of viewBandWidth.
setViewRangeEnd(viewRangeEnd)Sets a new value of the end position of a view range.
setViewRangeStart(viewRangeStart)Sets a new value of the start position of a view range.
setZoomOrigin(zoomOrigin)Sets the zoom origin.
setZoomRate(zoomRate)Sets a new value of zoom rate.
viewToBandIndex(value)Transforms a position in the coordinate system to a band index
viewToElement(value)Transforms a position in the coordinate system to an element
viewToElementIndex(value)Transforms a position in the coordinate system to an element index
viewToRowIndex(value, iMaxIndex)Transforms a position in the coordinate system to a row index
Constructor Detail
new sap.gantt.misc.AxisOrdinal(aAlementArray, aScaleArray, nViewBandWidth, nViewRangeStart, nViewRangeEnd, nZoomRate, nZoomOrigin, nPadding)
Creates and initializes an AxisOrdinal class.
Parameters:
{array}aAlementArray Element array corresponding to an ordinal axis.
{array}aScaleArray Scale array where each item represents one or more smallest width units in one-to-one relationship with aAlementArray.
{number}nViewBandWidth Smallest width unit for elements.
{number}nViewRangeStart Start position of an axis in the viewport area.
{number}nViewRangeEnd End position of an axis in the viewport area. The parameter is ignored if viewBandWidth is set.
{number}nZoomRate Zoom rate of the viewport area.
{number}nZoomOrigin Zoom origin of the viewport area.
{number}nPadding Padding for each band.
Method Detail
Clones a new AxisOrdinal from the current one.
Returns:
{sap.gantt.misc.AxisOrdinal} Reference to the newly created clone.
elementToView(element)
Transforms an element to a position in the coordinate system
Parameters:
{Object}element Element that exists in parameter elementArray of the constructor
getElementArray(): array
Retrieves the value of elementArray.
Returns:
{array} Value of elementArray.
getScaleArray(): array
Retrieves the value of scaleArray.
Returns:
{array} Value of scaleArray.
getViewBandWidth(): number
Retrieves the value of viewBandWidth.
Returns:
{number} Value of viewBandWidth that indicates the smallest width unit for elements.
getViewRange(): array
Retrieves the view range of the current viewport area.
Returns:
{array} Value of the view range containing the start and end positions.
getZoomOrigin(): number
Retrieves the zoom origin.
Returns:
{number} Zoom origin.
getZoomRate(): number
Retrieves the value of zoom rate.
Returns:
{number} Value of zoom rate.
setElements(elementArray, scaleArray): sap.gantt.misc.AxisOrdinal
Sets a new value of elementArray with the corresponding scaleArray.
Parameters:
{array}elementArray New element array corresponding to an ordinal axis.
{array}scaleArray Corresponding scale array where each item represents one or more smallest width units in one-to-one relationship with elementArray.
Returns:
{sap.gantt.misc.AxisOrdinal} Reference to this in order to allow method chaining.
setViewBandWidth(viewBandWidth): sap.gantt.misc.AxisOrdinal
Sets a new value of viewBandWidth.
Parameters:
{number}viewBandWidth Smallest width unit for elements.
Returns:
{sap.gantt.misc.AxisOrdinal} Reference to this in order to allow method chaining.
setViewRangeEnd(viewRangeEnd): sap.gantt.misc.AxisOrdinal
Sets a new value of the end position of a view range.
Parameters:
{number}viewRangeEnd End position of axis in the viewport area. The parameter is ignored if viewBandWidth is set.
Returns:
{sap.gantt.misc.AxisOrdinal} Reference to this in order to allow method chaining.
setViewRangeStart(viewRangeStart): sap.gantt.misc.AxisOrdinal
Sets a new value of the start position of a view range.
Parameters:
{number}viewRangeStart Start position of an axis in the viewport area.
Returns:
{sap.gantt.misc.AxisOrdinal} Reference to this in order to allow method chaining.
setZoomOrigin(zoomOrigin): sap.gantt.misc.AxisOrdinal
Sets the zoom origin.
Parameters:
{number}zoomOrigin Zoom origin of the viewport area.
Returns:
{sap.gantt.misc.AxisOrdinal} Reference to this in order to allow method chaining.
setZoomRate(zoomRate): sap.gantt.misc.AxisOrdinal
Sets a new value of zoom rate.
Parameters:
{number}zoomRate New zoom rate of the viewport area.
Returns:
{sap.gantt.misc.AxisOrdinal} Reference to this in order to allow method chaining.
viewToBandIndex(value)
Transforms a position in the coordinate system to a band index
Parameters:
{Number}value A position in the coordinate system
viewToElement(value)
Transforms a position in the coordinate system to an element
Parameters:
{Number}value Position in the coordinate system
viewToElementIndex(value)
Transforms a position in the coordinate system to an element index
Parameters:
{Number}value Position in the coordinate system
viewToRowIndex(value, iMaxIndex)
Transforms a position in the coordinate system to a row index
Parameters:
{Number}value Position in the coordinate system
{Number}iMaxIndex Max row index in the coordinate system