version 6.0 (Modified)
CT Chart selection (area; type; size; groupCategory; table; categoryField; series/valuesFields) Longint
Parameter | Type | Description | |
area | Longint | 4D Chart area | |
type | Integer | Type of graph (see codes below) | |
size | Integer | Option for initial size of graph | |
1 = Variable | |||
2 = Relative to window (Auto-Variable) | |||
3 = Relative to document (Auto-Document) | |||
groupCategory | Integer | Group the Category data? | |
0 = No | |||
1 = Yes | |||
table | Integer | Number of the table to graph | |
categoryField | Integer | Number of the field to plot on the Category axis | |
series/valuesFields | Integer array | Array of field numbers | |
Function result | Longint | Object ID of the chart |
Description
The CT Chart selection command creates a graph of the current selection of records of table. The function returns the chart's Object ID.
The following table lists the codes for the type parameter.
Code | Chart Type |
1 | Area |
2 | Column |
3 | Picture |
4 | Line |
5 | Scatter |
6 | Pie |
7 | Polar |
8 | 2D XY |
100 | 3D Column |
101 | 3D Line |
102 | 3D Area |
103 | 3D Surface |
104 | 3D Triangle |
105 | 3D Spike |
The size parameter determines how much space the graph fills when it is generated and how the graph size changes when you resize the window:
If you pass 1 (size Variable), the graph will fill the 4D chart area or the window. It will keep this size until you modify it using the handles.
If you pass 2 (size Relative to the window), the graph will fill the 4D chart area or the external window. If you later change the size of the window, the graph will adapt automatically. However, once you modify the size of the graph using the handles, this change will not take place anymore.
If you pass 3 (size Relative to the document), the graph will adapt to the dimensions of the page that you selected in the Page Setup dialog. It will keep this size until you modify the graph size using the handles.
GroupCategory specifies whether the data on the Category axis should be grouped.
If groupCategory = 1, then each category will be unique, and values for any duplicate categories will be summed.
If groupCategory = 0, then the values for every category will be graphed separately.
Note: There is no need to group series, because the series are field names and are therefore unique.
table is the number of the table from which to graph data. You can retrieve the number of a table by passing a pointer to the table as a parameter to the Table function.
categoryField is the number of the field to graph on the Category axis. You can retrieve the number of a field by passing a pointer to the field as a parameter to the Field function.
series/valuesFields is an array of field numbers of the fields to graph as the series and values. The field names become the series; the values stored in the fields are graphed on the Values axis. In a two-dimensional graph, the series are displayed on the Category axis. In a three-dimensional graph, the series are displayed on the Series axis.
See Also
CT Chart arrays, CT Chart data.