AxisValue
public struct AxisValueRepresents a value at an axis mark position. Swift Charts equivalent: AxisValue in AxisMarks { value in … } Access to the value and formatting utilities.
Constructors
Section titled “Constructors”
AxisValue(float, int, string, PlottableType)
Section titled “AxisValue(float, int, string, PlottableType)”public AxisValue(float value, int index, string formatted, PlottableType type = PlottableType.Quantitative)Creates a numeric axis tick with its generated index, formatted label, and scale classification. The sequence count is left unknown.
Parameters
| Name | Type |
|---|---|
value |
System.Single |
index |
System.Int32 |
formatted |
System.String |
type |
ChartGuru.PlottableType |
AxisValue(float, int, int, string, PlottableType)
Section titled “AxisValue(float, int, int, string, PlottableType)”public AxisValue(float value, int index, int count, string formatted, PlottableType type = PlottableType.Quantitative)Creates a numeric axis tick with its position in the complete generated tick sequence.
Parameters
| Name | Type |
|---|---|
value |
System.Single |
index |
System.Int32 |
count |
System.Int32 |
formatted |
System.String |
type |
ChartGuru.PlottableType |
AxisValue(DateTime, int, string)
Section titled “AxisValue(DateTime, int, string)”public AxisValue(DateTime dateValue, int index, string formatted)Creates a temporal axis tick that preserves the source date and exposes its tick count as the raw numeric value.
Parameters
| Name | Type |
|---|---|
dateValue |
System.DateTime |
index |
System.Int32 |
formatted |
System.String |
AxisValue(DateTime, int, int, string)
Section titled “AxisValue(DateTime, int, int, string)”public AxisValue(DateTime dateValue, int index, int count, string formatted)Creates a temporal axis tick with its position in the complete generated tick sequence.
Parameters
| Name | Type |
|---|---|
dateValue |
System.DateTime |
index |
System.Int32 |
count |
System.Int32 |
formatted |
System.String |
AxisValue(string, int, int)
Section titled “AxisValue(string, int, int)”public AxisValue(string categoryValue, int index, int categoryIndex)Creates a categorical axis tick whose raw coordinate is the category index and whose label is the category text.
Parameters
| Name | Type |
|---|---|
categoryValue |
System.String |
index |
System.Int32 |
categoryIndex |
System.Int32 |
AxisValue(string, int, int, int)
Section titled “AxisValue(string, int, int, int)”public AxisValue(string categoryValue, int index, int count, int categoryIndex)Creates a categorical axis tick with its position in the complete generated tick sequence.
Parameters
| Name | Type |
|---|---|
categoryValue |
System.String |
index |
System.Int32 |
count |
System.Int32 |
categoryIndex |
System.Int32 |
Methods
Section titled “Methods”
public T? As<T>() where T : structGets the value as the specified type. Swift Charts equivalent: value.as(Float.self)
Returns
System.Nullable{{T}}
AsValue()
Section titled “AsValue()”public T AsValue<T>() where T : structGets the value as the specified type (non-nullable). Swift Charts equivalent: value.as(Float.self)!
Returns
{T}
AsCategory()
Section titled “AsCategory()”public string AsCategory()Gets the category string Value (for categorical axes).
Returns
System.String
AsDate()
Section titled “AsDate()”public DateTime? AsDate()Gets the DateTime Value (for temporal axes).
Returns
System.Nullable{System.DateTime}
ToString()
Section titled “ToString()”public override string ToString()Returns
System.String
Properties
Section titled “Properties”
public int Index { get; }The index of this value in the sequence of axis marks.
Returns
System.Int32
public int Count { get; }The total number of axis values in the current sequence.
Swift Charts equivalent: AxisValue.count.
Returns
System.Int32
RawValue
Section titled “RawValue”public float RawValue { get; }The raw numeric value.
Returns
System.Single
Formatted
Section titled “Formatted”public string Formatted { get; }The formatted string representation of the value.
Returns
System.String
public PlottableType Type { get; }The data type of this value.
Returns
ChartGuru.PlottableType