IVZDataSourceMapping.Data

Syntax

Data(elId: String): Variant;

Parameters

elId. Identifier of the element, the value of which is to be obtained.

Description

The Data property returns the value of selected element.

Comments

To determine data source, use the IVZDataSourceMapping.DataSource property.

Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier, which data source is built on a dictionary with the TBL_DICTIONARY identifier. The Color metric should be selected in the bubble tree report.

Add links to the Drawing, Express, Metabase, Visualizators system assemblies.

Sub UserProc;
Var
    Metabase: IMetabase;
    EaxAnalyzer: IEaxAnalyzer;
    BubbleTree: IVZBubbleTree;
    ColorVisual: IVZColorVisual;
    DataSourceMapping: IVZDataSourceMapping;
    DataSource: IVZMultiplyDataSource;
    Element: IGxSolidBrush;
Begin
    Metabase := MetabaseClass.Active;
    EaxAnalyzer := Metabase.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    // Get bubble tree
    BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
    // Get color visualizer
    ColorVisual := BubbleTree.ColorVisual;
    // Get settings used for data mapping
    DataSourceMapping := ColorVisual.ColorMapping;
    // Set title for data source corresponding to identifier
    DataSource := DataSourceMapping.DataSource;
    DataSource.Title := DataSource.ID;
    DataSourceMapping.DataSource := DataSource;
    // Set index, according to which the data is returned from each dimension
    DataSourceMapping.Index := 1;
    // Set dimension identifier
    DataSourceMapping.AttributeId := "TBL_DICTIONARY";
    // Set color fill for the no data bubble
    Element := DataSourceMapping.Data(""As IGxSolidBrush;
    Element.Color := New GxColor.CreateRGB(0255255);
    // Initialize scale used to display data
    DataSourceMapping.Setup;
    Debug.WriteLine("Data source name: " + 
        DataSourceMapping.DataSource.Title);
    Debug.WriteLine("Name of selected dimension selection: " + 
        DataSourceMapping.Title);

    Debug.WriteLine("Index according to which the data is returned from each dimension: " + 
        DataSourceMapping.Index.ToString);
    Debug.WriteLine("Dimension ID according to which the data is selected: " + 
        DataSourceMapping.AttributeId);
    // Save changes to express report
    (EaxAnalyzer As IMetabaseObject).Save;
End Sub UserProc;

Before executing the example, the bubble tree color scale looked as shown on the page with description of the IVZDataScale interface.

After executing the example, the following will be set:

After executing the example the console window displays data source name and identifier of the dimension, by which data is selected.

See also:

IVZDataSourceMapping