IChart.GetPositiveBackground

Syntax

GetPositiveBackground: IChartBackgroundInfo;

Description

The GetPositiveBackground method returns fill color for positive chart columns.

Example

Executing the example requires the Button component with the Button1 identifier, the Panel component with the Panel1 identifier, and an express report with the EXPRESS_REPORT identifier.

Add links to the Chart, Express and Metabase system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Chart: IChart;
    MB: IMetabase;
    Eax: IEaxAnalyzer;
    a, r, g, b: integer;
Begin
    
//Connect to repository
    MB := MetabaseClass.Active;
    
//Get express report
    Eax := MB.ItemById("EXPRESS_REPORT").Edit As IEaxAnalyzer;
    
//Get chart
    Chart := Eax.Chart As IChart;
    
//Get fill of positive columns
    a := Chart.GetPositiveBackground.Color.A;
    r := Chart.GetPositiveBackground.Color.R;
    g := Chart.GetPositiveBackground.Color.G;
    b := Chart.GetPositiveBackground.Color.B;
    Panel1.Color := 
New GxColor.CreateARGB(A, R, G, B);
End Sub Button1OnClick;

After executing the example, after the button is clicked, a color for positive columns of EXPRESS_REPORT express report chart is set for the Panel component.

See also:

IChart