ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Chart functions
  • Consistency of values
  • Adding data
  • Adding data into the different types of charts
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Adds data into a stock chart (candlestick, barcharts or minmax).
Please note Depending on the type of graph to be manipulated, there is a specific WLanguage function for adding data (see paragraph "Remarks").
Linux Caution: In Linux, this function requires a specific configuration. For more details, see The charts.
Example
// Graphe créé par programmation
grCreate("MonGraphe", grCandleStick)
...
// Ajout de données dans le graphe "MonGraphe"
grStockAddData("MonGraphe", 1, 5.4, 6.8, 6.1, 6.3)
// Champ Graphe
// Ajout de données dans le graphe "GRF_MonGraphe"
grStockAddData(GRF_MonGraphe, 1, 5.4, 6.8, 6.1, 6.3)
Syntax
grStockAddData(<Chart name> , <Series number> [, <Index>] , <Minimum value> , <Maximum value> , <First value> , <Last value>)
<Chart name>: Control name or character string
Name of the chart to be used. This name corresponds to:
  • the name of the chart defined programmatically with grCreate.
  • the name of the Chart control in the window, page or report editor.
PHP Only 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.
Warning: Only the first series will be drawn.
<Index>: Optional integer
Index of data in the series into which the values will be added. If this parameter:
  • is not specified: values are added at the end of the series.
  • is specified: the old value is replaced.
<Minimum value>: Integer or real
Minimum value for the day.
<Maximum value>: Integer or real
Maximum value for the day.
<First value>: Integer or real
First value for the day.
<Last value>: Integer or real
Last value for the day.
Remarks

Consistency of values

If the values are not consistent, the data will not be displayed in the chart:
  • <First value>, <Last value> and <Minimum value> must be less than <Maximum value>.
  • <First value>, <Last value> and <Maximum value> must be greater than <Minimum value>.

Adding data

  • The data added by grStockAddData will be taken into account during the next call to grDraw.
  • Only the first series will be drawn.
  • By default, a stock chart created by grCreate contains no data.

Adding data into the different types of charts

Component: wd300grf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help