Axis Attributes

Topics:

Depending on the graph type, the graph may include one or two ordinal axes (O1 and O2) and multiple numeric axes (X1, Y1, Y2, Y3, Y4, Y5). The following illustration shows a graph with one ordinal axis (O1) and two numeric axes (Y1 and Y2). Note that the secondary ordinal axis (O2) only appears in 3D graphs.

3D graph

See Time Scale Axis Graphs for information about how to set up a time scale axis.

Axis Properties

This table shows the default values for properties that affect the axes and their grid lines, labels, titles, and so on. Blank cells indicate the property is not supported or applicable for the axis.

Property

O1 Axis

O2 Axis (see note)

X1 Axis

Y1 Axis

Y2 Axis

AxisDescending

 

 

false

false

false

AxisLineDisplay

true

 

true

true

true

AxisSide

0

 

0

see note

see note

ExcludeMaxLabel

false

false

false

false

false

ExcludeMinLabel

false

false

false

false

false

LabelAutofit

true

true

true

false

true

LabelAutoskip

0

 

 

 

 

LabelDisplay

true

true

true

true

true

LabelFormat

 

 

0

0

0

LabelFormatPattern

 

 

"#.#"

"#.#"

"#.#"

LabelMargin

0

 

 

 

 

LabelRotate

0

0

0

0

0

LabelSkipBegin

0

 

 

 

 

LabelSkipCount

0

 

 

 

 

LabelStagger

false

 

false

false

false

LogScale

 

 

false

false

false

LabelWrap

false

false

 

 

 

MajorGridDisplay

true

*

true

true

true

MajorGridStep

 

 

10.0

10.0

10.0

MajorGridStepAuto

 

 

true

true

true

MajorGridStyle

0

 

0

0

0

MinorGridCount

1

 

 

 

 

MinorGridDisplay

false

 

false

false

false

MinorGridStep

 

 

10.0

10.0

10.0

MinorGridStepAuto

 

 

true

true

true

MinorGridStyle

0

 

0

0

0

MustIncludeZero

 

 

false

false

false

OffScaleDisplay

 

 

true

true

true

ScaleMax

 

 

100.0

70.0

80.0

ScaleMaxAuto

 

 

true

true

true

ScaleMin

 

 

0.0

0.0

0.0

ScaleMinAuto

 

 

true

true

true

TitleAutofit

true

true

true

true

true

TitleDisplay

false

false

false

false

false

TitleString

Null String

Null String

Null String

Null String

Null String

ZeroLineDisplay

 

 

false

false

false

Note:
  • The O2-axis only appears in 3D graphs and spectral maps. Grid3DFloorDisplayX/Z, Grid3DLeftWallDisplayY/Z, Grid3DRightWallDisplayX/Y, and Grid3DRiserDisplayX/Y/Z enable/disable the display of grid lines in a 3D graph.
  • For dual (Y1/Y2) axis graphs, the default AxisSide is 0 (left) for the Y1 axis and 1 (right) for the Y2-axis. For graphs with more than two Y-axes, the default AxisSide is 0 (left) for odd numbered axes (Y1, Y3, Y5) and 1 (right) for even numbered axes (Y2, Y4).

Ordinal Axis Properties

Use these properties to define how ordinal axes are displayed in a graph:

  • O1AxisLineDisplay (true/false); Enables (true)/disables (false) the display of the base line on the primary ordinal axis.
  • O1AxisSide (0...3); Controls which side of the graph the ordinal axis is imaged. Although the vast majority of all graphs will image their ordinal text on the bottom of a vertical graph or left of a horizontal graph, it is possible to image it to the top/right or both sides. 1 is the suggested value (bottom for vertical graphs/left for horizontal graphs).

See Grid Lines and Labels and Titles for additional information about how to control the display of labels and titles on an ordinal axis.

Ordinal Axis Methods

Use these methods to determine if the graph includes the primary or secondary ordinal axis:

  • isO1AxisPresent(); Returns true or false indicating whether or not the primary ordinal axis is present in the graph.
  • isO2AxisPresent(); Returns true or false indicating whether or not the secondary ordinal axis is present in the graph.

These properties indicate whether or not the axis is present regardless of whether or not the axis base line is enabled for display. The primary ordinal axis is present in most graph types. The secondary ordinal axis is only present in 3D graph types.

Numeric Axis Properties

Use these properties to define how numeric axes are imaged in the graph:

  • X1/Y1/Y2/Y3/Y4/Y5 AxisDescending (true/false)

    The AxisDescending properties change the direction of values displayed on the axis to descending or ascending. True is the suggested value (ascending values).

  • X1/Y1/Y2AxisLineDisplay (true/false)

    The AxisLineDisplay properties enable (true)/disable (false) the display of the bottom line on an axis.

  • X1/Y1/Y2AxisSide (0...2)

    The AxisSide properties control the side of the graph where the axis is imaged. For vertical graphs, the default settings draw the Y1 axis on the left side of the graph and the Y2 on the right. For horizontal graphs, Y1 is drawn on the bottom of the graph and Y2 on the top.

  • X1/Y1/Y2OffScaleDisplay (true/false)

    The OffScaleDisplay properties determine whether or not values out of range are imaged on the axis.

  • X1/Y1/Y2/Y3/Y4/Y5LogScale (true/false)

    The LogScale properties specify the scale (logarithmic or linear) for the numeric axis. False is the default value (linear).

  • X1/Y1/Y2ScaleMax (Double), X1/Y1/Y2ScaleMaxAuto (true/false), X1/Y1/Y2ScaleMin (Double), and X1/Y1/Y2ScaleMinAuto (true/false)

    The ScaleMin and ScaleMax properties define the range (minimum and maximum) of values that will be imaged on the axis. The ScaleMinAuto and ScaleMaxAuto properties tell the graphing engine to automatically calculate the minimum and maximum values. If these properties are enabled (true), values set by ScaleMin and ScaleMax are ignored.

  • X1/Y1/Y2/Y3/Y4/Y5ZeroLineDisplay (true/false)

    The ZeroLineDisplay properties enable (true)/disable (false) the drawing of a zero line on an axis. True is the suggested value.

  • X1/Y1/Y2MustIncludeZero (true/false)

    The MustIncludeZero properties determine whether or not the numeric axes include zero. False is the default value.

See Labels and Titles for additional information about how to control the display of labels and titles on a numeric axis.

Numeric Axis Methods

Use these methods to get information about specific numeric axes in a graph:

  • getX1ScaleMaxAutoValue(); If the maximum scale value is automatically calculated, this method returns the maximum scaling value that will be used on the X-axis.
  • getX1ScaleMinAutoValue(); If the minimum scale value is automatically calculated, this method returns the minimum scaling value that will be used on the X-axis.
  • getY1MajorGridStepAutoValue(); If major grid steps are automatically calculated, this method returns the grid step value for the Y1-axis.
  • getY1ScaleMaxAutoValue(); If the maximum scale value is automatically calculated, this method returns the maximum scaling value that will be used on the Y1-axis.
  • getY1ScaleMinAutoValue(); If the minimum scale value is automatically calculated, this method returns the minimum scaling value that will be used on the Y1-axis.
  • getY2MajorGridStepAutoValue(); If major grid steps are automatically calculated, this method returns the grid step value for the Y2-axis.
  • getY2ScaleMaxAutoValue(); If the maximum scale value is automatically calculated, this method returns the maximum scaling value that will be used on the Y2-axis.
  • getY2ScaleMinAutoValue(); If the minimum scale value is automatically calculated, this method returns the minimum scaling value that will be used on the Y2-axis.
  • isX1AxisPresent(); Returns true or false indicating whether or not the X-axis is present in the graph.
  • isY1AxisPresent(); Returns true or false indicating whether or not the primary numeric axis is present in the graph.
  • isY2AxisPresent(); Returns true or false indicating whether or not the secondary numeric axis is present in the graph.
  • isZ1AxisPresent(); Returns true or false indicating whether or not the Z-axis is present in the graph.

These methods indicate whether or not the axis is present regardless of whether or not the axis base line is enabled for display. The X1-axis is present in scatter graphs, bubble graphs, histograms, and so on. The Y1-axis is present in most graph types. The Y2-axis is only present in dual-axis graphs.

Axis Independent Methods

In addition to the axis-specific properties and methods, you can use these methods to get/set axis attributes.

  • get/setAxisAssignment(); Get/set the axis assignment to determine where a series is assigned to an axis.
  • get/setAxisDescending(); Get/set the order (ascending or descending) in which an axis is drawn.
  • get/setAxisOffset(); Get/set axis offset in multi-Y graphs.
  • get/setAxisSide(); Get/set the side of the graph where an axis is imaged.
  • get/setAxisSize(); Get/set the size of an axis in multi-Y graphs.
  • get/setDisplayOffscale(); Get/set whether or not off-scale values are drawn on an axis.
  • get/setLogScale(); Get/set whether the axis uses linear or logarithmic scaling.
  • get/setLogScaleBase(); Get/set the scale base when logarithmic scaling is used on a numeric axis.
  • get/setScaleMax; Get/set the maximum value imaged on an axis.
  • get/setScaleMaxAuto(); Get/set automatic calculation of the ScaleMax value.
  • get/setScaleMin(); Get/set the minimum value imaged on an axis.
  • get/setScaleMinAuto(); Get/set automatic calculation of the ScaleMin value.
  • get/setScaleMustIncludeZero(); Get/set whether or not the axis must include a zero value.

When you use these methods, you may supply the object ID of an axis as an input parameter to identify the axis where the attribute is applied. If an axis is not specified, the attribute is retrieved from or assigned to the first item in the selection list. If the object ID does not identify an axis or the first item in the selection list is not an axis, a set operation will apply the attribute to the object but it will not affect the appearance of the graph.

Tick Mark Properties and Methods

Tick marks can be enabled on any axis independent of grid lines.

The following properties control drawing of tick marks on the primary ordinal axis:

IgnoreTickSkip
O1MajorTickDisplay
O1MajorTickStyle
O1MinorTickCount
O1MinorTickDisplay
O1MinorTickStyle

The following properties control drawing of independent tick marks on a numeric axis:

X1/Y1/Y2MajorTickDisplay
X1/Y1/Y2MajorTickStep
X1/Y1/Y2MajorTickStepAuto
X1/Y1/Y2MajorTickStyle
X1/Y1/Y2MinorTickDisplay
X1/Y1/Y2MinorTickStep
X1/Y1/Y2MinorTickStepAuto
X1/Y1/Y2MinorTickStyle

Note that tick marks can be drawn on Y3-, Y4-, and Y5-axes using the methods listed below.

The following methods can be used to enable and control the appearance of independent tick marks on O1-, X1- and all Y-axes:

  • get/setTickLength(); Get/set the length of tick marks in virtual coordinates.
  • get/setTickStep(); Get/set the number of tick steps on an axis when setTickStepAuto(objectID, FALSE) is used.
  • get/setTickStepAuto(); Enable/disable automatic calculation of the number of ticks.
  • get/setTickStyle(); Get/set tick style (inside, outside, or spanning) the axis baseline.
  • get/setDrawTicksPerpendicular(); Force tick marks to be perpendicular to axis base line or not.

When these methods are used, the object ID of tick marks may be supplied as an input parameter to identify the axis tick marks to which the attribute is applied. If a tick mark object is not specified, the attribute is retrieved from or assigned to the first item in the selection list. If the object ID does not identify a tick mark object or the first item in the selection list is not a tick mark object, a "set" operation will apply the attribute to the object but it will not have any effect on the appearance of the chart.

Properties for Dual Axis Graphs

These properties control the axes in dual-axis graphs:

  • DualAxisLineDisplay (true/false); Enables (true)/disables (false) the display of a line that separates the two halves of a dual-axis graph.
  • DualAxisSplitPosition (0...100); Sets the position within the graph frame where the dual-Y split position will be created.

Autofitting Axis Text

Use these properties to define how axis text is autofitted:

  • AxisTextAutofitMax ( value ); Defines the maximum size of axis text in virtual coordinates.
  • AxisTextAutofitMin ( value ); Defines the minimum size of axis text in virtual coordinates.
  • AxisTextAutofitMode ( 0...2 ); Defines the mode to be used for autofitting axis text.
  • AxisTextAutofitPercent ( 0...100% ); When AxisTextAutofitMode is set to 2, this property defines the percent to be used for autofitting axis text. All axis text is maintained within AxisTextAutofitPercent of the axis with the smallest font size as determined by Autofit.

WebFOCUS

Feedback