Class sap.gantt.legend.DimensionLegendModule: sap/gantt/legend/DimensionLegend
Dimension Legend provides a template for two-dimension legends. This template defines the representation (shape, pattern, and color) of individual legend items and their corresponding meanings in both dimensions.
Consider that you need to create a legend where legend items represent both the type and status of an object. In this case, you can configure xDimention to indicate object types and yDimension to indicate object statuses. Assume that valid object types are "Freight Order", "Freight Unit", and "Trailer Unit"; valid object statuses are "Executed", "In Execution", "Fixed", "Planned", and “Unplanned”. You will have a three by four two-dimension legend containing twelve legend items. Each them represents an object in a specific type and a specific status. For example, a red square stands for executed freight orders.
sClassName
and enriches it with the information contained in oClassInfo
. Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.
The supported settings are:
- Properties
- shape : sap.gantt.config.Shape
- xDimension : string
- yDimension : string
- xDomain : array (default: [])
- yDomain : array (default: [])
- exclude : array (default: [])
- legendSpace : number (default: 8)
In addition, all settings applicable to the base type sap.gantt.legend.LegendBase can be used as well.
{string} | sId? | ID of the new control, generated automatically if no ID is given |
{object} | mSettings? | Initial settings for the new control |
sClassName
and enriches it with the information contained in oClassInfo
. oClassInfo
might contain the same kind of information as described in sap.gantt.legend.LegendBase.extend.
{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 |
{function} | Created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
exclude
. Default value is []
.
{array} | Value of property exclude |
legendSpace
. Space between two legend items.
Default value is 8
.
{number} | Value of property legendSpace |
shape
. A Shape instance that contains two sets of data, one for the 'x' dimension and the other for the 'y' dimension. The system determines the representation of a legend element according to its 'x' dimension and 'y' dimension values.
{sap.gantt.config.Shape} | Value of property shape |
xDimension
. Name of xDimension. Note that the Shape instance used in DimensionLegend must have a set of data matches this property's value. The data set contains entries specifying the representation of individual legend items.
{string} | Value of property xDimension |
xDomain
. Valid values of xDimension. Each of these values has a corresponding entry in the data set that matches xDimension in the Shape instance.
Default value is []
.
{array} | Value of property xDomain |
yDimension
. Name of yDimension. Note that the Shape instance used in DimensionLegend must have a set of data matches this property's value. The data set contains entries specifying the representation of individual legend items.
{string} | Value of property yDimension |
yDomain
. Valid values of yDimension. Each of these values has a corresponding entry in the data set that matches yDimension in the Shape instance.
Default value is []
.
{array} | Value of property yDomain |
exclude
. When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is []
.
{array} | sExclude | New value for property exclude |
{sap.gantt.legend.DimensionLegend} | Reference to this in order to allow method chaining |
legendSpace
. Space between two legend items.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 8
.
{number} | sLegendSpace | New value for property legendSpace |
{sap.gantt.legend.DimensionLegend} | Reference to this in order to allow method chaining |
shape
. A Shape instance that contains two sets of data, one for the 'x' dimension and the other for the 'y' dimension. The system determines the representation of a legend element according to its 'x' dimension and 'y' dimension values.
When called with a value of null
or undefined
, the default value of the property will be restored.
{sap.gantt.config.Shape} | sShape | New value for property shape |
{sap.gantt.legend.DimensionLegend} | Reference to this in order to allow method chaining |
xDimension
. Name of xDimension. Note that the Shape instance used in DimensionLegend must have a set of data matches this property's value. The data set contains entries specifying the representation of individual legend items.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sXDimension | New value for property xDimension |
{sap.gantt.legend.DimensionLegend} | Reference to this in order to allow method chaining |
xDomain
. Valid values of xDimension. Each of these values has a corresponding entry in the data set that matches xDimension in the Shape instance.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is []
.
{array} | sXDomain | New value for property xDomain |
{sap.gantt.legend.DimensionLegend} | Reference to this in order to allow method chaining |
yDimension
. Name of yDimension. Note that the Shape instance used in DimensionLegend must have a set of data matches this property's value. The data set contains entries specifying the representation of individual legend items.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sYDimension | New value for property yDimension |
{sap.gantt.legend.DimensionLegend} | Reference to this in order to allow method chaining |
yDomain
. Valid values of yDimension. Each of these values has a corresponding entry in the data set that matches yDimension in the Shape instance.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is []
.
{array} | sYDomain | New value for property yDomain |
{sap.gantt.legend.DimensionLegend} | Reference to this in order to allow method chaining |