## org.jCharts.chartData
Class StockChartDataSet

    java.lang.Object
      org.jCharts.chartData.StockChartDataSet

All Implemented Interfaces:
  Serializable, IAxisPlotDataSet, IData, IDataSet, IStockChartDataSet, HTMLTestable

    public class StockChartDataSet

extends Object
implements IStockChartDataSet, HTMLTestable

See Also:
  Serialized Form

Field Summary
`private ChartType` `chartType`
`private double[]` `close`
`private double[]` `high`
`private String[]` `legendLabels`
`private double[]` `low`
`private int` `numberOfDataSets`
`private double[]` `open`
`private Paint[]` `paints`
`private StockChartProperties` `stockChartProperties`

Constructor Summary
`StockChartDataSet(double[] high, String highLegendLabel, double[] low, String lowLegendLabel, Paint highLowPaint, StockChartProperties stockChartProperties)` Constructor

Method Summary
`ChartType` `getChartType()` Returns the type constant that this data set should be plotted as.
`ChartTypeProperties` `getChartTypeProperties()` Returns the chart specific properties
`double` `getCloseValue(int index)`
`double` `getHighValue(int index)`
`String` `getLegendLabel(int index)` Returns the legend label for the passed index.
`double` `getLowValue(int index)`
`int` `getNumberOfDataItems()` Returns the number of elements in the data set.
`int` `getNumberOfDataSets()` Returns the number of IAxisChartDataSet Objects in this series
`int` `getNumberOfLegendLabels()` Returns the number of Legend Labels to display.
`double` `getOpenValue(int index)`
`Paint` `getPaint(int index)` Returns the number of IAxisChartDataSet Objects in this series
`boolean` `hasCloseValues()`
`boolean` `hasOpenValues()`
`void` `setCloseValues(double[] data, String legendLabel, Paint paint)` Sets the 'Close' values
`void` `setOpenValues(double[] data, String legendLabel, Paint paint)` Sets the 'Open' values
`void` `toHTML(HTMLGenerator htmlGenerator)` Enables the testing routines to display the contents of this Object.
`void` `validate()` Performs a limited validation of data passed to Constructor.

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

Field Detail

### chartType

    private ChartType chartType

### high

    private double[] high

### low

    private double[] low

### open

    private double[] open

### close

    private double[] close

### numberOfDataSets

    private int numberOfDataSets

### legendLabels

    private String[] legendLabels

### paints

    private Paint[] paints

### stockChartProperties

    private StockChartProperties stockChartProperties

Constructor Detail

### StockChartDataSet

    public StockChartDataSet(double[] high,
                             String highLegendLabel,
                             double[] low,
                             String lowLegendLabel,
                             Paint highLowPaint,
                             StockChartProperties stockChartProperties)
                      throws ChartDataException

  Constructor

  Parameters:
    `high` -
    `highLegendLabel` -
    `low` -
    `lowLegendLabel` -
    `stockChartProperties` - properties Object specific to the type of chart you are rendering.
  Throws:
    `ChartDataException` - performs a limited validation of the data

Method Detail

### validate

    public void validate()
                  throws ChartDataException,
                         PropertyException

  Performs a limited validation of data passed to Constructor.

  Specified by:
    `validate` in interface `IAxisPlotDataSet`
  Throws:
    `ChartDataException`
    `PropertyException`

### getLegendLabel

    public String getLegendLabel(int index)

  Returns the legend label for the passed index. This index corresponds to the DataSet for which label you want.

  Specified by:
    `getLegendLabel` in interface `IDataSet`
  Parameters:
    `index` -
  Returns:
    String

### getNumberOfLegendLabels

    public int getNumberOfLegendLabels()

  Returns the number of Legend Labels to display.

  Specified by:
    `getNumberOfLegendLabels` in interface `IDataSet`
  Returns:
    int

### getNumberOfDataItems

    public int getNumberOfDataItems()

  Returns the number of elements in the data set. All data sets must be of the same length so just look at the first one.

  Specified by:
    `getNumberOfDataItems` in interface `IDataSet`
  Returns:
    int

### setCloseValues

    public void setCloseValues(double[] data,
                               String legendLabel,
                               Paint paint)

  Sets the 'Close' values

  Parameters:
    `data` -
    `legendLabel` -
    `paint` -

### setOpenValues

    public void setOpenValues(double[] data,
                              String legendLabel,
                              Paint paint)

  Sets the 'Open' values

  Parameters:
    `data` -
    `legendLabel` -
    `paint` -

### getHighValue

    public double getHighValue(int index)

  Specified by:
    `getHighValue` in interface `IStockChartDataSet`
  Parameters:
    `index` -
  Returns:
    double

### getLowValue

    public double getLowValue(int index)

  Specified by:
    `getLowValue` in interface `IStockChartDataSet`
  Parameters:
    `index` -
  Returns:
    double

### getCloseValue

    public double getCloseValue(int index)

  Specified by:
    `getCloseValue` in interface `IStockChartDataSet`
  Parameters:
    `index` -
  Returns:
    double

### hasCloseValues

    public boolean hasCloseValues()

  Specified by:
    `hasCloseValues` in interface `IStockChartDataSet`
  Returns:
    boolean

### getOpenValue

    public double getOpenValue(int index)

  Specified by:
    `getOpenValue` in interface `IStockChartDataSet`
  Parameters:
    `index` -
  Returns:
    double

### hasOpenValues

    public boolean hasOpenValues()

  Specified by:
    `hasOpenValues` in interface `IStockChartDataSet`
  Returns:
    boolean

### getChartType

    public ChartType getChartType()

  Returns the type constant that this data set should be plotted as.

  Specified by:
    `getChartType` in interface `IAxisPlotDataSet`
  Specified by:
    `getChartType` in interface `IStockChartDataSet`
  Returns:
    ChartType
  See Also:
    `ChartType`

### getChartTypeProperties

    public ChartTypeProperties getChartTypeProperties()

  Returns the chart specific properties

  Specified by:
    `getChartTypeProperties` in interface `IDataSet`
  Returns:
    ChartTypeProperties

### getNumberOfDataSets

    public int getNumberOfDataSets()

  Returns the number of IAxisChartDataSet Objects in this series

  Specified by:
    `getNumberOfDataSets` in interface `IAxisPlotDataSet`
  Returns:
    int

### getPaint

    public Paint getPaint(int index)

  Returns the number of IAxisChartDataSet Objects in this series

  Specified by:
    `getPaint` in interface `IDataSet`
  Returns:
    int

### toHTML

    public void toHTML(HTMLGenerator htmlGenerator)

  Enables the testing routines to display the contents of this Object.

  Specified by:
    `toHTML` in interface `HTMLTestable`
  Parameters:
    `htmlGenerator` -