StartColor: IGxColor;
The StartColor property determines start color of color scale.
To use this property, the IGxColorScale.UseAutoValues property must be set to True.
To set color scale end color, use the IGxColorScale.EndColor property.
Executing the example requires that the repository contains an express report with the EXPRESS_SCALE identifier. The report contains a table based on a cube. The cube contains a non-hidden fixed dimension, which has metrics display set up.
Add links to the Dimensions, Drawing, Express, Metabase system assemblies.
Sub UserProc;
Var
MB: IMetaBase;
Express: IEaxAnalyzer;
Style: IEaxTableStyle;
DimSel: IDimSelection;
ColorScale: IGxColorScale;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get regular report
Express := MB.ItemById("EXPRESS_SCALE").Edit As IEaxAnalyzer;
// Get table formatting parameters
Style := Express.Grid.Style;
// Get selection of fixed dimension
DimSel := Express.Grid.IndicatorSelection(EaxGridIndicatorType.BackgroundColor);
// Select second element
DimSel.SelectElement(1, False);
// Set scale to fill cells
ColorScale := Style.IndicatorScale(EaxGridIndicatorType.BackgroundColor) As IGxColorScale;
// Enable automatic values
ColorScale.UseAutoValues := True;
// Set start color
ColorScale.StartColor := GxColor.FromName("Green");
// Set end color
ColorScale.EndColor := GxColor.FromName("Yellow");
// Get selection and change element to update table
DimSel := Express.Grid.IndicatorSelection(EaxGridIndicatorType.BackgroundColor);
Dimsel.SelectElement(0, False);
// Save changes
(Express As IMetabaseObject).Save;
End Sub UserProc;
After executing the example cell fill color will be changed from the top left corner to the bottom right corner of the value area.
See also: