Package org.jCharts.chartData
Class AxisDataSeries
java.lang.Object
org.jCharts.chartData.AxisDataSeries
- All Implemented Interfaces:
Serializable
,IAxisDataSeries
,IData
,HTMLTestable
- Direct Known Subclasses:
DataSeries
,ScatterPlotDataSeries
Collection of all IAxisChartDataSets to display in an AxisChart
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAxisDataSeries
(String xAxisTitle, String yAxisTitle, String chartTitle) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addIAxisPlotDataSet
(IAxisPlotDataSet iAxisPlotDataSet) Adds the passed IAxisPlotDataSet to the seriesReturns the chart title.getIAxisPlotDataSet
(ChartType chartType) Returns the IAxisPlotDataSet for the passed chart type constant.Returns an Iterator over a List of IAxisPlotDataSet Objectsint
Returns number of elements in each data set dimension, so i can validate a that all IAxisPlotDataSets on a ComboChart have the same number of elements, as well as the number of Axis Labels equal the number of data elements other charts.int
Returns the total number data dimensions in all of the IAxisChartDataSets contained in this collection.Returns the x-axis titleReturns the y-axis titleint
size()
Returns the number of IAxisPlotDataSet Objects in this seriesvoid
toHTML
(HTMLGenerator htmlGenerator) Enables the testing routines to display the contents of this Object.void
validate()
Validates the DataSeries implementation.
-
Field Details
-
chartTitle
-
xAxisTitle
-
yAxisTitle
-
dataSets
-
totalNumberOfDataSets
protected int totalNumberOfDataSets -
sizeOfEachDataSet
private int sizeOfEachDataSet
-
-
Constructor Details
-
AxisDataSeries
Constructor- Parameters:
xAxisTitle
- if this is NULL, no title will be displayedyAxisTitle
- if this is NULL, no title will be displayedchartTitle
- if this is NULL, no title will be displayed
-
-
Method Details
-
getXAxisTitle
Returns the x-axis title- Specified by:
getXAxisTitle
in interfaceIAxisDataSeries
- Returns:
- String
-
getYAxisTitle
Returns the y-axis title- Specified by:
getYAxisTitle
in interfaceIAxisDataSeries
- Returns:
- String
-
getChartTitle
Returns the chart title.- Specified by:
getChartTitle
in interfaceIAxisDataSeries
- Returns:
- String the chart title. If this returns NULL, no title will be displayed.
-
getIAxisPlotDataSet
Returns the IAxisPlotDataSet for the passed chart type constant. Will return NULL if if no data set exists for the passed type.- Specified by:
getIAxisPlotDataSet
in interfaceIAxisDataSeries
- Parameters:
chartType
-- Returns:
- IAxisPlotDataSet
-
getIAxisPlotDataSetIterator
Returns an Iterator over a List of IAxisPlotDataSet Objects- Specified by:
getIAxisPlotDataSetIterator
in interfaceIAxisDataSeries
- Returns:
- Iterator over a List of IAxisPlotDataSet Objects
-
getTotalNumberOfDataSets
public int getTotalNumberOfDataSets()Returns the total number data dimensions in all of the IAxisChartDataSets contained in this collection. For example, if this contains two IAxisChartDataSets and each one contains 3 dimensions ( 3 lines and 3 sets of points ), this should return six. This provides a means to avoid looping the contents of the series each time i need the value.- Specified by:
getTotalNumberOfDataSets
in interfaceIAxisDataSeries
- Returns:
- int
-
addIAxisPlotDataSet
Adds the passed IAxisPlotDataSet to the series- Specified by:
addIAxisPlotDataSet
in interfaceIAxisDataSeries
- Parameters:
iAxisPlotDataSet
-
-
validate
Description copied from interface:IAxisDataSeries
Validates the DataSeries implementation. This will only get called if the ChartProperties flag to validate is true.- Specified by:
validate
in interfaceIAxisDataSeries
- Throws:
ChartDataException
PropertyException
- See Also:
-
getSizeOfEachDataSet
public int getSizeOfEachDataSet()Returns number of elements in each data set dimension, so i can validate a that all IAxisPlotDataSets on a ComboChart have the same number of elements, as well as the number of Axis Labels equal the number of data elements other charts.- Returns:
- int
-
toHTML
Enables the testing routines to display the contents of this Object.- Specified by:
toHTML
in interfaceHTMLTestable
- Parameters:
htmlGenerator
-
-
size
public int size()Returns the number of IAxisPlotDataSet Objects in this series- Specified by:
size
in interfaceIAxisDataSeries
- Returns:
- int
-