PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

This content has been translated automatically. Click here to view the French version.
  • Adding data
  • Adding data into the different types of charts
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 chart.
Caution: A specific WLanguage function must be used for "advanced" charts (see "Remarks").
Versions 15 and later
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
WEBDEV - Server codeLinux Caution: A specific configuration is required to use this function in Linux. For more details, see The charts.
New in version 15
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
WEBDEV - Server codeLinux Caution: A specific configuration is required to use this function in Linux. For more details, see The charts.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
WEBDEV - Server codeLinux Caution: A specific configuration is required to use this function in Linux. For more details, see The charts.
Versions 16 and later
WINDEVLinux This function is now available for WINDEV applications in Linux.
New in version 16
WINDEVLinux This function is now available for WINDEV applications in Linux.
WINDEVLinux This function is now available for WINDEV applications in Linux.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 19 and later
Android This function is now available for Android applications.
New in version 19
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 23 and later
PHP This function is now available for PHP sites.
New in version 23
PHP This function is now available for PHP sites.
PHP This function is now available for PHP sites.
Example
// Ajout d'une donnée dans le champ "GRF_MonGraphe".
// Cette donnée de valeur 10, est ajoutée à la fin de la première série.
grAddData(GRF_MonGraphe, 1, 10)
Syntax
grAddData(<Chart name> , <Series number> [, <Subscript>] , <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. This name must be in quotation marks.
  • the name of the Chart control (in the window, page or report editor). This name must not be in quotation marks.
Android Only Chart controls are available.
PHP Only the interactive Chart controls are available.
<Series number>: Integer
Number of the series into which a value will be added.
For example, if the Chart control displays 2 lines, this is used to identify the line for which the data must be added.
If the specified number does not exist, the series between the last existing series and the specified number are automatically created and initialized to 0.
<Subscript>: Optional integer
Subscript of the data in the series into which a value must be added.
For example, for a Line chart, this parameter corresponds to the X-axis of the value to add.
If this parameter:
  • is not specified, the value is added at the end of the series.
  • is specified, the former value is replaced.
Android The subscript of the data in the series must be strictly positive.
<Value>: Integer or real
Value to add.
For example, for a Line chart, this parameter corresponds to the Y-axis of the value to add.
Remarks

Adding data

  • The data added by grAddData will be taken into account during the next call to grDraw.
  • For a pie chart (grPie constant), only the data found in the first series is used. A Pie chart cannot be drawn if the data found in the first series is null.
  • For the "Stacked bar" charts, if the value of the first series is negative, the corresponding bar is oriented toward the bottom.

Adding data into the different types of charts

  • For Scatter charts, it is recommended to use grScatterAddDataXY.
  • For stock charts, it is recommended to use grStockAddData.
  • Versions 21 and later
    For Heatmap charts, it is recommended to use grHMAddData.
    New in version 21
    For Heatmap charts, it is recommended to use grHMAddData.
    For Heatmap charts, it is recommended to use grHMAddData.
  • Versions 20 and later
    For Sunburst charts, it is recommended to use grSunburstAddData.
    New in version 20
    For Sunburst charts, it is recommended to use grSunburstAddData.
    For Sunburst charts, it is recommended to use grSunburstAddData.
  • Versions 18 and later
    For Surface charts, it is recommended to use grSurfaceAddData.
    New in version 18
    For Surface charts, it is recommended to use grSurfaceAddData.
    For Surface charts, it is recommended to use grSurfaceAddData.
  • Versions 27 and later
    For circular progress graphs, it is advisable to use the grRBAddData function.
    New in version 27
    For circular progress graphs, it is advisable to use the grRBAddData function.
    For circular progress graphs, it is advisable to use the grRBAddData function.
  • To add a value to the data in a chart, use grIncreaseData.
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.
The Chart functions Unit examples (WEBDEV): The Chart functions
[ + ] This example presents the main features of the chart designer of WEBDEV and it allows you to:
- Create a chart: Pie, Column or Line
- Define the display area of a chart
- Define the options of the chart (legend, percentage, ...)
The Chart control Unit examples (WINDEV Mobile): The Chart control
[ + ] Using the Chart control to display different types of charts:
- Pie (or pie chart)
- Line
- Column chart
- Area
The Chart functions Unit examples (WINDEV Mobile): The Chart functions
[ + ] Using the Chart functions:
- create a Pie, Column or Line chart by programming
- define the chart options (legend, percentage, ...)
Business / UI classification: Neutral code
Component: wd270grf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment