Using a color map
To use a color map specify the name of a color map in a color property cell for an object that you insert in your visual project.
About this task
To use a color map:
Procedure
- Insert an object in your visual project.
- From the most convenient view (Properties, Outline or the Project Explorer), click the color property that will use the color map.
- Specify the name of the color map that you want to use
and a data value. There are several ways that you can specify the
data value:
- Literally: You can use a specific number to indicate the data
value. For example:
colorMap(Colormap1, 10)
The data value 10 will be compared against the breakpoints that have been specified for the color map named Colormap1. The color of this object will be determined by the color assigned to a data value of 10.
- With an expression: You can create an expression that can be used
to calculate the data value. For example:
colorMap(Colormap1,(close_price - open_price))
The expression will be evaluated based on the current data values. The calculated data value will be compared against the breakpoints that have been specified for the color map named Colormap1. The color of this object will be determined by the color assigned to the calculated data value.
- Using a function: You can use a function to generate a data value.
For example:
colorMap(Colormap1,PointNumber())
The PointNumber() function will be used with a color map named Colormap1. The PointNumber() function assigns a unique color to the object for each row returned by a query.
- Literally: You can use a specific number to indicate the data
value. For example: