Position: ChartAxisPosition;
Position: Prognoz.Platform.Interop.Chart.ChartAxisPosition;
The Position property determines the position where the chart intersects with the orthogonal chart axis.
By default this property has the ChartAxisPosition.Auto value and the axis intersects with the orthogonal axis in the minimum value/category.
If this property is set to ChartAxisPosition.Custom, specify the IChartAxis.PositionValue value.
The position of intersecting with the orthogonal axis cannot be defined for the secondary value axis. In this case the Position property is always equal to ChartAxisPosition.Auto and attempting to define another value throws an exception.
Executing this example requires a regular report a sheet of which contains a chart. A module is to be added to the report and the UserProc procedure is called from this module using the hyperlink. The inspector of module assemblies should contain links to the Chart, Report, Tab system assemblies.
Sub UserProc1;
Var
Chart: IChart;
Axis : IChartAxis;
Begin
Chart :=(PrxReport.ActiveReport.ActiveSheet As IPrxTable).TabSheet.Objects.Item(0).Extension As IChart;
Axis := Chart.AxisX;
Axis.Position := ChartAxisPosition.Maximum;
End Sub UserProc1;
After executing the example the X axis intersects the orthogonal axis to the maximum value.
Executing this example requires a regular report a sheet of which contains a chart. The .NET assembly is added to the report to handle report events. The EventsClass class in the module of the specified assembly contains description of the OnBeforeOpenReport event.
Public Override Sub OnBeforeOpenReport(Report : IPrxReport; Var Cancel : Boolean);
Var
Chart: IChart;
Axis : IChartAxis;
Begin
Cancel := False;
Chart :=(Report.ActiveSheet As IPrxTable).TabSheet.Objects.Item[0].Extension As IChart;
Axis := Chart.AxisX;
Axis.Position := Prognoz.Platform.Interop.Chart.ChartAxisPosition.capMaximum;
End Sub OnBeforeOpenReport;
When the report is opened, the X axis intersects the orthogonal axis to the maximum value.
See also: