SeriesCollection<TKey>
public class SeriesCollection<TKey>A collection of data series with change notification support. Automatically assigns series indices and manages dirty state.
Methods
Section titled “Methods”
Add(DataSeries)
Section titled “Add(DataSeries)”public void Add(DataSeries<TKey> series)Add a new series to the collection.
Parameters
| Name | Type |
|---|---|
series |
ChartGuru.DataSeries{{TKey}} |
Add(TKey)
Section titled “Add(TKey)”public DataSeries<TKey> Add(TKey key)Create and add a new series with the given key.
Parameters
| Name | Type |
|---|---|
key |
{TKey} |
Returns
ChartGuru.DataSeries{{TKey}}
Add(TKey, IEnumerable)
Section titled “Add(TKey, IEnumerable)”public DataSeries<TKey> Add(TKey key, IEnumerable<DataPoint> points)Create and add a new series with data.
Parameters
| Name | Type |
|---|---|
key |
{TKey} |
points |
System.Collections.Generic.IEnumerable{ChartGuru.DataPoint} |
Returns
ChartGuru.DataSeries{{TKey}}
Add(TKey, IEnumerable, Color)
Section titled “Add(TKey, IEnumerable, Color)”public DataSeries<TKey> Add(TKey key, IEnumerable<DataPoint> points, Color color)Create and add a new series with data and color.
Parameters
| Name | Type |
|---|---|
key |
{TKey} |
points |
System.Collections.Generic.IEnumerable{ChartGuru.DataPoint} |
color |
UnityEngine.Color |
Returns
ChartGuru.DataSeries{{TKey}}
Remove(TKey)
Section titled “Remove(TKey)”public bool Remove(TKey key)Remove a series by key.
Parameters
| Name | Type |
|---|---|
key |
{TKey} |
Returns
System.Boolean
Remove(DataSeries)
Section titled “Remove(DataSeries)”public bool Remove(DataSeries<TKey> series)Remove a series.
Parameters
| Name | Type |
|---|---|
series |
ChartGuru.DataSeries{{TKey}} |
Returns
System.Boolean
Clear()
Section titled “Clear()”public void Clear()Remove all series.
ContainsKey(TKey)
Section titled “ContainsKey(TKey)”public bool ContainsKey(TKey key)Check if a series with the given key exists.
Parameters
| Name | Type |
|---|---|
key |
{TKey} |
Returns
System.Boolean
TryGetSeries(TKey, out DataSeries)
Section titled “TryGetSeries(TKey, out DataSeries)”public bool TryGetSeries(TKey key, out DataSeries<TKey> series)Try to get a series by key.
Parameters
| Name | Type |
|---|---|
key |
{TKey} |
series |
ChartGuru.DataSeries{{TKey}} |
Returns
System.Boolean
GetVisibleSeries()
Section titled “GetVisibleSeries()”public IEnumerable<DataSeries<TKey>> GetVisibleSeries()Get all visible series.
Returns
System.Collections.Generic.IEnumerable{ChartGuru.DataSeries{{TKey}}}
ClearDirty()
Section titled “ClearDirty()”public void ClearDirty()Clear dirty flags on all series after rendering.
GetEnumerator()
Section titled “GetEnumerator()”public IEnumerator<DataSeries<TKey>> GetEnumerator()Enumerates series in collection order without copying them.
Returns
System.Collections.Generic.IEnumerator{ChartGuru.DataSeries{{TKey}}}
OnCollectionChanged(NotifyCollectionChangedEventArgs)
Section titled “OnCollectionChanged(NotifyCollectionChangedEventArgs)”protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs e)Maintains series indices and forwards collection changes to registered listeners.
Parameters
| Name | Type |
|---|---|
e |
System.Collections.Specialized.NotifyCollectionChangedEventArgs |
Dispose()
Section titled “Dispose()”public void Dispose()Releases resources owned by this Series Collection; callers should not use the instance afterward.
Constructors
Section titled “Constructors”
SeriesCollection()
Section titled “SeriesCollection()”public SeriesCollection()Properties
Section titled “Properties”
public int Count { get; }Number of series in the collection.
Returns
System.Int32
TotalPointCount
Section titled “TotalPointCount”public int TotalPointCount { get; }Total number of data points across all series.
Returns
System.Int32
IsDirty
Section titled “IsDirty”public bool IsDirty { get; }Whether any series has pending changes.
Returns
System.Boolean
public float MinY { get; }Minimum Y value across all series.
Returns
System.Single
public float MaxY { get; }Maximum Y value across all series.
Returns
System.Single
public float MinX { get; }Minimum X value across all series.
Returns
System.Single
public float MaxX { get; }Maximum X value across all series.
Returns
System.Single
this[int]
Section titled “this[int]”public DataSeries<TKey> this[int index] { get; }Parameters
| Name | Type |
|---|---|
index |
System.Int32 |
Returns
ChartGuru.DataSeries{{TKey}}
this[TKey]
Section titled “this[TKey]”public DataSeries<TKey> this[TKey key] { get; }Parameters
| Name | Type |
|---|---|
key |
{TKey} |
Returns
ChartGuru.DataSeries{{TKey}}
Events
Section titled “Events”
CollectionChanged
Section titled “CollectionChanged”public event NotifyCollectionChangedEventHandler CollectionChangedRaised after series are inserted, removed, replaced, or reset.
Returns
System.Collections.Specialized.NotifyCollectionChangedEventHandler
DataChanged
Section titled “DataChanged”public event Action<SeriesCollection<TKey>> DataChangedRaised when collection structure or any contained series data changes.
Returns
System.Action{ChartGuru.SeriesCollection`1}