sap.gantt.shape.Shape.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.gantt.shape.Shape with name
sClassName
and enriches it with the information contained in
oClassInfo
.
oClassInfo
might contain the same kind of information as described in Object.extend.
Parameters:
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
Returns:
{function} | Created class / constructor function |
Returns a metadata object for class sap.gantt.shape.Shape.
Returns:
_configFirst(sAttrName, oData, bScaleBySapUiSizeMode): string
This method must be used to ensure 'configuration-first' principle for extended shapes.
Parameters:
{string} | sAttrName | Attribute name. |
{object} | oData | Shape data. |
{boolean} | bScaleBySapUiSizeMode | whether scale by size mode or not |
Returns:
{string} | Resolved attribute. |
_rotate(oData, oRowInfo, aRetVal)
Rotate Shape
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Shape Row Info. |
{object} | aRetVal | Return Value. |
_rtlRotation(nAngle): number
Provide logic for rotation considering RTL.
Parameters:
{number} | nAngle | Rotation angle. |
Returns:
{number} | Actual rotation angle. |
_translate(oData, oRowInfo, aRetVal)
Translate Shape
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Shape Row Info. |
{object} | aRetVal | Return Value. |
Destroys the selectedShape in the aggregation selectedShape
.
Returns:
getAriaLabel(oData, oRowInfo): string
Gets current value of property
ariaLabel
.
Arial Label enables screen readers.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{string} | Value of property ariaLabel . |
getArrayAttribute(oData, oRowInfo): string
Gets current value of property
arrayAttribute
.
Specify which attribute is child array.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{string} | Value of property arrayAttribute . |
getAxisTime(): object
Get the AxisTime of gantt chart instance
Returns:
{object} | the AxisTime instance |
getCategory(oData, oRowInfo): string
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{string} | Value of property category . |
getClipPath(oData, oRowInfo): string
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{string} | Value of property clipPath . |
getEnableDnD(oData, oRowInfo): boolean
Gets current value of property
enableDnD
.
This value controls whether a shape is enabled for drag-and-drop behavior.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{boolean} | Value of property enableDnD . |
getEnableSelection(oData, oRowInfo): boolean
Gets current value of property
enableSelection
.
This value controls whether a shape is enabled for selection behavior.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{boolean} | Value of property enableSelection . |
getEndTime(oData, oRowInfo): string
Gets current value of property
endTime
.
End timestamp for duration shape.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{string} | Value of property endTime . |
getEndTimeFilterAttribute(oData, oRowInfo): string
Gets current value of property
endTimeFilterAttribute
.
Specify which is end time attribute of items in child array.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{string} | Value of property endTimeFilterAttribute . |
getFill(oData, oRowInfo): string
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{string} | Value of property fill . |
getFillOpacity(oData, oRowInfo): number
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{number} | Value of property fillOpacity . |
getFilter(oData, oRowInfo): string
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{string} | Value of property filter . |
getHtmlClass(oData, oRowInfo): string
Gets current value of property
htmlClass
.
Customized html classes. Multiple classes can be provided and seperated by space.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{string} | Value of property htmlClass . |
getIsBulk(oData, oRowInfo): boolean
Gets current value of property
isBulk
.
Gantt chart do filtering of data by timestamp for performance sake. For simple shapes which has time
or endTime
provided, set this flag to false. For shapes (path or polygon) which connect a list of data, set this value to false. And if filtering is required to next level data, provide arrayAttribute
, timeFilterAttribute
and endTimeFilterAttribute
in combination.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{boolean} | Value of property isBulk . |
getIsDuration(oData, oRowInfo): boolean
Gets current value of property
isDuration
.
When this flag is set to true, the shape is called 'duration shape'. And time
stands for startTime, endTime
stands for end time. When this flag is set to be false, the shape is called 'transient shape'. And only time
is used. Usually these 3 properties are used to determine x position of one shape.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{boolean} | Value of property isDuration . |
getLegend(oData): string
Gets legend value of property
legend
.
Specifies the legend text of the shape.
Parameters:
{object} | oData | Shape data. |
Returns:
{string} | Value of property legend . |
getRotationAngle(oData, oRowInfo): number
Gets current value of property
rotationAngle
.
This value is used in combination of property rotationCenter
. By providing both shape can be rotated with any angle around rotation center.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{number} | Value of property rotationAngle . |
getRotationCenter(oData, oRowInfo): array
Gets current value of property
rotationCenter
.
This value is used in combination of property rotationAngle
. By providing both shape can be rotated with any angle around rotation center. Default implementation is the coordinate at time
in x coordinate, and rowYCenter
in y coordinate. If application over-write this property by configuration or code, the logic cannot be guaranteed.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{array} | Value of property rotationCenter . |
getRowYCenter(oData, oRowInfo): array
Gets current value of property
rowYCenter
.
Default implementation is return the middle position of the row in y direction. If application over-write this property by configuration or code, the logic cannot be guaranteed.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{array} | Value of property rowYCenter . |
Gets content of aggregation
selectedShape
.
Selected Shape.
Selected shape specifies how to draw the selection high-light. Application can implement it by extending sap.gantt.shape.SelectedShape
and configure it in sap.gantt.config.Shape
.
Returns:
getShapeViewBoundary(): array
This method is used to get view boundary for visible area in Gantt Chart. The view boundary is a range of x-coordinate for visible area.
Returns:
{array} | View boundary for visible area in Gantt Chart. |
getStroke(oData, oRowInfo): string
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{string} | Value of property stroke . |
getStrokeDasharray(oData, oRowInfo): string
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{string} | Value of property strokeDasharray . |
getStrokeOpacity(oData): number
Parameters:
{object} | oData | Shape data. |
Returns:
{number} | Value of property strokeOpacity . |
getStrokeWidth(oData, oRowInfo): number
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{number} | Value of property strokeWidth . |
getTag(oData, oRowInfo): string
Gets current value of property
tag
.
SVG tag name of the shape. See SVG 1.1 specification for shapes.
Note: This value is not recommended to be over-written by configuration or coding.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{string} | Value of property tag . |
getTime(oData, oRowInfo): string
Gets current value of property
time
.
Timestamp for transient shape or start timestamp for duration shape.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{string} | Value of property time . |
getTimeFilterAttribute(oData, oRowInfo): string
Gets current value of property
timeFilterAttribute
.
Specify which is time attribute of items in child array.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{string} | Value of property timeFilterAttribute . |
getTitle(oData, oRowInfo): string
Gets current value of property
title
.
Title is visualized as tooltip by browser. Notes: Use character entity to do simple text tabbing and breaking. (Use " " for tab and "
" for break.) See SVG 1.1 specification for 'title'.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{string} | Value of property title . |
getTransform(oData, oRowInfo): string
Gets current value of property
transform
.
Standard SVG 'transform' attribute. See SVG 1.1 specifica6tion for 'transform'. Some logic in getTransform() is provided to enable property rotationCenter
and rotationAngle
. If application over-write this property by configuration or coding, rotation behavior cannot be guaranteed.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{string} | Value of property transform . |
getXBias(oData, oRowInfo): number
Gets current value of property
xBias
.
Fine-tune x coordinate. This value only works for category inRowShape
. Shape usually determines position in x coordinate by property isDuration
, time
and endTime
. Application can use this property to do some x coordinate adjustment in pixel. The xBias will be automatically mirrored for RTL mode. It means if you set 10 to property xBias, in RTL mode, the value of the xBias will be -10.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{number} | Value of property xBias . |
getYBias(oData, oRowInfo): number
Gets current value of property
yBias
.
Fine-tune y coordinate. This value only works for category inRowShape
. Y coordinate is automatically determined by row. Application can use this property to do some y coordinate adjustment in pixel.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{number} | Value of property yBias . |
Sets a new value for property
ariaLabel
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sAriaLabel | New value for property ariaLabel |
Returns:
Sets a new value for property
arrayAttribute
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sArrayAttribute | New value for property arrayAttribute |
Returns:
Sets a new value for property
category
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is sap.gantt.shape.ShapeCategory.InRowShape
.
Parameters:
{string} | sCategory | New value for property category |
Returns:
Sets a new value for property
clipPath
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sClipPath | New value for property clipPath |
Returns:
Sets a new value for property
enableDnD
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bEnableDnD | New value for property enableDnD |
Returns:
Sets a new value for property
enableSelection
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bEnableSelection | New value for property enableSelection |
Returns:
Sets a new value for property
endTime
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sEndTime | New value for property endTime |
Returns:
Sets a new value for property
endTimeFilterAttribute
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sEndTimeFilterAttribute | New value for property endTimeFilterAttribute |
Returns:
Sets a new value for property
fill
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
Returns:
Sets a new value for property
fillOpacity
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 1
.
Parameters:
{number} | sFillOpacity | New value for property fillOpacity |
Returns:
Sets a new value for property
filter
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sFilter | New value for property filter |
Returns:
Sets a new value for property
htmlClass
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sHtmlClass | New value for property htmlClass |
Returns:
Sets a new value for property
isBulk
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bIsBulk | New value for property isBulk |
Returns:
Sets a new value for property
isDuration
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bIsDuration | New value for property isDuration |
Returns:
Sets a new value for property
legend
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sLegend | New value for property legend |
Returns:
Sets a new value for property
rotationAngle
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{number} | sRotationAngle | New value for property rotationAngle |
Returns:
Sets a new value for property
rotationCenter
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{array} | sRotationCenter | New value for property rotationCenter |
Returns:
Sets a new value for property
rowYCenter
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 7.5
.
Parameters:
{number} | sRowYCenter | New value for property rowYCenter |
Returns:
Sets the aggregated selectedShape
.
Parameters:
Returns:
Sets a new value for property
stroke
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
Returns:
Sets a new value for property
strokeDasharray
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sStrokeDasharray | New value for property strokeDasharray |
Returns:
Sets a new value for property
strokeOpacity
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 1
.
Parameters:
{number} | sStrokeOpacity | New value for property strokeOpacity |
Returns:
Sets a new value for property
strokeWidth
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
Parameters:
{number} | sStrokeWidth | New value for property strokeWidth |
Returns:
Sets a new value for property
tag
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sTag | New value for property tag |
Returns:
Sets a new value for property
time
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sTime | New value for property time |
Returns:
Sets a new value for property
timeFilterAttribute
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sTimeFilterAttribute | New value for property timeFilterAttribute |
Returns:
Sets a new value for property
title
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sTitle | New value for property title |
Returns:
Sets a new value for property
transform
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sTransform | New value for property transform |
Returns:
Sets a new value for property
xBias
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
Parameters:
{number} | sXBias | New value for property xBias |
Returns:
Sets a new value for property
yBias
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
Parameters:
{number} | sYBias | New value for property yBias |
Returns: