com.jinsight.jetchart
Class CandleStickSerie

java.lang.Object
  |
  +--com.jinsight.jetchart.AbstractSerie
        |
        +--com.jinsight.jetchart.GraphSerie
              |
              +--com.jinsight.jetchart.OHLCSerie
                    |
                    +--com.jinsight.jetchart.OHLCStickSerie
                          |
                          +--com.jinsight.jetchart.CandleStickSerie

public class CandleStickSerie
extends OHLCStickSerie

This class implements the properties and methods of a candlestick series. A candlestick series is displayed as a sequence of rectangles vertically arranged over 'sticks', and are given this name because of their similarity with candle sticks. This series is used in financial charts, and each candlestick plotted in a chart represents four values. The top and bottom of the stick represent the 'high' and 'low' values, whereas the top and bottom of the rectangle represent the 'open' and 'close' values, or vice versa. The four values are known as OHLC values(open, high,low,close) in the financial market.

Candlesticks are painted in two different colors, depending upon the 'open' and 'close' values. If the 'open' value is greater than the 'close' value, there is a bearish condition. If the 'open' value is smaller than the 'close' value, there is a bullish condition. A bearish and a bullish candlesticks are distinctly painted, so we can easily distinguish the conditions above mentioned at a glance.

Data points of a candlestick series can be depicted as a sequence of sharp or rounded rectangles.

See Also:
GraphSerie.CANDLESTICK, GraphSerie.ROUNDED_CANDLESTICK

Fields inherited from class com.jinsight.jetchart.GraphSerie
ABOVE_TOP_YAXIS, AREA, BAR, BAR_HLC, BAR_OHLC, BESIDE_TOP_YAXIS, CANDLESTICK, DASHED, EMPTY_CIRCLE_MARK, EMPTY_DIAMOND_MARK, EMPTY_SQUARE_MARK, EMPTY_TRIANGLE_MARK, IMAGE, LEGEND, LINE, LINE_HLC, LINE_OHLC, MARK_SHAPE_LEGEND, POINT, ROUNDED_CANDLESTICK, SOLID, SOLID_CIRCLE_MARK, SOLID_DIAMOND_MARK, SOLID_SQUARE_LEGEND, SOLID_SQUARE_MARK, SOLID_TRIANGLE_MARK, STACKED_BAR, X_MARK
 
Fields inherited from class com.jinsight.jetchart.AbstractSerie
CLIENT_SIDE, SERVER_SIDE_CERN, SERVER_SIDE_NCSA
 
Constructor Summary
CandleStickSerie()
          Creates a CandleStickSerie object.
CandleStickSerie(double[][] multipleValues)
          Creates a candlestick series.
CandleStickSerie(double[][] multipleValues, java.lang.String title)
          Creates an OHLC series.
 
Method Summary
 void setBorderColor(java.awt.Color borderColor)
          Sets the color of the candlestick's border.
 void setType(int type)
          Sets the series type.
 void setWickColor(java.awt.Color wickColor)
          Sets the color of the candlestick's wick.
 
Methods inherited from class com.jinsight.jetchart.OHLCStickSerie
finalize, setBearishColor, setBullishColor, setWidth
 
Methods inherited from class com.jinsight.jetchart.OHLCSerie
setToolTipText
 
Methods inherited from class com.jinsight.jetchart.GraphSerie
getColor, getMultipleValues, getRegressionLine, getSerieMap, getSerieMap, getSerieMap, getTitle, getType, getValues, removeRegressionLine, setColor, setCoordinatesStatus, setFont, setMarkLegendBackground, setMarkLegendEnabled, setMarkLegendForeground, setMarkLegendOpacityEnabled, setMarksColor, setMarksEnabled, setMarksStyle, setMultipleValues, setStartPoint, setTitle, setTitleFont, setTitlePosition, setToolTipContent, setValues, setValuesQuery
 
Methods inherited from class com.jinsight.jetchart.AbstractSerie
getId, setHighlightColor, setHighlightEnabled, setId, setLegendEnabled, setMultipleValues, setSVGURLs, setToolTipEnabled, setValueFormat, setValues
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CandleStickSerie

public CandleStickSerie()
Creates a CandleStickSerie object. Default constructor.

CandleStickSerie

public CandleStickSerie(double[][] multipleValues)
Creates a candlestick series. The values of each coordinate(high,low,open,close) must be passed as elements of a bidimensional array of double precision numbers.
Parameters:
multipleValues - A bidimensional array of double precision numbers.

CandleStickSerie

public CandleStickSerie(double[][] multipleValues,
                        java.lang.String title)
Creates an OHLC series. The values of each coordinate(high,low,open,close) must be passed as elements of a bidimensional array of double precision numbers. The series title is passed as the second parameter.
Parameters:
multipleValues - A bidimensional array of double precision numbers.
title - String containing series title.
Method Detail

setType

public void setType(int type)
Sets the series type. Default value is CANDLESTICK
Overrides:
setType in class OHLCSerie
Parameters:
type - One of the constants used to set the candlestick series type.
See Also:
GraphSerie.CANDLESTICK, GraphSerie.ROUNDED_CANDLESTICK

setWickColor

public void setWickColor(java.awt.Color wickColor)
Sets the color of the candlestick's wick. Default color is black.
Parameters:
wickColor - A Color object.

setBorderColor

public void setBorderColor(java.awt.Color borderColor)
Sets the color of the candlestick's border. Default color is black.
Parameters:
borderColor - A Color object.