PlottableValue
public static class PlottableValueStatic factory methods for creating PlottableValues with automatic type inference. Swift Charts-style .Value(“Label”, data) syntax.
Methods
Section titled “Methods”
Value(string, object)
Section titled “Value(string, object)”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.
Value(string, string)
Section titled “Value(string, string)”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.
Value(string, float)
Section titled “Value(string, float)”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.
Value(string, int)
Section titled “Value(string, int)”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.
Value(string, double)
Section titled “Value(string, double)”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.
Value(string, long)
Section titled “Value(string, long)”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.
Value(string, DateTime)
Section titled “Value(string, DateTime)”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.
Value(string, DateTime, TimeUnit, int)
Section titled “Value(string, DateTime, TimeUnit, int)”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.
Value(string, ChartBinRange)
Section titled “Value(string, ChartBinRange)”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.
Value(string, float, float)
Section titled “Value(string, float, float)”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.
Value(string, DateTime, DateTime)
Section titled “Value(string, DateTime, DateTime)”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.
Float(string, float)
Section titled “Float(string, float)”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.
Double(string, double)
Section titled “Double(string, double)”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.
Int(string, int)
Section titled “Int(string, int)”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.
Long(string, long)
Section titled “Long(string, long)”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.
Temporal(string, DateTime)
Section titled “Temporal(string, DateTime)”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.
Timestamp(string, double)
Section titled “Timestamp(string, double)”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.
Categorical(string, string)
Section titled “Categorical(string, string)”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.
Categorical(string, TEnum)
Section titled “Categorical(string, TEnum)”public static PlottableValue<int> Categorical<TEnum>(string label, TEnum data) where TEnum : unmanaged, EnumNo 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.
Float2(string, float2)
Section titled “Float2(string, float2)”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.
Float3(string, float3)
Section titled “Float3(string, float3)”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. |
Unregister()
Section titled “Unregister()”public static bool Unregister<T>()Removes a previously registered converter.
Returns
System.Boolean — No return description is available.
IsRegistered()
Section titled “IsRegistered()”public static bool IsRegistered<T>()True when a custom converter is registered for T.
Returns
System.Boolean — No return description is available.
Value(string, T)
Section titled “Value(string, T)”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.