Class sap.gantt.legend.DimensionLegendModule: sap/gantt/legend/DimensionLegend

extends LegendBase

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.

Constructor Summary
new sap.gantt.legend.DimensionLegend(sId?, mSettings?)Creates and initializes a new Dimension Legend class.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.gantt.legend.DimensionLegend.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.gantt.legend.DimensionLegend with name sClassName and enriches it with the information contained in oClassInfo.
sap.gantt.legend.DimensionLegend.getMetadata()Returns a metadata object for class sap.gantt.legend.DimensionLegend.
getExclude()Gets current value of property exclude.
getLegendSpace()Gets current value of property legendSpace.
getShape()Gets current value of property shape.
getXDimension()Gets current value of property xDimension.
getXDomain()Gets current value of property xDomain.
getYDimension()Gets current value of property yDimension.
getYDomain()Gets current value of property yDomain.
setExclude(sExclude)Sets a new value for property exclude.
setLegendSpace(sLegendSpace)Sets a new value for property legendSpace.
setShape(sShape)Sets a new value for property shape.
setXDimension(sXDimension)Sets a new value for property xDimension.
setXDomain(sXDomain)Sets a new value for property xDomain.
setYDimension(sYDimension)Sets a new value for property yDimension.
setYDomain(sYDomain)Sets a new value for property yDomain.
Constructor Detail
new sap.gantt.legend.DimensionLegend(sId?, mSettings?)
Creates and initializes a new Dimension Legend class.

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:

In addition, all settings applicable to the base type sap.gantt.legend.LegendBase can be used as well.

Parameters:
{string}sId? ID of the new control, generated automatically if no ID is given
{object}mSettings? Initial settings for the new control
Method Detail
sap.gantt.legend.DimensionLegend.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.gantt.legend.DimensionLegend with name 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.

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
sap.gantt.legend.DimensionLegend.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.gantt.legend.DimensionLegend.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getExclude(): array
Gets current value of property exclude.

Default value is [].

Returns:
{array} Value of property exclude
getLegendSpace(): number
Gets current value of property legendSpace.

Space between two legend items.

Default value is 8.

Returns:
{number} Value of property legendSpace
Gets current value of property 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.

Returns:
{sap.gantt.config.Shape} Value of property shape
getXDimension(): string
Gets current value of property 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.

Returns:
{string} Value of property xDimension
getXDomain(): array
Gets current value of property 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 [].

Returns:
{array} Value of property xDomain
getYDimension(): string
Gets current value of property 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.

Returns:
{string} Value of property yDimension
getYDomain(): array
Gets current value of property 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 [].

Returns:
{array} Value of property yDomain
setExclude(sExclude): sap.gantt.legend.DimensionLegend
Sets a new value for property exclude.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is [].

Parameters:
{array}sExclude New value for property exclude
Returns:
{sap.gantt.legend.DimensionLegend} Reference to this in order to allow method chaining
setLegendSpace(sLegendSpace): sap.gantt.legend.DimensionLegend
Sets a new value for property 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.

Parameters:
{number}sLegendSpace New value for property legendSpace
Returns:
{sap.gantt.legend.DimensionLegend} Reference to this in order to allow method chaining
Sets a new value for property 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.

Parameters:
{sap.gantt.config.Shape}sShape New value for property shape
Returns:
{sap.gantt.legend.DimensionLegend} Reference to this in order to allow method chaining
setXDimension(sXDimension): sap.gantt.legend.DimensionLegend
Sets a new value for property 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.

Parameters:
{string}sXDimension New value for property xDimension
Returns:
{sap.gantt.legend.DimensionLegend} Reference to this in order to allow method chaining
setXDomain(sXDomain): sap.gantt.legend.DimensionLegend
Sets a new value for property 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 [].

Parameters:
{array}sXDomain New value for property xDomain
Returns:
{sap.gantt.legend.DimensionLegend} Reference to this in order to allow method chaining
setYDimension(sYDimension): sap.gantt.legend.DimensionLegend
Sets a new value for property 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.

Parameters:
{string}sYDimension New value for property yDimension
Returns:
{sap.gantt.legend.DimensionLegend} Reference to this in order to allow method chaining
setYDomain(sYDomain): sap.gantt.legend.DimensionLegend
Sets a new value for property 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 [].

Parameters:
{array}sYDomain New value for property yDomain
Returns:
{sap.gantt.legend.DimensionLegend} Reference to this in order to allow method chaining