bindingInfo.setSecondaryField(col1, col2, binding)

bindingInfo.getSecondaryField(col, binding) to obtain the binding information.

Set the secondary field to be used in a bivariate aggregation method (e.g., correlation, covariance, etc.).

Parameter

col1

Name of existing primary field

col2

Name of secondary field

binding

Field binding, one of the following constants:

Chart.BINDING_FIELD:   // bound to X or Y axis
Chart.AESTHETIC_COLOR: // bound to Color
Chart.AESTHETIC_SHAPE: // bound to Shape
Chart.AESTHETIC_SIZE:  // bound to Size
Chart.AESTHETIC_TEXT:  // bound to Text

Example

For primary field "Price" bound to the ColorFrame.

var formula = Chart1.bindingInfo.setSecondaryField("Price", "Discount", Chart.AESTHETIC_COLOR);
Dashboard script that modifies bindingInfo should generally be placed in the onRefresh handler. See Add Dashboard Script.