ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV, WEBDEV and WINDEV Mobile 2025 feature!
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
Initializes a category image in a Pie, Donut or Semi-circular chart.
Linux Caution: In Linux, this function requires a specific configuration. For more details, see The charts.
Example
CHART_Consumption.DeleteAll()
CHART_Consumption.AddData(1, 1, 35)
CHART_Consumption.CategoryLabel(1, "Heating")
CHART_Consumption.CategoryThumbnail(1, IMG_Heating)
CHART_Consumption.CategoryColor(1, HTMLToRGB("#FF5722"))

CHART_Consumption.AddData(1, 2, 20)
CHART_Consumption.CategoryLabel(2, "Water")
CHART_Consumption.CategoryThumbnail(2, IMG_Water)
CHART_Consumption.CategoryColor(2, HTMLToRGB("#2196F3"))

CHART_Consumption.AddData(1, 3, 12)
CHART_Consumption.CategoryLabel(3, "EV charging")
CHART_Consumption.CategoryThumbnail(3, IMG_Car)
CHART_Consumption.CategoryColor(3, HTMLToRGB("#8BC34A"))

CHART_Consumption.AddData(1, 4, 18)
CHART_Consumption.CategoryLabel(4, "Household appliances")
CHART_Consumption.CategoryThumbnail(4, IMG_Household_appliances)
CHART_Consumption.CategoryColor(4, HTMLToRGB("#9C27B0"))

CHART_Consumption.Draw()
Syntax
<Chart control>.CategoryThumbnail(<Index> , <Image>)
<Chart control>: Control name
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>: Integer
Data index in the series.
<Image>: Character string or Image variable
Category image. This image can correspond to:
  • a memo item,
  • the path of an image file (or just the file name if the image is located in the same directory as the executable),
  • the name of an Image control containing image.
  • a variable of type Image.
Remarks
  • The image is reduced to be displayed in the corresponding segment. If the image or the segment is too small, the image will not be displayed.
  • By default, the thumbnail does not shrink or grow when the chart is resized. To allow the thumbnail to be resized, use <Chart>.Parameter with the grThumbnailResizeEnabled constant.
  • The category image and label can be displayed simultaneously.
  • <Chart>.AutoRefreshCategoryLabel has no impact on category thumbnails.
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: 02/13/2025

Send a report | Local help