BackgroundInfo: IChartBackgroundInfo;
BackgroundInfo: Prognoz.Platform.Interop.Chart.IChartBackgroundInfo;
The BackgroundInfo property determines properties of fill of external legend.
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( 255, 245, 120, 255);
items:= chartlegend.InternalItems;
(rep As IMetabaseObject).Save;
End Sub Main;
After executing the example the fill color of the chart external legend is changed.
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(255, 245, 120, 255);
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: