menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ChartSeriesCollection - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ChartSeriesCollection

    System.Collections.CollectionBase derived class that holds instances of ChartSeries.

    Inheritance
    System.Object
    System.Collections.CollectionBase
    ChartSeriesCollection
    Implements
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable
    Inherited Members
    System.Collections.CollectionBase.Capacity
    System.Collections.CollectionBase.Clear()
    System.Collections.CollectionBase.Count
    System.Collections.CollectionBase.GetEnumerator()
    System.Collections.CollectionBase.InnerList
    System.Collections.CollectionBase.List
    System.Collections.CollectionBase.OnClear()
    System.Collections.CollectionBase.OnClearComplete()
    System.Collections.CollectionBase.OnInsert(System.Int32, System.Object)
    System.Collections.CollectionBase.OnInsertComplete(System.Int32, System.Object)
    System.Collections.CollectionBase.OnRemove(System.Int32, System.Object)
    System.Collections.CollectionBase.OnRemoveComplete(System.Int32, System.Object)
    System.Collections.CollectionBase.OnSet(System.Int32, System.Object, System.Object)
    System.Collections.CollectionBase.OnSetComplete(System.Int32, System.Object, System.Object)
    System.Collections.CollectionBase.OnValidate(System.Object)
    System.Collections.CollectionBase.RemoveAt(System.Int32)
    System.Collections.CollectionBase.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
    System.Collections.CollectionBase.System.Collections.ICollection.IsSynchronized
    System.Collections.CollectionBase.System.Collections.ICollection.SyncRoot
    System.Collections.CollectionBase.System.Collections.IList.Add(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.Contains(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.get_Item(System.Int32)
    System.Collections.CollectionBase.System.Collections.IList.IndexOf(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.Insert(System.Int32, System.Object)
    System.Collections.CollectionBase.System.Collections.IList.IsFixedSize
    System.Collections.CollectionBase.System.Collections.IList.IsReadOnly
    System.Collections.CollectionBase.System.Collections.IList.Item[System.Int32]
    System.Collections.CollectionBase.System.Collections.IList.Remove(System.Object)
    System.Collections.CollectionBase.System.Collections.IList.set_Item(System.Int32, System.Object)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms.Chart
    Assembly: Syncfusion.Chart.Base.dll
    Syntax
    public sealed class ChartSeriesCollection : CollectionBase, IList, ICollection, IEnumerable

    Constructors

    ChartSeriesCollection(ChartModel)

    Initializes a new instance of the ChartSeriesCollection class.

    Declaration
    public ChartSeriesCollection(ChartModel chartModel)
    Parameters
    Type Name Description
    ChartModel chartModel

    Chart model associated with this collection.

    Properties

    DisableStyles

    Indicates whether the Series's EnableStyles Enable or Not.

    Declaration
    public bool DisableStyles { get; set; }
    Property Value
    Type
    System.Boolean

    Item[Int32]

    Overloaded. Returns the ChartSeries object stored at the specified index.

    Declaration
    public ChartSeries this[int index] { get; }
    Parameters
    Type Name Description
    System.Int32 index
    Property Value
    Type
    ChartSeries

    Item[String]

    Returns the ChartSeries object stored with the specified name.

    Declaration
    public ChartSeries this[string name] { get; }
    Parameters
    Type Name Description
    System.String name
    Property Value
    Type
    ChartSeries

    ShouldSort

    Indicates whether the series in this collection should be sorted.

    Declaration
    public bool ShouldSort { get; set; }
    Property Value
    Type
    System.Boolean

    Sorted

    Indicates whether this ChartSeriesCollection is sorted.

    Declaration
    public bool Sorted { get; }
    Property Value
    Type
    System.Boolean

    VisibleCount

    Returns the number of visible series in the collection.

    Declaration
    public int VisibleCount { get; }
    Property Value
    Type
    System.Int32

    Methods

    Add(ChartSeries)

    Adds the specified ChartSeries into this collection.

    Declaration
    public void Add(ChartSeries series)
    Parameters
    Type Name Description
    ChartSeries series

    ChartSeries An instance of the Chartseries that is to be added to this collection.

    BeginUpdate()

    Call this method if you perform multiple changes in quick succession.

    Declaration
    public void BeginUpdate()
    See Also
    EndUpdate()

    Contains(ChartSeries)

    Determines whether the collection contains a specific value.

    Declaration
    public bool Contains(ChartSeries series)
    Parameters
    Type Name Description
    ChartSeries series

    The series.

    Returns
    Type
    System.Boolean

    EndUpdate()

    Call this method if you called BeginUpdate() earlier and you are done with your changes.

    Declaration
    public void EndUpdate()
    See Also
    BeginUpdate()

    GetIndexLowerSeries(Int32, ChartSeriesType)

    Declaration
    [Obsolete("Internal method")]
    public int GetIndexLowerSeries(int pointIndex, ChartSeriesType type)
    Parameters
    Type Name Description
    System.Int32 pointIndex
    ChartSeriesType type
    Returns
    Type
    System.Int32

    GetIndexMostSeries(Int32, ChartSeriesType)

    Declaration
    [Obsolete("Internal method")]
    public int GetIndexMostSeries(int pointIndex, ChartSeriesType type)
    Parameters
    Type Name Description
    System.Int32 pointIndex
    ChartSeriesType type
    Returns
    Type
    System.Int32

    GetMaxCountPoint()

    Returns the maximum number of points in the series collection

    Declaration
    [Obsolete("Internal method")]
    public int GetMaxCountPoint()
    Returns
    Type
    System.Int32

    GetSeriesByVisible(Int32)

    Returns the visible series with the specified index

    Declaration
    public ChartSeries GetSeriesByVisible(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type
    ChartSeries

    IndexOf(ChartSeries)

    Call this method to retrieve the index value of the specified ChartSeries.

    Declaration
    public int IndexOf(ChartSeries series)
    Parameters
    Type Name Description
    ChartSeries series

    An instance of the ChartSeries that is to be located.

    Returns
    Type Description
    System.Int32

    The index value of specified ChartSeries.

    Insert(Int32, ChartSeries)

    Inserts the specified ChartSeries to this collection at the specified index.

    Declaration
    public void Insert(int index, ChartSeries series)
    Parameters
    Type Name Description
    System.Int32 index

    Index value where the insert is to be made.

    ChartSeries series

    An instance of the ChartSeries that is to be inserted into this collection.

    Remove(ChartSeries)

    Removes the specified ChartSeries from this collection.

    Declaration
    public void Remove(ChartSeries series)
    Parameters
    Type Name Description
    ChartSeries series

    ChartSeries that is to be removed from this collection.

    ResetCache()

    Call this method to remove any temporarily cached style instances. You do not normally have to call this method.

    Declaration
    public void ResetCache()

    ResetCache(ChartSeries)

    Call this method to remove any temporarily cached style instances. You do not normally have to call this method.

    Declaration
    public void ResetCache(ChartSeries series)
    Parameters
    Type Name Description
    ChartSeries series

    Sort(IComparer)

    Sorts by the specified comparer.

    Declaration
    public void Sort(IComparer comparer)
    Parameters
    Type Name Description
    System.Collections.IComparer comparer

    The System.Collections.IComparer. Only ComparerByZandY is supported.

    VisibleByIndex(Int32)

    Returns the index of the visible series

    Declaration
    [Obsolete("Internal method")]
    public int VisibleByIndex(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type
    System.Int32

    VisibleSeriesIndexOf(ChartSeries)

    Returns the index of the series if visible otherwise returns -1

    Declaration
    [Obsolete("Internal method")]
    public int VisibleSeriesIndexOf(ChartSeries series)
    Parameters
    Type Name Description
    ChartSeries series
    Returns
    Type
    System.Int32

    Events

    Changed

    Event that will be raised when this collection is changed.

    Declaration
    public event ChartSeriesCollectionChangedEventHandler Changed
    Event Type
    Type
    ChartSeriesCollectionChangedEventHandler

    Implements

    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable

    Extension Methods

    EnumerableExtensions.GetElementType(IEnumerable)
    EnumerableExtensions.GetItemPropertyInfo(IEnumerable)
    FunctionalExtensions.ForEach<T>(IEnumerable, Action<T>)
    FunctionalExtensions.ToList<T>(IEnumerable)
    FunctionalExtensions.MoveTo(IList, Int32, Int32)
    QueryableExtensions.OfQueryable(IEnumerable)
    QueryableExtensions.OfQueryable(IEnumerable, Type)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable, Type, List<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany(IEnumerable, Type, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Func<String, Expression>, String[])
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved