Adds a color scale to the meter.
A color scale is similar to a meter scale. Instead of using labels to denote the values, a color scale uses different colors for different values. The colors can vary continuously or in discrete steps. The width of the color scale can also vary based on the value. There can be multiple more than one color scale in a meter.
A color scale is defined with an array of numbers. For a continuous color scale, each pair of numbers represents a value and its associated color. For example, to define a continuous color scale in which 0 is blue (0000FF), 50 is yellow (FFFF00) and 100 is red (FF0000), the numbers should be:
0.0, 0x0000ff, 50.0, 0xffff00, 100.0, 0xff0000
For a step color scale, the number of colors would be one less than the number of values. For example, to define a step color scale in which 0 to 50 is red (FF0000), and 50 to 100 is green (00FF00), the numbers will be:
0.0, 0xff0000, 50.0, 0x00ff00, 100.0
Note: The above hexadecimal numbers are based on C# syntax. For VB.NET, instead of using "0x", please use "&H" as the prefix for hexadecimal numbers.
© 2023 Advanced Software Engineering Limited. All rights reserved.