ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV, WEBDEV and WINDEV Mobile 2025 feature!
This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Chart functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Initialize a category image with an image (thumbnail) in Sector, Doughnut or Hemicycle type charts.
Linux Caution: Using this function under Linux requires a specific configuration.. For more details, see The charts.
Example
grDeleteAll(GRF_Consumption)
grAddData(GRF_Consumption, 1, 1, 35)
grCategoryLabel(GRF_Consumption, 1, "Heating")
grCategoryDisc(GRF_Consumption, 1, IMG_Heating)
grCategoryColor(GRF_Consumption, 1, HTMLVersRGB("#FF5722"))

grAddData(GRF_Consumption, 1, 2, 20)
grCategoryLabel(GRF_Consumption, 2, "Water")
grVignetteCategory(GRF_Consumption, 2, IMG_Water)
grCategoryColor(GRF_Consumption, 2, HTMLVersRGB("#2196F3"))

grAddData(GRF_Consumption, 1, 3, 12)
grCategoryLabel(GRF_Consumption, 3, "Car recharge")
grCategoryDisc(GRF_Consumption, 3, IMG_Car)
grCategoryColor(GRF_Consumption, 3, HTMLVersRGB("#8BC34A"))

grAddData(GRF_Consumption, 1, 4, 18)
grCategoryLabel(GRF_Consommation, 4, "Appliances")
grCategoryDisc(GRF_Consumption, 4, IMG_Home Appliances)
grCategoryColor(GRF_Consumption, 4, HTMLVersRGB("#9C27B0"))

grDraw(GRF_Consumption)
Syntax
grVignetteCategory(<Chart name> , <Index> , <Image>)
<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.
Android Only Chart controls are available.
<Index>: entier
Data index in the series.
<Image>: Character string or Image variable
Category image. This image can correspond to:
  • a memo section,
  • the path of an image file (or just its name if the image is present in the executable directory),
  • an image field name containing an image.
  • a variable of type Image.
Remarks
  • The image is reduced to be displayed in the. If the image size is too small, or if the portion in which the image is to be displayed is too small, the image is not displayed.
  • It is possible to display both the image and the category label.
  • The grAutoRefreshCategoryLabel function has no impact on the display of category thumbnails.
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.
Business / UI classification: Business Logic
Component: wd300grf.dll
Minimum version required
  • Version 2025
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 10/19/2024

Send a report | Local help