Class sap.viz.ui5.data.FlattenedDatasetModule: sap/viz/ui5/data/FlattenedDataset

extends Dataset

A dataset for flattened (redundant) data using a tabular format.


Since: 1.7.2.
Constructor Summary
new sap.viz.ui5.data.FlattenedDataset(sId?, mSettings?)Constructor for a new ui5/data/FlattenedDataset.
Method Summary
sap.viz.ui5.data.FlattenedDataset.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.viz.ui5.data.FlattenedDataset with name sClassName and enriches it with the information contained in oClassInfo.
sap.viz.ui5.data.FlattenedDataset.getMetadata()Returns a metadata object for class sap.viz.ui5.data.FlattenedDataset.
addData(oData)Adds some data to the aggregation data.
addDimension(oDimension)Adds some dimension to the aggregation dimensions.
addMeasure(oMeasure)Adds some measure to the aggregation measures.
bindData(oBindingInfo)Binds aggregation data to model data.
destroyData()Destroys all the data in the aggregation data.
destroyDimensions()Destroys all the dimensions in the aggregation dimensions.
destroyMeasures()Destroys all the measures in the aggregation measures.
getContext()Gets current value of property context.
getData()Gets content of aggregation data.
getDimensions()Gets content of aggregation dimensions.
getMeasures()Gets content of aggregation measures.
indexOfData(oData)Checks for the provided sap.ui.core.Element in the aggregation data.
indexOfDimension(oDimension)Checks for the provided sap.viz.ui5.data.DimensionDefinition in the aggregation dimensions.
indexOfMeasure(oMeasure)Checks for the provided sap.viz.ui5.data.MeasureDefinition in the aggregation measures.
insertData(oData, iIndex)Inserts a data into the aggregation data.
insertDimension(oDimension, iIndex)Inserts a dimension into the aggregation dimensions.
insertMeasure(oMeasure, iIndex)Inserts a measure into the aggregation measures.
removeAllData()Removes all the controls from the aggregation data.
removeAllDimensions()Removes all the controls from the aggregation dimensions.
removeAllMeasures()Removes all the controls from the aggregation measures.
removeData(vData)Removes a data from the aggregation data.
removeDimension(vDimension)Removes a dimension from the aggregation dimensions.
removeMeasure(vMeasure)Removes a measure from the aggregation measures.
setContext(oContext)Sets a new value for property context.
unbindData()Unbinds aggregation data from model data.
Constructor Detail
new sap.viz.ui5.data.FlattenedDataset(sId?, mSettings?)
Constructor for a new ui5/data/FlattenedDataset.

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
    • dimensions : sap.viz.ui5.data.DimensionDefinition[]
    • measures : sap.viz.ui5.data.MeasureDefinition[]
    • data : sap.ui.core.Element[]

In addition, all settings applicable to the base type sap.viz.ui5.data.Dataset 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
Method Detail
sap.viz.ui5.data.FlattenedDataset.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.viz.ui5.data.FlattenedDataset 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.data.Dataset.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.data.FlattenedDataset.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.viz.ui5.data.FlattenedDataset.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
Adds some data to the aggregation data.
Parameters:
{sap.ui.core.Element}oData the data to add; if empty, nothing is inserted
Returns:
{sap.viz.ui5.data.FlattenedDataset} Reference to this in order to allow method chaining
addDimension(oDimension): sap.viz.ui5.data.FlattenedDataset
Adds some dimension to the aggregation dimensions.
Parameters:
{sap.viz.ui5.data.DimensionDefinition}oDimension the dimension to add; if empty, nothing is inserted
Returns:
{sap.viz.ui5.data.FlattenedDataset} Reference to this in order to allow method chaining
addMeasure(oMeasure): sap.viz.ui5.data.FlattenedDataset
Adds some measure to the aggregation measures.
Parameters:
{sap.viz.ui5.data.MeasureDefinition}oMeasure the measure to add; if empty, nothing is inserted
Returns:
{sap.viz.ui5.data.FlattenedDataset} Reference to this in order to allow method chaining
bindData(oBindingInfo): sap.viz.ui5.data.FlattenedDataset
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.viz.ui5.data.FlattenedDataset} Reference to this in order to allow method chaining
Destroys all the data in the aggregation data.
Returns:
{sap.viz.ui5.data.FlattenedDataset} Reference to this in order to allow method chaining
destroyDimensions(): sap.viz.ui5.data.FlattenedDataset
Destroys all the dimensions in the aggregation dimensions.
Returns:
{sap.viz.ui5.data.FlattenedDataset} Reference to this in order to allow method chaining
Destroys all the measures in the aggregation measures.
Returns:
{sap.viz.ui5.data.FlattenedDataset} Reference to this in order to allow method chaining
getContext(): any
Gets current value of property context.

Additional data which works with data context in this dataset. The input could be an array. Each item represents a dimension that is added as the additional information based on data context. The input could be a string of dimension id, or object like this {id: "name", showInTooltip: true}. If showInTooltip is false, the dimensions set in this API will not show in popover or tooltip. However other dimensions in data context will show. In selection event, all dimension information (including the dimension set in this API) will be included. Context will be shown by default in tooltip if only set context with string or string of array.

Returns:
{any} Value of property context
getData(): sap.ui.core.Element[]
Gets content of aggregation data.

Data containing dimensions and measures.

Note: This aggregation can only be bound against a model, it cannot be managed programmatically using the aggregation mutator methods like addData.

Returns:
{sap.ui.core.Element[]}
Gets content of aggregation dimensions.

List of definitions of all dimensions in this dataset

Returns:
{sap.viz.ui5.data.DimensionDefinition[]}
Gets content of aggregation measures.

list of definitions of all measures in this dataset

Returns:
{sap.viz.ui5.data.MeasureDefinition[]}
indexOfData(oData): int
Checks for the provided sap.ui.core.Element in the aggregation data. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.core.Element}oData The data whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
indexOfDimension(oDimension): int
Checks for the provided sap.viz.ui5.data.DimensionDefinition in the aggregation dimensions. and returns its index if found or -1 otherwise.
Parameters:
{sap.viz.ui5.data.DimensionDefinition}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.viz.ui5.data.MeasureDefinition in the aggregation measures. and returns its index if found or -1 otherwise.
Parameters:
{sap.viz.ui5.data.MeasureDefinition}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(oData, iIndex): sap.viz.ui5.data.FlattenedDataset
Inserts a data into the aggregation data.
Parameters:
{sap.ui.core.Element}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.viz.ui5.data.FlattenedDataset} Reference to this in order to allow method chaining
insertDimension(oDimension, iIndex): sap.viz.ui5.data.FlattenedDataset
Inserts a dimension into the aggregation dimensions.
Parameters:
{sap.viz.ui5.data.DimensionDefinition}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.viz.ui5.data.FlattenedDataset} Reference to this in order to allow method chaining
insertMeasure(oMeasure, iIndex): sap.viz.ui5.data.FlattenedDataset
Inserts a measure into the aggregation measures.
Parameters:
{sap.viz.ui5.data.MeasureDefinition}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.viz.ui5.data.FlattenedDataset} Reference to this in order to allow method chaining
removeAllData(): sap.ui.core.Element[]
Removes all the controls from the aggregation data.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.core.Element[]} An array of the removed elements (might be empty)
removeAllDimensions(): sap.viz.ui5.data.DimensionDefinition[]
Removes all the controls from the aggregation dimensions.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.viz.ui5.data.DimensionDefinition[]} An array of the removed elements (might be empty)
removeAllMeasures(): sap.viz.ui5.data.MeasureDefinition[]
Removes all the controls from the aggregation measures.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.viz.ui5.data.MeasureDefinition[]} An array of the removed elements (might be empty)
removeData(vData): sap.ui.core.Element
Removes a data from the aggregation data.
Parameters:
{int|string|sap.ui.core.Element}vData The datato remove or its index or id
Returns:
{sap.ui.core.Element} The removed data or null
removeDimension(vDimension): sap.viz.ui5.data.DimensionDefinition
Removes a dimension from the aggregation dimensions.
Parameters:
{int|string|sap.viz.ui5.data.DimensionDefinition}vDimension The dimensionto remove or its index or id
Returns:
{sap.viz.ui5.data.DimensionDefinition} The removed dimension or null
removeMeasure(vMeasure): sap.viz.ui5.data.MeasureDefinition
Removes a measure from the aggregation measures.
Parameters:
{int|string|sap.viz.ui5.data.MeasureDefinition}vMeasure The measureto remove or its index or id
Returns:
{sap.viz.ui5.data.MeasureDefinition} The removed measure or null
setContext(oContext): sap.viz.ui5.data.FlattenedDataset
Sets a new value for property context.

Additional data which works with data context in this dataset. The input could be an array. Each item represents a dimension that is added as the additional information based on data context. The input could be a string of dimension id, or object like this {id: "name", showInTooltip: true}. If showInTooltip is false, the dimensions set in this API will not show in popover or tooltip. However other dimensions in data context will show. In selection event, all dimension information (including the dimension set in this API) will be included. Context will be shown by default in tooltip if only set context with string or string of array.

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

Parameters:
{any}oContext New value for property context
Returns:
{sap.viz.ui5.data.FlattenedDataset} Reference to this in order to allow method chaining
Unbinds aggregation data from model data.
Returns:
{sap.viz.ui5.data.FlattenedDataset} Reference to this in order to allow method chaining