• Managing colors
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Specifies the colors of different values in a Heatmap chart.
// Define the colors
CHART_HMap.HMColor(-50, DarkBlue)
CHART_HMap.HMColor(+50, LightRed)
FOR i = 1 TO 500
CHART_HMap.HMAddData(Random(-100, 100), Random(-100, 100), -100)
CHART_HMap.HMAddData(Random(-100, 100), Random(-100, 100), 100)
<Chart control>.HMColor(<Level> , <Color>)
<Chart control>: Control name
Name of the Chart control to use (found in the window editor or in the report editor).
PHP Only the interactive Chart controls are available.
<Level>: Real or Constant
Level from which the color will be applied. Corresponds to:
  • a real value,
  • the grHMColorEmptyValue constant. In this case, the color will be applied to the data outside level or without value. This color is transparent by default.
<Color>: Integer or Integer constant
Color that will be given to the level. This color can correspond to:

Managing colors

The colors are defined by level. For the values found between 2 levels, a linear gradient is applied by default.
This behavior can be modified by <Chart>.Parameter associated with the grHMDisplayColor constant. The following syntax is used:
<Chart control>.Parameter(grHMDisplayColor, <Display type>)

where <Display type> corresponds to one of the following constants:
(Default value)
A linear gradient is applied to the intermediate values.
grLowerLevelThe display of colors is done by level. All the values less than or equal to the level will take the color given by <Chart>.HMColor.
grHigherLevelThe display of colors is done by level. All the values greater than or equal to the level will take the color given by <Chart>.HMColor.

For the facets outside color bounds or without value, the color specified by grHMColorEmptyValue will be applied. This color is transparent by default.
Remark: The colors defined by <Chart>.HMColor will be taken into account during the next call to <Chart>.Draw.
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: wd280grf.dll
Minimum version required
  • Version 23
This page is also available for…
Click [Add] to post a comment