Sorting data for series and categories  Specifying overlap and spacing

Chapter 24: Working with Graphs

Specifying text properties for titles, labels, axes, and legends

A graph can have four text elements:

Figure 24-20: Text elements of a graph

You can specify properties for each text element.

StepsTo specify text properties for the title, labels, axis values, and legend of a graph:

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

  2. Select a text element from the list in the Text Object drop-down list.

    Figure 24-21: Selecting text elements to change their properties

  3. Specify the font and its characteristics.

Using Auto Size

With Auto Size in effect, PocketBuilder resizes the text appropriately whenever the graph is resized. With Auto Size disabled, you specify the font size of a text element explicitly.

StepsTo have PocketBuilder automatically size a text element in a graph:

  1. On the Text properties page for the graph, select a text element from the list in the Text Object drop-down list.

  2. Select the Autosize check box (this is the default).

StepsTo specify a font size for a text element in a graph:

  1. On the Text properties page for the graph, select a text element from the list in the Text Object drop-down list.

  2. Clear the Autosize check box.

  3. Select the Font size in the Size drop-down list.

Rotating text

For all the text elements, you can specify the number of degrees by which you want to rotate the text.

StepsTo specify rotation for a text element in a graph:

  1. On the Text properties page for the graph, select a text element from the list in the Text Object drop-down list.

  2. Specify the rotation you want in the Escapement box, using tenths of a degree (450 means 45 degrees)

Changes you make here are shown in the model graph in the Design view and in the Preview view.

Using display formats

Display formats are masks in which certain characters have special significance that aid in the presentation of information to the user. For more information about defining display formats, see Chapter 21, “Displaying and Validating Data.”

StepsTo use a display format for a text element in a graph:

  1. On the Text properties page for the graph, select a text element from the list in the Text Object drop-down list.

  2. Type a display format in the Format box or choose one from the pop-up menu.

    To display the pop-up menu, click the button to the right of the Format box.

Modifying display expressions

You can specify an expression for the text that is used for each graph element. The expression is evaluated at execution time.

StepsTo specify an expression for a text element in a graph:

  1. On the Text properties page for the graph, select a text element from the list in the Text Object drop-down list.

  2. Click the button next to the Display Expression box.

    The Modify Expression dialog box displays.

  3. Specify the expression.

    You can paste functions, column names, and operators. Included with column names in the Columns box are statistics about the columns, such as counts and sums.

  4. Click OK to return to the graph's Properties view.

Example

By default, when you generate a pie graph, PocketBuilder puts the title at the top and labels each slice of the pie with the percentage that slice represents of the whole. Percentages are accurate to two decimal places.

Figure 24-22 has been enhanced as follows:

Figure 24-22: Pie chart with display enhancements

To enhance the pie chart, the display expressions were modified for the title and pie graph labels as follows:

Element

Original expression

Modified expression

Title

title

title + " as of " + date(today())

Pie graph labels

if(seriescount > 1, series, string (percentofseries, "0.00%"))

if(seriescount > 1, series, string(percentofseries,"0%") + " (" + value + ")" )





Copyright © 2004. Sybase Inc. All rights reserved. Specifying overlap and spacing

View this book as PDF