ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Chart functions
  • Adding data into a Scatter chart
  • Adding data into a chart
  • Equivalence
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Adds a data into a "Scatter" chart.
Reminder: By default, a chart contains no data.
Linux Caution: A specific configuration is required to use this function in Linux. For more details, see The charts.
Example
// Ajoute une donnée dans le graphe "MonGraphe" de type "Nuage de points".
// Cette valeur (10, 20) est ajoutée à la fin de la première série.
grScatterAddDataXY("MonGraphe", 1, 10, 20)
// Ajoute une donnée dans le champ GRF_MonGraphe de type "Nuage de points".
// Cette valeur (20, 10) est ajoutée à la fin de la première série.
grScatterAddDataXY(GRF_MonGraphe, 1, 20, 10)
Syntax
grScatterAddDataXY(<Chart name> , <Series number> [, <Subscript>] , <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 Chart control found in the window editor, page editor or report editor.
<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.
<Subscript>: Optional integer
Subscript 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.
Remarks

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

grAddData 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.

Equivalence

We recommend that you use grScatterAddDataXY to add data into the "Scatter" charts. However, it is also possible to use the grAddData function.
The following syntax:
grScatterAddDataXY(GRF_MonGraphe, i, 1, 10, 20)
est is equivalent to the syntax:
grAddData(GRF_MonGraphe, i*2-1, 1, 10)
grAddData(GRF_MonGraphe, i*2, 1, 20)
Related Examples:
WD Chart Training (WINDEV): WD Chart
[ + ] This example presents the different uses of the Chart control.
Different types of charts are presented:
- Pie
- Sunburst
- Line
- Scatter
- Column
- Area
- etc.

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.
Component: wd270grf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help