- Adding data
- Adding data into the different types of charts
In french: <Graphe>.AjouteDonnée
Adds a data into a chart.
Caution: A specific WLanguage function must be used for "advanced" charts (see "Remarks").
This function is now available for WEBDEV sites in Linux.
: A specific configuration is required to use this function in Linux. For more details, see The charts
This function is now available for WINDEV applications in Linux.
// 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.
<Chart control>.AddData(<Series number> [, <Subscript>] , <Value>)
<Chart control>: Control name
Name of the Chart control to use (present in the window, page or report editor).
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.
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.
- The data added by <Chart>.AddData will be taken into account during the next call to <Chart>.Draw.
- 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.
Training (WINDEV): WD Chart
Unit examples (WEBDEV): The Chart functions
Unit examples (WINDEV Mobile): The Chart control
Unit examples (WINDEV Mobile): The Chart functions
Business / UI classification: Neutral code
This page is also available for…