ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

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 the category color for a chart whose type is:
  • Pie,
  • Column,
  • Bubble chart,
  • Waterfall.
By default, the colors of categories (or the colors of sections, bubbles, ...) are selected according to a preset order among a set of 11 colors.
Linux Caution: In Linux, this function requires a specific configuration. For more details, see The charts.
Example
// Modifie la couleur de la catégorie 3 dans le champ "GRF_Graphe1"
GRF_Graphe1.CouleurCatégorie(3, LightRed)
Syntax
<Chart control>.CategoryColor(<Category number> , <Color>)
<Chart control>: Control name
Name of the Chart control to use (in the window, page or report editor).
<Category number>: Integer
Number of the category to modify.
For a Pie chart (constant grSector), this parameter corresponds to the index of the data in the series (the sector number). In this case, this function is equivalent to <Chart>.SeriesColor.
For a column chart type (constant grHistogramme), this parameter corresponds to the category index: all bars in the category will be colored. The colors specified for the category series will be ignored.
For a Bubble chart (constant grGrapheBulle), this parameter corresponds to the category index: the bubble corresponding to the category will be colored.
<Color>: Integer or Integer constant
Color of specified category. This color can correspond to:
Remarks
  • The colors defined by <Chart>.CategoryColor will be taken into account during the next call to <Chart>.Draw.
  • To display the color gradients, use <Chart>.Gradient.
  • The colors specified by <Chart>.CategoryColor are taken into account in the Waterfall charts. You also have the ability to define the colors of categories in the Waterfall charts with <Chart>.WaterfallColor.
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 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/26/2024

Send a report | Local help