Summ:  Fields Constr. Methods    Details:  Fields Constr. Methods      Class:  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);
 }
 
Similar output should be expected:

Candle stick type uses LowValue, HighValue, OpenValue and CloseValue, types to determine index of corresponding Y values among chart point's Y values.

 

Since: 1.0

 

 

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

 

Fields inherited from class: com.artfulbits.aiCharts.Base.ChartType
POINT_WIDTH

 

 

Constructors Summary
ChartCandleStickType()
    
Sole constructor.

 

 

Methods Summary
void draw(ChartRenderArgs args)
    
Draws this chart type on surface specified along.
java.lang.String getName()
    
Provides human-readable representation of this chart type.
ChartPointDeclaration.Usage[] getRequiredUsages()
    
Gets value indicating usages that this chart type requires to be shown.
DoubleRange getYRange(ChartSeries series)
    
Gets range that this chart type will consume having specified series.
boolean isOriginDependent()
    
Indicates whether this type depends on axis origin value.
boolean isSideBySide()
    
Indicated whether this chart type is placed side by side.

 

Methods inherited from class: com.artfulbits.aiCharts.Base.ChartType
colorPerPoint, computeXRange, computeYRange, drawMarkers, getRequiredCoordinateSystem, getXRange, isCompatible, isCompatible, 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 ChartCustomAttribute<java.lang.Integer> PRICE_UP_COLOR

 

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

 

Since: 1.0

 

 

 

PRICE_DOWN_COLOR

 

public static final ChartCustomAttribute<java.lang.Integer> PRICE_DOWN_COLOR

 

Represents color that is used to draw price down segment.

 

Since: 1.0

 

 

 

 

ChartCandleStickType

 

public ChartCandleStickType( )

 

Sole constructor. (For invocation by subclass constructors, typically implicit.)

 

Since: 1.0

 

 

 

 

isOriginDependent

 

public boolean isOriginDependent( )

 

[ description from ChartType.isOriginDependent() ]
 
Indicates whether this type depends on axis origin value.

 

Returns:
true if chart type consumes value of origin to draw, otherwise false.

 

Overrides: ChartType.isOriginDependent()

 

 

 

isSideBySide

 

public boolean isSideBySide( )

 

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

 

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)

 

 

 

getRequiredUsages

 

public ChartPointDeclaration.Usage[] getRequiredUsages( )

 

[ description from ChartType.getRequiredUsages() ]
 
Gets value indicating usages that this chart type requires to be shown.

 

Returns:
array of

 

Overrides: ChartType.getRequiredUsages()

 

 

 

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)

 

 

 

getName

 

public java.lang.String getName( )

 

[ description from ChartType.getName() ]
 
Provides human-readable representation of this chart type.

 

Returns:
instance of

 

Implements: ChartType.getName()

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.