Skip to content

PlottableValueRef

ClassChartGuruChartGuru
public class PlottableValueRef

Non-generic wrapper for PlottableValue to allow usage as parameter type. Used for Swift Charts-style APIs like ForegroundStyle(by: .Value(“Label”, data)).

PlottableValueRef(string, object, PlottableType)

Section titled “PlottableValueRef(string, object, PlottableType)”
public PlottableValueRef(string label, object value, PlottableType type = PlottableType.Quantitative)

Creates a managed plottable reference for APIs that accept numeric, categorical, or temporal values through one type.

Parameters

Name Type
label System.String
value System.Object
type ChartGuru.PlottableType

public static PlottableValueRef From<T>(PlottableValue<T> plottable) where T : unmanaged

Boxes a Burst-compatible plottable value while preserving its label and scale classification.

Parameters

Name Type
plottable ChartGuru.PlottableValue{{T}}

Returns

ChartGuru.PlottableValueRef

public override string ToString()

Returns

System.String

public string Label { get; }

The label for this plottable value.

Returns

System.String

public object Value { get; }

The boxed value.

Returns

System.Object

public PlottableType Type { get; }

The data type.

Returns

ChartGuru.PlottableType

public TimeUnit DateUnit { get; }

When set via ChartGuru.PlottableValue.Value(System.String%2cSystem.DateTime%2cChartGuru.TimeUnit%2cSystem.Int32), carries the date-unit for downstream axis auto-configuration.

Returns

ChartGuru.TimeUnit

public int DateUnitCount { get; }

The multiplier for ChartGuru.PlottableValueRef.DateUnit (e.g., every 2 months).

Returns

System.Int32

public bool IsRange { get; }

True when ChartGuru.PlottableValueRef.Value carries a ChartBinRange-style interval. Swift Charts equivalent: .Value(“Label”, lower..<upper) / .Value(“Label”, lower…upper).

Returns

System.Boolean