Specifying axis properties

Graphs have two or three axes. You specify the axes' properties in the Axis page in the graph's Properties view.

StepsTo specify properties for an axis of a graph:

  1. Select Properties from the graph's pop-up menu and then select the Axis page in the Properties view.

  2. Select the Category, the Value, or the Series axis from the Axis drop-down list.

    If you are not working with a 3D graph, the Series Axis options are disabled.

  3. Specify the properties as described next.

Specifying text properties

You can specify the characteristics of the text that displays for each axis. Table 24-9 shows the two kinds of text associated with an axis.

Table 24-9: Text types associated with each axis of a graph

Type of text

Meaning

Text

Text that identifies the values for an axis.

Label

Text that describes the axis. You specify the label text in a painter. You can use ~n to embed a new line within a label.

For information on specifying properties for the text, see “Specifying text properties for titles, labels, axes, and legends”.

Specifying datatypes

The data graphed along the Value, Category, and Series axes has an assigned datatype. The Series axis always has the datatype String. The Value and Category axes can have the datatypes listed in Table 24-10.

Table 24-10: Datatypes for Value and Category axes

Axis

Possible datatypes

Both axes (for scatter graph)

Number, Date, Time

Value (other graph types)

Number, Date, DateTime, Time

Category (other graph types)

String, Number, Date, DateTime, Time

For graphs in DataWindow objects, PocketBuilder automatically assigns the datatypes based on the datatype of the corresponding column; you do not specify them.

For graphs in windows, you specify the datatypes yourself. Be sure you specify the appropriate datatypes so that when you populate the graph (using the AddData function), the data matches the datatype.

Scaling axes

You can specify the properties listed in Table 24-11 to define the scaling used along numeric axes.

Table 24-11: Properties for scaling on numeric axes

Property

Meaning

Autoscale

If selected (the default), PocketBuilder automatically assigns a scaling for the numbers along the axis.

Round To, Round To Unit

Specifies how to round the end points of the axis. This rounds only the range displayed along the axis; it does not round the data itself.

You can specify a number and a unit. The unit is based on the datatype; you can specify Default as the unit to have PocketBuilder decide for you. For example, if the Value axis is a Date column, you can specify that you want to round the end points of the axis to the nearest five years. In this case, if the largest data value is the year 1997, the axis extends up to 2000.

Minimum Value, Maximum Value

The smallest and largest numbers to appear on the axis (disabled if you have selected Autoscale).

Scale Type

Specifies linear or logarithmic (common or natural) scaling.

Using major and minor divisions

You can divide axes into divisions. Each division is identified by a tick mark, which is a short line that intersects an axis. In the Sales by Printer graphs shown in “Examples”, the graph's Value axis is divided into major divisions of 50 units each. PocketBuilder divides the axes automatically into major divisions.

StepsTo define divisions for an axis of a graph:

  1. To divide an axis into a specific number of major divisions, type the number of divisions you want in the MajorDivisions box.

    Leave the number 0 to have PocketBuilder automatically create divisions. PocketBuilder labels each tick mark in major divisions. If you do not want each tick mark labeled, enter a value in the DisplayEveryNLabels box. For example, if you enter 2, PocketBuilder labels every second tick mark for the major divisions.

  2. To use minor divisions, which are divisions within each major division, type the appropriate number in the MinorDivisions box.

    To use no minor divisions, leave the number 0.

    NoteWhen using logarithmic axes If you want minor divisions, specify 1; otherwise, specify 0.

Representing divisions with grid and drop lines

You can specify lines to represent the divisions as described in Table 24-12 and illustrated in Figure 24-23.

Table 24-12: Representing graph divisions with grid and drop lines

Line

Meaning

Grid line

A line that extends from a tick mark across the graph. Grid lines make graphs easier to read.

Drop line

A line that extends vertically from a data point to its axis (not available for all graph types).

Figure 24-23: Grid and drop lines in a graph

The sample shows a graph titled Mileage. The value axis displays miles per gallon and the category axis displays Speed. Solid grid lines extend across the graph from every value marked on the Value axis. Dashed drop lines extend vertically up from each speed on the Category axis to the plotted point that represents miles per gallon for that speed.

Using line styles

You can define line styles for the components of a graph listed in Table 24-13.

Table 24-13: Components of a graph that can have line styles

Component

Meaning

PrimaryLine

The axis itself

SecondaryLine

The axis parallel to and opposite the primary axis

OriginLine

A grid line that represents the value zero

Frame

The frame for the axis in 3D graphs (disabled for 2D graphs)