GemBox.Spreadsheet
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    ChartSeriesCollection Class

    Namespace:
    GemBox.Spreadsheet.Charts
    Assembly:
    GemBox.Spreadsheet.dll

    Represents a collection of ChartSeries objects.

    • C#
    • VB.NET
    public abstract class ChartSeriesCollection : IList, ICollection, IEnumerable
    Public MustInherit Class ChartSeriesCollection
        Implements IList, ICollection, IEnumerable
    Inheritance:
    System.Object
    ChartSeriesCollection
    Derived
    ChartSeriesCollection<T>
    Implements
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable

    Properties

    Count

    Gets the number of elements contained in the ChartSeriesCollection.

    • C#
    • VB.NET
    public abstract int Count { get; }
    Public MustOverride ReadOnly Property Count As Integer
    Property Value
    System.Int32

    Item[Int32]

    Gets the ChartSeries that is stored at the zero-based index of the ChartSeriesCollection.

    • C#
    • VB.NET
    public ChartSeries this[int index] { get; }
    Public ReadOnly Property Item(index As Integer) As ChartSeries
    Parameters
    index
    System.Int32

    The zero-based index of the ChartSeriesCollection from which to get the ChartSeries.

    Property Value
    ChartSeries

    The ChartSeries that is stored at the zero-based index of the ChartSeriesCollection.

    Methods

    Add()

    Adds a new empty series to the chart.

    • C#
    • VB.NET
    public ChartSeries Add()
    Public Function Add As ChartSeries
    Returns
    ChartSeries

    A new empty series added to the chart.

    Remarks

    Calling this method on ComboChart's series collection will add a new empty series to the last child chart's series collection. If ComboChart is empty, an AreaChart will be added automatically.

    Add(String, IEnumerable)

    Adds a new series with specified name and values to the chart.

    • C#
    • VB.NET
    public ChartSeries Add(string name, IEnumerable values)
    Public Function Add(name As String, values As IEnumerable) As ChartSeries
    Parameters
    name
    System.String

    The series name.

    values
    System.Collections.IEnumerable

    The series values.

    Returns
    ChartSeries

    A new series with specified name and values added to the chart.

    Remarks

    Calling this method on ComboChart's series collection will add a new series with specified name and values to the last child chart's series collection. If ComboChart is empty, an AreaChart will be added automatically.

    Add(String, Object[])

    Adds a new series with specified name and values to the chart.

    • C#
    • VB.NET
    public ChartSeries Add(string name, params object[] values)
    Public Function Add(name As String, ParamArray values As Object()) As ChartSeries
    Parameters
    name
    System.String

    The series name.

    values
    System.Object[]

    The series values.

    Returns
    ChartSeries

    A new series with specified name and values added to the chart.

    Remarks

    Calling this method on ComboChart's series collection will add a new series with specified name and values to the last child chart's series collection. If ComboChart is empty, an AreaChart will be added automatically.

    Add(String, String)

    Adds a new series with specified name and values reference to the chart.

    • C#
    • VB.NET
    public ChartSeries Add(string name, string valuesReference)
    Public Function Add(name As String, valuesReference As String) As ChartSeries
    Parameters
    name
    System.String

    The series name.

    valuesReference
    System.String

    The series values reference.

    Returns
    ChartSeries

    A new series with specified name and values reference added to the chart.

    Remarks

    Calling this method on ComboChart's series collection will add a new series with specified name and values reference to the last child chart's series collection. If ComboChart is empty, an AreaChart will be added automatically.

    Clear()

    Removes all elements from the ChartSeriesCollection.

    • C#
    • VB.NET
    public abstract void Clear()
    Public MustOverride Sub Clear

    Move(Int32, Int32)

    Moves the series at the specified index to a new location in the collection.

    • C#
    • VB.NET
    public abstract void Move(int oldIndex, int newIndex)
    Public MustOverride Sub Move(oldIndex As Integer, newIndex As Integer)
    Parameters
    oldIndex
    System.Int32

    The zero-based index specifying the location of the item to be moved.

    newIndex
    System.Int32

    The zero-based index specifying the new location of the item.

    Remarks

    This method is not supported by ComboChart's series collection.

    RemoveAt(Int32)

    Removes the element at the specified index of the ChartSeriesCollection.

    • C#
    • VB.NET
    public abstract void RemoveAt(int index)
    Public MustOverride Sub RemoveAt(index As Integer)
    Parameters
    index
    System.Int32

    The zero-based index of the element to remove.

    Implements

    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.