bindingInfo.setFormula(col, formula, binding)

bindingInfo.getFormula(col,binding) to obtain existing binding information.

Sets the aggregation method for a measure (Chart series). The measure can be bound to the X or Y axis, or to one of the VisualFrames (ColorFrame, SizeFrame, ShapeFrame, TextFrame).

Parameter

col

Field to summarize

formula

A Summarization Formula

binding

The field’s binding, one of the following:

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

Return

The formula name (String)

Examples

For a field “Total” bound to the Y-axis:

Chart1.bindingInfo.setFormula("Total", Chart.MAX_FORMULA, Chart.BINDING_FIELD);

bindingInfoSetFormula 3

For a field “Total” bound to the ColorFrame:

Chart1.bindingInfo.setFormula("Total", Chart.MAX_FORMULA, Chart.AESTHETIC_COLOR);

bindingInfoSetFormulaColor

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