Class sap.suite.ui.commons.ComparisonChartModule: sap/suite/ui/commons/ComparisonChart
This control shows a comparison chart.
Deprecated API:Since version 1.34. Deprecated. sap.suite.ui.microchart.ComparisonMicroChart should be used.
sClassName
and enriches it with the information contained in oClassInfo
.fnFunction
to the 'press' event of this sap.suite.ui.commons.ComparisonChart
.fnFunction
from the 'press' event of this sap.suite.ui.commons.ComparisonChart
.sap.suite.ui.commons.ComparisonData
in the aggregation named data
and returns its index if found or -1 otherwise. Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers.
If the name of a setting is ambiguous (e.g. a property has the same name as an event), then the framework assumes property, aggregation, association, event in that order. To override this automatic resolution, one of the prefixes "aggregation:", "association:" or "event:" can be added to the name of the setting (such a prefixed name must be enclosed in single or double quotes).
The supported settings are:
- Properties
- scale : string
- size : sap.suite.ui.commons.InfoTileSize (default: sap.suite.ui.commons.InfoTileSize.Auto)
- view : sap.suite.ui.commons.ComparisonChartView (default: sap.suite.ui.commons.ComparisonChartView.Normal)
- width : sap.ui.core.CSSSize
- colorPalette : string[] (default: [])
- shrinkable : boolean (default: false)
- height : sap.ui.core.CSSSize
- Aggregations
- data : sap.suite.ui.commons.ComparisonData[]
- Associations
- Events
- press : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
{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.34. Deprecated. sap.suite.ui.microchart.ComparisonMicroChart should be used.
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters |
sClassName
and enriches it with the information contained in oClassInfo
. oClassInfo
might contain the same kind of informations as described in Element.extend.
{string} | sClassName | name of the class to be created |
{object} | oClassInfo? | object literal with informations about the class |
{function} | FNMetaImpl? | constructor function for the metadata object. If not given, it defaults to sap.ui.core.ElementMetadata. |
{function} | the created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
oData
to the aggregation named data
. {sap.suite.ui.commons.ComparisonData} | oData | the data to add; if empty, nothing is inserted |
{sap.suite.ui.commons.ComparisonChart} | this to allow method chaining |
fnFunction
to the 'press' event of this sap.suite.ui.commons.ComparisonChart
.. When called, the context of the event handler (its
this
) will be bound to oListener if specified otherwise to this sap.suite.ui.commons.ComparisonChart
.
itself. The event is fired when the user chooses the comparison chart.
Parameters:
{object} | oData? | An application specific payload object, that will be passed to the event handler along with the event object when firing the event. |
{function} | fnFunction | The function to call, when the event occurs. |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.suite.ui.commons.ComparisonChart .itself. |
Returns:
{sap.suite.ui.commons.ComparisonChart} | this to allow method chaining |
destroyData(): sap.suite.ui.commons.ComparisonChart Destroys all the data in the aggregation named data
. Returns:{sap.suite.ui.commons.ComparisonChart} this
to allow method chaining
detachPress(fnFunction, oListener): sap.suite.ui.commons.ComparisonChart Detach event handler fnFunction
from the 'press' event of this sap.suite.ui.commons.ComparisonChart
.
The passed function and listener object must match the ones used for event registration.
Parameters:{function} fnFunction The function to call, when the event occurs. {object} oListener Context object on which the given function had to be called.
Returns:{sap.suite.ui.commons.ComparisonChart} this
to allow method chaining
firePress(mArguments?): sap.suite.ui.commons.ComparisonChart Fire event press to attached listeners. Parameters:{Map} mArguments? the arguments to pass along with the event.
Returns:{sap.suite.ui.commons.ComparisonChart} this
to allow method chaining
getColorPalette(): string[] Getter for property colorPalette
. The color palette for the chart. If this property is set, semantic colors defined in ComparisonData are ignored. Colors from the palette are assigned to each bar consequentially. When all the palette colors are used, assignment of the colors begins from the first palette color. Default value is []
- Since:
- 1.24
Returns:{string[]} the value of property colorPalette
getData(): sap.suite.ui.commons.ComparisonData[] Getter for aggregation data
.
The comparison chart data. Returns:{sap.suite.ui.commons.ComparisonData[]}
getHeight(): sap.ui.core.CSSSize Getter for property height
. Height of the chart. Default value is empty/undefined
- Since:
- 1.25
Returns:{sap.ui.core.CSSSize} the value of property height
getScale(): string Getter for property scale
. The scaling suffix. Default value is empty/undefined
Returns:{string} the value of property scale
getShrinkable(): boolean Getter for property shrinkable
. If it is set to true, the height of the control is defined by its content. Default value is false
- Since:
- 1.25
Returns:{boolean} the value of property shrinkable
getSize(): sap.suite.ui.commons.InfoTileSize Getter for property size
. Updates the size of the chart. If not set then the default size is applied based on the device tile. Default value is Auto
Returns:{sap.suite.ui.commons.InfoTileSize} the value of property size
getView(): sap.suite.ui.commons.ComparisonChartView Getter for property view
. The view of the chart. If not set, the Normal view is used by default. Default value is Normal
- Since:
- 1.25
Returns:{sap.suite.ui.commons.ComparisonChartView} the value of property view
getWidth(): sap.ui.core.CSSSize Getter for property width
. The width of the chart. If it is not set, the size of the control is defined by the size property. Default value is empty/undefined
- Since:
- 1.22
Returns:{sap.ui.core.CSSSize} the value of property width
indexOfData(oData): int Checks for the provided sap.suite.ui.commons.ComparisonData
in the aggregation named data
and returns its index if found or -1 otherwise. Parameters:{sap.suite.ui.commons.ComparisonData} oData the data whose index is looked for.
Returns:{int} the index of the provided control in the aggregation if found, or -1 otherwise
insertData(oData, iIndex): sap.suite.ui.commons.ComparisonChart Inserts a data into the aggregation named data
. Parameters:{sap.suite.ui.commons.ComparisonData} oData the data to insert; if empty, nothing is inserted {int} iIndex the 0
-based index the data should be inserted at; for a negative value of iIndex
, the data is inserted at position 0; for a value greater than the current size of the aggregation, the data is inserted at the last position
Returns:{sap.suite.ui.commons.ComparisonChart} this
to allow method chaining
removeAllData(): sap.suite.ui.commons.ComparisonData[] Removes all the controls in the aggregation named data
.
Additionally unregisters them from the hosting UIArea. Returns:{sap.suite.ui.commons.ComparisonData[]} an array of the removed elements (might be empty)
removeData(vData): sap.suite.ui.commons.ComparisonData Removes an data from the aggregation named data
. Parameters:{int|string|sap.suite.ui.commons.ComparisonData} vData the data to remove or its index or id
Returns:{sap.suite.ui.commons.ComparisonData} the removed data or null
setColorPalette(aColorPalette): sap.suite.ui.commons.ComparisonChart Setter for property colorPalette
. Default value is []
Parameters:{string[]} aColorPalette new value for property colorPalette
- Since:
- 1.24
Returns:{sap.suite.ui.commons.ComparisonChart} this
to allow method chaining
setHeight(sHeight): sap.suite.ui.commons.ComparisonChart Setter for property height
. Default value is empty/undefined
Parameters:{sap.ui.core.CSSSize} sHeight new value for property height
- Since:
- 1.25
Returns:{sap.suite.ui.commons.ComparisonChart} this
to allow method chaining
setScale(sScale): sap.suite.ui.commons.ComparisonChart Setter for property scale
. Default value is empty/undefined
Parameters:{string} sScale new value for property scale
Returns:{sap.suite.ui.commons.ComparisonChart} this
to allow method chaining
setShrinkable(bShrinkable): sap.suite.ui.commons.ComparisonChart Setter for property shrinkable
. Default value is false
Parameters:{boolean} bShrinkable new value for property shrinkable
- Since:
- 1.25
Returns:{sap.suite.ui.commons.ComparisonChart} this
to allow method chaining
setSize(oSize): sap.suite.ui.commons.ComparisonChart Setter for property size
. Default value is Auto
Parameters:{sap.suite.ui.commons.InfoTileSize} oSize new value for property size
Returns:{sap.suite.ui.commons.ComparisonChart} this
to allow method chaining
setView(oView): sap.suite.ui.commons.ComparisonChart Setter for property view
. Default value is Normal
Parameters:{sap.suite.ui.commons.ComparisonChartView} oView new value for property view
- Since:
- 1.25
Returns:{sap.suite.ui.commons.ComparisonChart} this
to allow method chaining
setWidth(sWidth): sap.suite.ui.commons.ComparisonChart Setter for property width
. Default value is empty/undefined
Parameters:{sap.ui.core.CSSSize} sWidth new value for property width
- Since:
- 1.22
Returns:{sap.suite.ui.commons.ComparisonChart} this
to allow method chaining