IGxScale.UseAutoValues

Syntax

UseAutoValues: Boolean;

Description

The UseAutoValues property determines whether autoselection of scale minor values is used.

Comments

Available values:

To use the property, set the start and the end values, by which minor values of color or numeric scale will be automatically determined. When the color scale is used, set values using IGxColorScale.StartColor and IGxColorScale.EndColor. When the numeric scale is used, set values using IGxNumericScale.StartValue and IGxNumericScale.EndValue.

To manually set scale minor values, use the IGxColorScale.Color and IGxNumericScale.Value properties for the color and the numeric scale, respectively.

Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier. The express report should contain a table based on a cube. Make sure that the cube contains a non-hidden fixed dimension.

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

Sub UserProc;
Var
    MB: IMetaBase;
    Express: IEaxAnalyzer;
    Style: IEaxTableStyle;
    Scale: IGxColorScale;
    Grid: IEaxGrid;
    Background: EaxGridIndicatorType;
    DimSel: IDimSelection;
Begin
    
// Get repository
    MB := MetabaseClass.Active;
    
// Get express report
    Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    
// Get table
    Grid := Express.Grid;
    
// Set table metric type - cell background color
    Background := EaxGridIndicatorType.BackgroundColor;
    
// Set fixed dimension selection
    DimSel := Express.Grid.IndicatorSelection(Background);
    DimSel.SelectElement(
0False);
    
// Get table formatting parameters
    Style := Grid.Style;
    
// Set cell fill scale
    Scale := Style.IndicatorScale(Background) As IGxColorScale;
    
// Enable autoselection of intermediate hues of color scale
    Scale.UseAutoValues := True;
    
// Set start color
    Scale.StartColor := GxColor.FromName("Yellow");
    
// Set end color
    Scale.EndColor := GxColor.FromName("Green");
    
// Set the number of scale intervals
    Scale.IntervalsCount := 7;
    
// Save changes
    (Express As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the metric that is cell background color is set in the express report table. The table cell background is split into intermediate hues from yellow to green according to cell value ranges.

See also:

IGxScale