Using charts

Using charts in forms or reports allows you to break data into categories you specify, summarize the data within those categories, and sort the summarized information. Charts can help reveal trends, patterns and relationships in your data that you might otherwise miss. Paradox allows you to choose from a number of different chart types for presenting data.

In this section you'll learn about

  creating charts
  
  defining charts
  
  changing chart types
  
  changing chart axes
  
  modifying chart titles
  
  changing the appearance of charts
  
  changing the color of charts
  
For more information about charts, see "Reference: Using charts".

Creating charts

Paradox lets you create a chart in a form or report. Each chart is based on the tables in the data model of the form or report. When you create a chart, Paradox first cross-tabulates the data, and then generates the chart. 

To create a chart in a form or report

1	With a form or report open in the design window, click the Chart tool.

2	Drag to the area of the chart where you want to place the chart.

An empty tabular chart object appears with undefined x-axis, y-axis, and charted data.

3	Drag the sizing handles to resize the chart.

Note

  In a report, the scope of a chart is determined in part by the section of the report in which it is placed.
  
Defining charts

When you create a new chart  on a form or report, you must choose the tables fields on which to base the x and y axes. You must also define the data series which appear in the chart's x-axis. You must also specify a data type for the chart. You can choose from tabular charts which take their data directly from a table, 1-D summary charts which analyze one data type in relation to another, and 2-D summary charts which summarize information by more than one category.

In 2-D summary charts, you can specify an additional group field which functions like a secondary x-axis. For example, a chart might show sales by quarter. The quarters are listed along the x-axis and sales along the y-axis. You could break down the data, for example, to show sales by quarter and, within each quarter, sales by product. In this new chart, the x-axis and y-axis would be the same, but each point on the x-axis would have multiple summaries-one for each product. 

To define a chart

1	Right-click a chart, and click Define chart.

2	In the Data type area, enable one of the following options

  Tabular
  
  1-D summary
  
  2-D summary
  
3	Click the Data model icon located in the top-left corner of the Define chart dialog box.

4	From the list box at the top of the Data model dialog box, select the alias containing the table(s) on which you want to base the chart.

5	In the list, double-click the table(s) on which you want to base the chart.

If you are adding more than one table, ensure that you link the desired fields.

6	Open the drop-down list(s) to expand the table(s) and view all available fields.

7	Click a field on which to base the X-axis.

8	Enable the Y-value option, and click a field on which to base the Y-axis.

Notes

  For more information on data types, see "Chart basics."
  
  If you choose the 2-D summary data type, you will also need to chose a field on which to group data.
  
To define a series

  With a form or report open in the design window, right-click a data point in a chart and click the appropriate menu selection.
  
Notes

  When the data type of the chart is tabular or one-dimensional (1-D) summary, you can add more series to the original undefined series by choosing additional fields for Define Y-Value.
  
  When the data type of the chart is 2-D summary, you can choose only one field for the single series allowed for this data type.
  
To specify an additional group field in a 2-D summary chart

1	With a form or report open in the design window, right-click the upper-left hand corner of the chart and click Define chart.

2	In the Data type area, enable the 2-D summary option.

3	In the Field used in area, enable the Grouped by option.

4	From a table's list box, choose the field by which you want to group the summary data. 

You cannot choose the same field for x-axis values, y-value data, and an additional grouping. If you have already chosen fields from this table to supply the x-axis value and the y-axis data, those fields are grayed.

To control the number of groups (series) that a 2-D summary chart displays

1	With a form or report open in the design window, right-click a 2-D summary chart and click Max groups.

2	Choose a number from the list.

Tip

  You can also specify the number of groups that a 2-D summary chart displays by clicking the ellipsis (...) at the top of the list.
  
Changing chart types

After you have created a chart, you change the chart's type or the chart's data type. Changing a chart's type affects the visual display of a chart, while changing a chart's data type affects how data is summarized before the chart is generated.

To change a chart's type

1	With a form or report open in the Design window, right-click the upper-left corner of a chart and click Chart type.

2	Choose a chart type from the list. 

Note

  For more information about the types of charts you can create, see "Chart types."
  
To change a chart's data type

1	With a form or report open in the design window, right-click the upper-left corner of the chart and click Data type.

2	In the Data type area of the Define Chart dialog box, enable one of the following options:

  Tabular
  
  One-dimensional (1-D) summary
  
  Two-dimensional (2-D) summary
  
Note

  For more information on data types, see "Chart basics."
  
Changing chart axes

You can change, or remove, any of the fields that display on each of the chart's axes. You can also specify the minimum and maximum number of values to include along the x-axis, and you can change the order in which fields display along the y-axis. 

To change a chart's x-axis

1	With a form or report open in the design window, right-click the chart's x-axis and click Define x-value.

2	Choose a field from any table's list box.

To change a chart's y-axis

1	With a form or report in the design window, right-click the chart's y-axis, and click Define y-value.

2	From the list box choose a field for the y-axis.

Note

  With a tabular chart, you can only choose numeric fields for the y-value. Fields that are not numeric are dimmed. With a 1-D summary chart, you can choose any available and valid field(s) to define the y-axis
  
To remove fields from a chart

1	With a form or report open in the Design window, select the chart.

2	Right-click the upper-left corner of the chart and click Define chart.

3	In the Define chart dialog box, choose the field you want to remove in either of the X-axis, Y-value, or Grouped by  boxes.

4	Click Remove field.

To choose the minimum and maximum number of values to include in the x-axis

1	Right-click the upper-left corner of a chart, and click one of the following:

  Min x-values
  
  Max x-values
  
2	Choose a number from the menu. 

Tip

  You can  also click the ellipsis (...) at the top of the menu to specify your own values.
  
To change the order of y-value fields on a chart

1	With a form or report open in the design window, right-click the upper-left corner of a chart, and click Define chart.

2	Click the Change order arrows at the bottom of the Field used in area to change the order.

Note

  The Change order arrows become active when you define a tabular or 1-D summary chart, when you select a y-value, and when you have more than one field in Y-value box.
  
Modifying chart titles

You can change the title that displays for a chart, and you can change the font, style, and color used for a title.

To change a chart title

1	With a form or report open in the design window, right-click the title area of a chart.

2	Click Title  Text.

3	In the Enter title box, enter a new title.

Tip

  You can change the title of a chart axis by right-clicking the axis.
  
To change the appearance of a chart title

1	With a form or report open in the Design window, right-click the title area of a chart.

2	 Click Title and then one of the following:

  Font Typeface- to specify a new font for a title
  
  Font Style- to bold, italicize, or underline a title
  
  Font Color- to change a title's color
  
  Font Script- to change a title's script
  
Changing the appearance of charts

You can change the appearance of charts in a number of ways. You can choose to format the tick marks which appear along the x and y axes. You can also choose to show or hide most chart elements, and you can rotate and elevate certain chart types.

To format x or y-axis ticks

1	With a form or report open in the Design window, right-click the area around the axis whose tick marks you want to change.

2	Click Ticks and then one of the following:

  Number Format- to specify formatting for numbers displayed along the axis.
  
  Fonts Typeface- to specify a new font for the tick marks
  
  Font Style- to make tick marks bold, italicized, or underlined
  
  Font Color- to change the color of the tick marks
  
  Font Script- to change the script for tick marks
  
To show or hide chart elements

  Right-click a chart, click Options and click one of the following
  
  Show title
  
  Show legend
  
  Show grid
  
  Show axes
  
  Show labels
  
A check mark beside the menu command indicates that the chart element is displayed.

To rotate a chart

  Right-click a chart, click Options  Rotation, and click an amount in degress.
  
Note

  The option to rotate a chart is available for all 3-D charts except 3-D Pie and 3-D Columns.
  
To elevate a chart

  Right-click a chart, click Options  Elevation, and click an amount in degress.
  
Note

  The option to elevate a chart is available for all 3-D charts except 3-D Pie and 3-D Columns.
  
Changing the color of charts

You can change a chart's color and transparency, as well as a chart's background color and pattern. You can also create custom colors to be used in charts.

To change a chart's color and transparency

1	With a form or report in the design window, right-click the upper-left corner of the chart, and click Properties.

2	Click the General tab.

3	Click a color on the color palette.

You can also	

Make the chart transparent	Enable the Transparent check box

Change the color of an area of a chart.	Right click the area, click Color, and click a color on the palette.

To change a chart's background color

1	With a form or report in the design window, select a chart.

2	Right-click the background area, click Color, and click a color on the palette.

To change a chart's background pattern

1	Open a form or report in the Design window, select the chart.

2	Right-click the background area, click Palette, and choose a style from the palette.

To create custom colors for a chart

1	With a form or report open in the design window, right-click the upper-left corner of the chart, and click Properties.

2	Click the General tab.

3	Click a blank space on the color palette.

4	Click Add custom color.

5	In the Custom color dialog box, enable one of the following options

  RGB
  
  HSV
  
  CMY
  
6	Drag the sliders to mix a color.

Notes

  The custom color appears on the color palette and is available for use whenever you change a color.
  
  Paradox saves custom colors in the Registry, not with the particular document you are working on when you create the color. Therefore, you can create a custom color in one design document and use the color in any other design document.
  
Reference: Using charts

This section contains reference information pertaining to Charts.

Chart basics

Use a chart to analyze the following types of data:

Tabular (no categories)

Paradox's default (and most simple) chart type is tabular. Because a tabular chart displays data without summarizing it, there is no crosstab equivalent. For a tabular chart, you can specify either one field for x-axis values or multiple fields for the y-axis. Each represents a series of values plotted as a group on the chart.

A tabular chart measures the values in one numeric field within each category represented by the values in another field. These values are unique only if the x-value field is a key field. To make x-values unique when the field is not a key field, choose a one-dimensional summary chart.

The following example shows a tabular chart created on the sample Orders table. When both the chart and a table frame are in a form, you can move through the table's records and the chart updates to reflect the current record. For example, if you move past Customer No 1510 in the table frame, the chart updates to show the next set of records.

One-dimensional (1-D) summary (one category)

A 1-D summary chart has one category. A 1-D summary chart differs from a tabular chart in that Paradox lets you choose a summary operation to define the y-axis values. It also guarantees that x-values are unique.

Two-dimensional (2-D) summary (two categories)

A 2-D summary chart categorizes, or groups the summary data being charted by the unique values of two fields. The data is grouped by the x axis values.

Multi-table charts

If you want to analyze (cross-tabulate) data contained in two or more tables, the tables must be linked.

A chart can draw information from any number of tables that are linked in a single-value (oneone or manyone) relationship. For example, if you want to view the number of items in stock by equipment class and the vendor that supplies them, you can link the Stock and Vendors tables. You can then define the x-axis, y-axis, and summary data using any field from either table.

To create the table relationship, use the Data model dialog box to create a data model that links the tables. For more information on linking tables in data models, see Linking tables in data models. When you place a chart in a form or report, the chart uses the data model of that form or report.

 You can combine fields from linked tables in the same chart only if the link is a single-value (one-to-one) relationship. You cannot chart information from combined fields of tables linked in multi-value (onemany) relationships. You can chart information from the detail table only in a onemany relationship.

The chart is grouped by values in the Equipment Class field of the Stock table. The x-axis is defined as the Vendor Name field of the Vendors table. The y-axis is defined as a count of the Stock No field from the Stock table. The legend shows the colors and patterns that represent each equipment class value in the chart.

Charts of detail tables

Suppose you have a linked multi-value (onemany) relationship and you want to see a summary chart of only those records in the detail table that apply to a record of the master table. For example, you might want to define a chart of the Orders detail table that sums the Total Invoice field by month for each customer, as shown in the following figure:

In the relationship between the Customer and Orders tables, each customer can have many orders. You can link the two tables and create a chart on the detail table, Orders. You can then place the Customer No or Name field (or both) from the master table, Customer, on the page.

Paradox knows from the data model that the information in the chart applies only to the current record of the master table. In this example, the Name field at the top comes from the Customer table. As you scroll through Customer, the chart is updated to show each customer's order information.

Chart types

  Area charts and stacked bar charts:  Show the actual value that each series contributes to the total (for example, how total sales are divided between regions). Area graphs use lines to track values and display patterns that are created over time.
  
  Bar charts:  Compare the values of different items in specific categories or at discrete points in time (for example, to contrast quarterly commissions for each sales representative, by quarter or by representative). A rotated bar chart is a bar chart that has been rotated on its side.
  
  Column and pie charts:  Compare individual values to other values and to the whole (for example, how yearly expenses break down into categories).
  
  Line charts:  Show the progression of values over time (for example, for tracking sales).
  
  Surface charts:  Plot rows and columns as intersecting lines on a surface that is suspended in a 3-Dimensional frame.
  
  Ribbon charts and step charts:  Show a dramatic contrast in the data. Ribbon and step charts are best suited for charts that plot a limited series (for example, no more than five or six items). 
  



