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

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

public static ManagedPlottableValue Value(string label, float data)

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

Parameters

Name Type
label System.String
data System.Single

Returns

ChartGuru.ManagedPlottableValue

public static ManagedPlottableValue Value(string label, double data)

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

Parameters

Name Type
label System.String
data System.Double

Returns

ChartGuru.ManagedPlottableValue

public static ManagedPlottableValue Value(string label, int data)

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

Parameters

Name Type
label System.String
data System.Int32

Returns

ChartGuru.ManagedPlottableValue

public static ManagedPlottableValue Value(string label, string category)

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

Parameters

Name Type
label System.String
category System.String

Returns

ChartGuru.ManagedPlottableValue

public static ManagedPlottableValue Value(string label, DateTime data)

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

Parameters

Name Type
label System.String
data System.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

Name Type
label System.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