ChartCategoryCollection

Inheritance: java.lang.Object, com.aspose.slides.DomObject

All Implemented Interfaces: com.aspose.slides.IChartCategoryCollection

public class ChartCategoryCollection extends DomObject<ChartData> implements IChartCategoryCollection

Represents collection of ChartCategory

Methods

MethodDescription
get_Item(int index)Gets the element at the specified index.
getUseCells()If true then worksheet is used for storing categories (this case supports a multi-level categories).
setUseCells(boolean value)If true then worksheet is used for storing categories (this case supports a multi-level categories).
getGroupingLevelCount()Returns count of category grouping levels used.
add(IChartDataCell chartDataCell)If category exists in collection, return it.
add(Object value)Creates new ChartCategory from value and adds it to the collection.
indexOf(IChartCategory value)Searches for the specified ChartCategory and returns the zero-based index of the first occurrence within the entire Collection.
remove(IChartCategory value)Removes the specified value.
removeAt(int index)Removes the element at the given index.
clear()Removes all elements from the collection.
iterator()Returns an enumerator that iterates through the collection.
iteratorJava()Returns a java iterator for the entire collection.
size()Returns a number of elements int the collection.
copyTo(System.Array array, int index)Copies all elements of the collection to the specified array.
isSynchronized()Returns a value indicating whether access to the List is synchronized (thread safe).
getSyncRoot()Returns an object that can be used to synchronize access to the collection.

get_Item(int index)

public final IChartCategory get_Item(int index)

Gets the element at the specified index.

Parameters:

ParameterTypeDescription
indexint

Returns: IChartCategory - The element at the specified index.

getUseCells()

public final boolean getUseCells()

If true then worksheet is used for storing categories (this case supports a multi-level categories). If false then worksheet is NOT used for storing values (and this case doesn’t support a multi-level categories). Read/write boolean.

Returns: boolean

setUseCells(boolean value)

public final void setUseCells(boolean value)

If true then worksheet is used for storing categories (this case supports a multi-level categories). If false then worksheet is NOT used for storing values (and this case doesn’t support a multi-level categories). Read/write boolean.

Parameters:

ParameterTypeDescription
valueboolean

getGroupingLevelCount()

public final int getGroupingLevelCount()

Returns count of category grouping levels used. Is more then one for multilevel categories. Read-only int.

Returns: int

add(IChartDataCell chartDataCell)

public final IChartCategory add(IChartDataCell chartDataCell)

If category exists in collection, return it. Else creates new chart category from IChartDataCell and adds it to the collection.

Parameters:

ParameterTypeDescription
chartDataCellIChartDataCellCell used to create chart category.

Returns: IChartCategory - Added or existing category.

add(Object value)

public final IChartCategory add(Object value)

Creates new ChartCategory from value and adds it to the collection.

Parameters:

ParameterTypeDescription
valuejava.lang.ObjectThe value.

This method adds worksheet with name AUTO_DATA and adds all values there. If you use ChartDataWorkbook to add or edit cell values, be sure that you do not use this worksheet Maximum number of values added using this method must not exceed 16711680 |

Returns: IChartCategory - Added IChartCategory.

indexOf(IChartCategory value)

public final int indexOf(IChartCategory value)

Searches for the specified ChartCategory and returns the zero-based index of the first occurrence within the entire Collection.

Parameters:

ParameterTypeDescription
valueIChartCategoryChart category.

Returns: int - The zero-based index of the first occurrence of value within the entire CollectionBase, if found; otherwise, -1.

remove(IChartCategory value)

public final void remove(IChartCategory value)

Removes the specified value.

Parameters:

ParameterTypeDescription
valueIChartCategoryThe value.

removeAt(int index)

public final void removeAt(int index)

Removes the element at the given index.

Parameters:

ParameterTypeDescription
indexintIndex of a category to remove.

clear()

public final void clear()

Removes all elements from the collection.

iterator()

public final System.Collections.Generic.IGenericEnumerator<IChartCategory> iterator()

Returns an enumerator that iterates through the collection.

Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.slides.IChartCategory> - A IGenericEnumerator that can be used to iterate through the collection.

iteratorJava()

public final System.Collections.Generic.IGenericEnumerator<IChartCategory> iteratorJava()

Returns a java iterator for the entire collection.

Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.slides.IChartCategory> - An java.util.Iterator for the entire collection.

size()

public final int size()

Returns a number of elements int the collection. Read-only int.

Returns: int

copyTo(System.Array array, int index)

public final void copyTo(System.Array array, int index)

Copies all elements of the collection to the specified array.

Parameters:

ParameterTypeDescription
arraycom.aspose.ms.System.ArrayTarget array.
indexintStarting index in the array.

isSynchronized()

public final boolean isSynchronized()

Returns a value indicating whether access to the List is synchronized (thread safe). Read-only boolean.

Returns: boolean

getSyncRoot()

public final Object getSyncRoot()

Returns an object that can be used to synchronize access to the collection. Read-only Object.

Returns a synchronization root. Read-only Object.

Returns: java.lang.Object