bindingInfo.setCandleBindingField(arr)
bindingInfo.setMapLayer(col,layer)
bindingInfo.getGroupOrder(col,binding)
bindingInfo.setGroupOrder(col,grouping)
bindingInfo.setTimeSeries(col,boolean)
bindingInfo.getColumnOrder(col)
bindingInfo.setColumnOrder(col,order)
bindingInfo.isTopNReverse(col)
bindingInfo.setTopNReverse(col,boolean)
bindingInfo.getTopNSummaryCol(col)
bindingInfo.setTopNSummaryCol(col,agg)
bindingInfo.getFormula(col,binding)
bindingInfo.setFormula(col, formula, binding)
bindingInfo.getPercentageType(col,binding)
bindingInfo.setPercentageType(col,type)
bindingInfo.getSecondaryField(col, binding)
bindingInfo.setSecondaryField(col1, col2, binding)
bindingInfo.setColorField(col, type)
bindingInfo.setShapeField(col, type)
bindingInfo.setSizeField(col, type)
bindingInfo.setTextField(col, type)
bindingInfo.setCandleBindingField(arr)
bindingInfo.getCandleBindingField(measure)
bindingInfo.setStockBindingField(arr)
bindingInfo.getStockBindingField(measure)
Configure the binding for a candlestick-type chart. A candlestick chart displays four different measures, “low,” “high,” “opening,” and “closing,” and is most often used to plot trading information. The parameter arr contains information for plotting one of these four measures.
Parameter
arr Array of properties for a candlestick chart measure:
[field1,measure,formula,option,field2]
The items in the array are described below:
field1 Field containing data corresponding to measure.
measure The measure represented by field1:
Chart.HIGH: field1 defines the high values
Chart.LOW: field1 defines the low values
Chart.OPEN: field1 defines the opening values
Chart.CLOSE: field1 defines the closing values
formula A Chart Constants summarization formula
(See Summarization Formulas.)
option Specifies how percentages should be computed:
Chart.PERCENTAGE_NONE
Chart.PERCENTAGE_OF_GRANDTOTAL
Chart.PERCENTAGE_OF_GROUP
field2 The second operand for a bivariate formula (e.g., correlation).
The first two items in the array (field1, measure) are required. The others are optional.
Example
To create a candlestick chart that displays the average high, low, opening, and closing prices by quarter, follow the steps below:
1. Create a new report or Viewsheet. For a Viewsheet, select the 'Stock History' > 'Stock Prices' query as the data source.
2. Add a new Chart element to the report or Viewsheet.
3. Enter the following script in the onLoad handler of the report or Viewsheet. (Note the slightly different syntax in the first two lines for report and Viewsheet.)
// For a report:
Chart1.query='Stock Prices';
// For a Viewsheet:
Chart1.data='Stock Prices';
Chart1.separatedStyle=Chart.CHART_CANDLE;
var data_high = ["Stock Prices.High",Chart.HIGH,Chart.AVERAGE_FORMULA];
var data_low = ["Stock Prices.Low",Chart.LOW,Chart.AVERAGE_FORMULA];
var data_close = ['Stock Prices.Close/Last',Chart.CLOSE,Chart.AVERAGE_FORMULA];
var data_open = ['Stock Prices.Open',Chart.OPEN,Chart.AVERAGE_FORMULA];
Chart1.bindingInfo.xFields=[['Date',Chart.DATE]];
Chart1.bindingInfo.setGroupOrder('Date',Chart.QUARTER_INTERVAL);
Chart1.bindingInfo.setCandleBindingField(data_high);
Chart1.bindingInfo.setCandleBindingField(data_low);
Chart1.bindingInfo.setCandleBindingField(data_close);
Chart1.bindingInfo.setCandleBindingField(data_open);
4. Preview the chart.

In a Viewsheet, you can also use the 'Zoom' tool to limit the date range.
5. To observe the structure of the chart more closely, set a condition on the chart to limit the date range (e.g., limit to the year of 2004).

Note that for each quarter, the values of each of the measures (High, Low, Close/Last, Open) have been independently aggregated as specified by the corresponding formula parameter (in this case, Chart.AVERAGE_FORMULA for each).
The “high” and “low” measures are represented by the extremes of the candle “wick,” and the “open” and “close” measures are represented by the extremes of the candle “body.” Candles for which the “open” measure exceeds the value of the “close” measure are shown filled. Candles for which the “close” measure exceeds the value of the “open” measure are shown unfilled.
See Also
bindingInfo.getCandleBindingField(measure), to obtain current binding information.
| << bindingInfo.setTextField(col, type) | © 1996-2013 InetSoft Technology Corporation (v11.4) | bindingInfo.getCandleBindingField(measure) >> |