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
setElements(elementArray, scaleArray)Sets a new value of elementArray with the corresponding scaleArray.
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
clone(): sap.gantt.misc.AxisOrdinal
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. |
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. |
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 |