bindingInfo.setColorField(col, type)

Bind the specified field to a ColorFrame (color coding).

Parameter

col

Field to be used for color-coding

type

One of the following: Chart.STRING, Chart.DATE, or Chart.NUMBER

Examples

Dimension (categorical) field
Chart1.bindingInfo.setColorField("Employee",Chart.STRING);
Chart1.bindingInfo.colorFrame = new CategoricalColorFrame;

CategoricalColorFrame

Measure (numerical) field
Chart1.bindingInfo.setColorField("Total",Chart.NUMBER);
Chart1.bindingInfo.colorFrame = new BrightnessColorFrame;

BrightnessColorFrame1

Dashboard script that modifies bindingInfo should generally be placed in the onRefresh handler. See Add Dashboard Script.