PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Adds a data into a chart.
Caution: A specific WLanguage function must be used for the "advanced" charts (see "Notes").
Versions 15 and later
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WEBDEV - Server codeLinux Caution: A specific configuration is required to use this function in Linux. See The charts for more details.
New in version 15
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WEBDEV - Server codeLinux Caution: A specific configuration is required to use this function in Linux. See The charts for more details.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WEBDEV - Server codeLinux Caution: A specific configuration is required to use this function in Linux. See The charts for more details.
Versions 16 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 16
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 19 and later
Android This function is now available for the Android applications.
New in version 19
Android This function is now available for the Android applications.
Android This function is now available for the 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 the PHP sites.
New in version 23
PHP This function is now available for the PHP sites.
PHP This function is now available for the PHP sites.
Example
// Add a data into the "CHART_MyChart" control.
// This data (whose value is 10) is added at the end of the first series.
grAddData(CHART_MyChart, 1, 10)
Syntax
grAddData(<Chart Name> , <Series Number> [, <Subscript>] , <Value>)
<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).
Android Only the 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. 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 in the series into which a value must be added. 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.
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 the Scatter charts, we recommend that you use grScatterAddDataXY.
  • For the stock charts, we recommend that you use grStockAddData.
  • Versions 21 and later
    For the Heatmap charts, we recommend that you use grHMAddData.
    New in version 21
    For the Heatmap charts, we recommend that you use grHMAddData.
    For the Heatmap charts, we recommend that you use grHMAddData.
  • Versions 20 and later
    For the Sunburst charts, we recommend that you use grSunburstAddData.
    New in version 20
    For the Sunburst charts, we recommend that you use grSunburstAddData.
    For the Sunburst charts, we recommend that you use grSunburstAddData.
  • Versions 18 and later
    For the Surface charts, we recommend that you use grSurfaceAddData.
    New in version 18
    For the Surface charts, we recommend that you use grSurfaceAddData.
    For the Surface charts, we recommend that you use grSurfaceAddData.
  • To add a value to a chart data, use grIncreaseData.
Related Examples:
WD Chart Training (WINDEV): WD Chart
[ + ] This educational example present different uses of the chart control.
The following charts are presented:
- Semi-circular
- Donut
- Pie
- Sunburst
- Line
- Scatter
- 3D Scatter
- Column
- Area
- Bubble
- Radar
- Funnel
- Surface
- Waterfall
- Composite

The main features presented in this example are the ability to customize the charts by programming as well as the method used to fill a chart from a HFSQL 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, ...)
Components
WINDEVWEBDEV - Server codeReports and Queries wd230grf.dll
Windows Mobile wp230grf.dll
Linux wd230grf.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment