Position: ChartAxisPosition;
Position: Prognoz.Platform.Interop.Chart.ChartAxisPosition;
The Position property determines a position where the chart intersects with the orthogonal chart axis.
The property is set to ChartAxisPosition.Auto by default, and the axis intersects with the orthogonal axis in the minimum value/category.
If the property is set to ChartAxisPosition.Custom, specify the IChartAxis.PositionValue value.
The position of intersecting with the orthogonal axis cannot be set for the secondary value axis. In this case the Position property is always equal to ChartAxisPosition.Auto and attempting to set another value throws an exception.
Executing the example requires a regular report, which sheet contains a chart. A unit is added to the report, and the UserProc procedure is called from this unit using the hyperlink. The inspector of unit assemblies must 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 with the orthogonal axis in the maximum value.
Executing the example requires a regular report, which sheet contains a chart. The .NET assembly is added to the report to handle report events. The EventsClass class in the unit 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 with the orthogonal axis in the maximum value.
See also: