ChartDirector 6.0 (Perl Edition)

XYChart.addCandleStickLayer


Usage

addCandleStickLayer(highData, lowData, openData, closeData [, riseColor [, fallColor [, edgeColor ]]])

Description

Adds a candlestick layer to the XYChart, and specify the data sets to use for drawing the layer.

The candlestick symbol will be drawn using the colors specified in the riseColor, fallColor and edgeColor argument. The riseColor and fallColor are used to fill the candle depending on whether the opening value or closing value is larger. The edgeColor is used to as the color of the stick and the border of the candle.

CandleStickLayer.setColors and CandleStickLayer.setExtraColors can be used to configure the candlestick colors in more detail.

Arguments

ArgumentDefaultDescription
highData(Mandatory)An array of numbers representing the high values.
lowData(Mandatory)An array of numbers representing the low values.
openData(Mandatory)An array of numbers representing the opening values.
closeData(Mandatory)An array of numbers representing the closing values.
riseColorFFFFFFThe color used to fill the candle if the closing value is higher than the opening value.
fallColor000000The color used to fill the candle if the opening value is higher than the closing value.
edgeColorLineColorThe color used to draw the center line and the border of the candle.

Return Value

A CandleStickLayer object representing the candlestick layer created.