Class sap.chart.ChartModule: sap/chart/Chart

extends BaseControl

UI5 Chart control


Since: 1.32.0.
Constructor Summary
new sap.chart.Chart(sId?, mSettings?)Constructor for a new Chart.
Event Summary
deselectData(oControlEvent)Event fires when certain data point(s) is(are) deselected, data context of deselected item(s) would be passed in
drilledDown(oControlEvent)fired after a drill-down operation
drilledUp(oControlEvent)fired after a drill-up operation
renderComplete(oControlEvent)Event fires when the rendering ends.
selectData(oControlEvent)Event fires when certain data point(s) is(are) selected, data context of selected item(s) would be passed in.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.chart.Chart.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.chart.Chart with name sClassName and enriches it with the information contained in oClassInfo.
sap.chart.Chart.getMetadata()Returns a metadata object for class sap.chart.Chart.
addData()Unsupported.
addDimension(oDimension)Adds some dimension to the aggregation dimensions.
addMeasure(oMeasure)Adds some measure to the aggregation measures.
addSelectedCategories(aCategories)Add one or more categories to current category selections, specified by category objects.
addSelectedDataPoints(aDataPoints)Add one or more data points to current data point selection, specified by datapoint objects.
addSelectedSeries(aSeries)Add one or more series to current series selections, specified by series objects.
attachDeselectData(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the deselectData event of this sap.chart.Chart.
attachDrilledDown(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the drilledDown event of this sap.chart.Chart.
attachDrilledUp(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the drilledUp event of this sap.chart.Chart.
attachRenderComplete(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the renderComplete event of this sap.chart.Chart.
attachSelectData(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the selectData event of this sap.chart.Chart.
bindData(oBindingInfo)Binds aggregation data to model data.
destroyData()Unsupported.
destroyDimensions()Destroys all the dimensions in the aggregation dimensions.
destroyMeasures()Destroys all the measures in the aggregation measures.
detachDeselectData(fnFunction, oListener)Detaches event handler fnFunction from the deselectData event of this sap.chart.Chart.
detachDrilledDown(fnFunction, oListener)Detaches event handler fnFunction from the drilledDown event of this sap.chart.Chart.
detachDrilledUp(fnFunction, oListener)Detaches event handler fnFunction from the drilledUp event of this sap.chart.Chart.
detachRenderComplete(fnFunction, oListener)Detaches event handler fnFunction from the renderComplete event of this sap.chart.Chart.
detachSelectData(fnFunction, oListener)Detaches event handler fnFunction from the selectData event of this sap.chart.Chart.
drillDown(vDimensions)Drill down on specific Dimension(s).
drillUp()Drill up to previous drill down state, or remove the last visible Dimension
fireDeselectData(mArguments?)Fires event deselectData to attached listeners.
fireDrilledDown(mArguments?)Fires event drilledDown to attached listeners.
fireDrilledUp(mArguments?)Fires event drilledUp to attached listeners.
fireRenderComplete(mArguments?)Fires event renderComplete to attached listeners.
fireSelectData(mArguments?)Fires event selectData to attached listeners.
getAvailableChartTypes()Returns available and unavailable chart types with current Dimensions and Measures.
getChartType()Gets current value of property chartType.
getData()Unsupported.
getDimensionByName(sName)Return Dimension with the given name.
getDimensions()Gets content of aggregation dimensions.
getEnablePagination()Gets current value of property enablePagination.
getInResultDimensions()Gets current value of property inResultDimensions.
getIsAnalytical()Gets current value of property isAnalytical.
getMeasureByName(sName)Return Measure with the given name.
getMeasures()Gets content of aggregation measures.
getSelectedCategories()Return category objects of currently selected categories and a total number of selected data points.
getSelectedDataPoints()Return a total number and an array of datapoint objects (including a Context object) of currently selected data points.
getSelectedSeries()Return series objects of currently selected series and a total number of selected data points.
getSelectionBehavior()Gets current value of property selectionBehavior.
getSelectionMode()Gets current value of property selectionMode.
getTimeDimensions()Return all TimeDimensions from current Dimensions.
getUiConfig()Gets current value of property uiConfig.
getVisibleDimensions()Gets current value of property visibleDimensions.
getVisibleMeasures()Gets current value of property visibleMeasures.
getVizProperties()Return Chart's properties.
getVizScales()Return Chart's scales.
getVizUid()Get the UID for Chart.
indexOfData()Unsupported.
indexOfDimension(oDimension)Checks for the provided sap.chart.data.Dimension in the aggregation dimensions.
indexOfMeasure(oMeasure)Checks for the provided sap.chart.data.Measure in the aggregation measures.
insertData()Unsupported.
insertDimension(oDimension, iIndex)Inserts a dimension into the aggregation dimensions.
insertMeasure(oMeasure, iIndex)Inserts a measure into the aggregation measures.
removeAllData()Unsupported.
removeAllDimensions()Removes all the controls from the aggregation dimensions.
removeAllMeasures()Removes all the controls from the aggregation measures.
removeData()Unsupported.
removeDimension(vDimension)Removes a dimension from the aggregation dimensions.
removeMeasure(vMeasure)Removes a measure from the aggregation measures.
removeSelectedCategories(aCategories)Deselect one or more categories from current category selections, specified by category objects.
removeSelectedDataPoints(aDataPoints)Deselect one or more data points from current data point selections, specified by datapoint objects.
removeSelectedSeries(aSeries)Deselect one or more series from current series selections, specified by series objects.
resetLayout()Reset to visible layout.
setChartType(sChartType)Sets a new value for property chartType.
setEnablePagination(bEnablePagination)Sets a new value for property enablePagination.
setInResultDimensions(sInResultDimensions)Sets a new value for property inResultDimensions.
setIsAnalytical(bIsAnalytical)Sets a new value for property isAnalytical.
setSelectedCategories(aCategories)Select one or more categories, specified by category objects.
setSelectedDataPoints(aDataPoints)Select one or more data points, specified by datapoint objects.
setSelectedSeries(aSeries)Select one or more series, specified by series objects.
setSelectionBehavior(sSelectionBehavior)Sets a new value for property selectionBehavior.
setSelectionMode(sSelectionMode)Sets a new value for property selectionMode.
setUiConfig(oUiConfig)Setter for property uiConfig.
setVisibleDimensions(sVisibleDimensions)Sets a new value for property visibleDimensions.
setVisibleMeasures(sVisibleMeasures)Sets a new value for property visibleMeasures.
setVizProperties(oVizProperties)Change Chart's properties.
setVizScales(oVizScales)Change Chart's scales.
unbindData()Unbinds aggregation data from model data.
zoom(oConfig)Zoom the chart plot.
Constructor Detail
new sap.chart.Chart(sId?, mSettings?)
Constructor for a new Chart.

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
  • Aggregations
  • Events
    • drilledDown : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • drilledUp : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • 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.

Parameters:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Event Detail
deselectData(oControlEvent)
Event fires when certain data point(s) is(are) deselected, data context of deselected item(s) would be passed in
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
drilledDown(oControlEvent)
fired after a drill-down operation
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string[]}oControlEvent.getParameters.dimensions array of strings holding the names of the added dimensions
drilledUp(oControlEvent)
fired after a drill-up operation
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string[]}oControlEvent.getParameters.dimensions array of strings holding the names of the removed dimensions
renderComplete(oControlEvent)
Event fires when the rendering ends.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
selectData(oControlEvent)
Event fires when certain data point(s) is(are) selected, data context of selected item(s) would be passed in.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Method Detail
sap.chart.Chart.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.chart.Chart 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.controls.common.BaseControl.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.chart.Chart.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.chart.Chart.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addData()
Unsupported. Chart manages the "data" aggregation only via data binding. The method "addData" therefore cannot be used programmatically!
addDimension(oDimension): sap.chart.Chart
Adds some dimension to the aggregation dimensions.
Parameters:
{sap.chart.data.Dimension}oDimension the dimension to add; if empty, nothing is inserted
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
addMeasure(oMeasure): sap.chart.Chart
Adds some measure to the aggregation measures.
Parameters:
{sap.chart.data.Measure}oMeasure the measure to add; if empty, nothing is inserted
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
addSelectedCategories(aCategories): sap.chart.Chart
Add one or more categories to current category selections, specified by category objects.

Category object has the following structure:

{
	   measure: measureName,
	   dimensions: {
		   dimensionName1: dimensionValue1,
		   dimensionName2: dimensionValue2,
		   ...
	   }
}

Only works when selectionBehavior is "CATEGORY"

Parameters:
{array}aCategories an array of category objects
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
addSelectedDataPoints(aDataPoints): sap.chart.Chart
Add one or more data points to current data point selection, specified by datapoint objects.

Datapoint object has the following structure:

{
		groupId:  "groupId",		  // group ID (optional)
		index:		index,				  // index of the data in the group
		measures: ["measureId"]   // measure IDs
}

Only works when selectionBehavior is "DATAPOINT"

Parameters:
{array}aDataPoints an array of datapoint objects.
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
addSelectedSeries(aSeries): sap.chart.Chart
Add one or more series to current series selections, specified by series objects.

Series object has the following structure:

{
	   measure: measureName,
	   dimensions: {
		   dimensionName1: dimensionValue1,
		   dimensionName2: dimensionValue2,
		   ...
	   }
}

Only works when selectionBehavior is "SERIES"

Parameters:
{array}aSeries an array of series objects
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
attachDeselectData(oData?, fnFunction, oListener?): sap.chart.Chart
Attaches event handler fnFunction to the deselectData event of this sap.chart.Chart.

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.chart.Chart itself.

Event fires when certain data point(s) is(are) deselected, data context of deselected item(s) would be passed in

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.chart.Chart itself
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
attachDrilledDown(oData?, fnFunction, oListener?): sap.chart.Chart
Attaches event handler fnFunction to the drilledDown event of this sap.chart.Chart.

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.chart.Chart itself.

fired after a drill-down operation

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.chart.Chart itself
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
attachDrilledUp(oData?, fnFunction, oListener?): sap.chart.Chart
Attaches event handler fnFunction to the drilledUp event of this sap.chart.Chart.

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.chart.Chart itself.

fired after a drill-up operation

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.chart.Chart itself
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
attachRenderComplete(oData?, fnFunction, oListener?): sap.chart.Chart
Attaches event handler fnFunction to the renderComplete event of this sap.chart.Chart.

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.chart.Chart itself.

Event fires when the rendering ends.

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.chart.Chart itself
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
attachSelectData(oData?, fnFunction, oListener?): sap.chart.Chart
Attaches event handler fnFunction to the selectData event of this sap.chart.Chart.

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.chart.Chart itself.

Event fires when certain data point(s) is(are) selected, data context of selected item(s) would be passed in.

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.chart.Chart itself
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
bindData(oBindingInfo): sap.chart.Chart
Binds aggregation data to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Parameters:
{object}oBindingInfo The binding information
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
destroyData()
Unsupported. Chart manages the "data" aggregation only via data binding. The method "destroyData" therefore cannot be used programmatically!
destroyDimensions(): sap.chart.Chart
Destroys all the dimensions in the aggregation dimensions.
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
destroyMeasures(): sap.chart.Chart
Destroys all the measures in the aggregation measures.
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
detachDeselectData(fnFunction, oListener): sap.chart.Chart
Detaches event handler fnFunction from the deselectData event of this sap.chart.Chart.

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.chart.Chart} Reference to this in order to allow method chaining
detachDrilledDown(fnFunction, oListener): sap.chart.Chart
Detaches event handler fnFunction from the drilledDown event of this sap.chart.Chart.

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.chart.Chart} Reference to this in order to allow method chaining
detachDrilledUp(fnFunction, oListener): sap.chart.Chart
Detaches event handler fnFunction from the drilledUp event of this sap.chart.Chart.

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.chart.Chart} Reference to this in order to allow method chaining
detachRenderComplete(fnFunction, oListener): sap.chart.Chart
Detaches event handler fnFunction from the renderComplete event of this sap.chart.Chart.

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.chart.Chart} Reference to this in order to allow method chaining
detachSelectData(fnFunction, oListener): sap.chart.Chart
Detaches event handler fnFunction from the selectData event of this sap.chart.Chart.

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.chart.Chart} Reference to this in order to allow method chaining
drillDown(vDimensions)
Drill down on specific Dimension(s).

The drill down Dimension(s) must present in the Dimension aggregation and must NOT present in previous drill down or be visible already.

Parameters:
{array}vDimensions an array, or just a single instance, of either Dimension instance or Dimension name to drill down
drillUp()
Drill up to previous drill down state, or remove the last visible Dimension
fireDeselectData(mArguments?): sap.chart.Chart
Fires event deselectData to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
fireDrilledDown(mArguments?): sap.chart.Chart
Fires event drilledDown to attached listeners.

Expects the following event parameters:

  • dimensions of type string[]array of strings holding the names of the added dimensions
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
fireDrilledUp(mArguments?): sap.chart.Chart
Fires event drilledUp to attached listeners.

Expects the following event parameters:

  • dimensions of type string[]array of strings holding the names of the removed dimensions
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
fireRenderComplete(mArguments?): sap.chart.Chart
Fires event renderComplete to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
fireSelectData(mArguments?): sap.chart.Chart
Fires event selectData to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
getAvailableChartTypes(): object
Returns available and unavailable chart types with current Dimensions and Measures. An error info will be returned along with each unavailable chart types.

{
		 available: [{
				 chart: "chartType"
		 }, ...],
		 unavailable: [{
				 chart: "chartType"
				 error: {
						 missing: {
								 Dimension: n,
								 Measure: n,
								 DateTimeDimension: n
						 }
				 }
		 }, ...]
}
Returns:
{object} chart types and errors for unavailable chart types, grouped by availability
getChartType(): string
Gets current value of property chartType.

Type of the Chart.

Refer to supported chart enum sap.chart.ChartType

Default value is bar.

Returns:
{string} Value of property chartType
getData()
Unsupported. Chart manages the "data" aggregation only via data binding. The method "getData" therefore cannot be used programmatically!
getDimensionByName(sName): sap.chart.data.Dimension
Return Dimension with the given name.
Parameters:
{string}sName name of the Dimension to get
Returns:
{sap.chart.data.Dimension} Dimension of the specified name.
getDimensions(): sap.chart.data.Dimension[]
Gets content of aggregation dimensions.

Dimensions of the data.

Returns:
{sap.chart.data.Dimension[]}
getEnablePagination(): boolean
Gets current value of property enablePagination.

Enable pagination mode.

Pagination mode empowers users to visualize dataset page by page by scrolling back or forth. Currently there are some limitations of this mode in some chart transversal features. Please refer to release notes for details.

Default value is false.

Experimental API:This property is only for experimental usage!!! It only works with constructor and cannot be changed during runtime.

Experimental:
This property is only for experimental usage!!! It only works with constructor and cannot be changed during runtime.
Returns:
{boolean} Value of property enablePagination
getInResultDimensions(): string[]
Gets current value of property inResultDimensions.

Names of the inResult dimensions.

inResult dimension do not show up in chart layout, i.e. axis/legend. They do show in tooltip, popover, and in selection results.

Default value is [].

Returns:
{string[]} Value of property inResultDimensions
getIsAnalytical(): boolean
Gets current value of property isAnalytical.

Whether or not an aggregated entity set is bound to the chart.

Returns:
{boolean} Value of property isAnalytical
getMeasureByName(sName): sap.chart.data.Measure
Return Measure with the given name.
Parameters:
{string}sName name of the Measure to get
Returns:
{sap.chart.data.Measure} Measure of the specified name.
getMeasures(): sap.chart.data.Measure[]
Gets content of aggregation measures.

Measures of the data.

Returns:
{sap.chart.data.Measure[]}
getSelectedCategories(): object
Return category objects of currently selected categories and a total number of selected data points.

Category object has the following structure:

{
	   measure: measureName,
	   dimensions: {
		   dimensionName1: dimensionValue1,
		   dimensionName2: dimensionValue2,
		   ...
	   }
}

Return 0 and empty list if selectionBehavior is not "CATEGORY"

Returns:
{object} a total number of selected data points, and an array of category objects for selected categories.
getSelectedDataPoints(): object
Return a total number and an array of datapoint objects (including a Context object) of currently selected data points.

Datapoint object has the following structure:

{
		groupId:  "groupId",		  // group ID (optional)
		index:		index,				  // index of the data in the group
		measures: ["measureId"]   // measure IDs (data points created from the same Context object
														  // differing only in measure names are merged together)
		context:  [Context]		   // Context object
}

Only works when selectionBehavior is "DATAPOINT"

Returns:
{object} a total number of selected data points, and an array of datapoint objects.
getSelectedSeries(): object
Return series objects of currently selected series and a total number of selected data points.

Series object has the following structure:

{
	   measure: measureName,
	   dimensions: {
		   dimensionName1: dimensionValue1,
		   dimensionName2: dimensionValue2,
		   ...
	   }
}

Return 0 and empty list if selectionBehavior is not "SERIES"

Returns:
{object} object containing a total number of selected data points, and an array of series objects for selected series.
getSelectionBehavior(): string
Gets current value of property selectionBehavior.

Chart selection behavior.

Supported values are "DATAPOINT", "CATEGORY", or "SERIES", case insensitive, always return in upper case.

Unsupported values will be ignored.

Default value is DATAPOINT.

Returns:
{string} Value of property selectionBehavior
getSelectionMode(): string
Gets current value of property selectionMode.

Chart selection mode.

Supported values are sap.chart.SelectionMode.Single or sap.chart.SelectionMode.Multi, case insensitive, always return in upper case.

Unsupported values will be ignored.

Default value is sap.chart.SelectionMode.Multi.

Returns:
{string} Value of property selectionMode
getTimeDimensions(): array
Return all TimeDimensions from current Dimensions.
Returns:
{array} Dimensions which are instance of TimeDimension.
getUiConfig(): object
Gets current value of property uiConfig.

Configuration for initialization to VizControl. This property could only set via settings parameter in Constructor.

Returns:
{object} Value of property uiConfig
getVisibleDimensions(): string[]
Gets current value of property visibleDimensions.

Names of the Dimensions to be displayed in the Chart.

Depending on chart type, insufficient number of visible Dimensions will cause error.

Default value is [].

Returns:
{string[]} Value of property visibleDimensions
getVisibleMeasures(): string[]
Gets current value of property visibleMeasures.

Names of the Measures to be displayed in the Chart.

Depending on chart type, insufficient number of visible Measures will cause errors.

Default value is [].

Returns:
{string[]} Value of property visibleMeasures
getVizProperties(): object
Return Chart's properties.

Refer to chart property documentation for more details.

Returns:
{object} the Chart properties object
getVizScales(): object[]
Return Chart's scales.

Refer to chart property documentation for more details.

Returns:
{object[]} an array of scale objects
getVizUid(): string
Get the UID for Chart. It supports other controls to connect to a viz instance.
Returns:
{string} Chart UID
indexOfData()
Unsupported. Chart manages the "data" aggregation only via data binding. The method "indexOfData" therefore cannot be used programmatically!
indexOfDimension(oDimension): int
Checks for the provided sap.chart.data.Dimension in the aggregation dimensions. and returns its index if found or -1 otherwise.
Parameters:
{sap.chart.data.Dimension}oDimension The dimension whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
indexOfMeasure(oMeasure): int
Checks for the provided sap.chart.data.Measure in the aggregation measures. and returns its index if found or -1 otherwise.
Parameters:
{sap.chart.data.Measure}oMeasure The measure whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertData()
Unsupported. Chart manages the "data" aggregation only via data binding. The method "insertData" therefore cannot be used programmatically!
insertDimension(oDimension, iIndex): sap.chart.Chart
Inserts a dimension into the aggregation dimensions.
Parameters:
{sap.chart.data.Dimension}oDimension the dimension to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the dimension should be inserted at; for a negative value of iIndex, the dimension is inserted at position 0; for a value greater than the current size of the aggregation, the dimension is inserted at the last position
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
insertMeasure(oMeasure, iIndex): sap.chart.Chart
Inserts a measure into the aggregation measures.
Parameters:
{sap.chart.data.Measure}oMeasure the measure to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the measure should be inserted at; for a negative value of iIndex, the measure is inserted at position 0; for a value greater than the current size of the aggregation, the measure is inserted at the last position
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
removeAllData()
Unsupported. Chart manages the "data" aggregation only via data binding. The method "removeAllData" therefore cannot be used programmatically!
removeAllDimensions(): sap.chart.data.Dimension[]
Removes all the controls from the aggregation dimensions.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.chart.data.Dimension[]} An array of the removed elements (might be empty)
removeAllMeasures(): sap.chart.data.Measure[]
Removes all the controls from the aggregation measures.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.chart.data.Measure[]} An array of the removed elements (might be empty)
removeData()
Unsupported. Chart manages the "data" aggregation only via data binding. The method "removeData" therefore cannot be used programmatically!
removeDimension(vDimension): sap.chart.data.Dimension
Removes a dimension from the aggregation dimensions.
Parameters:
{int|string|sap.chart.data.Dimension}vDimension The dimensionto remove or its index or id
Returns:
{sap.chart.data.Dimension} The removed dimension or null
removeMeasure(vMeasure): sap.chart.data.Measure
Removes a measure from the aggregation measures.
Parameters:
{int|string|sap.chart.data.Measure}vMeasure The measureto remove or its index or id
Returns:
{sap.chart.data.Measure} The removed measure or null
removeSelectedCategories(aCategories): sap.chart.Chart
Deselect one or more categories from current category selections, specified by category objects.

Category object has the following structure:

{
	   measure: measureName,
	   dimensions: {
		   dimensionName1: dimensionValue1,
		   dimensionName2: dimensionValue2,
		   ...
	   }
}

Only works when selectionBehavior is "CATEGORY"

Parameters:
{array}aCategories an array of category objects
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
removeSelectedDataPoints(aDataPoints): sap.chart.Chart
Deselect one or more data points from current data point selections, specified by datapoint objects.

Datapoint object has the following structure:

{
		groupId:  "groupId",		  // group ID (optional)
		index:		index,				  // index of the data in the group
		measures: ["measureId"]   // measure IDs
}

Only works when selectionBehavior is "DATAPOINT"

Parameters:
{array}aDataPoints an array of datapoint objects.
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
removeSelectedSeries(aSeries): sap.chart.Chart
Deselect one or more series from current series selections, specified by series objects.

Series object has the following structure:

{
	   measure: measureName,
	   dimensions: {
		   dimensionName1: dimensionValue1,
		   dimensionName2: dimensionValue2,
		   ...
	   }
}

Only works when selectionBehavior is "SERIES"

Parameters:
{array}aSeries an array of series objects
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
resetLayout(): sap.chart.Chart
Reset to visible layout.
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
setChartType(sChartType): sap.chart.Chart
Sets a new value for property chartType.

Type of the Chart.

Refer to supported chart enum sap.chart.ChartType

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

Default value is bar.

Parameters:
{string}sChartType New value for property chartType
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
setEnablePagination(bEnablePagination): sap.chart.Chart
Sets a new value for property enablePagination.

Enable pagination mode.

Pagination mode empowers users to visualize dataset page by page by scrolling back or forth. Currently there are some limitations of this mode in some chart transversal features. Please refer to release notes for details.

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

Default value is false.

Experimental API:This property is only for experimental usage!!! It only works with constructor and cannot be changed during runtime.

Parameters:
{boolean}bEnablePagination New value for property enablePagination
Experimental:
This property is only for experimental usage!!! It only works with constructor and cannot be changed during runtime.
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
setInResultDimensions(sInResultDimensions): sap.chart.Chart
Sets a new value for property inResultDimensions.

Names of the inResult dimensions.

inResult dimension do not show up in chart layout, i.e. axis/legend. They do show in tooltip, popover, and in selection results.

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

Default value is [].

Parameters:
{string[]}sInResultDimensions New value for property inResultDimensions
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
setIsAnalytical(bIsAnalytical): sap.chart.Chart
Sets a new value for property isAnalytical.

Whether or not an aggregated entity set is bound to the chart.

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

Parameters:
{boolean}bIsAnalytical New value for property isAnalytical
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
setSelectedCategories(aCategories): sap.chart.Chart
Select one or more categories, specified by category objects.

Category object has the following structure:

{
	   measure: measureName,
	   dimensions: {
		   dimensionName1: dimensionValue1,
		   dimensionName2: dimensionValue2,
		   ...
	   }
}

Only works when selectionBehavior is "CATEGORY"

Parameters:
{array}aCategories an array of category objects
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
setSelectedDataPoints(aDataPoints): sap.chart.Chart
Select one or more data points, specified by datapoint objects.

Datapoint object has the following structure:

{
		groupId:  "groupId",		  // group ID (optional)
		index:		index,				  // index of the data in the group
		measures: ["measureId"]   // measure IDs
}

Only works when selectionBehavior is "DATAPOINT"

Parameters:
{array}aDataPoints an array of datapoint objects.
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
setSelectedSeries(aSeries): sap.chart.Chart
Select one or more series, specified by series objects.

Series object has the following structure:

{
	   measure: measureName,
	   dimensions: {
		   dimensionName1: dimensionValue1,
		   dimensionName2: dimensionValue2,
		   ...
	   }
}

Only works when selectionBehavior is "SERIES"

Parameters:
{array}aSeries an array of series objects
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
setSelectionBehavior(sSelectionBehavior): sap.chart.Chart
Sets a new value for property selectionBehavior.

Chart selection behavior.

Supported values are "DATAPOINT", "CATEGORY", or "SERIES", case insensitive, always return in upper case.

Unsupported values will be ignored.

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

Default value is DATAPOINT.

Parameters:
{string}sSelectionBehavior New value for property selectionBehavior
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
setSelectionMode(sSelectionMode): sap.chart.Chart
Sets a new value for property selectionMode.

Chart selection mode.

Supported values are sap.chart.SelectionMode.Single or sap.chart.SelectionMode.Multi, case insensitive, always return in upper case.

Unsupported values will be ignored.

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

Default value is sap.chart.SelectionMode.Multi.

Parameters:
{string}sSelectionMode New value for property selectionMode
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
setUiConfig(oUiConfig)
Setter for property uiConfig. uiConfig could only set via settings parameter of constructor.

uiConfig from base type could config the instance. Supported uiConfig keyword: applicationSet, showErrorMessage

Example:

var chart = new sap.chart.Chart({
 'chartType' : 'bar',
 'uiConfig' : {
		  'applicationSet' : 'fiori',
		  'showErrorMessage' : true
 }
});
Parameters:
{object}oUiConfig the UI configuration
setVisibleDimensions(sVisibleDimensions): sap.chart.Chart
Sets a new value for property visibleDimensions.

Names of the Dimensions to be displayed in the Chart.

Depending on chart type, insufficient number of visible Dimensions will cause error.

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

Default value is [].

Parameters:
{string[]}sVisibleDimensions New value for property visibleDimensions
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
setVisibleMeasures(sVisibleMeasures): sap.chart.Chart
Sets a new value for property visibleMeasures.

Names of the Measures to be displayed in the Chart.

Depending on chart type, insufficient number of visible Measures will cause errors.

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

Default value is [].

Parameters:
{string[]}sVisibleMeasures New value for property visibleMeasures
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
setVizProperties(oVizProperties)
Change Chart's properties.

Chart's properties will be updated with the parameter.

Refer to chart property documentation for more details.

Parameters:
{object}oVizProperties object containing vizProperty values to update
setVizScales(oVizScales)
Change Chart's scales.

Chart's scales will be updated with the parameters.

Refer to chart property documentation for more details.

Parameters:
{object[]}oVizScales array of vizScale objects
unbindData(): sap.chart.Chart
Unbinds aggregation data from model data.
Returns:
{sap.chart.Chart} Reference to this in order to allow method chaining
zoom(oConfig)
Zoom the chart plot.

Example:

	var oChart = new sap.chart.Chart(...);
	oChart.zoom({direction: "in"});
Parameters:
{object}oConfig contains a "direction" attribute with value "in" or "out" indicating zoom to enlarge or shrink respectively