Summ:  Nested 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 final class ChartSeries extends ChartPointAttributes

 

Represents chart series. Series is used to draw required 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);
 
XML Attributes
name Defines series name
area Defines corresponding area name
legend Defines corresponding legend name
type Defines type
background Defines background resource
filter Defines whether color filter is enabled
marker Defines marker resource
markersize Defines marker size
showlabel Defines whether labels is shown
color Defines background color
border Defines border color
linewidth Defines line/border width
halign Defines labels horizontal alignment
valign Defines labels vertical alignment

 

Since: 1.0

 

 

Nested Members Summary
static class ChartSeries.LegendIconCell
    

 

 

Constructors Summary
ChartSeries()
    
Initializes a new instance of ChartSereies class.
ChartSeries(ChartType type)
    
Initializes a new instance of ChartSereies class with specified type.
ChartSeries(java.lang.String name)
    
Initializes a new instance of ChartSereies class with specified name.
ChartSeries(java.lang.String name, ChartType type)
    
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 current type of series.
ChartAxis getXAxis()
    
Gets X axis for series.
ChartAxis getYAxis()
    
Gets Y axis for series.
boolean isRegionsEnabled()
    
Gets value indicating whether chart engine should track regions belonging to this series for future hit zones creation.
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 setRegionsEnabled(boolean enabled)
    
Sets value indicating whether chart engine should track regions belonging to this series for future hit zones creation.
void setType(ChartType type)
    
Sets the type that is represents the 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, getBackDrawable, getBorderColor, getHLabelAlignment, getLabel, getLabelBackground, getLabelFormat, getLabelPadding, getLineWidth, getMarkerDrawable, getMarkerSize, getPathEffect, getShowLabel, getTag, getTextPaint, getVLabelAlignment, isBackFilterEnabled, reset, setAttribute, setBackColor, setBackDrawable, setBackFilterEnabled, setBorderColor, setHLabelAlignment, setLabel, setLabelBackground, setLabelFormat, setLabelPadding, setLineWidth, setMarkerDrawable, setMarkerPaint, setMarkerSize, setPathEffect, setShowLabel, setTag, setVLabelAlignment

 

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

 

 

 

 

ChartSeries

 

public ChartSeries( java.lang.String name)

 

Initializes a new instance of ChartSereies class with specified name.

 

Parameters:
name-
Name of series.

 

Since: 1.0

 

 

 

ChartSeries

 

public ChartSeries( java.lang.String name,
ChartType type)

 

Initializes a new instance of ChartSereies class with specified name and type.

 

Parameters:
name-
name of series.
type-
instance of ChartType class.

 

Since: 1.0

 

 

 

ChartSeries

 

public ChartSeries( ChartType type)

 

Initializes a new instance of ChartSereies class with specified type.

 

Parameters:
type-
instance of ChartType class.

 

Since: 1.0

 

 

 

ChartSeries

 

public ChartSeries( )

 

Initializes a new instance of ChartSereies class.

 

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

 

 

 

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 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

 

 

 

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.

 

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

 

Since: 1.0

 

 

 

getActualYAxis

 

public ChartAxis getActualYAxis( )

 

Gets the actual X axis depending on currently assigned chart type.

 

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

 

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.setData(Element,boolean,String,String...)ChartPointCollection.addXY(double,double...)ChartPointCollection.addDate(Date,double...)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

 

 

 

getType

 

public ChartType getType( )

 

Gets the current 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 is represents the series.

 

Parameters:
type-
instance of ChartType class.

 

Since: 1.0

 

 

 

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

 

 

 

getPointsCache

 

public ChartPoint[] getPointsCache( )

 

Gets sorted points array.

 

Returns:
Array of sorted points

 

Since: 1.0

 

 

 

isRegionsEnabled

 

public boolean isRegionsEnabled( )

 

Gets value indicating whether chart engine should track regions belonging to this series for future hit zones creation.

 

Returns:
true

 

Since: 1.5
See also: ChartEngine.hitTest(int,int)

 

 

 

setRegionsEnabled

 

public void setRegionsEnabled( boolean enabled)

 

Sets value indicating whether chart engine should track regions belonging to this series for future hit zones creation.

 

Parameters:
enabled-

 

Since: 1.5
See also: ChartEngine.hitTest(int,int)

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.