Description
Settings that control the appearance of an axis on a graph.
Applies to
Graph controls
Syntax
PowerBuilder dot notation:
dw_control.Object.graphname.axis.property
Describe and Modify argument:
"graphname.axis.property { = value }"
Parameter |
Description |
---|---|
graphname |
The name of the graph within the DataWindow object for which you want to get or set a property value for an axis. |
axis |
An axis name. Values are:
|
property |
A property for the axis. Properties and their settings are listed in the table that follows. |
value |
The value to be assigned to the property. For axis properties, value can be a quoted DataWindow expression. |
Property for Axis |
Value |
---|---|
AutoScale |
(exp) A boolean number specifying whether PowerBuilder scales the axis automatically. Enabled when the axis displays nonstring data. Values are: 0 -- No, do not automatically scale the axis. 1 -- Yes, automatically scale the axis. Painter: Axis tab, Scale group. |
DispAttr. fontproperty |
(exp) Properties that control the appearance of the text that labels the axis divisions. For a list of font properties, see the main entry for DispAttr.fontproperty. Painter: Text tab. Choose Category Axis Text, Series Axis Text, or Values Axis Text, and set font properties. |
DisplayEveryNLabels |
(exp) An integer specifying which major axis divisions to label. For example, 2 means label every other tick mark. Values 0 and 1 both mean label every tick mark. If the labels are too long, they are clipped. Painter: Axis tab, Major Divisions group (not available for all graph types). |
DropLines |
(exp) An integer indicating the type of drop line for the axis. Values are: 0 -- None 1 -- Solid 2 -- Dash 3 -- Dot 4 -- DashDot 5 -- DashDotDot Painter: Axis tab, Major Divisions group (not available for all graph types). Not supported by Render3D graph style. |
Frame |
(exp) An integer indicating the type of line used for the frame. Values are 0--5. See DropLines in this table for their meaning. Available for 3D graph types. Painter: Axis tab, Line Style group. Not supported by Render3D graph style. |
Label |
(exp) A string whose value is the axis label. Painter: Axis tab. |
LabelDispAttr. fontproperty |
(exp) Properties that control the appearance of the axis label. For a list of font properties, see the main entry for DispAttr.fontproperty. Painter: Text tab. Choose Category Axis Label, Series Axis Label, or Values Axis Label, and set font properties. |
MajorDivisions |
(exp) An integer specifying the number of major divisions on the axis. Painter: Axis tab, Major Divisions group. |
MajorGridLine |
(exp) An integer specifying the type of line for the major grid. Values are 0-5. See DropLines in this table for their meaning. Painter: Axis tab, Major Divisions group. Not supported by Render3D graph style. |
MajorTic |
(exp) An integer specifying the type of the major tick marks. Values are: 1 -- None 2 -- Inside 3 -- Outside 4 -- Straddle Painter: Axis tab, Major Divisions group. Not supported by Render3D graph style. |
MaximumValue |
(exp) A double specifying the maximum value for the axis. Painter: Axis tab, Scale group. |
MinimumValue |
(exp) A double specifying the minimum value for the axis. Painter: Axis tab, Scale group. |
MinorDivisions |
(exp) An integer specifying the number of minor divisions on the axis. Painter: Axis tab, Minor Divisions group. Not supported by Render3D graph style. |
MinorGridLine |
(exp) An integer specifying the type of line for the minor grid. Values are 0-5. See DropLines in this table for their meaning. Painter: Axis tab, Minor Divisions group. Not supported by Render3D graph style. |
MinorTic |
(exp) An integer specifying the type of the minor tick marks. Values are: 1 -- None 2 -- Inside 3 -- Outside 4 -- Straddle Painter: Axis tab, Minor Divisions group. Not supported by Render3D graph style. |
OriginLine |
(exp) An integer specifying the type of origin line for the axis. Values are 0-5. See DropLines in this table for their meaning. Enabled for numeric data axes. Painter: Axis tab, Line Style group. Not supported by Render3D graph style. |
PrimaryLine |
(exp) An integer specifying the type of primary line for the axis. Values are 0-5. See DropLines in this table for their meaning. Painter: Axis tab, Line Style group. Not supported by Render3D graph style. |
RoundTo |
(exp) A double specifying the value to which you want to round the axis values. Specify both a value and a unit (described next). Painter: Axis tab, Scale group. |
RoundToUnit |
(exp) An integer specifying the units for the rounding value. The units must be appropriate for the axis datatype. Values are: 0 -- Default, for an axis of any datatype 1 -- Years, for an axis of type date or DateTime 2 -- Months, for an axis of type date or DateTime 3 -- Days, for an axis of type date or DateTime 4 -- Hours, for an axis of type time or DateTime 5 -- Minutes, for an axis of type time or DateTime 6 -- Seconds, for an axis of type time or DateTime 7 -- Microseconds, for an axis of type time or DateTime Painter: Axis tab, Scale group. |
ScaleType |
(exp) An integer specifying the type of scale used for the axis. Values are: 1 -- Scale_Linear 2 -- Scale_Log10 3 -- Scale_Loge Painter: Axis tab, Scale group. |
ScaleValue |
(exp) An integer specifying the scale of values on the axis. Values are: 1 -- Scale_Actual 2 -- Scale_Cumulative 3 -- Scale_Percentage 4 -- Scale_CumPercent Painter: Axis tab, Scale group. |
SecondaryLine |
(exp) An integer specifying the type of secondary line for the axis. The line is parallel to and opposite the primary line and is usually not displayed in 2D graphs. Values are 0-5. See DropLines in this table for their meaning. Painter: Axis tab, Line Style group. Not supported by Render3D graph style. |
ShadeBackEdge |
(exp) A boolean number specifying whether the back edge of the axis is shaded. Values are: 0 -- No, the back edge is not shaded 1 -- Yes, the back edge is shaded Painter: Axis tab. Enabled for 3D graphs only. Not supported by Render3D graph style. |
Sort |
(exp) An integer specifying the way the axis values should be sorted. (Does not apply to the Values axis.) Values are: 0 -- Unsorted 1 -- Ascending 2 -- Descending Painter: Axis tab, Line Style group. |
Usage
In the painter
Select the graph control or the Graph DataWindow object and set the value in the Properties view. To set most axis properties, select the Axis tab and an axis in the Axis drop-down list. Font properties are set on the Text tab.
Examples
string ls_data ls_data = dw1.Object.gr_1.Category.AutoScale dw1.Object.Category.LabelDispAttr.Alignment = 2 ls_data = dw1.Describe("gr_1.Category.AutoScale") dw1.Modify("gr_1.Series.AutoScale=0") dw1.Modify("gr_1.Values.Label='Cities'") dw1.Modify("gr_1.Category.LabelDispAttr.Alignment=2")