Package org.jCharts.chartData
Class DataSet
java.lang.Object
org.jCharts.chartData.DataSet
- All Implemented Interfaces:
Serializable,IData,IDataSet,HTMLTestable
- Direct Known Subclasses:
AxisChartDataSet,PieChartDataSet
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ChartTypePropertiesprotected double[][]protected String[]protected Paint[] -
Constructor Summary
ConstructorsConstructorDescriptionDataSet(double[][] data, String[] legendLabels, Paint[] paints, ChartTypeProperties chartTypeProperties) Constructor -
Method Summary
Modifier and TypeMethodDescriptionReturns 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 Legend Labels to display.getPaint(int index) Returns the legend label for the passed index.voidtoHTML(HTMLGenerator htmlGenerator) Enables the testing routines to display the contents of this Object.
-
Field Details
-
chartTypeProperties
-
data
protected double[][] data -
legendLabels
-
paints
-
-
Constructor Details
-
DataSet
public DataSet(double[][] data, String[] legendLabels, Paint[] paints, ChartTypeProperties chartTypeProperties) Constructor- Parameters:
data-legendLabels- will be NULL if no Legend.paints-chartTypeProperties-
-
-
Method Details
-
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
-
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:
getNumberOfDataItemsin interfaceIDataSet- Returns:
- int
-
toHTML
Enables the testing routines to display the contents of this Object.- Specified by:
toHTMLin interfaceHTMLTestable- Parameters:
htmlGenerator-
-