Summ:  Fields Constr. Methods    Details:  Fields Constr. Methods      Class:  Constants Prev Next
com.artfulbits.aiCharts.Types
Class ChartCandleStickType

java.lang.Object com.artfulbits.aiCharts.Base.ChartType com.artfulbits.aiCharts.Types.ChartCandleStickType

Declaration: public class ChartCandleStickType extends com.artfulbits.aiCharts.Base.ChartType

 

Represents Candle Stick chart type. A candlestick chart is a style of bar-chart used primarily to describe price movements of an equity over time. It is a combination of a line-chart and a bar-chart, in that each bar represents the range of price movement over a given time interval. It is most often used in technical analysis of equity and currency price patterns. It appears superficially similar to error bars, but these are unrelated.
 // Creating series.
 ChartSeries series = new ChartSeries("Series 1", ChartTypes.CandleStick);
 // Filling series with 10 data points.
 for(int i = 0; i < 10; i++)
 {
 	series.getPoints().addXY(i, Math.cos(i) - 2, Math.cos(i) + 2,
 			Math.cos(i) + 1, Math.cos(i) - 1);
 }
 
Candle stick type uses USAGE_LOW, USAGE_HIGH, USAGE_OPEN and USAGE_CLOSE, types to determine index of corresponding Y values among chart point's Y values.

 

Since: 1.0

 

 

Fields Summary
static java.lang.String PRICE_DOWN_COLOR
    
Represents color that is used to draw price down segment.
static java.lang.String PRICE_UP_COLOR
    
Represents the color that is used to draw price up segment of candle.

 

 

Constructors Summary
ChartCandleStickType()
    

 

 

Methods Summary
void draw(ChartRenderArgs args)
    
Draws this chart type on surface specified along.
DoubleRange getYRange(ChartSeries series)
    
Gets range that this chart type will consume having specified series.
boolean isSideBySide()
    
Indicated whether this chart type is placed side by side.

 

Methods inherited from class: com.artfulbits.aiCharts.Base.ChartType
colorPerPoint, computeXRange, computeYRange, drawIcon, drawMarkers, getRequiredCoordinateSystem, getXRange, isCompatible, isCompatible, isOriginDependent, isRotated, isStacked, isStacked100

 

Methods inherited from class: java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

 

 

 

PRICE_UP_COLOR

 

public static final java.lang.String PRICE_UP_COLOR

 

Represents the color that is used to draw price up segment of candle.

 

Since: 1.0
See also: Constants

 

 

 

PRICE_DOWN_COLOR

 

public static final java.lang.String PRICE_DOWN_COLOR

 

Represents color that is used to draw price down segment.

 

Since: 1.0
See also: Constants

 

 

 

 

ChartCandleStickType

 

public ChartCandleStickType( )

 

 

 

 

isSideBySide

 

public boolean isSideBySide( )

 

[ description from ChartType.isSideBySide() ]
 
Indicated whether this chart type is placed side by side. Typical side-by-side chart type is ChartColumnType.

 

Returns:
true if chart type is side by side, otherwise false.

 

Overrides: ChartType.isSideBySide()

 

 

 

draw

 

public void draw( ChartRenderArgs args)

 

[ description from ChartType.draw(ChartRenderArgs) ]
 
Draws this chart type on surface specified along.

 

Parameters:
args-
instance of ChartRenderArgs that provides facilities to draw this type.

 

Implements: ChartType.draw(ChartRenderArgs)

 

 

 

getYRange

 

public DoubleRange getYRange( ChartSeries series)

 

[ description from ChartType.getYRange(ChartSeries) ]
 
Gets range that this chart type will consume having specified series.

 

Parameters:
series-
instance of ChartSeries class.
Returns:
instance of

 

Overrides: ChartType.getYRange(ChartSeries)

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.