Adds a candlestick layer to the XYChart, and specify the data sets to use for drawing the layer.
By default, 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 the center line and the border of the candle.
Internally, ChartDirector maps the colors of different parts of the candlestick symbol to data set colors as shown in the following table. You may control the colors of the candlestick symbol in more details by setting the data set colors directly. The data set objects can be obtained using
Layer.getDataSet, and the colors can be changed using
DataSet.setDataColor.
Candlestick Symbol Color | Data Set Color |
---|
Fill color for "up" candlesticks | Data Color for the first data set (index = 0).
|
Fill color for "down" candlesticks | Data Color for the second data set (index = 1).
|
Border color | Edge Color for the first data set (index = 0).
|
Center line color | Edge Color for the second data set (index = 1).
|
A
CandleStickLayer object representing the candlestick layer created.
© 2012 Advanced Software Engineering Limited. All rights reserved.