Skip to content

ManagedPlottableValue

StructChartGuruChartGuru
public readonly struct ManagedPlottableValue

Managed wrapper for PlottableValue that supports string categories directly. Use this for convenience API; it converts to native types internally for rendering. Swift Charts-style .Value() naming for consistency.

public readonly string Label

Returns

System.String

public readonly object BoxedValue

Returns

System.Object

public readonly PlottableType Type

Returns

ChartGuru.PlottableType

ManagedPlottableValue(string, object, PlottableType)

Section titled “ManagedPlottableValue(string, object, PlottableType)”
public ManagedPlottableValue(string label, object value, PlottableType type)

Creates a managed labeled value with an explicit scale-classification hint and an unmodified boxed payload.

Parameters

NameType
labelSystem.String
valueSystem.Object
typeChartGuru.PlottableType

public static ManagedPlottableValue Value(string label, float data)

Creates a quantitative float value. Swift Charts equivalent: .Value(“Label”, floatValue)

Parameters

NameType
labelSystem.String
dataSystem.Single

Returns

ChartGuru.ManagedPlottableValue

public static ManagedPlottableValue Value(string label, double data)

Creates a quantitative double value. Swift Charts equivalent: .Value(“Label”, doubleValue)

Parameters

NameType
labelSystem.String
dataSystem.Double

Returns

ChartGuru.ManagedPlottableValue

public static ManagedPlottableValue Value(string label, int data)

Creates a quantitative int value. Swift Charts equivalent: .Value(“Label”, intValue)

Parameters

NameType
labelSystem.String
dataSystem.Int32

Returns

ChartGuru.ManagedPlottableValue

public static ManagedPlottableValue Value(string label, string category)

Creates a categorical string value. Swift Charts equivalent: .Value(“Label”, stringCategory)

Parameters

NameType
labelSystem.String
categorySystem.String

Returns

ChartGuru.ManagedPlottableValue

public static ManagedPlottableValue Value(string label, DateTime data)

Creates a temporal DateTime value. Swift Charts equivalent: .Value(“Label”, dateValue)

Parameters

NameType
labelSystem.String
dataSystem.DateTime

Returns

ChartGuru.ManagedPlottableValue

public static ManagedPlottableValue Value<TEnum>(string label, TEnum data) where TEnum : Enum

Creates a categorical enum value. Swift Charts equivalent: .Value(“Label”, enumValue)

Parameters

NameType
labelSystem.String
data{TEnum}

Returns

ChartGuru.ManagedPlottableValue

public float GetNumericValue()

Gets the numeric value for quantitative data, or hash code for categorical.

Returns

System.Single

public string GetCategoryString()

Gets the string representation for categorical data or labels.

Returns

System.String

public override string ToString()

Returns

System.String