IChartExternLegend.BackgroundInfo

Fore Syntax

BackgroundInfo: IChartBackgroundInfo;

Fore.NET Syntax

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

Description

The BackgroundInfo property determines properties of fill of external legend.

Fore Example

Executing the example requires a regular report with the Report identifier. The report includes the following objects: a chart and an external legend.

Sub Main;
Var
    mb: IMetabase;
    rep: IPrxReport;
    legend: IPrxChartLegend;
    chartlegend: IChartExternLegend;
    items: IChartExternLegendItems;
    chartBI : IChartBackgroundInfo;
Begin
    mb:= MetabaseClass.Active;
    rep:= mb.ItemById("OBJ42859").Edit As IPrxReport;
    legend:= ((rep.ActiveSheet As IprxTable).TabSheet.Objects.Item(1)) As IPrxChartLegend;
    chartlegend:= legend As IChartExternLegend;
    chartlegend.AxisIcon:= ChartLegendAxisIcon.Axis;
    chartBI:= chartlegend.BackgroundInfo;
    chartBI.Color:= New GxColor.CreateARGB( 255245120255);     
    items:= chartlegend.InternalItems;        
    (rep As IMetabaseObject).Save;
End Sub Main;

After executing the example the fill color of the chart external legend is changed.

Fore.NET Example

Executing the example requires a regular report with the Report identifier. The report includes the following objects: a chart and an external legend.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.Drawing;
...
Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    rep: IPrxReport;
    legend: IPrxChartLegend;
    chartlegend: IChartExternLegend;
    items: IChartExternLegendItems;
    chartBI: IChartBackgroundInfo;
    color: GxColorClass_2;
Begin
    mb := Params.Metabase;
    rep := mb.ItemById["OBJ42859"].Edit() As IPrxReport;
    legend := ((rep.ActiveSheet As IprxTable).TabSheet.Objects.Item[1]) As IPrxChartLegend;
    chartlegend := legend As IChartExternLegend;
    chartlegend.AxisIcon := ChartLegendAxisIcon.claiAxis;
    chartBI := chartlegend.BackgroundInfo;
    color := New GxColorClass_2();
    color.CreateARGB(255245120255);
    chartBI.Color := color;
    items := chartlegend.InternalItems;
    (rep As IMetabaseObject).Save();
End Sub;
End Class;

After executing the example the fill color of the chart external legend is changed.

See also:

IChartExternLegend