ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Chart functions
  • Surface chart
  • Adding data into a chart
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Adds a data into a Surface chart.
Example
x, y, z are reals
wImage is Image

// Chargement de la photo en mémoire dans une variable de type Image
wImage = "couchersoleil.jpg"


// Balayage de l'image et de tous les points
// pour déterminer le taux de luminosité du point
// à l'aide de la fonction CouleurLuminosité
FOR i = 1 _TO_ wImage.Width STEP 4
	FOR j = 1 _TO_ wImage.Height STEP 4
		x = i
		y = j
		z = ColorLightness(dPixelColor(wImage, x, y))
		GRF_Surface.SurfaceAjouteDonnée(x, y, z)
	END
END

// On dessine le graphe dans le champ Graphe
GRF_Surface.Dessine()
Syntax
<Chart control>.SurfaceAddData(<X> , <Y> , <Z>)
<Chart control>: Control name
Name of Chart control (present in window or report editor).
<X>: Real
X-coordinate of the point to add.
<Y>: Real
Y-coordinate of the point to add.
<Z>: Real
Z coordinate of the point to add.
Remarks

Surface chart

For the data in a Surface chart, the XY plane constitutes the base of the surface while Z indicates the height of the point.

Adding data into a chart

<Chart>.AddData 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 a data item on a graph, use the <Chart>.IncreaseData function.
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: wd300grf.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/20/2024

Send a report | Local help