API Reference
ChartDataset`1
Represents an immutable, renderer-neutral collection of source rows that can be transformed before chart construction.
Inheritance
- Object
- ChartDataset`1
Usage
Explore 13 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 10
- Property ChartDataBin.Dataset
- Property ChartDataGroup.Dataset
- Method ChartDataset.Bin
- Method ChartDataset.Filter
- Method ChartDataset.From
- Method ChartDataset.Select``1
- Method ChartDataset.SortByDescending``1
- Method ChartDataset.SortBy``1
- Method ChartDataset.Summarize``2
- Property ChartDataset.Empty
Accepted by parameters 3
- Method Chart.AddHistogram``1
- Method ChartGrid.FromFacets``2
- Method ChartGrid.FromFacets``2
Type Parameters
- T
- The source row type.
Methods
public ChartDataset<ChartDataBin<T?>> Bin(Func<T?, Double> valueSelector, Int32 binCount) #ChartDataset<ChartDataBin<T?>>Partitions a numeric measure into the same rounded, equal-width layout used by scalar histogram ingestion.
Parameters
- valueSelector System.Func<T?, System.Double>
- binCount System.Int32
public ChartDataset<ChartDataBin<T?>> Bin(Func<T?, Double> valueSelector, ChartHistogramBinLayout layout) #ChartDataset<ChartDataBin<T?>>Partitions measurements through an explicit shared layout, preserving empty intervals and rejecting observations outside intervals or in gaps.
Parameters
- valueSelector System.Func<T?, System.Double>
- layout ChartForgeX.Core.ChartHistogramBinLayout
public ChartDataset<T?> Filter(Func<T?, Boolean> predicate) #ChartDataset<T?>Returns rows accepted by the predicate without changing this dataset.
Parameters
- predicate System.Func<T?, System.Boolean>
public static ChartDataset<T?> From(IEnumerable<T?> rows) #ChartDataset<T?>Materializes a source sequence once into an immutable dataset.
Parameters
- rows System.Collections.Generic.IEnumerable<T?>
public IEnumerator<T?> GetEnumerator() #IEnumerator<T?>Returns an enumerator that iterates through the collection.
Returns
An enumerator that can be used to iterate through the collection.
public IReadOnlyList<ChartDataGroup<TKey?, T?>> GroupBy<TKey>(Func<T?, TKey?> keySelector, IEqualityComparer<TKey?>? comparer = null) #IReadOnlyList<ChartDataGroup<TKey?, T?>>Groups rows by key while preserving first-key and source-row order.
Type Parameters
- TKey
Parameters
- keySelector System.Func<T?, TKey?>
- comparer System.Collections.Generic.IEqualityComparer<TKey?>? = null
public ChartDataset<TResult?> Select<TResult>(Func<T?, TResult?> selector) #ChartDataset<TResult?>Projects every row into a new immutable dataset.
Type Parameters
- TResult
Parameters
- selector System.Func<T?, TResult?>
public ChartDataset<T?> SortByDescending<TKey>(Func<T?, TKey?> keySelector, IComparer<TKey?>? comparer = null) #ChartDataset<T?>Returns rows ordered descending by the selected key without changing this dataset.
Type Parameters
- TKey
Parameters
- keySelector System.Func<T?, TKey?>
- comparer System.Collections.Generic.IComparer<TKey?>? = null
public ChartDataset<T?> SortBy<TKey>(Func<T?, TKey?> keySelector, IComparer<TKey?>? comparer = null) #ChartDataset<T?>Returns rows ordered by the selected key without changing this dataset.
Type Parameters
- TKey
Parameters
- keySelector System.Func<T?, TKey?>
- comparer System.Collections.Generic.IComparer<TKey?>? = null
public ChartDataset<TResult?> Summarize<TKey, TResult>(Func<T?, TKey?> keySelector, Func<TKey?, IReadOnlyList<T?>, TResult?> summarize, IEqualityComparer<TKey?>? comparer = null) #ChartDataset<TResult?>Creates one summary row per group.
Type Parameters
- TKey
- TResult
Parameters
- keySelector System.Func<T?, TKey?>
- summarize System.Func<TKey?, System.Collections.Generic.IReadOnlyList<T?>, TResult?>
- comparer System.Collections.Generic.IEqualityComparer<TKey?>? = null
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public static ChartDataset<T?> Empty { get; } #Gets an empty dataset.
public Int32 Count { get; } #Gets the number of rows.
public T? this[Int32 index] { get; } #Gets the row at the specified position.
Parameters
- index System.Int32
public IReadOnlyList<T?> Rows { get; } #Gets the rows through a read-only collection.