Class sap.viz.ui5.controls.VizFrameModule: sap/viz/ui5/controls/VizFrame
VizFrame is a viz control that manages a visualization’s initialization, layout, feeding, customization and interactions.
For more information on the available info chart types, see the following documentation.
Since: 1.22.0.
sClassName
and enriches it with the information contained in oClassInfo
.fnFunction
to the deselectData
event of this sap.viz.ui5.controls.VizFrame
.fnFunction
to the renderComplete
event of this sap.viz.ui5.controls.VizFrame
.fnFunction
to the selectData
event of this sap.viz.ui5.controls.VizFrame
.fnFunction
from the deselectData
event of this sap.viz.ui5.controls.VizFrame
.fnFunction
from the renderComplete
event of this sap.viz.ui5.controls.VizFrame
.fnFunction
from the selectData
event of this sap.viz.ui5.controls.VizFrame
.sap.viz.ui5.controls.common.feeds.FeedItem
in the aggregation feeds
. 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
- vizType : string (default: column)
- vizProperties : object
- vizScales : object
- vizCustomizations : object
- legendVisible : boolean (default: true)
- Aggregations
- Events
- renderComplete : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- selectData : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- deselectData : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
In addition, all settings applicable to the base type sap.viz.ui5.controls.common.BaseControl can be used as well.
{string} | sId? | id for the new control, generated automatically if no id is given |
{object} | mSettings? | initial settings for the new control |
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters |
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters |
{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 information as described in sap.viz.ui5.controls.common.BaseControl.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 |
feeds
. {sap.viz.ui5.controls.common.feeds.FeedItem} | oFeed | the feed to add; if empty, nothing is inserted |
{sap.viz.ui5.controls.VizFrame} | Reference to this in order to allow method chaining |
fnFunction
to the deselectData
event of this sap.viz.ui5.controls.VizFrame
. When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.viz.ui5.controls.VizFrame
itself.
Event fires when certain data point(s) is(are) deselected, data context of deselected item(s) would be passed in
{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 be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.viz.ui5.controls.VizFrame itself |
{sap.viz.ui5.controls.VizFrame} | Reference to this in order to allow method chaining |
fnFunction
to the renderComplete
event of this sap.viz.ui5.controls.VizFrame
. When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.viz.ui5.controls.VizFrame
itself.
Event fires when the rendering ends.
{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 be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.viz.ui5.controls.VizFrame itself |
{sap.viz.ui5.controls.VizFrame} | Reference to this in order to allow method chaining |
fnFunction
to the selectData
event of this sap.viz.ui5.controls.VizFrame
. When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.viz.ui5.controls.VizFrame
itself.
Event fires when certain data point(s) is(are) selected, data context of selected item(s) would be passed in.
{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 be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.viz.ui5.controls.VizFrame itself |
{sap.viz.ui5.controls.VizFrame} | Reference to this in order to allow method chaining |
dataset
. {sap.viz.ui5.controls.VizFrame} | Reference to this in order to allow method chaining |
feeds
. {sap.viz.ui5.controls.VizFrame} | Reference to this in order to allow method chaining |
fnFunction
from the deselectData
event of this sap.viz.ui5.controls.VizFrame
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.viz.ui5.controls.VizFrame} | Reference to this in order to allow method chaining |
fnFunction
from the renderComplete
event of this sap.viz.ui5.controls.VizFrame
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.viz.ui5.controls.VizFrame} | Reference to this in order to allow method chaining |
fnFunction
from the selectData
event of this sap.viz.ui5.controls.VizFrame
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.viz.ui5.controls.VizFrame} | Reference to this in order to allow method chaining |
{Object} | option? | { width: Number - the exported svg will be scaled to the specific width. height: Number - the exported svg will be scaled to the specific height. hideTitleLegend: Boolean - flag to indicate if the exported svg includes the original title and legend. hideAxis: Boolean - flag to indicate if the exported svg includes the original axis. } |
{string} | the SVG string of the current viz or empty svg if error occurs. |
deselectData
to attached listeners. {Map} | mArguments? | The arguments to pass along with the event |
{sap.viz.ui5.controls.VizFrame} | Reference to this in order to allow method chaining |
renderComplete
to attached listeners. {Map} | mArguments? | The arguments to pass along with the event |
{sap.viz.ui5.controls.VizFrame} | Reference to this in order to allow method chaining |
selectData
to attached listeners. {Map} | mArguments? | The arguments to pass along with the event |
{sap.viz.ui5.controls.VizFrame} | Reference to this in order to allow method chaining |
dataset
. Dataset for chart.
{sap.viz.ui5.data.Dataset} |
feeds
. All feeds for chart.
{sap.viz.ui5.controls.common.feeds.FeedItem[]} |
vizCustomizations
. Chart customizations property, aim to customize existing (build-in) charts to meet specific LoB requirements. Currently, supported chart type : column, dual_column, bar, dual_bar, stacked_column, stacked_bar, 100_stacked_bar, 100_stacked_column, 100_dual_stacked_bar, 100_dual_stacked_column, dual_stacked_bar, dual_stacked_column, line, horizontal_line, dual_line, dual_horizontal_line, combination, horizontal_combination, stacked_combination, horizontal_stacked_combination, dual_stacked_combination, dual_horizontal_stacked_combination, scatter, bubble.
{object} | Value of property vizCustomizations |
vizProperties
. Chart properties, refer to chart property doc for more details.
{object} | Value of property vizProperties |
vizScales
. Chart scales, refer to chart property doc for more details.
- Since:
- 1.25
{object} | Value of property vizScales |
vizType
. Type for viz frame. User can pass 'chartType' or 'info/chartType'. For example both 'bar' and 'info/bar' will create a info bar chart. Supported chart type: column, dual_column, bar, dual_bar, stacked_bar, stacked_column, line, dual_line, combination, bullet, bubble, time_bubble, pie, donut, timeseries_column, timeseries_line, timeseries_scatter, timeseries_bubble, scatter, vertical_bullet, dual_stacked_bar, 100_stacked_bar, 100_dual_stacked_bar, dual_stacked_column, 100_stacked_column, 100_dual_stacked_column, stacked_combination, horizontal_stacked_combination, dual_stacked_combination, dual_horizontal_stacked_combination, heatmap, waterfall, horizontal_waterfall
Default value is column
.
{string} | Value of property vizType |
{string} |
sap.viz.ui5.controls.common.feeds.FeedItem
in the aggregation feeds
. and returns its index if found or -1 otherwise. {sap.viz.ui5.controls.common.feeds.FeedItem} | oFeed | The feed whose index is looked for |
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
feeds
. {sap.viz.ui5.controls.common.feeds.FeedItem} | oFeed | the feed to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the feed should be inserted at; for a negative value of iIndex , the feed is inserted at position 0; for a value greater than the current size of the aggregation, the feed is inserted at the last position |
{sap.viz.ui5.controls.VizFrame} | Reference to this in order to allow method chaining |
feeds
. Additionally, it unregisters them from the hosting UIArea.
{sap.viz.ui5.controls.common.feeds.FeedItem[]} | An array of the removed elements (might be empty) |
feeds
. {int|string|sap.viz.ui5.controls.common.feeds.FeedItem} | vFeed | The feedto remove or its index or id |
{sap.viz.ui5.controls.common.feeds.FeedItem} | The removed feed or null |
dataset
. {sap.viz.ui5.data.Dataset} | oDataset | The dataset to set |
{sap.viz.ui5.controls.VizFrame} | Reference to this in order to allow method chaining |
{boolean} | bLegendVisible | Set legend visibility. |
- Since:
- 1.28
{object} |
uiConfig from base type could config the instance. Supported uiConfig keyword: applicationSet, showErrorMessage
Example:
var vizFrame = new sap.viz.ui5.controls.VizFrame({ 'vizType' : 'bar', 'uiConfig' : { 'applicationSet' : 'fiori', 'showErrorMessage' : true } });
{object} | oUiConfig |
{sap.viz.ui5.controls.VizFrame} |
vizCustomizations
. Chart customizations property, aim to customize existing (build-in) charts to meet specific LoB requirements. Currently, supported chart type : column, dual_column, bar, dual_bar, stacked_column, stacked_bar, 100_stacked_bar, 100_stacked_column, 100_dual_stacked_bar, 100_dual_stacked_column, dual_stacked_bar, dual_stacked_column, line, horizontal_line, dual_line, dual_horizontal_line, combination, horizontal_combination, stacked_combination, horizontal_stacked_combination, dual_stacked_combination, dual_horizontal_stacked_combination, scatter, bubble.
When called with a value of null
or undefined
, the default value of the property will be restored.
{object} | oVizCustomizations | New value for property vizCustomizations |
{sap.viz.ui5.controls.VizFrame} | Reference to this in order to allow method chaining |
Example:
var vizFrame = new sap.viz.ui5.controls.VizFrame(...); var properties = { 'legend' : { 'visible'; : true } }; vizFrame.setVizProperties(properties);
{object} | oVizProperties |
{sap.viz.ui5.controls.VizFrame} |
Example:
var vizFrame = new sap.viz.ui5.controls.VizFrame(...); var scales = [{ 'feed': 'color', 'palette': ['#ff0000'] }]; vizFrame.setVizScales(scales);
{object} | oVizScales |
{sap.viz.ui5.controls.VizFrame} |
vizType is a string of supported chart type or extension chart type.
Supported chart types: bubble, combination, column, bar, line, stacked_bar, stacked_column, bullet, vertical_bullet, timebubble. User can pass 'chartType' or 'info/chartType' for these supported chart types.
Example:
var vizFrame = new sap.viz.ui5.controls.VizFrame({ 'vizType' : 'bar' });
For extension chart type, user should load extension js file manually at first.
Example:
var vizFrame = new sap.viz.ui5.controls.VizFrame({ 'vizType' : 'myextension' });
{string} | sVizType |
{sap.viz.ui5.controls.VizFrame} |
var vizFrame = new sap.viz.ui5.controls.VizFrame(...); var points = [{ data : { "Country" : "China", "Year" : "2001", "Product" : "Car", "Profit" : 25 }}, { data : { "Country" : "China", "Year" : "2001", "Product" : "Trunk", "Profit" : 34 }}]; var action = { clearSelection : true }; vizFrame.vizSelection(points, action);
{object[]} | aPoints | some data points of the chart |
{object} | oAction | whether to clear previous selection, by default the selection will be incremental selection |
{sap.viz.ui5.controls.VizFrame} |
var vizFrame = new sap.viz.ui5.controls.VizFrame(...); var data = new sap.viz.ui5.data.FlattenedDataset(...); var properties = { 'legend' : {'visible' : true}, }; var scales = [{ 'feed': 'color', 'palette': ['#ff0000'] }]; var customizations = {id:"sap.viz.custom",customOverlayProperties: {}}; var FeedItem = sap.viz.ui5.controls.common.feeds.FeedItem; var feeds = [ new FeedItem({'uid' : 'primaryValues', 'type' : 'Measure', 'values' []}), new FeedItem({'uid' : 'regionColor', 'type' : 'Dimension', 'values' []})]; vizFrame.vizUpdate({ 'data' : data, 'properties' : properties, 'scales' : scales, 'customizations' : customizations, 'feeds' : feeds });
{object} | oOptions | a JSON object contains combination of properties, feeds and data model. |
{sap.viz.ui5.controls.VizFrame} |