Applies to

grAxis objects in Graph controls


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.


In a painter

To set the value to which to round axis values:

  1. Display the Axis tab page from the graph control's Properties view and select the desired axis from the Axis list.

  2. Turn on autoscaling by checking the AutoScale check box.

  3. Choose the datatype of the axis by selecting an option from the DataType drop-down list.

  4. 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