## org.jCharts.chartData
Class ScatterPlotDataSet

    java.lang.Object
      org.jCharts.chartData.ScatterPlotDataSet

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

    public class ScatterPlotDataSet

extends Object
implements IScatterPlotDataSet, HTMLTestable

See Also:
  Serialized Form

Field Summary
`private ArrayList` `data`
`private ArrayList` `legendLabels`
`private int` `numDataItems`
`private ArrayList` `paints`
`private static Point2D.Double` `POINT`
`private ScatterPlotProperties` `scatterPlotProperties`

Constructor Summary
`ScatterPlotDataSet(ScatterPlotProperties scatterPlotProperties)` Constructor

Method Summary
`void` `addDataPoints(Point2D.Double[] points, Paint paint, String legendLabel)`
`static Point2D.Double` `createPoint2DDouble()` Take advantage of the face Cloning performs better than creating new for highly used Objects.
`ChartType` `getChartType()` Returns the type constant that this data set should be plotted as.
`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` `getNumberOfDataSets()` 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.
`Point2D.Double` `getValue(int dataset, int index)` Returns the value in the data set at the specified position.
`void` `toHTML(HTMLGenerator htmlGenerator)` Enables the testing routines to display the contents of this Object.
`void` `validate()` Performs a limited validation of data.

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

Field Detail

### POINT

    private static Point2D.Double POINT

### data

    private ArrayList data

### legendLabels

    private ArrayList legendLabels

### paints

    private ArrayList paints

### scatterPlotProperties

    private ScatterPlotProperties scatterPlotProperties

### numDataItems

    private int numDataItems

Constructor Detail

### ScatterPlotDataSet

    public ScatterPlotDataSet(ScatterPlotProperties scatterPlotProperties)

  Constructor

  Parameters:
    `scatterPlotProperties` -

Method Detail

### getChartType

    public final ChartType getChartType()

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

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

### addDataPoints

    public void addDataPoints(Point2D.Double[] points,
                              Paint paint,
                              String legendLabel)

  Parameters:
    `points` -
    `paint` -
    `legendLabel` -

### validate

    public void validate()
                  throws ChartDataException

  Performs a limited validation of data.

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

### getValue

    public Point2D.Double getValue(int dataset,
                                   int index)

  Returns the value in the data set at the specified position.

  Specified by:
    `getValue` in interface `IScatterPlotDataSet`
  Parameters:
    `dataset` -
    `index` -
  Returns:
    Point.Double

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

### getNumberOfDataSets

    public int getNumberOfDataSets()

  Returns the number of elements in the data set.

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

### getNumberOfDataItems

    public int getNumberOfDataItems()

  Returns the number of elements in the data set.

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

### createPoint2DDouble

    public static final Point2D.Double createPoint2DDouble()

  Take advantage of the face Cloning performs better than creating new for highly used Objects.

  Returns:
    Point2D.Double

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