TicksOnZeroLine: Boolean;
TicksOnZeroLine: Boolean;
The TicksOnZeroLine property determines whether tick lines are to be displayed on zero line.
This property is relevant only for category axis (X axis). To use this property, you need to enable showing zero line on the Y axis.
By default this property is set to False, and tick lines are displayed only on the category axis (X axis). If this property is set to True, tick marks are displayed on the line that crosses the value axis (Y axis) at zero point. If value axis (Y) contains minimum and maximum that are certainly less than zero or certainly grater than zero, tick lines are displayed on the category axis (X).
Example of displaying tick lines on zero line:
Executing this example requires a regular report a sheet of which contains a chart. A module is added to the report, and you can use a hyperlink to call the GetChart procedure from this module. The inspector of module assemblies should contain links to the Chart, Report, Tab system assemblies.
Sub GetChart;
Var
chart: IChart;
objs: ITabObjects;
Begin
objs := (PrxReport.ActiveReport.ActiveSheet As IPrxTable).TabSheet.Objects;
chart := objs.Item(0).Extension As IChart;
chart.AxisY.IncludeZero := True;
chart.AxisX.TicksOnZeroLine := True;
End Sub GetChart;
After you click the hyperlink, using zero line and displaying zero line tick marks are set for the value axis.
Executing the example requires a regular report with the bar chart on its sheet. A .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; Out Cancel: Boolean);
Var
chart: IChart;
objs: ITabObjects;
Begin
Cancel := False;
objs := Report.ActiveSheet.Table.Objects;
chart := objs.Item[0].Extension As IChart;
chart.AxisY.IncludeZero := True;
chart.AxisX.TicksOnZeroLine := True;
End Sub OnBeforeOpenReport;
After the report is opened, using zero line and displaying zero line tick marks are set for the value axis.
See also: