RoundToUnit – PB Docs 150

RoundToUnit property for PowerScript controls

Controls

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 RoundToUnit property specifies the type of units that
should be used for the rounding. The type of units that can be specified
are based on the datatype of the axis. For example, for a date axis,
you might round tick marks to the nearest five years or to every
third month.

Usage

In a painter

proc.png To specify the type of unit to be used for rounding:

  1. Display the Axis tab page of 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. Choose the desired unit from the RoundToUnit drop-down
    list.

In scripts

The RoundToUnit property takes a value of the enumerated datatype grRoundToType.
When you set this property in scripts, make sure the value is compatible
with the datatype of the axis.

The following example sets the datatype of the Values axis
to date and then sets the unit for rounding to months and the number
of months to which to round:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x