Package org.jCharts.chartData
Class ScatterPlotDataSet
java.lang.Object
org.jCharts.chartData.ScatterPlotDataSet
- All Implemented Interfaces:
Serializable
,IAxisPlotDataSet
,IData
,IDataSet
,IScatterPlotDataSet
,HTMLTestable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ArrayList
private ArrayList
private int
private ArrayList
private static Point2D.Double
private ScatterPlotProperties
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDataPoints
(Point2D.Double[] points, Paint paint, String legendLabel) static final Point2D.Double
Take advantage of the face Cloning performs better than creating new for highly used Objects.final ChartType
Returns the type constant that this data set should be plotted as.Returns ChartTypeProperties Object for the data set which will be typed into the specific chart type class.final String
getLegendLabel
(int index) Returns the legend label for the passed index.int
Returns the number of elements in the data set.int
Returns the number of elements in the data set.int
Returns the number of Legend Labels to display.getPaint
(int index) Returns the legend label for the passed index.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.
-
Field Details
-
POINT
-
data
-
legendLabels
-
paints
-
scatterPlotProperties
-
numDataItems
private int numDataItems
-
-
Constructor Details
-
ScatterPlotDataSet
Constructor- Parameters:
scatterPlotProperties
-
-
-
Method Details
-
getChartType
Returns the type constant that this data set should be plotted as.- Specified by:
getChartType
in interfaceIAxisPlotDataSet
- Returns:
- ChartType
- See Also:
-
addDataPoints
- Parameters:
points
-paint
-legendLabel
-
-
validate
Performs a limited validation of data.- Specified by:
validate
in interfaceIAxisPlotDataSet
- Throws:
ChartDataException
-
getValue
Returns the value in the data set at the specified position.- Specified by:
getValue
in interfaceIScatterPlotDataSet
- Parameters:
dataset
-index
-- Returns:
- Point.Double
-
getLegendLabel
Returns the legend label for the passed index. This index corresponds to the DataSet for which label you want.- Specified by:
getLegendLabel
in interfaceIDataSet
- 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 interfaceIDataSet
- Returns:
- int
-
getPaint
Returns the legend label for the passed index. This index corresponds to the DataSet for which label you want. -
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 interfaceIDataSet
- Returns:
- ChartTypeProperties
-
getNumberOfDataSets
public int getNumberOfDataSets()Returns the number of elements in the data set.- Specified by:
getNumberOfDataSets
in interfaceIAxisPlotDataSet
- Returns:
- int
-
getNumberOfDataItems
public int getNumberOfDataItems()Returns the number of elements in the data set.- Specified by:
getNumberOfDataItems
in interfaceIDataSet
- Returns:
- int
-
createPoint2DDouble
Take advantage of the face Cloning performs better than creating new for highly used Objects.- Returns:
- Point2D.Double
-
toHTML
Enables the testing routines to display the contents of this Object.- Specified by:
toHTML
in interfaceHTMLTestable
- Parameters:
htmlGenerator
-
-