Class sap.viz.ui5.core.BaseChartModule: sap/viz/ui5/core/BaseChart

extends Control

An abstract base class for all VIZ charts

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.core.BaseChart(sId?, mSettings?)Constructor for a new ui5/core/BaseChart.
Event Summary
beforeCreateViz(oControlEvent)Fired before a new VIZ instance is created.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.viz.ui5.core.BaseChart.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.viz.ui5.core.BaseChart with name sClassName and enriches it with the information contained in oClassInfo.
sap.viz.ui5.core.BaseChart.getMetadata()Returns a metadata object for class sap.viz.ui5.core.BaseChart.
attachBeforeCreateViz(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the beforeCreateViz event of this sap.viz.ui5.core.BaseChart.
destroyDataset()Destroys the dataset in the aggregation dataset.
destroyNoData()Destroys the noData in the aggregation noData.
detachBeforeCreateViz(fnFunction, oListener)Detaches event handler fnFunction from the beforeCreateViz event of this sap.viz.ui5.core.BaseChart.
fireBeforeCreateViz(mArguments?)Fires event beforeCreateViz to attached listeners.
getCss()Gets current value of property css.
getDataset()Gets content of aggregation dataset.
getHeight()Gets current value of property height.
getNoData()Gets content of aggregation noData.
getWidth()Gets current value of property width.
setCss(sCss)Sets a new value for property css.
setDataset(oDataset)Sets the aggregated dataset.
setHeight(sHeight)Sets a new value for property height.
setNoData(oNoData)Sets the aggregated noData.
setWidth(sWidth)Sets a new value for property width.
Constructor Detail
new sap.viz.ui5.core.BaseChart(sId?, mSettings?)
Constructor for a new ui5/core/BaseChart.

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
    • width : sap.ui.core.CSSSize (default: 640px)
    • height : sap.ui.core.CSSSize (default: 480px)
    • css : string
  • Aggregations
  • Events
    • beforeCreateViz : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

In addition, all settings applicable to the base type sap.ui.core.Control 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.

Event Detail
beforeCreateViz(oControlEvent)
Fired before a new VIZ instance is created. Event parameter "usrOptions" contains the intended value for the parameter with the same name of the createViz call.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{object}oControlEvent.getParameters.usrOptions Value for the parameter with the same name of the createViz call.
Method Detail
sap.viz.ui5.core.BaseChart.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.viz.ui5.core.BaseChart with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.core.Control.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.core.BaseChart.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.viz.ui5.core.BaseChart.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
attachBeforeCreateViz(oData?, fnFunction, oListener?): sap.viz.ui5.core.BaseChart
Attaches event handler fnFunction to the beforeCreateViz event of this sap.viz.ui5.core.BaseChart.

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.core.BaseChart itself.

Fired before a new VIZ instance is created. Event parameter "usrOptions" contains the intended value for the parameter with the same name of the createViz call.

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 be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.viz.ui5.core.BaseChart itself
Returns:
{sap.viz.ui5.core.BaseChart} Reference to this in order to allow method chaining
destroyDataset(): sap.viz.ui5.core.BaseChart
Destroys the dataset in the aggregation dataset.
Returns:
{sap.viz.ui5.core.BaseChart} Reference to this in order to allow method chaining
destroyNoData(): sap.viz.ui5.core.BaseChart
Destroys the noData in the aggregation noData.
Returns:
{sap.viz.ui5.core.BaseChart} Reference to this in order to allow method chaining
detachBeforeCreateViz(fnFunction, oListener): sap.viz.ui5.core.BaseChart
Detaches event handler fnFunction from the beforeCreateViz event of this sap.viz.ui5.core.BaseChart.

The passed function and listener object must match the ones used for event registration.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.viz.ui5.core.BaseChart} Reference to this in order to allow method chaining
fireBeforeCreateViz(mArguments?): sap.viz.ui5.core.BaseChart
Fires event beforeCreateViz to attached listeners.

Expects the following event parameters:

  • usrOptions of type objectValue for the parameter with the same name of the createViz call.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.viz.ui5.core.BaseChart} Reference to this in order to allow method chaining
getCss(): string
Gets current value of property css.

CSS style of Chart.

Returns:
{string} Value of property css
Gets content of aggregation dataset.

Dataset for this chart

Returns:
{sap.viz.ui5.data.Dataset}
getHeight(): sap.ui.core.CSSSize
Gets current value of property height.

Height of the Chart as a CSS size.

Default value is 480px.

Returns:
{sap.ui.core.CSSSize} Value of property height
getNoData(): sap.ui.core.Control
Gets content of aggregation noData.

Control tree to display when there is no data available

Returns:
{sap.ui.core.Control}
getWidth(): sap.ui.core.CSSSize
Gets current value of property width.

Width of the Chart as a CSS size.

Default value is 640px.

Returns:
{sap.ui.core.CSSSize} Value of property width
Sets a new value for property css.

CSS style of Chart.

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

Parameters:
{string}sCss New value for property css
Returns:
{sap.viz.ui5.core.BaseChart} Reference to this in order to allow method chaining
setDataset(oDataset): sap.viz.ui5.core.BaseChart
Sets the aggregated dataset.
Parameters:
{sap.viz.ui5.data.Dataset}oDataset The dataset to set
Returns:
{sap.viz.ui5.core.BaseChart} Reference to this in order to allow method chaining
setHeight(sHeight): sap.viz.ui5.core.BaseChart
Sets a new value for property height.

Height of the Chart as a CSS size.

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

Default value is 480px.

Parameters:
{sap.ui.core.CSSSize}sHeight New value for property height
Returns:
{sap.viz.ui5.core.BaseChart} Reference to this in order to allow method chaining
setNoData(oNoData): sap.viz.ui5.core.BaseChart
Sets the aggregated noData.
Parameters:
{sap.ui.core.Control}oNoData The noData to set
Returns:
{sap.viz.ui5.core.BaseChart} Reference to this in order to allow method chaining
setWidth(sWidth): sap.viz.ui5.core.BaseChart
Sets a new value for property width.

Width of the Chart as a CSS size.

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

Default value is 640px.

Parameters:
{sap.ui.core.CSSSize}sWidth New value for property width
Returns:
{sap.viz.ui5.core.BaseChart} Reference to this in order to allow method chaining