Summ:  Constr. Methods    Details:  Constr. Methods      Class:  Prev Next
com.artfulbits.aiCharts.Base
Class ChartSeries

java.lang.Object com.artfulbits.aiCharts.Base.ChartPointAttributes com.artfulbits.aiCharts.Base.ChartSeries

Declaration: public class ChartSeries extends ChartPointAttributes

 

Represents chart series. Series is used to draw visualize chart type on area. Series is a part of area's series collection. Chart points collection for series can be added via getPoints() method. In order to be displayed, series should be added to chart's series collection:
 //Instantiate new instance of series.
 ChartSeries series = new ChartSeries("Series 1");
 //Add series to chart.
 chart.getSeries().add(series);
 
Even though multiple series can be added to a single area, you must ensure their chart types compatibility. Incompatible series are not visible on area.

 

Since: 1.0

 

 

Constructors Summary
ChartSeries()
    
Initializes a new instance of ChartSereies class with specified name.
ChartSeries(java.lang.String typeName)
    
Initializes a new instance of ChartSereies class with specified type.
ChartSeries(java.lang.String name, java.lang.String typeName)
    
Initializes a new instance of ChartSereies class with specified name and type.

 

 

Methods Summary
ChartAxis getActualXAxis()
    
Gets the actual X axis depending on currently assigned chart type.
ChartAxis getActualYAxis()
    
Gets the actual X axis depending on currently assigned chart type.
java.lang.String getArea()
    
Gets the parent area name.
java.lang.String getLegend()
    
Gets the name of legend that represents this series.
java.lang.String getName()
    
Gets the name of this series.
ChartPointDeclaration getPointDeclaration()
    
Gets point declaration for series.
ChartPointCollection getPoints()
    
Gets the points collection that series represents.
ChartPoint[] getPointsCache()
    
Gets sorted points array.
ChartType getType()
    
Gets the corresponding type of series.
ChartAxis getXAxis()
    
Gets X axis for series.
ChartAxis getYAxis()
    
Gets Y axis for series.
void setArea(java.lang.String name)
    
Sets the name of area that is parent for this series.
void setLegend(java.lang.String name)
    
Sets the name of legend that represents this series.
void setName(java.lang.String name)
    
Sets the name for series.
void setPointDeclaration(ChartPointDeclaration declaration)
    
Sets point declaration for series.
void setType(ChartType type)
    
Sets the type that represents this series.
void setType(java.lang.String typeName)
    
Sets name of chart type represented by this series.
void setXAxis(ChartAxis axis)
    
Sets X axis for series.
void setYAxis(ChartAxis axis)
    
Sets Y axis for series.

 

Methods inherited from class: com.artfulbits.aiCharts.Base.ChartPointAttributes
getAttribute, getBackColor, getBackImage, getBorderColor, getHLabelAlignment, getLabel, getLabelColor, getLabelFont, getMarker, getShowLabel, getTag, getVLabelAlignment, reset, setAttribute, setBackColor, setBackImage, setBorderColor, setHLabelAlignment, setLabel, setLabelColor, setLabelFont, setLabelFormat, setLabelFormat, setMarker, setShowLabel, setTag, setVLabelAlignment

 

Methods inherited from class: java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

 

 

 

ChartSeries

 

public ChartSeries( )

 

Initializes a new instance of ChartSereies class with specified name. Series must be added to ChartArea's series collection in order to be rendered.

 

Since: 1.0

 

 

 

ChartSeries

 

public ChartSeries( java.lang.String typeName)

 

Initializes a new instance of ChartSereies class with specified type. Series must be added to ChartArea's series collection in order to be rendered.

 

Parameters:
typeName-
name of corresponding chart type.

 

Since: 1.0

 

 

 

ChartSeries

 

public ChartSeries( java.lang.String name,
java.lang.String typeName)

 

Initializes a new instance of ChartSereies class with specified name and type. Series must be added to ChartArea's series collection in order to be rendered.

 

Parameters:
name-
name of series.
typeName-
name of corresponding chart type.

 

Since: 1.0

 

 

 

 

getXAxis

 

public ChartAxis getXAxis( )

 

Gets X axis for series.

 

Returns:
instance of ChartAxis class currently representing X axis for series.

 

Since: 1.0

 

 

 

getYAxis

 

public ChartAxis getYAxis( )

 

Gets Y axis for series.

 

Returns:
instance of ChartAxis class currently representing Y axis for series.

 

Since: 1.0

 

 

 

setXAxis

 

public void setXAxis( ChartAxis axis)

 

Sets X axis for series.

 

Parameters:
axis-
instance of ChartAxis.

 

Since: 1.0

 

 

 

setYAxis

 

public void setYAxis( ChartAxis axis)

 

Sets Y axis for series.

 

Parameters:
axis-
instance of ChartAxis.

 

Since: 1.0

 

 

 

getActualXAxis

 

public ChartAxis getActualXAxis( )

 

Gets the actual X axis depending on currently assigned chart type. This method works the same as getXAxis() unless corresponding chart type is rotated.

 

Returns:
instance of ChartAxis that is currently actual for this series.

 

Since: 1.0
See also: ChartType.isRotated()

 

 

 

getActualYAxis

 

public ChartAxis getActualYAxis( )

 

Gets the actual X axis depending on currently assigned chart type. This method works the same as getYAxis() unless corresponding chart type is rotated.

 

Returns:
instance of ChartAxis that is currently actual for this series.

 

Since: 1.0
See also: ChartType.isRotated()

 

 

 

setArea

 

public void setArea( java.lang.String name)

 

Sets the name of area that is parent for this series. This is automatically removes previously assigned area and adds it to a new one. Series with the same area name be will drawn together on area, only if the corresponding chart types are compatible.

 

Parameters:
name-
java.lang.String representation of area's name.

 

Since: 1.0
See also: getArea()setLegend(String)

 

 

 

getArea

 

public java.lang.String getArea( )

 

Gets the parent area name.

 

Returns:
name of parent area.

 

Since: 1.0

 

 

 

setLegend

 

public void setLegend( java.lang.String name)

 

Sets the name of legend that represents this series.

 

Parameters:
name-
java.lang.String representation of legend's name.

 

Since: 1.0

 

 

 

getLegend

 

public java.lang.String getLegend( )

 

Gets the name of legend that represents this series.

 

Returns:
name of legend.

 

Since: 1.0

 

 

 

getType

 

public ChartType getType( )

 

Gets the corresponding type of series.

 

Returns:
instance of ChartType that is used to draw the series.

 

Since: 1.0
See also: ChartTypes

 

 

 

setType

 

public void setType( ChartType type)

 

Sets the type that represents this series.

 

Parameters:
type-
instance of ChartType class.

 

Since: 1.0

 

 

 

setType

 

public void setType( java.lang.String typeName)

 

Sets name of chart type represented by this series.

 

Parameters:
typeName-
type name.

 

 

 

getName

 

public java.lang.String getName( )

 

Gets the name of this series. Name is used to identify series on ChartLegend

 

Returns:
java.lang.String representation of series' name.

 

Since: 1.0
See also: setName(String)

 

 

 

setName

 

public void setName( java.lang.String name)

 

Sets the name for series. Name is used to identify series on ChartLegend

 

Parameters:
name-
java.lang.String representation of desired name.

 

Since: 1.0

 

 

 

getPoints

 

public ChartPointCollection getPoints( )

 

Gets the points collection that series represents. Points collection is used to assign data to be represented*.
 // Adding double point to series1.
 series1.getPoints().addXY(1, 10);
 // Adding date point to series.
 series2.getPoints().addDate(trialTime, 10);
 // Adding XML element as source of points.
 series3.getPoints().setData(xmlElement, true);
 
*see samples along the SDK for more idea.

 

Returns:
instance of ChartPointCollection class.

 

Since: 1.0
See also: ChartPointCollection.addXY(double,double)ChartPointCollection.addDate(Date,double)ChartPointCollection.setData(Enumeration,IItemBinder)ChartPoint

 

 

 

getPointDeclaration

 

public ChartPointDeclaration getPointDeclaration( )

 

Gets point declaration for series. Point declaration is actual for multiple Y value chart types.

 

Returns:
instance of ChartPointDeclaration class that is responsible for multiple Y values mapping.

 

Since: 1.0

 

 

 

setPointDeclaration

 

public void setPointDeclaration( ChartPointDeclaration declaration)

 

Sets point declaration for series. Point declaration is actual for multiple Y value chart types.

 

Parameters:
declaration-
instance of ChartPointDeclaration class that is responsible for multiple Y values mapping.

 

Since: 1.0

 

 

 

getPointsCache

 

public ChartPoint[] getPointsCache( )

 

Gets sorted points array.

 

Returns:
Array of sorted points

 

Since: 1.0

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.