grHMColor (Function) In french: grHMCouleur Specifies the colors of different values in a Heatmap chart.
// Define the colors grHMColor(CHART_HMap, -50, DarkBlue) grHMColor(CHART_HMap, +50, LightRed) FOR i = 1 TO 500 grHMAddData(CHART_HMap, Random(-100, 100), Random(-100, 100), -100) grHMAddData(CHART_HMap, Random(-100, 100), Random(-100, 100), 100) END grDraw(CHART_HMap)
Syntax
grHMColor(<Chart name> , <Level> , <Color>)
<Chart name>: Control name or character string Name of the chart to be used. This name can correspond to:- the chart name defined through programming with grCreate.
- the name of Chart control found in the window editor or report editor.
<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: Remarks 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 grParameter associated with the grHMDisplayColor constant. The following syntax is used:
grParameter(<Chart name>, grHMDisplayColor, <Display type>)
where <Display type> corresponds to one of the following constants:
| | grColorGradient (Default value) | A linear gradient is applied to the intermediate values. | grLowerLevel | The display of colors is done by level. All the values less than or equal to the level will take the color given by grHMColor. | grHigherLevel | The display of colors is done by level. All the values greater than or equal to the level will take the color given by grHMColor. |
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 grHMColor will be taken into account during the next call to grDraw.
Related Examples:
|
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.
|
This page is also available for…
|
|
|
|