ChartDirector 7.0 (ASP/COM/VB Edition)

ColorAxis.

Usage

setColorScale(colorStops [, underflowColor [, overflowColor ]])

Description

Sets the axis scale and the associated colors.

The axis scale and the associated colors are defined with an array of numbers. For a color scale with continuous color gradient, each pair of numbers represents a value and its associated color. For example, for a continuous color scale in which 0 is blue (0000FF), 50 is yellow (FFFF00) and 100 is red (FF0000), the numbers should be:

For a color scale with discrete color steps, 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:

**Note**: The above hexadecimal numbers are based on VB syntax. Other programming languages may use other methods to specify hexadecimal numbers. For example, in Javascript, "0x" is used instead of "&H".

The axis scale and the associated colors are defined with an array of numbers. For a color scale with continuous color gradient, each pair of numbers represents a value and its associated color. For example, for 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, &H0000ff, 50.0, &Hffff00, 100.0, &Hff0000`

For a color scale with discrete color steps, 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, &Hff0000, 50.0, &H00ff00, 100.0`

Arguments

Argument | Default | Description |
---|---|---|

colorStops | (Mandatory) | An array of numbers alternating between values and colors. If the number count is even, the array will define a continuous color scale, otherwise it will define a step color scale. |

underflowColor | -1 | The color to use if a value falls below the minimum value of the axis scale. -1 means the underflowColor is the same color at the minimum value. |

overflowColor | -1 | The color to use if a value exceeds the maximum value of the axis scale. -1 means the overflowColor is the same color at the maximum value. |

Return Value

None

© 2021 Advanced Software Engineering Limited. All rights reserved.