Skip to content

PlottableProjection<TElement, TValue>

StructChartGuruChartGuru
public readonly struct PlottableProjection<TElement, TValue>

Type-safe projection from a data element to a plottable value. Swift Charts equivalent: PlottableProjection<DataElement, DataValue> with typed key-path semantics via System.Func%602.

public readonly string Label

Returns

System.String

public readonly Func<TElement, TValue> Selector

Returns

System.Func{{TElement},{TValue}}

public readonly PlottableType Type

Returns

ChartGuru.PlottableType

PlottableProjection(string, Func<TElement, TValue>, PlottableType)

Section titled “PlottableProjection(string, Func<TElement, TValue>, PlottableType)”
public PlottableProjection(string label, Func<TElement, TValue> selector, PlottableType type)

Creates a typed projection that labels and classifies values selected from source elements.

Parameters

Name Type
label System.String
selector System.Func{{TElement},{TValue}}
type ChartGuru.PlottableType

public TValue Select(TElement element)

Projects one source element into the plottable value consumed by the mark binding.

Parameters

Name Type
element {TElement}

Returns

{TValue}

public PlottableValueRef ToRef(TElement element)

Evaluates the selector for one element and wraps the result as an untyped plottable reference for mark APIs.

Parameters

Name Type
element {TElement}

Returns

ChartGuru.PlottableValueRef