Applies to
grAxis objects in Graph controls
Description
When the AutoScale property is enabled, the RoundTo and RoundToUnit properties specify how to round the end points and tick marks of an axis. Rounding affects axis labels, not graph data.
The RoundTo property specifies the value to which you want to round the axis values, in the units specified by the RoundToUnit property.
Usage
In a painter
To set the value to which to round axis values:
-
Display the Axis tab page from the graph control's Properties view and select the desired axis from the Axis list.
-
Turn on autoscaling by checking the AutoScale check box.
-
Choose the datatype of the axis by selecting an option from the DataType drop-down list.
-
Enter a value in the RoundTo edit field.
In scripts
The RoundTo property takes a double value indicating the multiple to which you want to round axis tick marks.
The following example sets the datatype of the Values axis to date, sets the unit for rounding to months, and then sets the rounding value to six months:
gr_1.Values.DataType = AdtDate! gr_1.Values.RoundToUnit = RndMonths! gr_1.Values.RoundTo = 6