ChartTextManager
public class ChartTextManagerText rendering for charts. Coordinates text pools, label positioning, and formatting.
Methods
Section titled “Methods”
RenderPieLabels(IReadOnlyList, Vector2, float, float, string, Rect, IReadOnlyList, IReadOnlyList)
Section titled “RenderPieLabels(IReadOnlyList, Vector2, float, float, string, Rect, IReadOnlyList, IReadOnlyList)”public void RenderPieLabels(IReadOnlyList<IChartMark> marks, Vector2 center, float outerRadius, float innerRadius = 0, string labelFormat = "{name}\n{percent}%", Rect bounds = default, IReadOnlyList<Color> segmentColors = null, IReadOnlyList<float> animatedValues = null)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
marks |
System.Collections.Generic.IReadOnlyList{ChartGuru.IChartMark} | |
center |
UnityEngine.Vector2 | |
outerRadius |
System.Single | |
innerRadius |
System.Single | |
labelFormat |
System.String | |
bounds |
UnityEngine.Rect | |
segmentColors |
System.Collections.Generic.IReadOnlyList{UnityEngine.Color} | |
animatedValues |
System.Collections.Generic.IReadOnlyList{System.Single} | |
RenderDataLabelsFromPositions(IReadOnlyList, IReadOnlyList, Rect)
Section titled “RenderDataLabelsFromPositions(IReadOnlyList, IReadOnlyList, Rect)”public void RenderDataLabelsFromPositions(IReadOnlyList<DataLabelInfo> labelPositions, IReadOnlyList<IChartMark> marks, Rect plotArea)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
labelPositions |
System.Collections.Generic.IReadOnlyList{ChartGuru.DataLabelInfo} | |
marks |
System.Collections.Generic.IReadOnlyList{ChartGuru.IChartMark} | |
plotArea |
UnityEngine.Rect | |
RenderRadarLabels(IReadOnlyList)
Section titled “RenderRadarLabels(IReadOnlyList)”public void RenderRadarLabels(IReadOnlyList<ChartTextManager.RadarLabelInfo> labels)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
labels |
System.Collections.Generic.IReadOnlyList{ChartGuru.ChartTextManager.RadarLabelInfo} | |
ClearRadarLabels()
Section titled “ClearRadarLabels()”public void ClearRadarLabels()No description is available for this member.
ClearLegendLabels()
Section titled “ClearLegendLabels()”public void ClearLegendLabels()No description is available for this member.
RenderTitles(string, string, ChartTitlePosition, Vector2, LayoutMetrics, float)
Section titled “RenderTitles(string, string, ChartTitlePosition, Vector2, LayoutMetrics, float)”public void RenderTitles(string title, string subtitle, ChartTitlePosition titlePosition, Vector2 chartSize, LayoutMetrics metrics, float chartBorderCornerRadius = 0)Renders the chart title and/or subtitle block. Position is in chart coordinates (bottom-left origin).
Parameters
| Name | Type | Description |
|---|---|---|
title |
System.String | |
subtitle |
System.String | |
titlePosition |
ChartGuru.ChartTitlePosition | |
chartSize |
UnityEngine.Vector2 | |
metrics |
ChartGuru.LayoutMetrics | |
chartBorderCornerRadius |
System.Single | |
ClearTitles()
Section titled “ClearTitles()”public void ClearTitles()No description is available for this member.
SetTheme(ChartTheme)
Section titled “SetTheme(ChartTheme)”public void SetTheme(ChartTheme theme)Updates the theme for text styling.
Parameters
| Name | Type | Description |
|---|---|---|
theme |
ChartGuru.ChartTheme | |
InvalidateAll()
Section titled “InvalidateAll()”public void InvalidateAll()Invalidates all cached state, forcing a full redraw on next update.
ClearAll()
Section titled “ClearAll()”public void ClearAll()Renders axis labels using tick data from the axis renderer.
ClearAxisLabels()
Section titled “ClearAxisLabels()”public void ClearAxisLabels()No description is available for this member.
ClearAxisTitles()
Section titled “ClearAxisTitles()”public void ClearAxisTitles()No description is available for this member.
ClearDataLabels()
Section titled “ClearDataLabels()”public void ClearDataLabels()No description is available for this member.
ClearRuleAnnotations()
Section titled “ClearRuleAnnotations()”public void ClearRuleAnnotations()No description is available for this member.
Dispose()
Section titled “Dispose()”public void Dispose()Renders arbitrary positioned labels used by radar charts for ring tick values and spoke-tip category labels. Called from ChartGuru.ChartGraphic after the renderer has drawn the radar geometry.
RenderRuleAnnotations(IReadOnlyList, Rect, ClosedRange, ClosedRange, Chart)
Section titled “RenderRuleAnnotations(IReadOnlyList, Rect, ClosedRange, ClosedRange, Chart)”public void RenderRuleAnnotations(IReadOnlyList<IChartMark> marks, Rect plotArea, ClosedRange<float> xDomain, ClosedRange<float> yDomain, Chart chart = null)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
marks |
System.Collections.Generic.IReadOnlyList{ChartGuru.IChartMark} | |
plotArea |
UnityEngine.Rect | |
xDomain |
ChartGuru.ClosedRange{System.Single} | |
yDomain |
ChartGuru.ClosedRange{System.Single} | |
chart |
ChartGuru.Chart | |
RenderMarkAnnotations(IReadOnlyList, Rect, ClosedRange, ClosedRange, IReadOnlyList, IReadOnlyList, Chart)
Section titled “RenderMarkAnnotations(IReadOnlyList, Rect, ClosedRange, ClosedRange, IReadOnlyList, IReadOnlyList, Chart)”public void RenderMarkAnnotations(IReadOnlyList<IChartMark> marks, Rect plotArea, ClosedRange<float> xDomain, ClosedRange<float> yDomain, IReadOnlyList<BarGeometry> bars, IReadOnlyList<PointGeometry> points, Chart chart = null)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
marks |
System.Collections.Generic.IReadOnlyList{ChartGuru.IChartMark} | |
plotArea |
UnityEngine.Rect | |
xDomain |
ChartGuru.ClosedRange{System.Single} | |
yDomain |
ChartGuru.ClosedRange{System.Single} | |
bars |
System.Collections.Generic.IReadOnlyList{ChartGuru.BarGeometry} | |
points |
System.Collections.Generic.IReadOnlyList{ChartGuru.PointGeometry} | |
chart |
ChartGuru.Chart | |
RenderAxisLabels(TickLabel[], TickLabel[], AxisConfig, AxisConfig, Rect)
Section titled “RenderAxisLabels(TickLabel[], TickLabel[], AxisConfig, AxisConfig, Rect)”public void RenderAxisLabels(TickLabel[] xAxisTicks, TickLabel[] yAxisTicks, AxisConfig xAxisConfig, AxisConfig yAxisConfig, Rect plotArea)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
xAxisTicks |
ChartGuru.TickLabel[] | |
yAxisTicks |
ChartGuru.TickLabel[] | |
xAxisConfig |
ChartGuru.AxisConfig | |
yAxisConfig |
ChartGuru.AxisConfig | |
plotArea |
UnityEngine.Rect | |
RenderAxisLabels(IReadOnlyList, IReadOnlyList, AxisConfig, AxisConfig, Rect)
Section titled “RenderAxisLabels(IReadOnlyList, IReadOnlyList, AxisConfig, AxisConfig, Rect)”public void RenderAxisLabels(IReadOnlyList<TickLabel> xAxisTicks, IReadOnlyList<TickLabel> yAxisTicks, AxisConfig xAxisConfig, AxisConfig yAxisConfig, Rect plotArea)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
xAxisTicks |
System.Collections.Generic.IReadOnlyList{ChartGuru.TickLabel} | |
yAxisTicks |
System.Collections.Generic.IReadOnlyList{ChartGuru.TickLabel} | |
xAxisConfig |
ChartGuru.AxisConfig | |
yAxisConfig |
ChartGuru.AxisConfig | |
plotArea |
UnityEngine.Rect | |
RenderAxisTitlesFromPositions(AxisTitleInfo, AxisTitleInfo, AxisConfig, AxisConfig)
Section titled “RenderAxisTitlesFromPositions(AxisTitleInfo, AxisTitleInfo, AxisConfig, AxisConfig)”public void RenderAxisTitlesFromPositions(AxisTitleInfo xAxisTitle, AxisTitleInfo yAxisTitle, AxisConfig xAxisConfig, AxisConfig yAxisConfig)Renders axis titles from pre-calculated positions. Uses positions already computed by ChartRenderer to avoid duplicate logic.
Parameters
| Name | Type | Description |
|---|---|---|
xAxisTitle |
ChartGuru.AxisTitleInfo | |
yAxisTitle |
ChartGuru.AxisTitleInfo | |
xAxisConfig |
ChartGuru.AxisConfig | |
yAxisConfig |
ChartGuru.AxisConfig | |
RenderLegendFromPositions(IReadOnlyList, bool)
Section titled “RenderLegendFromPositions(IReadOnlyList, bool)”public void RenderLegendFromPositions(IReadOnlyList<LegendLabelInfo> legendLabels, bool showBackground = false)No description is available for this member.
Parameters
| Name | Type | Description |
|---|---|---|
legendLabels |
System.Collections.Generic.IReadOnlyList{ChartGuru.LegendLabelInfo} | |
showBackground |
System.Boolean | |
RenderColorScaleLegend(ColorScaleLegendInfo)
Section titled “RenderColorScaleLegend(ColorScaleLegendInfo)”public void RenderColorScaleLegend(ColorScaleLegendInfo info)Renders a continuous color scale legend bar with tick labels for heatmap charts.
Parameters
| Name | Type | Description |
|---|---|---|
info |
ChartGuru.ColorScaleLegendInfo |
Fields
Section titled “Fields”
ShowDebugObjects
Section titled “ShowDebugObjects”public static bool ShowDebugObjectsWhen true, shows helper GameObjects in hierarchy for debugging. Set to false to hide them in production.
Returns
System.Boolean — No return description is available.
Properties
Section titled “Properties”
AutoContrastText
Section titled “AutoContrastText”public bool AutoContrastText { get; set; }When true, axis labels, axis titles, data labels, and legend text automatically adjust to white or black for maximum contrast against their background.
Returns
System.Boolean — No return description is available.
ContrastBackground
Section titled “ContrastBackground”public Color ContrastBackground { get; set; }The background color used for contrast calculations for axis labels, axis titles, and legend text. Should be set to the effective chart background color by the owner.
Returns
UnityEngine.Color — No return description is available.
PlotContrastBackground
Section titled “PlotContrastBackground”public Color PlotContrastBackground { get; set; }The effective plot-area background color used for contrast calculations for
inset axis labels and data labels that sit inside the plot area. When the plot
area has a distinct color from the chart background, inset labels should contrast
against this rather than ChartGuru.ChartTextManager.ContrastBackground.
Returns
UnityEngine.Color — No return description is available.
DataLabelColorOverride
Section titled “DataLabelColorOverride”public Color? DataLabelColorOverride { get; set; }Optional per-chart override for the data-label text colour. When non-null, it
replaces the theme-derived colour in ChartGuru.ChartTextOptions before
auto-contrast adjustments run. Cleared by setting to null.
Returns
System.Nullable{UnityEngine.Color} — No return description is available.
AxisLabelColorOverride
Section titled “AxisLabelColorOverride”public Color? AxisLabelColorOverride { get; set; }Optional per-chart override for axis-label text (X/Y tick labels and
radar ring/spoke labels). When non-null it replaces the theme text
colour. Distinct from ChartGuru.ChartTextManager.DataLabelColorOverride so callers
can mute axis labels (e.g. radar ring values) without affecting the
data labels themselves.
Returns
System.Nullable{UnityEngine.Color} — No return description is available.
ShowAxisLabels
Section titled “ShowAxisLabels”public bool ShowAxisLabels { get; set; }Gets or sets whether axis labels are shown.
Returns
System.Boolean — No return description is available.
ShowAxisTitles
Section titled “ShowAxisTitles”public bool ShowAxisTitles { get; set; }Gets or sets whether axis titles are shown.
Returns
System.Boolean — No return description is available.
ShowDataLabels
Section titled “ShowDataLabels”public bool ShowDataLabels { get; set; }Gets or sets whether data labels are shown.
Returns
System.Boolean — No return description is available.
DataLabelFormat
Section titled “DataLabelFormat”public string DataLabelFormat { get; set; }Gets or sets the data label format string.
Returns
System.String — No return description is available.
XAxisLabelRotation
Section titled “XAxisLabelRotation”public LabelRotation XAxisLabelRotation { get; set; }Gets or sets the X-axis label rotation.
Returns
ChartGuru.LabelRotation — No return description is available.
YAxisLabelRotation
Section titled “YAxisLabelRotation”public LabelRotation YAxisLabelRotation { get; set; }Gets or sets the Y-axis label rotation.
Returns
ChartGuru.LabelRotation — No return description is available.
PieLabelMode
Section titled “PieLabelMode”public PieLabelMode PieLabelMode { get; set; }Gets or sets the pie/donut label positioning mode.
Returns
ChartGuru.PieLabelMode — No return description is available.
ScaleFactor
Section titled “ScaleFactor”public float ScaleFactor { get; set; }Gets or sets the scale factor for text sizing based on chart dimensions. Default is 1.0 (no scaling).
Returns
System.Single — No return description is available.
ContentScaleFactor
Section titled “ContentScaleFactor”public float ContentScaleFactor { get; set; }Gets or sets the legend-specific scale factor that only constrains by the dimension relevant to the legend position. Falls back to ScaleFactor if not set.
Returns
System.Single — No return description is available.
ShowLegend
Section titled “ShowLegend”public bool ShowLegend { get; set; }Gets or sets whether the legend is shown.
Returns
System.Boolean — No return description is available.
Constructors
Section titled “Constructors”
ChartTextManager(RectTransform, ChartTheme)
Section titled “ChartTextManager(RectTransform, ChartTheme)”public ChartTextManager(RectTransform parent, ChartTheme theme = null)Creates a new text manager.
Parameters
| Name | Type | Description |
|---|---|---|
parent |
UnityEngine.RectTransform | Parent RectTransform for the text container. |
theme |
ChartGuru.ChartTheme | Chart theme for styling. |