Package org.jCharts.chartData
Class AxisDataSeries
- java.lang.Object
-
- org.jCharts.chartData.AxisDataSeries
-
- All Implemented Interfaces:
java.io.Serializable,IAxisDataSeries,IData,HTMLTestable
- Direct Known Subclasses:
DataSeries,ScatterPlotDataSeries
public abstract class AxisDataSeries extends java.lang.Object implements IAxisDataSeries, HTMLTestable
Collection of all IAxisChartDataSets to display in an AxisChart- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringchartTitleprotected java.util.HashMapdataSetsprivate intsizeOfEachDataSetprotected inttotalNumberOfDataSetsprivate java.lang.StringxAxisTitleprivate java.lang.StringyAxisTitle
-
Constructor Summary
Constructors Constructor Description AxisDataSeries(java.lang.String xAxisTitle, java.lang.String yAxisTitle, java.lang.String chartTitle)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddIAxisPlotDataSet(IAxisPlotDataSet iAxisPlotDataSet)Adds the passed IAxisPlotDataSet to the seriesjava.lang.StringgetChartTitle()Returns the chart title.IAxisPlotDataSetgetIAxisPlotDataSet(ChartType chartType)Returns the IAxisPlotDataSet for the passed chart type constant.java.util.IteratorgetIAxisPlotDataSetIterator()Returns an Iterator over a List of IAxisPlotDataSet ObjectsintgetSizeOfEachDataSet()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.intgetTotalNumberOfDataSets()Returns the total number data dimensions in all of the IAxisChartDataSets contained in this collection.java.lang.StringgetXAxisTitle()Returns the x-axis titlejava.lang.StringgetYAxisTitle()Returns the y-axis titleintsize()Returns the number of IAxisPlotDataSet Objects in this seriesvoidtoHTML(HTMLGenerator htmlGenerator)Enables the testing routines to display the contents of this Object.voidvalidate()Validates the DataSeries implementation.
-
-
-
Field Detail
-
chartTitle
private java.lang.String chartTitle
-
xAxisTitle
private java.lang.String xAxisTitle
-
yAxisTitle
private java.lang.String yAxisTitle
-
dataSets
protected java.util.HashMap dataSets
-
totalNumberOfDataSets
protected int totalNumberOfDataSets
-
sizeOfEachDataSet
private int sizeOfEachDataSet
-
-
Constructor Detail
-
AxisDataSeries
public AxisDataSeries(java.lang.String xAxisTitle, java.lang.String yAxisTitle, java.lang.String chartTitle)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 Detail
-
getXAxisTitle
public java.lang.String getXAxisTitle()
Returns the x-axis title- Specified by:
getXAxisTitlein interfaceIAxisDataSeries- Returns:
- String
-
getYAxisTitle
public java.lang.String getYAxisTitle()
Returns the y-axis title- Specified by:
getYAxisTitlein interfaceIAxisDataSeries- Returns:
- String
-
getChartTitle
public java.lang.String getChartTitle()
Returns the chart title.- Specified by:
getChartTitlein interfaceIAxisDataSeries- Returns:
- String the chart title. If this returns NULL, no title will be displayed.
-
getIAxisPlotDataSet
public IAxisPlotDataSet getIAxisPlotDataSet(ChartType chartType)
Returns the IAxisPlotDataSet for the passed chart type constant. Will return NULL if if no data set exists for the passed type.- Specified by:
getIAxisPlotDataSetin interfaceIAxisDataSeries- Parameters:
chartType-- Returns:
- IAxisPlotDataSet
-
getIAxisPlotDataSetIterator
public java.util.Iterator getIAxisPlotDataSetIterator()
Returns an Iterator over a List of IAxisPlotDataSet Objects- Specified by:
getIAxisPlotDataSetIteratorin 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:
getTotalNumberOfDataSetsin interfaceIAxisDataSeries- Returns:
- int
-
addIAxisPlotDataSet
public void addIAxisPlotDataSet(IAxisPlotDataSet iAxisPlotDataSet)
Adds the passed IAxisPlotDataSet to the series- Specified by:
addIAxisPlotDataSetin interfaceIAxisDataSeries- Parameters:
iAxisPlotDataSet-
-
validate
public void validate() throws ChartDataException, PropertyExceptionDescription copied from interface:IAxisDataSeriesValidates the DataSeries implementation. This will only get called if the ChartProperties flag to validate is true.- Specified by:
validatein interfaceIAxisDataSeries- Throws:
ChartDataExceptionPropertyException- See Also:
ChartProperties.setValidate( boolean )
-
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
public void toHTML(HTMLGenerator htmlGenerator)
Enables the testing routines to display the contents of this Object.- Specified by:
toHTMLin interfaceHTMLTestable- Parameters:
htmlGenerator-
-
size
public int size()
Returns the number of IAxisPlotDataSet Objects in this series- Specified by:
sizein interfaceIAxisDataSeries- Returns:
- int
-
-