GRAPH TABLE

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 6.0 (Modified)

Version 6 Note: Starting with version 6, graphs are now supported by the 4D Chart Plug-in, which is integrated within 4th Dimension. The Graph commands from the previous version of 4D are transparently redirected to 4D Chart. For detailed information about the 4D Chart commands, refer to the 4D Chart Reference manual.


GRAPH TABLE {(table)}

or:

GRAPH TABLE ({table; }graphType; x field; y field{; y field2; ...; y fieldN})

ParameterTypeDescription
tableTableTable to graph, or
Default table, if omitted
graphTypeNumberGraph type number
x fieldFieldLabels for the x-axis
y fieldFieldFields to graph (up to eight allowed)

Description

GRAPH TABLE has two forms. The first form displays the Chart Wizard and allows the user to select the fields to be graphed. The second form specifies the fields to be graphed and does not display the Chart Wizard.

GRAPH TABLE graphs data from a table's fields. Only data from the current selection of the current process is graphed.

Using the first form is equivalent to choosing Charts from the Tools menu in the User environment. The following figure shows the Chart Wizard, which allows the user to define the graph.

The second form of the command graphs the fields specified for table.

The graphType parameter defines the type of graph that will be drawn. It must be a number from 1 to 8. See the graph types listed in the example for the command Graph.

The x field defines the labels that will be used to label the x-axis (the bottom of the graph). The field type can be Alpha, Integer, Long integer, Real or Date.

The y field is the data to graph. The field type must be Integer, Long integer or Real. Up to eight y fields can be graphed, each set off by a semicolon.

In either form, GRAPH TABLE opens a Chart window for working with the newly created graph. For more information about using the Chart window, see the 4th Dimension User Reference manual.

Note: You can also use the Quick Report editor to generate graphs from field data, by using the Print Destination menu.

Examples

1. The following example illustrates the use of the first form of GRAPH TABLE. It presents the Chart Wizard window and allows users to select the fields to graph. The code queries records in the [People] table, sorts them, and then displays the Chart Wizard:

   QUERY ([People])
   If (OK=1)
      ORDER BY ([People])
      If (OK=1) 
         GRAPH TABLE([People])
      End if
   End if

2. The following example illustrates the use of the second form of GRAPH TABLE. It first queries and orders records from the [People] table. It then graphs the salaries of the people:

   QUERY([People];[People]Title="Manager") 
   ORDER BY([People];[People]Salary;>)
   GRAPH TABLE([People];1;[People]Last Name;[People]Salary)

See Also

CT Chart selection, GRAPH.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next