In french: grSourceSérie
// Chart control filled from a Table control column
IF grSourceSeries(CHART_MyChart1, 3, grTableColumn, "Table1.Column1") = True THEN
Info("The source of series 3 is MyColumn from now on")
// Chart control based on an item of a SQL query
MyQuery is Data Source
MySQLCode is string = QRY_Query1..SQLCode
HExecuteQuery(MyQuery, hQueryDefault, MySQLCode)
grSourceSeries(CHART_Chart1, 1, grItem, "MyQuery", "TotalBT")
<Result> = grSourceSeries(<Chart name> , <Series number> , <Source> [, <Details 1> [... [, <Details N>]]])
- True if the source was defined,
- False otherwise. For more details about the error, use the ErrorInfo function.
<Chart name>: Character string (with or without quotes)
Name of chart to use. This name corresponds to:
- the chart name defined by programming with grCreate.
- the name of Chart control found in the window editor, page editor or report editor.
Only the Chart controls are available.
<Series number>: Integer
Number of the affected series.
<Source>: Integer constant
Data source of the chart:
|grTableColumn||Series filled from a column of a Table control. |
In this case, <Details 1> corresponds to the name of a column found in a Table control. This name must correspond to the full name of the column, enclosed in quotes (for example: "<TableName>.<ColumnName>").
The column is browsed to fill the series. If one of the values is not a numeric value, a "hole" is created in the series.
|grCallback||Series filled by a WLanguage function/procedure. |
In this case, <Details 1> corresponds to the name of the WLanguage procedure to call.
The procedure is called for each number. This procedure has the following format:
PROCEDURE MyProcedure(<Chart name>, <Series number>,
<Index in series>)
The procedure returns the requested number. To specify the end of the series, the procedure must return False.
This constant is not available.
|grListBox||Series filled from a List Box control.|
In this case, <Details 1> corresponds to the name of a List Box control. The List Box control is browsed to fill the series. If one of the values is not a numeric value, a "hole" is created in the series.
|grProgramming||Series described by programming. |
<Details 1> can correspond to a series of numbers in the same character string, separated by ";".
|grItem||Series filled from an item.|
<Details 1> corresponds to the name of the data file (or query), <Details 2> corresponds to the name of the item. The series will browse through the data file and will take all the values of the item.
If one of the values is not a numeric value, a "hole" is created in the series.
|grTable||Series filled from a WLanguage array.|
<Details 1> corresponds to the name of the array. <Details 2> can correspond to the subscript of the column (two-dimensional array) or to the name of a member (array of structures).
<Details 1>: Expected type (optional parameter)
First expected parameter, according to the type of the data source.
<Details N>: Expected type (optional parameter)
Last expected parameter, according to the type of the data source.
- Source is used to find out the type of data source of a chart series (column of a Table control, List Box control, etc.).
- The Property SourceDescription is used to find out the name of the element that corresponds to the HEX@ of data in a series of a graph.
This page is also available for…