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 ArrayListprivate ArrayListprivate intprivate ArrayListprivate static Point2D.Doubleprivate ScatterPlotProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataPoints(Point2D.Double[] points, Paint paint, String legendLabel) static final Point2D.DoubleTake advantage of the face Cloning performs better than creating new for highly used Objects.final ChartTypeReturns 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 StringgetLegendLabel(int index) Returns the legend label for the passed index.intReturns the number of elements in the data set.intReturns the number of elements in the data set.intReturns 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.voidtoHTML(HTMLGenerator htmlGenerator) Enables the testing routines to display the contents of this Object.voidvalidate()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:
getChartTypein interfaceIAxisPlotDataSet- Returns:
- ChartType
- See Also:
-
addDataPoints
- Parameters:
points-paint-legendLabel-
-
validate
Performs a limited validation of data.- Specified by:
validatein interfaceIAxisPlotDataSet- Throws:
ChartDataException
-
getValue
Returns the value in the data set at the specified position.- Specified by:
getValuein 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:
getLegendLabelin 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:
getNumberOfLegendLabelsin 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:IDataSetReturns ChartTypeProperties Object for the data set which will be typed into the specific chart type class.- Specified by:
getChartTypePropertiesin interfaceIDataSet- Returns:
- ChartTypeProperties
-
getNumberOfDataSets
public int getNumberOfDataSets()Returns the number of elements in the data set.- Specified by:
getNumberOfDataSetsin interfaceIAxisPlotDataSet- Returns:
- int
-
getNumberOfDataItems
public int getNumberOfDataItems()Returns the number of elements in the data set.- Specified by:
getNumberOfDataItemsin 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:
toHTMLin interfaceHTMLTestable- Parameters:
htmlGenerator-
-