CT Chart selection

4D - Documentation   Français   English   German   4D Chart, Command Theme List   4D Chart, Command Alphabetical List   Back   Previous   Next

version 6.0 (Modified)


CT Chart selection (area; type; size; groupCategory; table; categoryField; series/valuesFields) Longint

ParameterTypeDescription
areaLongint4D Chart area
typeIntegerType of graph (see codes below)
sizeIntegerOption for initial size of graph
1 = Variable
2 = Relative to window (Auto-Variable)
3 = Relative to document (Auto-Document)
groupCategoryIntegerGroup the Category data?
0 = No
1 = Yes
tableIntegerNumber of the table to graph
categoryFieldIntegerNumber of the field to plot on the Category axis
series/valuesFieldsInteger arrayArray of field numbers
Function resultLongintObject 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.

CodeChart Type
1Area
2Column
3 Picture
4Line
5Scatter
6Pie
7Polar
82D XY
1003D Column
1013D Line
1023D Area
1033D Surface
1043D Triangle
1053D 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.


4D - Documentation   Français   English   German   4D Chart, Command Theme List   4D Chart, Command Alphabetical List   Back   Previous   Next