org.achartengine.model
Class CategorySeries

java.lang.Object
  extended by org.achartengine.model.CategorySeries
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RangeCategorySeries

public class CategorySeries
extends java.lang.Object
implements java.io.Serializable

A series for the category charts like the pie ones.

See Also:
Serialized Form

Constructor Summary
CategorySeries(java.lang.String title)
          Builds a new category series.
 
Method Summary
 void add(double value)
          Adds a new value to the series
 void add(java.lang.String category, double value)
          Adds a new value to the series.
 void clear()
          Removes all the existing values from the series.
 java.lang.String getCategory(int index)
          Returns the category name at the specified index.
 int getItemCount()
          Returns the series item count.
 java.lang.String getTitle()
          Returns the series title.
 double getValue(int index)
          Returns the value at the specified index.
 void remove(int index)
          Removes an existing value from the series.
 void set(int index, java.lang.String category, double value)
          Replaces the value at the specific index in the series.
 XYSeries toXYSeries()
          Transforms the category series to an XY series.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CategorySeries

public CategorySeries(java.lang.String title)
Builds a new category series.

Parameters:
title - the series title
Method Detail

getTitle

public java.lang.String getTitle()
Returns the series title.

Returns:
the series title

add

public void add(double value)
Adds a new value to the series

Parameters:
value - the new value

add

public void add(java.lang.String category,
                double value)
Adds a new value to the series.

Parameters:
category - the category
value - the new value

set

public void set(int index,
                java.lang.String category,
                double value)
Replaces the value at the specific index in the series.

Parameters:
index - the index in the series
category - the category
value - the new value

remove

public void remove(int index)
Removes an existing value from the series.

Parameters:
index - the index in the series of the value to remove

clear

public void clear()
Removes all the existing values from the series.


getValue

public double getValue(int index)
Returns the value at the specified index.

Parameters:
index - the index
Returns:
the value at the index

getCategory

public java.lang.String getCategory(int index)
Returns the category name at the specified index.

Parameters:
index - the index
Returns:
the category name at the index

getItemCount

public int getItemCount()
Returns the series item count.

Returns:
the series item count

toXYSeries

public XYSeries toXYSeries()
Transforms the category series to an XY series.

Returns:
the XY series


Copyright © 2009 - 2011 4ViewSoft. All Rights Reserved.