public class

ChartCandleStickType

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

Class Overview

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.

Summary

Fields
public static final ChartCustomAttribute<Integer> PRICE_DOWN_COLOR Represents color that is used to draw price down segment.
public static final ChartCustomAttribute<Integer> PRICE_UP_COLOR Represents the color that is used to draw price up segment of candle.
[Expand]
Inherited Fields
From class com.artfulbits.aiCharts.Base.ChartType
Public Constructors
ChartCandleStickType()
Sole constructor.
Public Methods
void draw(ChartRenderArgs args)
Draws this chart type on surface specified along.
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.
[Expand]
Inherited Methods
From class com.artfulbits.aiCharts.Base.ChartType
From class java.lang.Object

Fields

public static final ChartCustomAttribute<Integer> PRICE_DOWN_COLOR

Represents color that is used to draw price down segment.

public static final ChartCustomAttribute<Integer> PRICE_UP_COLOR

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

Public Constructors

public ChartCandleStickType ()

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

Public Methods

public void draw (ChartRenderArgs args)

Draws this chart type on surface specified along.

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

public Usage[] getRequiredUsages ()

Gets value indicating usages that this chart type requires to be shown.

Returns

public DoubleRange getYRange (ChartSeries series)

Gets range that this chart type will consume having specified series.

Parameters
series instance of ChartSeries class.
Returns
  • instance of DoubleRange class that represents required Y range.

public boolean isOriginDependent ()

Indicates whether this type depends on axis origin value.

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

public boolean isSideBySide ()

Indicated whether this chart type is placed side by side.

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