AxisConfig
public class AxisConfigConfiguration data for a chart axis. Contains all settings for axis visibility, domain, styling, ticks, and labels.
Fields
Section titled “Fields”
Visible
Section titled “Visible”public bool VisibleReturns
System.Boolean
ShowAxisLine
Section titled “ShowAxisLine”public bool ShowAxisLineReturns
System.Boolean
ShowGridLines
Section titled “ShowGridLines”public bool ShowGridLinesReturns
System.Boolean
GridLinesExplicitlySet
Section titled “GridLinesExplicitlySet”public bool GridLinesExplicitlySetReturns
System.Boolean
ShowTicks
Section titled “ShowTicks”public bool ShowTicksReturns
System.Boolean
ShowLabels
Section titled “ShowLabels”public bool ShowLabelsReturns
System.Boolean
AutoDomain
Section titled “AutoDomain”public bool AutoDomainReturns
System.Boolean
IncludeZeroInDomain
Section titled “IncludeZeroInDomain”public bool IncludeZeroInDomainReturns
System.Boolean
IncludeZeroExplicitlySet
Section titled “IncludeZeroExplicitlySet”public bool IncludeZeroExplicitlySetReturns
System.Boolean
DomainMin
Section titled “DomainMin”public float DomainMinReturns
System.Single
DomainMax
Section titled “DomainMax”public float DomainMaxReturns
System.Single
Inverted
Section titled “Inverted”public bool InvertedReturns
System.Boolean
DomainExplicitlySet
Section titled “DomainExplicitlySet”public bool DomainExplicitlySetReturns
System.Boolean
RangeStartPadding
Section titled “RangeStartPadding”public float RangeStartPaddingReturns
System.Single
RangeEndPadding
Section titled “RangeEndPadding”public float RangeEndPaddingReturns
System.Single
public float SizeReturns
System.Single
LogBase
Section titled “LogBase”public float LogBaseReturns
System.Single
LogScaleSlopeAtZero
Section titled “LogScaleSlopeAtZero”public float LogScaleSlopeAtZeroReturns
System.Single
PowerExponent
Section titled “PowerExponent”public float PowerExponentReturns
System.Single
UseNiceTicks
Section titled “UseNiceTicks”public bool UseNiceTicksReturns
System.Boolean
TickCount
Section titled “TickCount”public int TickCountReturns
System.Int32
TickLength
Section titled “TickLength”public float TickLengthReturns
System.Single
TickLengthMode
Section titled “TickLengthMode”public AxisTickLengthMode TickLengthModeReturns
ChartGuru.AxisTickLengthMode
TickLengthExtendBy
Section titled “TickLengthExtendBy”public float TickLengthExtendByReturns
System.Single
LabelOrientation
Section titled “LabelOrientation”public AxisValueLabelOrientation LabelOrientationReturns
ChartGuru.AxisValueLabelOrientation
LabelCollisionResolution
Section titled “LabelCollisionResolution”public AxisValueLabelCollisionResolution LabelCollisionResolutionReturns
ChartGuru.AxisValueLabelCollisionResolution
AlignsOrigin
Section titled “AlignsOrigin”public bool AlignsOriginReturns
System.Boolean
ModifyInferredDomain
Section titled “ModifyInferredDomain”public Func<ClosedRange<float>, ClosedRange<float>> ModifyInferredDomainOptional callback invoked after auto-domain inference, before range padding.
Receives the inferred ChartGuru.ClosedRange%601 and returns the (possibly modified)
final range. Swift Charts equivalent: ChartXScale(domain: .Automatic(includesZero:reversed:))
.modifyInferredDomain { range in … }.
Returns
System.Func{ChartGuru.ClosedRange{System.Single},ChartGuru.ClosedRange{System.Single}}
CustomScaleTransformer
Section titled “CustomScaleTransformer”public IScaleTransformer CustomScaleTransformerPluggable axis scale transformer. When non-null, overrides the built-in
ChartGuru.AxisScaleType branches in ChartGuru.AxisConfig.TransformValue(System.Single) and
ChartGuru.AxisConfig.InverseTransformValue(System.Single).
Swift Charts equivalent: ChartXScale(transformer:) / ChartYScale(transformer:).
Returns
ChartGuru.IScaleTransformer
TickFormat
Section titled “TickFormat”public string TickFormatReturns
System.String
TickFormatter
Section titled “TickFormatter”public Func<float, string> TickFormatterReturns
System.Func{System.Single,System.String}
FormatStyle
Section titled “FormatStyle”public AxisFormatStyle FormatStyleReturns
ChartGuru.AxisFormatStyle
UseAbsoluteValueLabels
Section titled “UseAbsoluteValueLabels”public bool UseAbsoluteValueLabelsReturns
System.Boolean
Culture
Section titled “Culture”public CultureInfo CultureReturns
System.Globalization.CultureInfo
InferredTickPrecision
Section titled “InferredTickPrecision”public int InferredTickPrecisionTransient precision inferred by the layout engine from the actual tick values.
When > 0 and no explicit ChartGuru.AxisConfig.TickFormat is set, FormatAxisTick
uses this to ensure consistent decimal places across all ticks on the axis
(e.g. step=0.5 → precision=1 → “-1.0, -0.5, 0.0, 0.5, 1.0”).
Returns
System.Int32
CustomTickValues
Section titled “CustomTickValues”public float[] CustomTickValuesCustom tick Values (overrides TickCount when set). Swift Charts equivalent: AxisMarks(values: […])
Returns
System.Single[]
MarkConfig
Section titled “MarkConfig”public AxisMarkConfig MarkConfigConfiguration for individual axis marks. Swift Charts equivalent: AxisMarks { AxisTick(), AxisGridLine(), AxisValueLabel() }
Returns
ChartGuru.AxisMarkConfig
MarksBlocks
Section titled “MarksBlocks”public List<AxisMarkConfig> MarksBlocksMultiple independent AxisMarks blocks on this axis. Each block can have its own position, tick values, visibility, and styling. When populated, the renderer uses these blocks instead of the flat fields above. Swift Charts equivalent: multiple AxisMarks(…) { } closures inside .chartXAxis { }.
Returns
System.Collections.Generic.List{ChartGuru.AxisMarkConfig}
LabelPreset
Section titled “LabelPreset”public AxisMarkPreset LabelPresetSimple label preset override for the default (non-MarksBlocks) labels. Automatic = chart-type default. Inset = inside plot area. Aligned/Extended = outside. When MarksBlocks are present, their per-block Preset takes precedence.
Returns
ChartGuru.AxisMarkPreset
public string LabelReturns
System.String
LabelAlignment
Section titled “LabelAlignment”public AxisLabelAlignment LabelAlignmentReturns
ChartGuru.AxisLabelAlignment
LabelPosition
Section titled “LabelPosition”public AxisLabelPosition LabelPositionReturns
ChartGuru.AxisLabelPosition
LabelSpacing
Section titled “LabelSpacing”public float LabelSpacingReturns
System.Single
LabelFontStyle
Section titled “LabelFontStyle”public FontStyle LabelFontStyleReturns
UnityEngine.FontStyle
Position
Section titled “Position”public AxisPosition PositionReturns
ChartGuru.AxisPosition
Padding
Section titled “Padding”public float PaddingReturns
System.Single
TimeDomainMin
Section titled “TimeDomainMin”public DateTime TimeDomainMinReturns
System.DateTime
TimeDomainMax
Section titled “TimeDomainMax”public DateTime TimeDomainMaxReturns
System.DateTime
TimeDomainExplicitlySet
Section titled “TimeDomainExplicitlySet”public bool TimeDomainExplicitlySetReturns
System.Boolean
TimeOriginEpochSeconds
Section titled “TimeOriginEpochSeconds”public double TimeOriginEpochSecondsEpoch Offset (seconds since Unix epoch) subtracted from mark X values before
they were stored as float. Added back when converting to System.DateTime
for label formatting. Solves float-precision loss for modern timestamps.
Returns
System.Double
TimeUnit
Section titled “TimeUnit”public TimeUnit TimeUnitReturns
ChartGuru.TimeUnit
TimeFormat
Section titled “TimeFormat”public string TimeFormatReturns
System.String
HasStride
Section titled “HasStride”public bool HasStrideReturns
System.Boolean
Stride
Section titled “Stride”public float StrideReturns
System.Single
StrideUnit
Section titled “StrideUnit”public TimeUnit? StrideUnitReturns
System.Nullable{ChartGuru.TimeUnit}
StrideMultiplier
Section titled “StrideMultiplier”public int StrideMultiplierMultiplier for calendar strides. Swift Charts equivalent: the count: argument
of AxisMarkValues.Stride(by:count:). A value of 1 means “every unit”, 2 means
“every other unit”, etc. Ignored unless ChartGuru.AxisConfig.StrideUnit is set.
Returns
System.Int32
ValueCallback
Section titled “ValueCallback”public Action<AxisValue, AxisMarksBuilder> ValueCallbackReturns
System.Action{ChartGuru.AxisValue,ChartGuru.AxisMarksBuilder}
PerTickLabelOverrides
Section titled “PerTickLabelOverrides”public Dictionary<float, string> PerTickLabelOverridesReturns
System.Collections.Generic.Dictionary{System.Single,System.String}
HiddenTickValues
Section titled “HiddenTickValues”public HashSet<float> HiddenTickValuesReturns
System.Collections.Generic.HashSet{System.Single}
HiddenTickMarkValues
Section titled “HiddenTickMarkValues”public HashSet<float> HiddenTickMarkValuesPer-value tick mark hiding. Values in this set skip the tick mark but retain grid lines and label positions. Used for minor grid lines where only the grid line should render without a tick mark.
Returns
System.Collections.Generic.HashSet{System.Single}
HiddenLabelValues
Section titled “HiddenLabelValues”public HashSet<float> HiddenLabelValuesPer-value label hiding. Values in this set retain grid lines and tick marks
but their label text is blanked. Populated by ChartGuru.AxisMarksBuilder.HideLabel
inside a ChartGuru.AxisMarksBuilder.ForEachValue(System.Action%7bChartGuru.AxisValue%2cChartGuru.AxisMarksBuilder%7d) callback.
Swift Charts equivalent: conditionally not emitting AxisValueLabel() in the per-value closure.
Returns
System.Collections.Generic.HashSet{System.Single}
HiddenGridLineValues
Section titled “HiddenGridLineValues”public HashSet<float> HiddenGridLineValuesPer-value grid line hiding. Values in this set skip grid line rendering but retain
tick marks and labels. Populated by ChartGuru.AxisMarksBuilder.HideGridLine
inside a ChartGuru.AxisMarksBuilder.ForEachValue(System.Action%7bChartGuru.AxisValue%2cChartGuru.AxisMarksBuilder%7d) callback.
Swift Charts equivalent: conditionally not emitting AxisGridLine() in the per-value closure.
Returns
System.Collections.Generic.HashSet{System.Single}
MinorGridLineValues
Section titled “MinorGridLineValues”public HashSet<float> MinorGridLineValuesValues that receive minor (lighter/thinner) grid line styling instead of the default major grid style. Swift Charts equivalent: conditional AxisGridLine with different stroke/foregroundStyle inside an if/else AxisMarks closure.
Returns
System.Collections.Generic.HashSet{System.Single}
MinorGridLineColor
Section titled “MinorGridLineColor”public Color? MinorGridLineColorReturns
System.Nullable{UnityEngine.Color}
MinorGridLineWidth
Section titled “MinorGridLineWidth”public float? MinorGridLineWidthReturns
System.Nullable{System.Single}
GridLineStroke
Section titled “GridLineStroke”public StrokeStyle? GridLineStrokeOptional stroke style for grid lines, including dash pattern.
Swift Charts equivalent: AxisGridLine(stroke: StrokeStyle(…))
When set, overrides ChartGuru.AxisConfig.GridLineWidth and enables dashed rendering.
Returns
System.Nullable{ChartGuru.StrokeStyle}
TickStroke
Section titled “TickStroke”public StrokeStyle? TickStrokeOptional stroke style for tick marks, including dash pattern. Swift Charts equivalent: AxisTick(stroke: StrokeStyle(…)) When set, overrides tick rendering width and enables dashed ticks.
Returns
System.Nullable{ChartGuru.StrokeStyle}
HasMajorMinorGrid
Section titled “HasMajorMinorGrid”public bool HasMajorMinorGridReturns
System.Boolean
IntegerOnlyMajorGrid
Section titled “IntegerOnlyMajorGrid”public bool IntegerOnlyMajorGridReturns
System.Boolean
HasLabelStride
Section titled “HasLabelStride”public bool HasLabelStrideReturns
System.Boolean
LabelStride
Section titled “LabelStride”public float LabelStrideReturns
System.Single
LabelStrideUnit
Section titled “LabelStrideUnit”public TimeUnit? LabelStrideUnitReturns
System.Nullable{ChartGuru.TimeUnit}
LabelStrideMultiplier
Section titled “LabelStrideMultiplier”public int LabelStrideMultiplierReturns
System.Int32
Categories
Section titled “Categories”public string[] CategoriesReturns
System.String[]
LogScaleEpsilon
Section titled “LogScaleEpsilon”public const float LogScaleEpsilon = 1E-06Smallest positive value used as the floor for logarithmic transforms. Anything
at or below this is clamped before UnityEngine.Mathf.Log(System.Single%2cSystem.Single) to avoid producing
-Infinity/NaN. Public so callers (including tests) can be explicit
about the floor when authoring data with zeroes/negatives on a log axis.
Returns
System.Single
Methods
Section titled “Methods”
TransformValue(float)
Section titled “TransformValue(float)”public float TransformValue(float value)Maps a raw data value into the axis’s working coordinate space. For log-scaled
axes this returns log(max(value, epsilon)) / log(LogBase) so callers can
keep using linear (v - min) / (max - min) normalization unchanged. For
non-log axes this is the identity. Thread-safe / allocation-free.
Parameters
| Name | Type |
|---|---|
value |
System.Single |
Returns
System.Single
InverseTransformValue(float)
Section titled “InverseTransformValue(float)”public float InverseTransformValue(float transformed)Inverse of ChartGuru.AxisConfig.TransformValue(System.Single): maps a value in the axis’s working
coordinate space back to the raw data space. Used when generating tick labels
for logarithmic axes (the tick value emitted to the user is the raw exponentiated
number, not the log of it).
Parameters
| Name | Type |
|---|---|
transformed |
System.Single |
Returns
System.Single
FormatTick(float)
Section titled “FormatTick(float)”public string FormatTick(float value)Format a tick value as a string.
Parameters
| Name | Type |
|---|---|
value |
System.Single |
Returns
System.String
ResolveAxisColor(ChartTheme)
Section titled “ResolveAxisColor(ChartTheme)”public Color ResolveAxisColor(ChartTheme theme)Returns the explicit axis color, or the active theme’s axis color when no override is set.
Parameters
| Name | Type |
|---|---|
theme |
ChartGuru.ChartTheme |
Returns
UnityEngine.Color
ResolveTickColor(ChartTheme)
Section titled “ResolveTickColor(ChartTheme)”public Color ResolveTickColor(ChartTheme theme)Tick colour, resolved with theme + AxisColor fallback. When the user has not
explicitly set a tick colour, ticks share the axis line colour (the legacy
behaviour). Once ChartGuru.AxisConfig.TickColor is assigned, ticks render with that
colour while the axis line stays at ChartGuru.AxisConfig.AxisColor.
Parameters
| Name | Type |
|---|---|
theme |
ChartGuru.ChartTheme |
Returns
UnityEngine.Color
ResolveGridLineColor(ChartTheme)
Section titled “ResolveGridLineColor(ChartTheme)”public Color ResolveGridLineColor(ChartTheme theme)Returns the explicit grid-line color, or the active theme’s grid color when no override is set.
Parameters
| Name | Type |
|---|---|
theme |
ChartGuru.ChartTheme |
Returns
UnityEngine.Color
ResolveLabelColor(ChartTheme)
Section titled “ResolveLabelColor(ChartTheme)”public Color ResolveLabelColor(ChartTheme theme)Returns the explicit label color, or the active theme’s label color when no override is set.
Parameters
| Name | Type |
|---|---|
theme |
ChartGuru.ChartTheme |
Returns
UnityEngine.Color
ResolveAxisLineWidth(ChartTheme)
Section titled “ResolveAxisLineWidth(ChartTheme)”public float ResolveAxisLineWidth(ChartTheme theme)Returns the explicit axis-line width, or the active theme’s width when no override is set.
Parameters
| Name | Type |
|---|---|
theme |
ChartGuru.ChartTheme |
Returns
System.Single
ResolveGridLineWidth(ChartTheme)
Section titled “ResolveGridLineWidth(ChartTheme)”public float ResolveGridLineWidth(ChartTheme theme)Returns the explicit grid-line width, or the active theme’s width when no override is set.
Parameters
| Name | Type |
|---|---|
theme |
ChartGuru.ChartTheme |
Returns
System.Single
ResolveLabelFontSize(ChartTheme)
Section titled “ResolveLabelFontSize(ChartTheme)”public int ResolveLabelFontSize(ChartTheme theme)Returns the explicit label font size, or the active theme’s size when no override is set.
Parameters
| Name | Type |
|---|---|
theme |
ChartGuru.ChartTheme |
Returns
System.Int32
ResolveTitleFontSize(ChartTheme)
Section titled “ResolveTitleFontSize(ChartTheme)”public int ResolveTitleFontSize(ChartTheme theme)Returns the explicit title font size, or the active theme’s size when no override is set.
Parameters
| Name | Type |
|---|---|
theme |
ChartGuru.ChartTheme |
Returns
System.Int32
ResetStyleToBuiltInDefaults(bool)
Section titled “ResetStyleToBuiltInDefaults(bool)”public void ResetStyleToBuiltInDefaults(bool inheritFromTheme = true)Clears explicit axis style overrides, optionally restoring inheritance from the active chart theme.
Parameters
| Name | Type |
|---|---|
inheritFromTheme |
System.Boolean |
Clone()
Section titled “Clone()”public AxisConfig Clone()Create a copy of this config.
Returns
ChartGuru.AxisConfig
Constructors
Section titled “Constructors”
AxisConfig()
Section titled “AxisConfig()”public AxisConfig()Properties
Section titled “Properties”
MinValue
Section titled “MinValue”public float MinValue { get; set; }Returns
System.Single
MaxValue
Section titled “MaxValue”public float MaxValue { get; set; }Returns
System.Single
HasCustomDomain
Section titled “HasCustomDomain”public bool HasCustomDomain { get; }Returns
System.Boolean
HasExplicitDomain
Section titled “HasExplicitDomain”public bool HasExplicitDomain { get; }Returns
System.Boolean
UsesDefaultDomainFallback
Section titled “UsesDefaultDomainFallback”public bool UsesDefaultDomainFallback { get; }Returns
System.Boolean
HasRangePadding
Section titled “HasRangePadding”public bool HasRangePadding { get; }Returns
System.Boolean
UseLogScale
Section titled “UseLogScale”public bool UseLogScale { get; set; }Returns
System.Boolean
HasMarksBlocks
Section titled “HasMarksBlocks”public bool HasMarksBlocks { get; }Returns
System.Boolean
LabelFormat
Section titled “LabelFormat”public string LabelFormat { get; set; }Returns
System.String
AxisColor
Section titled “AxisColor”public Color AxisColor { get; set; }Returns
UnityEngine.Color
InheritAxisColor
Section titled “InheritAxisColor”public bool InheritAxisColor { get; set; }Returns
System.Boolean
GridLineColor
Section titled “GridLineColor”public Color GridLineColor { get; set; }Returns
UnityEngine.Color
InheritGridLineColor
Section titled “InheritGridLineColor”public bool InheritGridLineColor { get; set; }Returns
System.Boolean
LabelColor
Section titled “LabelColor”public Color LabelColor { get; set; }Returns
UnityEngine.Color
InheritLabelColor
Section titled “InheritLabelColor”public bool InheritLabelColor { get; set; }Returns
System.Boolean
AxisLineWidth
Section titled “AxisLineWidth”public float AxisLineWidth { get; set; }Returns
System.Single
InheritAxisLineWidth
Section titled “InheritAxisLineWidth”public bool InheritAxisLineWidth { get; set; }Returns
System.Boolean
GridLineWidth
Section titled “GridLineWidth”public float GridLineWidth { get; set; }Returns
System.Single
InheritGridLineWidth
Section titled “InheritGridLineWidth”public bool InheritGridLineWidth { get; set; }Returns
System.Boolean
LabelFontSize
Section titled “LabelFontSize”public int LabelFontSize { get; set; }Returns
System.Int32
InheritLabelFontSize
Section titled “InheritLabelFontSize”public bool InheritLabelFontSize { get; set; }Returns
System.Boolean
TitleFontSize
Section titled “TitleFontSize”public int TitleFontSize { get; set; }Returns
System.Int32
InheritTitleFontSize
Section titled “InheritTitleFontSize”public bool InheritTitleFontSize { get; set; }Returns
System.Boolean
ScaleType
Section titled “ScaleType”public AxisScaleType ScaleType { get; set; }Returns
ChartGuru.AxisScaleType
IsTimeAxis
Section titled “IsTimeAxis”public bool IsTimeAxis { get; set; }Returns
System.Boolean
IsBandAxis
Section titled “IsBandAxis”public bool IsBandAxis { get; set; }Returns
System.Boolean
TickColor
Section titled “TickColor”public Color TickColor { get; set; }Returns
UnityEngine.Color
InheritTickColor
Section titled “InheritTickColor”public bool InheritTickColor { get; set; }Returns
System.Boolean