Skip to content
ChartForgeX
Class

ChartDataset<T>

ChartForgeX.Data

Namespace
ChartForgeX.Data
Assembly
ChartForgeX
Implements
IReadOnlyList<T> IReadOnlyCollection<T> IEnumerable<T> IEnumerable
Modifiers
sealed
Attributes
DefaultMember("Item")

Represents an immutable, renderer-neutral collection of source rows that can be transformed before chart construction.

Inheritance

  • object
  • ChartDataset<T>

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.

Accepted by parameters 3

Type Parameters

T
The source row type.

Methods

Bin 2 overloads
public ChartDataset<ChartDataBin<T?>> Bin(Func<T?, double> valueSelector, int binCount) #

Partitions a numeric measure into the same rounded, equal-width layout used by scalar histogram ingestion.

Parameters

valueSelector System.Func<T?, double> required
binCount int required
public ChartDataset<ChartDataBin<T?>> Bin(Func<T?, double> valueSelector, ChartHistogramBinLayout layout) #

Partitions measurements through an explicit shared layout, preserving empty intervals and rejecting observations outside intervals or in gaps.

Parameters

valueSelector System.Func<T?, double> required
layout ChartForgeX.Core.ChartHistogramBinLayout required
public ChartDataset<T?> Filter(Func<T?, bool> predicate) #

Returns rows accepted by the predicate without changing this dataset.

Parameters

predicate System.Func<T?, bool> required
public static ChartDataset<T?> From(IEnumerable<T?> rows) #

Materializes a source sequence once into an immutable dataset.

Parameters

rows System.Collections.Generic.IEnumerable<T?> required
public IEnumerator<T?> GetEnumerator() #

Returns an enumerator over the dataset rows in insertion order.

Returns

IEnumerator<T?>
public IReadOnlyList<ChartDataGroup<TKey?, T?>> GroupBy<TKey>(Func<T?, TKey?> keySelector, IEqualityComparer<TKey?>? comparer = null) #

Groups rows by key while preserving first-key and source-row order.

Type Parameters

TKey

Parameters

keySelector System.Func<T?, TKey?> required
comparer System.Collections.Generic.IEqualityComparer<TKey?>? = null optional

Returns

IReadOnlyList<ChartDataGroup<TKey?, T?>>
public ChartDataset<TResult?> Select<TResult>(Func<T?, TResult?> selector) #

Projects every row into a new immutable dataset.

Type Parameters

TResult

Parameters

selector System.Func<T?, TResult?> required
public ChartDataset<T?> SortByDescending<TKey>(Func<T?, TKey?> keySelector, IComparer<TKey?>? comparer = null) #

Returns rows ordered descending by the selected key without changing this dataset.

Type Parameters

TKey

Parameters

keySelector System.Func<T?, TKey?> required
comparer System.Collections.Generic.IComparer<TKey?>? = null optional
public ChartDataset<T?> SortBy<TKey>(Func<T?, TKey?> keySelector, IComparer<TKey?>? comparer = null) #

Returns rows ordered by the selected key without changing this dataset.

Type Parameters

TKey

Parameters

keySelector System.Func<T?, TKey?> required
comparer System.Collections.Generic.IComparer<TKey?>? = null optional
public ChartDataset<TResult?> Summarize<TKey, TResult>(Func<T?, TKey?> keySelector, Func<TKey?, IReadOnlyList<T?>, TResult?> summarize, IEqualityComparer<TKey?>? comparer = null) #

Creates one summary row per group.

Type Parameters

TKey
TResult

Parameters

keySelector System.Func<T?, TKey?> required
summarize System.Func<TKey?, System.Collections.Generic.IReadOnlyList<T?>, TResult?> required
comparer System.Collections.Generic.IEqualityComparer<TKey?>? = null optional

Properties

public static ChartDataset<T?> Empty { get; } #

Gets an empty dataset.

public int Count { get; } #

Gets the number of rows.

public T? this[int index] { get; } #

Gets the row at the specified position.

Parameters

index int required
public IReadOnlyList<T?> Rows { get; } #

Gets the rows through a read-only collection.