ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Chart functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
grSourceCategoryLabel (Function)
In french: grSourceEtiquetteCatégorie
Defines the source of the category labels.
Linux Caution: A specific configuration is required to use this function in Linux. For more details, see The charts.
IF grSourceCategoryLabel("MyChart", grTableColumn, "MyTable.MyColumn") = True THEN
Info("The source of the category labels is MyColumn")
END
Syntax
<Result> = grSourceCategoryLabel(<Chart name> , <Source> [, <Details 1> [... [, <Details N>]]])
<Result>: Boolean
  • True if the source was defined,
  • False otherwise. To get more details on the error, use ErrorInfo.
<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.
Android Only Chart controls are available.
<Source>: Integer constant
Data source of the chart:
grCallbackCategory labels filled by a WLanguage function/procedure.
In this case, <Details 1> corresponds to the name of the WLanguage procedure to call.

The procedure is called for each number. This procedure has the following format:
PROCEDURE MyProcedure(<Chart name>,
<Series number>, <Index in series>)

The procedure returns the desired number. To specify the end of the series, the procedure must return False.
Universal Windows 10 App This constant is not available.
grItemCategory labels filled from an item.

<Details 1> corresponds to the name of the data file (or query), <Details 2> corresponds to the name of the item. The series will browse through the data file and will take all the values of the item.

If one of the values is not a numeric value, a "hole" is created in the series.
grListBoxCategory labels filled from a List Box control.

In this case, <Details 1> corresponds to the name of a List Box control. The List Box control is browsed to fill the series. If one of the values is not a numeric value, a "hole" is created in the series.
grProgrammingCategory labels populated programmatically.

<Details 1> can correspond to a series of numbers in the same character string, separated by ";".
grTableCategory labels filled from a WLanguage array.

<Details 1> corresponds to the name of the array. <Details 2> can be the index of the column (two-dimensional array) or the name of a member (array of structures).
grTableColumnCategory labels filled from a column of a Table control.

In this case, <Details 1> corresponds to the name of a column found in a Table control. This name must correspond to the full name of the column, enclosed in quotes (for example: "<TableName>.<ColumnName>").
The column is browsed to fill the series. If one of the values is not a numeric value, a "hole" is created in the series.
<Details 1>: Expected type (optional parameter)
First expected parameter, according to the type of the data source.
<Details N>: Expected type (optional parameter)
Last expected parameter, according to the type of the data source.
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 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help