ChartDirector 7.0 (Python Edition)

ColorAxis.setColorScale


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:

0.0, 0x0000ff, 50.0, 0xffff00, 100.0, 0xff0000

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, 0xff0000, 50.0, 0x00ff00, 100.0

Arguments

ArgumentDefaultDescription
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-1The 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-1The 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