LeaderLineGraphic
[RequireComponent(typeof(CanvasRenderer))]public class LeaderLineGraphic : GraphicUI Graphic component for rendering leader lines connecting pie labels to slices. Uses Unity’s UI mesh system for proper Canvas integration.
Properties
Section titled “Properties”
LineWidth
Section titled “LineWidth”public float LineWidth { get; set; }Width of the leader lines.
Returns
System.Single — No return description is available.
LineColor
Section titled “LineColor”public Color LineColor { get; set; }Default color for leader lines.
Returns
UnityEngine.Color — No return description is available.
DotRadius
Section titled “DotRadius”public float DotRadius { get; set; }Radius of the dot at the start of each line.
Returns
System.Single — No return description is available.
ShowStartDot
Section titled “ShowStartDot”public bool ShowStartDot { get; set; }Whether to show a dot at the start point.
Returns
System.Boolean — No return description is available.
Methods
Section titled “Methods”
Awake()
Section titled “Awake()”protected override void Awake()No description is available for this member.
SetLines(List)
Section titled “SetLines(List)”public void SetLines(List<LeaderLineGraphic.LeaderLine> lines)Sets the leader lines to render.
Parameters
| Name | Type | Description |
|---|---|---|
lines |
System.Collections.Generic.List{ChartGuru.LeaderLineGraphic.LeaderLine} | |
Clear()
Section titled “Clear()”public void Clear()Clears all leader lines.
AddLine(Vector2, Vector2, Color?)
Section titled “AddLine(Vector2, Vector2, Color?)”public void AddLine(Vector2 start, Vector2 end, Color? lineColor = null)Adds a single leader line.
Parameters
| Name | Type | Description |
|---|---|---|
start |
UnityEngine.Vector2 | |
end |
UnityEngine.Vector2 | |
lineColor |
System.Nullable{UnityEngine.Color} | |
AddLine(Vector2, Vector2, Vector2, Color?)
Section titled “AddLine(Vector2, Vector2, Vector2, Color?)”public void AddLine(Vector2 start, Vector2 elbow, Vector2 end, Color? lineColor = null)Adds a leader line with an elbow point.
Parameters
| Name | Type | Description |
|---|---|---|
start |
UnityEngine.Vector2 | |
elbow |
UnityEngine.Vector2 | |
end |
UnityEngine.Vector2 | |
lineColor |
System.Nullable{UnityEngine.Color} | |
SetFromPositionedLabels(List)
Section titled “SetFromPositionedLabels(List)”public void SetFromPositionedLabels(List<RadialLabelPositioner.PositionedLabel> labels)Creates leader lines from positioned labels.
Parameters
| Name | Type | Description |
|---|---|---|
labels |
System.Collections.Generic.List{ChartGuru.RadialLabelPositioner.PositionedLabel} | |
OnPopulateMesh(VertexHelper)
Section titled “OnPopulateMesh(VertexHelper)”protected override void OnPopulateMesh(VertexHelper vh)Callback function when a UI element needs to generate vertices. Fills the vertex buffer data.
Parameters
| Name | Type | Description |
|---|---|---|
vh |
UnityEngine.UI.VertexHelper | VertexHelper utility. |
Remarks
Used by Text, UI.Image, and RawImage for example to generate vertices specific to their use case.