Class sap.ca.ui.charts.ChartToolBarModule: sap/ca/ui/charts/ChartToolBar

extends Control

ToolBar used for displaying one chart amongst several and provide additional features: - 2 select boxes for selecting dimensions - fullscreen toggle - personalization icon - showLegend toggle

Deprecated API:Since version 1.24.

Sap.ca charts and the ChartToolBar have been replaced with sap.viz and vizFrame in 1.24. The UI5 control "sap.viz.ui5.controls.VizFrame" serves as a single point of entry for all the new charts. Now that 1.24 is available you are asked to use sap.viz charts and the VizFrame instead! This control will not be supported anymore from 1.24.

Constructor Summary
new sap.ca.ui.charts.ChartToolBar(sId?, mSettings?)Constructor for a new charts/ChartToolBar.
Event Summary
firstDimensionKeySelected(oControlEvent)Event fired when a user selects an item from the first select box.
personalizationPressed(oControlEvent)Event fired when a user clicks on the personalization icon
secondDimensionKeySelected(oControlEvent)Event fired when a user selects an item from the second select box.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ca.ui.charts.ChartToolBar.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ca.ui.charts.ChartToolBar with name sClassName and enriches it with the information contained in oClassInfo.
sap.ca.ui.charts.ChartToolBar.getMetadata()Returns a metadata object for class sap.ca.ui.charts.ChartToolBar.
addChart(oChart)Adds some chart oChart to the aggregation named charts.
attachFirstDimensionKeySelected(oData?, fnFunction, oListener?)Attach event handler fnFunction to the 'firstDimensionKeySelected' event of this sap.ca.ui.charts.ChartToolBar.
attachPersonalizationPressed(oData?, fnFunction, oListener?)Attach event handler fnFunction to the 'personalizationPressed' event of this sap.ca.ui.charts.ChartToolBar.
attachSecondDimensionKeySelected(oData?, fnFunction, oListener?)Attach event handler fnFunction to the 'secondDimensionKeySelected' event of this sap.ca.ui.charts.ChartToolBar.
destroyCharts()Destroys all the charts in the aggregation named charts.
destroyToolBar()Destroys the toolBar in the aggregation named toolBar.
detachFirstDimensionKeySelected(fnFunction, oListener)Detach event handler fnFunction from the 'firstDimensionKeySelected' event of this sap.ca.ui.charts.ChartToolBar.
detachPersonalizationPressed(fnFunction, oListener)Detach event handler fnFunction from the 'personalizationPressed' event of this sap.ca.ui.charts.ChartToolBar.
detachSecondDimensionKeySelected(fnFunction, oListener)Detach event handler fnFunction from the 'secondDimensionKeySelected' event of this sap.ca.ui.charts.ChartToolBar.
fireFirstDimensionKeySelected(mArguments?)Fire event firstDimensionKeySelected to attached listeners.
firePersonalizationPressed(mArguments?)Fire event personalizationPressed to attached listeners.
fireSecondDimensionKeySelected(mArguments?)Fire event secondDimensionKeySelected to attached listeners.
getCharts()Getter for aggregation charts.
getChartTitle()Getter for property chartTitle.
getFirstDimensionKeyPath()Getter for property firstDimensionKeyPath.
getFirstDimensionPath()Getter for property firstDimensionPath.
getFirstDimensionSelect()The sap.m.Select inserted into the toolBar for handling the firstDimension selection
getFirstDimensionTextPath()Getter for property firstDimensionTextPath.
getFullScreen()Getter for property fullScreen.
getSecondDimensionKeyPath()Getter for property secondDimensionKeyPath.
getSecondDimensionPath()Getter for property secondDimensionPath.
getSecondDimensionSelect()The sap.m.Select inserted into the toolBar for handling the secondDimension selection
getSecondDimensionTextPath()Getter for property secondDimensionTextPath.
getSelectedChart()The ui5 control displayed
getShowFullScreen()Getter for property showFullScreen.
getShowLegend()Getter for property showLegend.
getShowPersonalization()Getter for property showPersonalization.
getToolBar()Getter for aggregation toolBar.
indexOfChart(oChart)Checks for the provided sap.ui.core.Control in the aggregation named charts and returns its index if found or -1 otherwise.
insertChart(oChart, iIndex)Inserts a chart into the aggregation named charts.
removeAllCharts()Removes all the controls in the aggregation named charts.
removeChart(vChart)Removes an chart from the aggregation named charts.
setChartTitle(sChartTitle)Setter for property chartTitle.
setFirstDimensionKeyPath(sFirstDimensionKeyPath)Setter for property firstDimensionKeyPath.
setFirstDimensionPath(sFirstDimensionPath)Setter for property firstDimensionPath.
setFirstDimensionSelect(vFirstDimensionSelect)The sap.m.Select inserted into the toolBar for handling the firstDimension selection
setFirstDimensionTextPath(sFirstDimensionTextPath)Setter for property firstDimensionTextPath.
setFullScreen(bFullScreen)Setter for property fullScreen.
setSecondDimensionKeyPath(sSecondDimensionKeyPath)Setter for property secondDimensionKeyPath.
setSecondDimensionPath(sSecondDimensionPath)Setter for property secondDimensionPath.
setSecondDimensionSelect(vSecondDimensionSelect)The sap.m.Select inserted into the toolBar for handling the secondDimension selection
setSecondDimensionTextPath(sSecondDimensionTextPath)Setter for property secondDimensionTextPath.
setSelectedChart(vSelectedChart)The ui5 control displayed
setShowFullScreen(bShowFullScreen)Setter for property showFullScreen.
setShowLegend(bShowLegend)Setter for property showLegend.
setShowPersonalization(bShowPersonalization)Setter for property showPersonalization.
setToolBar(oToolBar)Setter for the aggregated toolBar.
Constructor Detail
new sap.ca.ui.charts.ChartToolBar(sId?, mSettings?)
Constructor for a new charts/ChartToolBar.

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:

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.24.

Sap.ca charts and the ChartToolBar have been replaced with sap.viz and vizFrame in 1.24. The UI5 control "sap.viz.ui5.controls.VizFrame" serves as a single point of entry for all the new charts. Now that 1.24 is available you are asked to use sap.viz charts and the VizFrame instead! This control will not be supported anymore from 1.24.

Event Detail
firstDimensionKeySelected(oControlEvent)
Event fired when a user selects an item from the first select box. This event is providing the item selectedKey as parameter
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
personalizationPressed(oControlEvent)
Event fired when a user clicks on the personalization icon
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
secondDimensionKeySelected(oControlEvent)
Event fired when a user selects an item from the second select box. This event is providing the item selectedKey as parameter
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Method Detail
sap.ca.ui.charts.ChartToolBar.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ca.ui.charts.ChartToolBar with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of informations as described in Element.extend.

Parameters:
{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.
Returns:
{function} the created class / constructor function
sap.ca.ui.charts.ChartToolBar.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ca.ui.charts.ChartToolBar.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
Adds some chart oChart to the aggregation named charts.
Parameters:
{sap.ui.core.Control}oChart the chart to add; if empty, nothing is inserted
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
attachFirstDimensionKeySelected(oData?, fnFunction, oListener?): sap.ca.ui.charts.ChartToolBar
Attach event handler fnFunction to the 'firstDimensionKeySelected' event of this sap.ca.ui.charts.ChartToolBar.
. When called, the context of the event handler (its this) will be bound to oListener if specified otherwise to this sap.ca.ui.charts.ChartToolBar.
itself.

Event fired when a user selects an item from the first select box. This event is providing the item selectedKey as parameter

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.ca.ui.charts.ChartToolBar.
itself.
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
attachPersonalizationPressed(oData?, fnFunction, oListener?): sap.ca.ui.charts.ChartToolBar
Attach event handler fnFunction to the 'personalizationPressed' event of this sap.ca.ui.charts.ChartToolBar.
. When called, the context of the event handler (its this) will be bound to oListener if specified otherwise to this sap.ca.ui.charts.ChartToolBar.
itself.

Event fired when a user clicks on the personalization icon

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.ca.ui.charts.ChartToolBar.
itself.
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
attachSecondDimensionKeySelected(oData?, fnFunction, oListener?): sap.ca.ui.charts.ChartToolBar
Attach event handler fnFunction to the 'secondDimensionKeySelected' event of this sap.ca.ui.charts.ChartToolBar.
. When called, the context of the event handler (its this) will be bound to oListener if specified otherwise to this sap.ca.ui.charts.ChartToolBar.
itself.

Event fired when a user selects an item from the second select box. This event is providing the item selectedKey as parameter

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.ca.ui.charts.ChartToolBar.
itself.
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
Destroys all the charts in the aggregation named charts.
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
Destroys the toolBar in the aggregation named toolBar.
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
detachFirstDimensionKeySelected(fnFunction, oListener): sap.ca.ui.charts.ChartToolBar
Detach event handler fnFunction from the 'firstDimensionKeySelected' event of this sap.ca.ui.charts.ChartToolBar.

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.ca.ui.charts.ChartToolBar}this to allow method chaining
detachPersonalizationPressed(fnFunction, oListener): sap.ca.ui.charts.ChartToolBar
Detach event handler fnFunction from the 'personalizationPressed' event of this sap.ca.ui.charts.ChartToolBar.

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.ca.ui.charts.ChartToolBar}this to allow method chaining
detachSecondDimensionKeySelected(fnFunction, oListener): sap.ca.ui.charts.ChartToolBar
Detach event handler fnFunction from the 'secondDimensionKeySelected' event of this sap.ca.ui.charts.ChartToolBar.

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.ca.ui.charts.ChartToolBar}this to allow method chaining
fireFirstDimensionKeySelected(mArguments?): sap.ca.ui.charts.ChartToolBar
Fire event firstDimensionKeySelected to attached listeners.
Parameters:
{Map}mArguments? the arguments to pass along with the event.
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
firePersonalizationPressed(mArguments?): sap.ca.ui.charts.ChartToolBar
Fire event personalizationPressed to attached listeners.
Parameters:
{Map}mArguments? the arguments to pass along with the event.
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
fireSecondDimensionKeySelected(mArguments?): sap.ca.ui.charts.ChartToolBar
Fire event secondDimensionKeySelected to attached listeners.
Parameters:
{Map}mArguments? the arguments to pass along with the event.
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
getCharts(): sap.ui.core.Control[]
Getter for aggregation charts.
The charts to display. Theses charts are sap.ui.core/Control that implements the following properties: - showLegend: boolean - icon: string (expected a string such as "sap-icon://line-chart")

If the inserted control is an sap.m.Table, the icon is automatically set to "sap-icon://table-chart"

Returns:
{sap.ui.core.Control[]}
getChartTitle(): string
Getter for property chartTitle. The string to display instead of the select boxes if there are no dimensions to display

Default value is empty/undefined

Returns:
{string} the value of property chartTitle
getFirstDimensionKeyPath(): string
Getter for property firstDimensionKeyPath. Model path to the first select box items key

Default value is empty/undefined

Returns:
{string} the value of property firstDimensionKeyPath
getFirstDimensionPath(): string
Getter for property firstDimensionPath. Model path to the dimensions to display into the first select box

Default value is empty/undefined

Returns:
{string} the value of property firstDimensionPath
getFirstDimensionSelect(): string
The sap.m.Select inserted into the toolBar for handling the firstDimension selection
Returns:
{string} Id of the element which is the current target of the firstDimensionSelect association, or null
getFirstDimensionTextPath(): string
Getter for property firstDimensionTextPath. Model path to the first select box items displayed text

Default value is empty/undefined

Returns:
{string} the value of property firstDimensionTextPath
getFullScreen(): boolean
Getter for property fullScreen. Display the chart and the toolbar in full screen or normal mode

Default value is false

Returns:
{boolean} the value of property fullScreen
getSecondDimensionKeyPath(): string
Getter for property secondDimensionKeyPath. Model path to the second select box items key

Default value is empty/undefined

Returns:
{string} the value of property secondDimensionKeyPath
getSecondDimensionPath(): string
Getter for property secondDimensionPath. Model path to the dimensions to display into the second select box

Default value is empty/undefined

Returns:
{string} the value of property secondDimensionPath
getSecondDimensionSelect(): string
The sap.m.Select inserted into the toolBar for handling the secondDimension selection
Returns:
{string} Id of the element which is the current target of the secondDimensionSelect association, or null
getSecondDimensionTextPath(): string
Getter for property secondDimensionTextPath. Model path to the displayed select box items displayed text

Default value is empty/undefined

Returns:
{string} the value of property secondDimensionTextPath
getSelectedChart(): string
The ui5 control displayed
Returns:
{string} Id of the element which is the current target of the selectedChart association, or null
getShowFullScreen(): boolean
Getter for property showFullScreen. Display or not the full screen icon into the ChartToolBar

Default value is false

Returns:
{boolean} the value of property showFullScreen
getShowLegend(): boolean
Getter for property showLegend. Display or not the legend on the contained charts.

Default value is true

Returns:
{boolean} the value of property showLegend
getShowPersonalization(): boolean
Getter for property showPersonalization. Display or not the personalization icon into the ChartToolBar

Default value is false

Returns:
{boolean} the value of property showPersonalization
getToolBar(): sap.m.Bar
Getter for aggregation toolBar.
The composite sap.m.Bar used for rendering select boxes and icons.
Returns:
{sap.m.Bar}
indexOfChart(oChart): int
Checks for the provided sap.ui.core.Control in the aggregation named charts and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.core.Control}oChart the chart whose index is looked for.
Returns:
{int} the index of the provided control in the aggregation if found, or -1 otherwise
insertChart(oChart, iIndex): sap.ca.ui.charts.ChartToolBar
Inserts a chart into the aggregation named charts.
Parameters:
{sap.ui.core.Control}oChart the chart to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the chart should be inserted at; for a negative value of iIndex, the chart is inserted at position 0; for a value greater than the current size of the aggregation, the chart is inserted at the last position
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
removeAllCharts(): sap.ui.core.Control[]
Removes all the controls in the aggregation named charts.
Additionally unregisters them from the hosting UIArea.
Returns:
{sap.ui.core.Control[]} an array of the removed elements (might be empty)
removeChart(vChart): sap.ui.core.Control
Removes an chart from the aggregation named charts.
Parameters:
{int|string|sap.ui.core.Control}vChart the chart to remove or its index or id
Returns:
{sap.ui.core.Control} the removed chart or null
setChartTitle(sChartTitle): sap.ca.ui.charts.ChartToolBar
Setter for property chartTitle.

Default value is empty/undefined

Parameters:
{string}sChartTitle new value for property chartTitle
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
setFirstDimensionKeyPath(sFirstDimensionKeyPath): sap.ca.ui.charts.ChartToolBar
Setter for property firstDimensionKeyPath.

Default value is empty/undefined

Parameters:
{string}sFirstDimensionKeyPath new value for property firstDimensionKeyPath
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
setFirstDimensionPath(sFirstDimensionPath): sap.ca.ui.charts.ChartToolBar
Setter for property firstDimensionPath.

Default value is empty/undefined

Parameters:
{string}sFirstDimensionPath new value for property firstDimensionPath
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
setFirstDimensionSelect(vFirstDimensionSelect): sap.ca.ui.charts.ChartToolBar
The sap.m.Select inserted into the toolBar for handling the firstDimension selection
Parameters:
{string|sap.m.Select}vFirstDimensionSelect Id of an element which becomes the new target of this firstDimensionSelect association. Alternatively, an element instance may be given.
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
setFirstDimensionTextPath(sFirstDimensionTextPath): sap.ca.ui.charts.ChartToolBar
Setter for property firstDimensionTextPath.

Default value is empty/undefined

Parameters:
{string}sFirstDimensionTextPath new value for property firstDimensionTextPath
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
setFullScreen(bFullScreen): sap.ca.ui.charts.ChartToolBar
Setter for property fullScreen.

Default value is false

Parameters:
{boolean}bFullScreen new value for property fullScreen
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
setSecondDimensionKeyPath(sSecondDimensionKeyPath): sap.ca.ui.charts.ChartToolBar
Setter for property secondDimensionKeyPath.

Default value is empty/undefined

Parameters:
{string}sSecondDimensionKeyPath new value for property secondDimensionKeyPath
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
setSecondDimensionPath(sSecondDimensionPath): sap.ca.ui.charts.ChartToolBar
Setter for property secondDimensionPath.

Default value is empty/undefined

Parameters:
{string}sSecondDimensionPath new value for property secondDimensionPath
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
setSecondDimensionSelect(vSecondDimensionSelect): sap.ca.ui.charts.ChartToolBar
The sap.m.Select inserted into the toolBar for handling the secondDimension selection
Parameters:
{string|sap.m.Select}vSecondDimensionSelect Id of an element which becomes the new target of this secondDimensionSelect association. Alternatively, an element instance may be given.
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
setSecondDimensionTextPath(sSecondDimensionTextPath): sap.ca.ui.charts.ChartToolBar
Setter for property secondDimensionTextPath.

Default value is empty/undefined

Parameters:
{string}sSecondDimensionTextPath new value for property secondDimensionTextPath
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
setSelectedChart(vSelectedChart): sap.ca.ui.charts.ChartToolBar
The ui5 control displayed
Parameters:
{string|sap.ui.core.Control}vSelectedChart Id of an element which becomes the new target of this selectedChart association. Alternatively, an element instance may be given.
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
setShowFullScreen(bShowFullScreen): sap.ca.ui.charts.ChartToolBar
Setter for property showFullScreen.

Default value is false

Parameters:
{boolean}bShowFullScreen new value for property showFullScreen
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
setShowLegend(bShowLegend): sap.ca.ui.charts.ChartToolBar
Setter for property showLegend.

Default value is true

Parameters:
{boolean}bShowLegend new value for property showLegend
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
setShowPersonalization(bShowPersonalization): sap.ca.ui.charts.ChartToolBar
Setter for property showPersonalization.

Default value is false

Parameters:
{boolean}bShowPersonalization new value for property showPersonalization
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining
setToolBar(oToolBar): sap.ca.ui.charts.ChartToolBar
Setter for the aggregated toolBar.
Parameters:
{sap.m.Bar}oToolBar
Returns:
{sap.ca.ui.charts.ChartToolBar}this to allow method chaining