Points: String;
The Points property determines address of the range, from which the names of the chart points are obtained.
Executing the example requires a chart in the regular report with the REGULAR_REPORT identifier, and data in the cells B4:F8, A4:A8 and B1:F1. Add links to the Metabase, Report, Tab, Drawing system assemblies.
Sub UserProc;
Var
Report: IPrxReport;
Chart: IPrxChart;
Sheet: ITabSheet;
MB: IMetabase;
Style: ITabCellStyle;
Arr: array Of integer;
i: integer;
Begin
//Connect to regular report
MB := MetabaseClass.Active;
Report := MB.ItemById("REGULAR_REPORT_POINTS").Edit As IPrxReport;
Sheet := (Report.Sheets.Item(0) As IPrxTable).TabSheet;
Chart := Sheet.Objects.Item(0).Extension As IPrxChart;
//Determine range of numeric values, series names and points names
Chart.Data := "B4:F8";
Chart.Series := "A4:A8";
Chart.Points := "B1:F1";
//Disable the "Change Ranges Automatically" function for chart data Chart.AutoAdjust := False;
//Range of data table, by which chart is built, is filled with specified color
Style := Chart.DataRange.Style;
Style.BackgroundColor := New GxColor.CreateRGB(164,199,252);
//Determine hidden data along category axis
Arr := Chart.ExcludedPoints;
Debug.WriteLine("Hidden points: ");
For Each i In Arr Do
Debug.WriteLine(Chart.PointNameByIndex(i));
End For;
//Disable the "Show Hidden Data" function for chart
Chart.IncludeHidden := False;
(Report As IMetabaseObject).Save;
End Sub UserProc;
Chart source data is changed in the regular report.
See also: