org.jCharts.chartData

## Class DataSet

- java.lang.Object
- - org.jCharts.chartData.DataSet

- All Implemented Interfaces:
    Serializable, IData, IDataSet, HTMLTestable
  Direct Known Subclasses:
    AxisChartDataSet, PieChartDataSet

      public class DataSet
      extends Object
      implements IDataSet, HTMLTestable

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private ChartTypeProperties` | `chartTypeProperties`
    `protected double[][]` | `data`
    `protected String[]` | `legendLabels`
    `protected Paint[]` | `paints`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataSet(double[][] data, String[] legendLabels, Paint[] paints, ChartTypeProperties chartTypeProperties)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ChartTypeProperties` | `getChartTypeProperties()` Returns ChartTypeProperties Object for the data set which will be typed into the specific chart type class.
    `String` | `getLegendLabel(int index)` Returns the legend label for the passed index.
    `int` | `getNumberOfDataItems()` Returns the number of elements in the data set.
    `int` | `getNumberOfLegendLabels()` Returns the number of Legend Labels to display.
    `Paint` | `getPaint(int index)` Returns the legend label for the passed index.
    `void` | `toHTML(HTMLGenerator htmlGenerator)` Enables the testing routines to display the contents of this Object.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### chartTypeProperties

          private ChartTypeProperties chartTypeProperties

    - #### data

          protected double[][] data

    - #### legendLabels

          protected String[] legendLabels

    - #### paints

          protected Paint[] paints

  - ### Constructor Detail

    - #### DataSet

          public DataSet(double[][] data,
                         String[] legendLabels,
                         Paint[] paints,
                         ChartTypeProperties chartTypeProperties)

      Constructor
      Parameters:
        `data` -
        `legendLabels` - will be NULL if no Legend.
        `paints` -
        `chartTypeProperties` -

  - ### Method Detail

    - #### getLegendLabel

          public final 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. This may not be the same as the number of Data Items, as in AxisCharts, or Data Sets, as in Pie Charts.
      Specified by:
        `getNumberOfLegendLabels` in interface `IDataSet`
      Returns:
        int

    - #### getPaint

          public Paint getPaint(int index)

      Returns the legend label for the passed index. This index corresponds to the DataSet for which label you want.
      Specified by:
        `getPaint` in interface `IDataSet`
      Parameters:
        `index` -
      Returns:
        Paint

    - #### getChartTypeProperties

          public ChartTypeProperties getChartTypeProperties()

      Description copied from interface: `IDataSet`
      Returns ChartTypeProperties Object for the data set which will be typed into the specific chart type class.
      Specified by:
        `getChartTypeProperties` in interface `IDataSet`
      Returns:
        ChartTypeProperties

    - #### 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

    - #### 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` -