Data Dynamics Reports Online Help
Color Scale 3
See Also Support Forum
User Guide > Creating Reports > Building Reports > Expressions > Data Visualization > Color Scale 3

Glossary Item Box

The ColorScale3 data visualization displays a range of colors to indicate minimum, middle, and maximum values, and all shades in between.

Parameters

You can use static values or aggregate functions (e.g. Min, Avg, or Max) to set the Minimum, Middle, and Maximum parameters. For more information on these and other aggregate functions, see the Functions topic.

Syntax

=ColorScale3(Value, Minimum, Middle, Maximum, StartColor, MiddleColor, EndColor)

Example

=ColorScale3(Fields!InStock.Value, 0, (Avg(Fields!InStock.Value, Nothing)),
(Max(Fields!InStock.Value, Nothing)), "Red", "Yellow", "Green")

Usage

Use an expression like the example in the BackgroundColor property of a Textbox control. This causes the background color to change depending on the value of the field you specified in the Value parameter, in the case of the example, InStock. Any values falling between the Minimum value and the Middle value render with a gradient scale color between the StartColor and MiddleColor. The closer the value is to the Minimum, the closer to red the color renders. In the same way, values falling between the Middle and Maximum render with a color between the MiddleColor and EndColor, in this case, varying shades of yellow-green.

Default Behavior

The function returns Transparent in any of the following cases:

  1. The Value is out of range (i.e. does not fall between the Minimum and Maximum values).
  2. The Maximum is less than the Minimum.
  3. The Middle is not between the Minimum and the Maximum.

If the argument for any of the parameters cannot be converted to the required data type, the default value is used instead.

Parameter Default Value
Value 0
Minimum 0
Middle 0
Maximum 0
StartColor Silver
MiddleColor Gainsboro
EndColor WhiteSmoke

Dialog

Selecting <Data Visualizer...> from the Smart Panel or Property Grid for a property that supports this data visualization will launch the following dialog.  To build the data visualizer expression, just select the appropriate values for each of the options on the dialog.

Color Scale Data Visualizer dialog

See Also

©2010. GrapeCity, inc. All Rights Reserved.