- Adding data into a Scatter chart
- Adding data into a chart
In french: grNuageAjouteDonnéeXY
Adds a data into a "Scatter" chart.
Reminder: By default, a chart contains no data.
: A specific configuration is required to use this function in Linux. For more details, see The charts
// Adds a data into the "Scatter" chart named "MyChart".
// This value (10, 20) is added at the end of the first series.
grScatterAddDataXY("MyChart", 1, 10, 20)
// Adds a data into the CHART_MyChart control ("Scatter" chart).
// This value (20, 10) is added at the end of the first series.
grScatterAddDataXY(CHART_MyChart, 1, 20, 10)
grScatterAddDataXY(<Chart name> , <Series number> [, <Index>] , <X value> , <Y value>)
<Chart name>: Control name or character string
Name of the chart to be used. This name corresponds to:
- the chart name defined through programming with grCreate.
- the name of the Chart control in the window, page or report editor.
Only the interactive Chart controls are available.
<Series number>: Integer
Number of the series in which a point must be initialized. If the specified series does not exist, the chart designer creates as many series as necessary in order to get a consistent matrix. All the created series are initialized to 0.
<Index>: Optional integer
Index of the data to initialize in the series. If this parameter is not specified, the value is added at the end of the series.
<X value>: Real
Horizontal coordinate (X-coordinate) of the point to add.
<Y value>: Real
Vertical coordinate (Y-coordinate) of the point to add.
Adding data into a Scatter chart
The data defined by grScatterAddDataXY
will be taken into account during the next call to grDraw
Adding data into a chart
is used to add data into a chart (pie, column, ...)
Depending on the type of chart, specific functions can also be used to add data:
Reminder: To add a value to the data in a chart, use grIncreaseData
We recommend that you use grScatterAddDataXY
to add data into the "Scatter" charts. However, you can also use grAddData
The following syntax:
grScatterAddDataXY(CHART_MyChart, i, 1, 10, 20)
est is equivalent to the syntax:
grAddData(CHART_MyChart, i*2-1, 1, 10)
grAddData(CHART_MyChart, i*2, 1, 20)
Training (WINDEV): WD Chart
[ + ]
This example presents the different uses of the Chart control.
Different types of charts are presented:
The main features presented here are the possibility to customize of charts from the code, as well as to fill the chart from an HFSQL data file, or in the editor.
This page is also available for…