Background: IChartBackgroundInfo;
The Background property determines fill options for a data series.
Fill type is determined by the Type property. For each fill type there is a corresponding set of properties of the IChartBackgroundInfo interface.
Fill type application is limited by chart types described in the ChartBackgroundType enumeration.
Executing the example requires a histogram in regular report with the REGULAR_REPORT identifier. Add links to the Chart, Drawing, Metabase, Report, Tab system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
Sheet: ITabSheet;
Chart: IChart;
Serie: IChartSerie;
Begin
MB := MetabaseClass.Active;
Report := MB.ItemById("REGULAR_REPORT").Edit As IPrxReport;
Sheet := (Report.Sheets.Item(0) As IPrxTable).TabSheet;
Chart := Sheet.Objects.Item(0).Extension As IChart;
Serie := Chart.Series.Item(0);
Serie.Background.Type := ChartBackgroundType.Gradient;
Serie.Background.Color := GxColor.FromName("Red");
Serie.Background.GradientColor := GxColor.FromName("Yellow");
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the chart series is filled with red and yellow gradient.
See also: