PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Surface chart
  • Adding data into a chart
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 Surface chart.
Versions 21 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 21
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
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 = 0 _TO_ wImage..Width STEP 4
FOR j = 0 _TO_ wImage..Height STEP 4
x = i
y = j
z = ColorLightness(dPixelColor(wImage, x, y))
grSurfaceAddData(CHART_Surface, x, y, z)
END
END

// Draw the chart in the Chart control
grDraw(CHART_Surface)
Syntax
grSurfaceAddData(<Chart Name> , <X> , <Y> , <Z>)
<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 the 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.
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

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:
  • For the stock charts, we recommend that you use grStockAddData.
  • For the Scatter charts, we recommend that you use grScatterAddDataXY.
  • 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.
Reminder: 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.
Components
WINDEVReports and Queries wd230grf.dll
Linux wd230grf.so
Minimum required version
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment