IChart.GetTotalBackground

Fore Syntax

GetTotalBackground: IChartBackgroundInfo;

Fore.NET Syntax

GetTotalBackground: Prognoz.Platform.Interop.Chart.IChartBackgroundInfo;

Description

The GetTotalBackground method returns fill color of chart total columns.

Fore 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 total columns
    a := Chart.GetTotalBackground.Color.A;
    r := Chart.GetTotalBackground.Color.R;
    g := Chart.GetTotalBackground.Color.G;
    b := Chart.GetTotalBackground.Color.B;
    Panel1.Color := 
New GxColor.CreateARGB(A, R, G, B);
End Sub Button1OnClick;

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

Fore.NET Example

Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Metabase;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    Chart: IChart;
    MB: IMetabase;
    Eax: IEaxAnalyzer;
    a, r, g, b: integer;
Begin
    
//Connect to repository
    MB := Self.Metabase;
    
//Get express report
    Eax := MB.ItemById["OBJ344"].Edit() As IEaxAnalyzer;
    
//Get chart
    Chart := Eax.Chart As IChart;
    
//Determine whether connecting lines are displayed
    Chart.IsConnectingLinesVisible := True;
    
//Get fill of total columns
    a := Chart.GetTotalBackground().Color.A;
    r := Chart.GetTotalBackground().Color.R;
    g := Chart.GetTotalBackground().Color.G;
    b := Chart.GetTotalBackground().Color.B;

    Self.panel1.BackColor := System.Drawing.Color.FromArgb(A, R, G, B);
End Sub;

See also:

IChart