PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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: A specific configuration is required to use this function in Linux. See The charts for more details.
Versions 23 and later
PHP This function is now available for PHP sites.
New in version 23
PHP This function is now available for PHP sites.
PHP This function is now available for PHP sites.
Example
// Modifies the color of category 3 in the "CHART_Chart1" control
CHART_Chart1.CategoryColor(3, LightRed)
Syntax
<Chart control>.CategoryColor(<Category number> , <Color>)
<Chart control>: Control name
Name of the Chart control to use (found in the window editor, page editor or report editor).
PHP Only the interactive Chart controls are available.
<Category number>: Integer
Number of the category to modify.
For a Pie chart (grPie constant), this parameter corresponds to the subscript of data in the series (the section number). In this case, this function is equivalent to <Chart>.SeriesColor.
For a Column chart (grColumn constant), this parameter corresponds to the category subscript: all the bars of the category will be colored. The colors specified for the category series will be ignored.
For a Bubble chart (grBubbleChart constant), this parameter corresponds to the category subscript: the bubble corresponding to the category will be colored.
<Color>: Integer or Integer constant
Color of specified category. This color corresponds 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 educational example present different uses of the chart control.
The following charts are presented:
- Semi-circular
- Donut
- Pie
- Sunburst
- Line
- Scatter
- 3D Scatter
- Column
- Area
- Bubble
- Radar
- Funnel
- Surface
- Waterfall
- Composite

The main features presented in this example are the ability to customize the charts by programming as well as the method used to fill a chart from a HFSQL file or in the editor.
Component : wd240grf.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment