Help / WLanguage / WLanguage functions / Controls, pages and windows / Chart functions
  • Surface chart
  • Adding data into a chart
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Adds a data into a Surface chart.
x, y, z are real
wImage is Image
// Load the photo found in memory in an Image variable
wImage = "sunset.jpg"
// Scan the image and all the points
// to define the rate of lightness for the point
// via ColorLightness
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))
grSurfaceAddData(CHART_Surface, x, y, z)
// Draw the chart in the Chart control
grSurfaceAddData(<Chart name> , <X> , <Y> , <Z>)
<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.
  • the name of Chart control (found in the window editor or in the 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.

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

grAddData 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 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.
Component: wd290grf.dll
Minimum version required
  • Version 18
This page is also available for…
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help