Axis.property

Description

Settings that control the appearance of an axis on a graph.

Applies to

Graph controls

Syntax

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:

  • Category

  • Series

  • Values

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 the DataWindow server 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.

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 category. Choose Category Axis Text, Series Axis Text, or Values Axis Text from the TextObject list, and set font properties.

DisplayEvery NLabels

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

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

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.

Label

(exp) A string whose value is the axis label.

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 category. Choose Category Axis Label, Series Axis Label, or Values Axis Label from the TextObject list, and set font properties.

MajorDivisions

(exp) An integer specifying the number of major divisions on the axis.

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.

MajorTic

(exp) An integer specifying the type of the major tick marks.

Values are:

  • 1 – None

  • 2 – Inside

  • 3 – Outside

  • 4 – Straddle

MaximumValue

(exp) A double specifying the maximum value for the axis.

MinimumValue

(exp) A double specifying the minimum value for the axis.

MinorDivisions

(exp) An integer specifying the number of minor divisions on the axis.

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.

MinorTic

(exp) An integer specifying the type of the minor tick marks.

Values are:

  • 1 – None

  • 2 – Inside

  • 3 – Outside

  • 4 – Straddle

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.

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.

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

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

ScaleType

(exp) An integer specifying the type of scale used for the axis.

Values are:

  • 1 – Scale_Linear

  • 2 – Scale_Log10

  • 3 – Scale_Loge

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

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.

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

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

Usage


In the painter

Select the graph control or the Graph DataWindow object and set the value in the Properties window. To set most axis properties, select the Axis category and an axis in the Axis drop-down list. Font properties are set in the Text category.

Examples

Example 1

[Visual Basic]
Dim PropVal As String
PropVal = dw1.GetProperty("Graph1.Category.AutoScale")
dw1.SetProperty("Category.LabelDispAttr.Alignment", " 2")
PropVal = dw1.Describe("Graph1.Category.AutoScale")
dw1.Modify("Graph1.Series.AutoScale=0")
dw1.Modify("Graph1.Values.Label='Cities'")
dw1.Modify("Graph1.Category.LabelDispAttr.Alignment=2")

Example 2

[C#]
string PropVal;
PropVal = dw1.GetProperty("Graph1.Category.AutoScale");
dw1.SetProperty("Category.LabelDispAttr.Alignment", " 2");
PropVal = dw1.Describe("Graph1.Category.AutoScale");
dw1.Modify("Graph1.Series.AutoScale=0");
dw1.Modify("Graph1.Values.Label='Cities'");
dw1.Modify("Graph1.Category.LabelDispAttr.Alignment=2");