Skip to content

PlottableValue

ClassChartGuruChartGuru
public static class PlottableValue

Static factory methods for creating PlottableValues with automatic type inference. Swift Charts-style .Value(“Label”, data) syntax.

public static PlottableValueRef Value(string label, object data)

Creates a PlottableValueRef for use in Swift Charts-style APIs. Example: mark.ForegroundStyle(PlottableValue.Value(“City”, city))

Parameters

Name Type Description
label System.String
data System.Object

Returns

ChartGuru.PlottableValueRef — No return description is available.

public static PlottableValueRef Value(string label, string category)

Creates a PlottableValueRef for categorical/string data. Example: mark.ForegroundStyle(PlottableValue.Value(“Category”, category))

Parameters

Name Type Description
label System.String
category System.String

Returns

ChartGuru.PlottableValueRef — No return description is available.

public static PlottableValueRef Value(string label, float data)

Creates a PlottableValueRef for numeric float data. Swift Charts equivalent: .Value(“Label”, floatValue)

Parameters

Name Type Description
label System.String
data System.Single

Returns

ChartGuru.PlottableValueRef — No return description is available.

public static PlottableValueRef Value(string label, int data)

Creates a PlottableValueRef for numeric int data. Swift Charts equivalent: .Value(“Label”, intValue)

Parameters

Name Type Description
label System.String
data System.Int32

Returns

ChartGuru.PlottableValueRef — No return description is available.

public static PlottableValueRef Value(string label, double data)

Creates a PlottableValueRef for numeric double data. Swift Charts equivalent: .Value(“Label”, doubleValue)

Parameters

Name Type Description
label System.String
data System.Double

Returns

ChartGuru.PlottableValueRef — No return description is available.

public static PlottableValueRef Value(string label, long data)

Creates a PlottableValueRef for numeric long data. Swift Charts equivalent: .Value(“Label”, longValue)

Parameters

Name Type Description
label System.String
data System.Int64

Returns

ChartGuru.PlottableValueRef — No return description is available.

public static PlottableValueRef Value(string label, DateTime data)

Creates a PlottableValueRef for temporal/DateTime data. Swift Charts equivalent: .Value(“Label”, dateValue)

Parameters

Name Type Description
label System.String
data System.DateTime

Returns

ChartGuru.PlottableValueRef — No return description is available.

public static PlottableValueRef Value(string label, DateTime data, TimeUnit unit, int count = 1)

Creates a PlottableValueRef for temporal data with date-unit binning. The DateTime is truncated to the nearest unit boundary at construction time. Swift Charts equivalent: .Value(“Day”, date, unit: .day).

Parameters

Name Type Description
label System.String
data System.DateTime
unit ChartGuru.TimeUnit
count System.Int32

Returns

ChartGuru.PlottableValueRef — No return description is available.

public static PlottableValueRef Value<T>(string label, ChartBinRange<T> range) where T : IComparable<T>

Creates a plottable interval value. Mirrors Swift Charts range-valued plottables while preserving open/closed bounds through ChartGuru.ChartBinRange%601.

Parameters

Name Type Description
label System.String
range ChartGuru.ChartBinRange{{T}}

Returns

ChartGuru.PlottableValueRef — No return description is available.

public static PlottableValueRef Value(string label, float lowerBound, float upperBound)

Convenience for a lower-closed, upper-open numeric interval.

Parameters

Name Type Description
label System.String
lowerBound System.Single
upperBound System.Single

Returns

ChartGuru.PlottableValueRef — No return description is available.

public static PlottableValueRef Value(string label, DateTime lowerBound, DateTime upperBound)

Convenience for a lower-closed, upper-open temporal interval.

Parameters

Name Type Description
label System.String
lowerBound System.DateTime
upperBound System.DateTime

Returns

ChartGuru.PlottableValueRef — No return description is available.

public static PlottableValue<float> Float(string label, float data)

No description is available for this member.

Parameters

Name Type Description
label System.String
data System.Single

Returns

ChartGuru.PlottableValue{System.Single} — No return description is available.

public static PlottableValue<double> Double(string label, double data)

No description is available for this member.

Parameters

Name Type Description
label System.String
data System.Double

Returns

ChartGuru.PlottableValue{System.Double} — No return description is available.

public static PlottableValue<int> Int(string label, int data)

No description is available for this member.

Parameters

Name Type Description
label System.String
data System.Int32

Returns

ChartGuru.PlottableValue{System.Int32} — No return description is available.

public static PlottableValue<long> Long(string label, long data)

No description is available for this member.

Parameters

Name Type Description
label System.String
data System.Int64

Returns

ChartGuru.PlottableValue{System.Int64} — No return description is available.

public static PlottableValue<long> Temporal(string label, DateTime data)

No description is available for this member.

Parameters

Name Type Description
label System.String
data System.DateTime

Returns

ChartGuru.PlottableValue{System.Int64} — No return description is available.

public static PlottableValue<double> Timestamp(string label, double unixTimestamp)

No description is available for this member.

Parameters

Name Type Description
label System.String
unixTimestamp System.Double

Returns

ChartGuru.PlottableValue{System.Double} — No return description is available.

public static PlottableValue<int> Categorical(string label, string category)

No description is available for this member.

Parameters

Name Type Description
label System.String
category System.String

Returns

ChartGuru.PlottableValue{System.Int32} — No return description is available.

public static PlottableValue<int> Categorical<TEnum>(string label, TEnum data) where TEnum : unmanaged, Enum

No description is available for this member.

Parameters

Name Type Description
label System.String
data {TEnum}

Returns

ChartGuru.PlottableValue{System.Int32} — No return description is available.

public static PlottableValue<float2> Float2(string label, float2 data)

No description is available for this member.

Parameters

Name Type Description
label System.String
data Unity.Mathematics.float2

Returns

ChartGuru.PlottableValue{Unity.Mathematics.float2} — No return description is available.

public static PlottableValue<float3> Float3(string label, float3 data)

No description is available for this member.

Parameters

Name Type Description
label System.String
data Unity.Mathematics.float3

Returns

ChartGuru.PlottableValue{Unity.Mathematics.float3} — No return description is available.

Register(Func<T, float>, Func<T, string>, PlottableType)

Section titled “Register(Func<T, float>, Func<T, string>, PlottableType)”
public static void Register<T>(Func<T, float> toScalar, Func<T, string> toLabel, PlottableType type = PlottableType.Quantitative)

Registers scalar / label converters for a user-defined type so it can flow through any API that accepts a ChartGuru.PlottableValueRef or ChartGuru.ManagedPlottableValue. Later registrations replace earlier ones for the same type.

Parameters

Name Type Description
toScalar System.Func{{T},System.Single} Converts a value to the numeric (domain) representation.
toLabel System.Func{{T},System.String} Converts a value to its display label (used for categorical axes / legends).
type ChartGuru.PlottableType Declares whether the scalar is Quantitative, Categorical, or Temporal.
public static bool Unregister<T>()

Removes a previously registered converter.

Returns

System.Boolean — No return description is available.

public static bool IsRegistered<T>()

True when a custom converter is registered for T.

Returns

System.Boolean — No return description is available.

public static PlottableValueRef Value<T>(string label, T data)

Creates a ChartGuru.PlottableValueRef for enum Values (categorical) or for a user-defined type, using the converter registered via ChartGuru.PlottableValue.Register%60%601(System.Func%7b%60%600%2cSystem.Single%7d%2cSystem.Func%7b%60%600%2cSystem.String%7d%2cChartGuru.PlottableType). Swift Charts equivalent: .Value(“Label”, enumValue) / .Value(“Label”, customValue)

Parameters

Name Type Description
label System.String
data {T}

Returns

ChartGuru.PlottableValueRef — No return description is available.