Class sap.viz.ui5.types.legend.CommonModule: sap/viz/ui5/types/legend/Common


Module sap.viz.ui5.types.legend.Common

Deprecated API:Since version 1.32.0. The chart controls in the sap.viz.ui5 package (which were always marked as experimental) have been deprecated since 1.32.0. They are no longer actively developed and won't receive new features or improvements, only important bug fixes. They will only remain in the SAPUI5 distribution for backward compatibility.

SAP strongly recommends that existing consumers of those controls migrate to the new VizFrame control to benefit from new charting enhancements and timely support.

Note: As the feature set, design and API usage of VizFrame might differ from the old chart controls, make sure you evaluate it thoroughly before migration.

Experimental API:Since version 1.7.2. Charting API is not finished yet and might change completely.


Since: 1.7.2.
Constructor Summary
new sap.viz.ui5.types.legend.Common(sId?, mSettings?)Constructor for a new sap.viz.ui5.types.legend.Common

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers.

Method Summary
sap.viz.ui5.types.legend.Common.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.viz.ui5.types.legend.Common with name sClassName and enriches it with the information contained in oClassInfo.
sap.viz.ui5.types.legend.Common.getMetadata()Returns a metadata object for class sap.viz.ui5.types.legend.Common.
destroyTitle()Destroys the title in the aggregation title.
getDrawingEffect()Gets current value of property drawingEffect.
getIsHierarchical()Gets current value of property isHierarchical.
getIsScrollable()Gets current value of property isScrollable.
getTitle()Gets content of aggregation title.
getVisible()Gets current value of property visible.
setDrawingEffect(sDrawingEffect)Sets a new value for property drawingEffect.
setIsHierarchical(bIsHierarchical)Sets a new value for property isHierarchical.
setIsScrollable(bIsScrollable)Sets a new value for property isScrollable.
setTitle(oTitle)Sets the aggregated title.
setVisible(bVisible)Sets a new value for property visible.
getAlignment()Gets current value of property alignment.
getFormatString()Gets current value of property formatString.
getPosition()Gets current value of property position.
getType()Gets current value of property type.
setAlignment(sAlignment)Sets a new value for property alignment.
setFormatString(sFormatString)Sets a new value for property formatString.
setPosition(sPosition)Sets a new value for property position.
setType(sType)Sets a new value for property type.
Constructor Detail
new sap.viz.ui5.types.legend.Common(sId?, mSettings?)
Constructor for a new sap.viz.ui5.types.legend.Common

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
    • visible : boolean (default: true)
    • formatString : string
    • isHierarchical : boolean (default: false)
    • isScrollable : boolean (default: false)
    • position : sap.viz.ui5.types.legend.Common_position (default: right)
    • type : sap.viz.ui5.types.legend.Common_type (default: ColorLegend)
    • alignment : sap.viz.ui5.types.legend.Common_alignment (default: start)
    • drawingEffect : sap.viz.ui5.types.legend.Common_drawingEffect (default: normal)
  • Aggregations
    • title : sap.viz.ui5.types.legend.Common_title

In addition, all settings applicable to the base type sap.viz.ui5.core.BaseStructuredType can be used as well.

Parameters:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Deprecated:
Since version 1.32.0. The chart controls in the sap.viz.ui5 package (which were always marked as experimental) have been deprecated since 1.32.0. They are no longer actively developed and won't receive new features or improvements, only important bug fixes. They will only remain in the SAPUI5 distribution for backward compatibility.

SAP strongly recommends that existing consumers of those controls migrate to the new VizFrame control to benefit from new charting enhancements and timely support.

Note: As the feature set, design and API usage of VizFrame might differ from the old chart controls, make sure you evaluate it thoroughly before migration.

Method Detail
sap.viz.ui5.types.legend.Common.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.viz.ui5.types.legend.Common with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.viz.ui5.core.BaseStructuredType.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.viz.ui5.types.legend.Common.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.viz.ui5.types.legend.Common.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
Destroys the title in the aggregation title.
Returns:
{sap.viz.ui5.types.legend.Common} Reference to this in order to allow method chaining
Gets current value of property drawingEffect.

Set the drawing effect for colors in the legend. If this value is set to 'glossy', colors are glossy. If this value is set to 'normal', colors are matte.

Default value is normal.

Returns:
{sap.viz.ui5.types.legend.Common_drawingEffect} Value of property drawingEffect
getIsHierarchical(): boolean
Gets current value of property isHierarchical.

Set whether the legend is hierarchical. This is only supported if the legend is located to the right of the chart.

Default value is false.

Returns:
{boolean} Value of property isHierarchical
getIsScrollable(): boolean
Gets current value of property isScrollable.

Set whether the legend is scrollable. If this value is set to 'false', and there is not enough room to show the whole legend, an ellipsis (...) indicates the missing legend items.

Default value is false.

Returns:
{boolean} Value of property isScrollable
Gets content of aggregation title.

Settings for the legend title

Returns:
{sap.viz.ui5.types.legend.Common_title}
getVisible(): boolean
Gets current value of property visible.

Set the visibility of the legend

Default value is true.

Returns:
{boolean} Value of property visible
setDrawingEffect(sDrawingEffect): sap.viz.ui5.types.legend.Common
Sets a new value for property drawingEffect.

Set the drawing effect for colors in the legend. If this value is set to 'glossy', colors are glossy. If this value is set to 'normal', colors are matte.

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

Default value is normal.

Parameters:
{sap.viz.ui5.types.legend.Common_drawingEffect}sDrawingEffect New value for property drawingEffect
Returns:
{sap.viz.ui5.types.legend.Common} Reference to this in order to allow method chaining
setIsHierarchical(bIsHierarchical): sap.viz.ui5.types.legend.Common
Sets a new value for property isHierarchical.

Set whether the legend is hierarchical. This is only supported if the legend is located to the right of the chart.

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

Default value is false.

Parameters:
{boolean}bIsHierarchical New value for property isHierarchical
Returns:
{sap.viz.ui5.types.legend.Common} Reference to this in order to allow method chaining
setIsScrollable(bIsScrollable): sap.viz.ui5.types.legend.Common
Sets a new value for property isScrollable.

Set whether the legend is scrollable. If this value is set to 'false', and there is not enough room to show the whole legend, an ellipsis (...) indicates the missing legend items.

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

Default value is false.

Parameters:
{boolean}bIsScrollable New value for property isScrollable
Returns:
{sap.viz.ui5.types.legend.Common} Reference to this in order to allow method chaining
Sets the aggregated title.
Parameters:
{sap.viz.ui5.types.legend.Common_title}oTitle The title to set
Returns:
{sap.viz.ui5.types.legend.Common} Reference to this in order to allow method chaining
setVisible(bVisible): sap.viz.ui5.types.legend.Common
Sets a new value for property visible.

Set the visibility of the legend

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

Default value is true.

Parameters:
{boolean}bVisible New value for property visible
Returns:
{sap.viz.ui5.types.legend.Common} Reference to this in order to allow method chaining
Gets current value of property alignment.

Set the alignment of the legend

Default value is start.

Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.legend.Common_alignment} Value of property alignment
getFormatString(): string
Gets current value of property formatString.

Set the format string for the legend. The following characters are reserved as tokens for format code: MDYHSAmdyhsa#?%0@.

Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{string} Value of property formatString
Gets current value of property position.

It is a deprecated property. Please use "legendGroup.layout.position" property to set legend position.

Default value is right.

Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.legend.Common_position} Value of property position
Gets current value of property type.

Set legend type for Bubble charts. Non-bubble charts are not supported.

Default value is ColorLegend.

Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.legend.Common_type} Value of property type
setAlignment(sAlignment): sap.viz.ui5.types.legend.Common
Sets a new value for property alignment.

Set the alignment of the legend

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

Default value is start.

Parameters:
{sap.viz.ui5.types.legend.Common_alignment}sAlignment New value for property alignment
Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.legend.Common} Reference to this in order to allow method chaining
setFormatString(sFormatString): sap.viz.ui5.types.legend.Common
Sets a new value for property formatString.

Set the format string for the legend. The following characters are reserved as tokens for format code: MDYHSAmdyhsa#?%0@.

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

Parameters:
{string}sFormatString New value for property formatString
Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.legend.Common} Reference to this in order to allow method chaining
setPosition(sPosition): sap.viz.ui5.types.legend.Common
Sets a new value for property position.

It is a deprecated property. Please use "legendGroup.layout.position" property to set legend position.

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

Default value is right.

Parameters:
{sap.viz.ui5.types.legend.Common_position}sPosition New value for property position
Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.legend.Common} Reference to this in order to allow method chaining
Sets a new value for property type.

Set legend type for Bubble charts. Non-bubble charts are not supported.

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

Default value is ColorLegend.

Parameters:
{sap.viz.ui5.types.legend.Common_type}sType New value for property type
Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.legend.Common} Reference to this in order to allow method chaining