ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

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
Indicates the type of category in a Waterfall chart.
Example
// CA 2017
grAddData(GRF_Waterfall, 1, 1, 298000)
grCategoryLabel(GRF_Waterfall, 1, "CA 2017")

// Ajout des bénéfices
grAddData(GRF_Waterfall, 1, 2, 420000)
grCategoryLabel(GRF_Waterfall, 2, "Bénéfices" + CR + "produits")
grAddData(GRF_Waterfall, 1, 3, 210000)
grCategoryLabel(GRF_Waterfall, 3, "Bénéfices" + CR + "services")

// Coûts
grAddData(GRF_Waterfall, 1, 4, -170000)
grCategoryLabel(GRF_Waterfall, 4, "Coûts fixes")
grAddData(GRF_Waterfall, 1, 5, -140000)
grCategoryLabel(GRF_Waterfall, 5, "Coûts variables")

// CA 2018
grAddData(GRF_Waterfall, 1, 6, 0)
grCategoryLabel(GRF_Waterfall, 6, "CA 2018")
grWaterfallCategoryType(GRF_Waterfall, 6, grSubTotal)

// CA Cumulé
grAddData(GRF_Waterfall, 1, 7, 0)
grCategoryLabel(GRF_Waterfall, 7, "CA cumulé")
grWaterfallCategoryType(GRF_Waterfall, 7, grTotal)
Syntax
grWaterfallCategoryType(<Chart name> , <Category> , <Type of category>)
<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 found in the window editor, report editor or page editor.
<Category>: Integer
Number of the category to use.
<Type of category>: Integer constant
Type of category:
grDefaultPositive or negative values of the chart.
grSubTotalSub-total values.
If the category corresponds to a sub-total, the value stored for this category is ignored. For this category, the Waterfall chart displays a bar corresponding to the sum of all previous categories from the last total or sub-total.
grTotalTotal values.
If the category corresponds to a total, the value stored for this category is ignored. For this category, the Waterfall chart displays a bar corresponding to the sum of all previous categories from the beginning of the chart.
Remarks
  • Special case: the first category
    The first category is always a "total" category, but the specified value is displayed: this is the starting value.
  • This function applies to the Waterfall charts only.
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: wd300grf.dll
Minimum version required
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help