Skip to content

AnnotationConfig

ClassChartGuruChartGuru
public class AnnotationConfig

Controls annotation text, placement, alignment, spacing, and overflow behavior for a chart mark.

public AnnotationPosition Position

Returns

ChartGuru.AnnotationPosition

public AnnotationAlignment Alignment

Returns

ChartGuru.AnnotationAlignment

public string Text

Returns

System.String

public Func<DataPoint, string> Formatter

Returns

System.Func{ChartGuru.DataPoint,System.String}

public bool Visible

Returns

System.Boolean

public Color Color

Returns

UnityEngine.Color

public float FontSize

Font size in logical points. Zero inherits the theme’s data-label size.

Returns

System.Single

public Vector2 Offset

Returns

UnityEngine.Vector2

public AnnotationOverflowResolution OverflowResolution

Strategy for annotations that would otherwise be clipped by the plot area. Swift Charts equivalent: AnnotationOverflowResolution.

Returns

ChartGuru.AnnotationOverflowResolution

public AnnotationOverflowConfig OverflowConfig

Apple-shaped richer overflow control with per-dimension strategies and a AnnotationBoundary. When set (non-default), this takes precedence over AnnotationConfig.OverflowResolution. Swift Charts: AnnotationOverflowResolution(x:y:boundary:).

Returns

ChartGuru.AnnotationOverflowConfig

public string GetText(DataPoint point)

Formats annotation text for the supplied data point using the configured label or callback.

Parameters

NameType
pointChartGuru.DataPoint

Returns

System.String

public AnnotationConfig()

public ChartFontStyle? FontStyle { get; set; }

Text style, or null to inherit the theme’s data-label style.

Returns

System.Nullable{ChartGuru.ChartFontStyle}

public float? Spacing { get; set; }

Gap in logical points between the mark and annotation. Null uses the default gap; zero places the annotation against the mark.

Returns

System.Nullable{System.Single}