Skip to content

SectorMark

ClassChartGuruChartGuru
public class SectorMark : ChartMark, IChartMark

Encodes an angular value as a pie or donut sector, with configurable radii, padding, corner treatment, and category grouping.

public SectorMark()

public SectorMark(float value)

Creates a SectorMark with the given Value (angle proportion). Swift Charts equivalent: SectorMark(angle: .Value(“Value”, value))

Parameters

Name Type
value System.Single
public SectorMark(float value, float innerRadius = 0, float angularInset = 0.01)

Creates a SectorMark with the given value and optional inner radius (for donut charts). Swift Charts equivalent: SectorMark(angle: .Value(…), innerRadius: .ratio(0.5))

Parameters

Name Type Description
value System.Single The angle Value (proportion)
innerRadius System.Single Inner radius ratio (0 = pie, >0 = donut)
angularInset System.Single Gap between slices in radians

SectorMark(PlottableValueRef, PlottableValueRef)

Section titled “SectorMark(PlottableValueRef, PlottableValueRef)”
public SectorMark(PlottableValueRef angle, PlottableValueRef category = null)

Creates a sector whose angular weight comes from a semantic value and whose optional category controls grouping and labels.

Parameters

Name Type
angle ChartGuru.PlottableValueRef
category ChartGuru.PlottableValueRef

SectorMark(PlottableValueRef, float, float, PlottableValueRef)

Section titled “SectorMark(PlottableValueRef, float, float, PlottableValueRef)”
public SectorMark(PlottableValueRef angle, float innerRadius, float angularInset = 0.01, PlottableValueRef category = null)

Creates a pie or donut sector from a semantic angular value, clamped inner-radius ratio, non-negative gap, and optional category.

Parameters

Name Type
angle ChartGuru.PlottableValueRef
innerRadius System.Single
angularInset System.Single
category ChartGuru.PlottableValueRef
public SectorMark(DataPoint point)

Creates a sector from an existing point, using its Y value as angular weight and preserving grouping metadata.

Parameters

Name Type
point ChartGuru.DataPoint
public SectorMark(float startAngle, float endAngle)

Creates a SectorMark with explicit start and end angles. Used by vectorized SectorPlot to specify angular bounds directly.

Parameters

Name Type Description
startAngle System.Single Start angle in degrees
endAngle System.Single End angle in degrees

public SectorMark CornerRadius(float radius)

Sets the corner radius for this sector. Swift Charts equivalent: .CornerRadius(value) Note: In Swift Charts, this is typically a constructor parameter.

Parameters

Name Type
radius System.Single

Returns

ChartGuru.SectorMark

public SectorMark InnerRadius(float ratio)

Sets the inner radius ratio for this sector. Swift Charts equivalent: SectorMark(… innerRadius: .ratio(value))

Parameters

Name Type Description
ratio System.Single Inner radius as a ratio (0.0 = pie, 0.5+ = donut)

Returns

ChartGuru.SectorMark

public SectorMark OuterRadius(float ratio)

Sets the outer radius ratio for this sector. Swift Charts equivalent: SectorMark(… outerRadius: .ratio(value))

Parameters

Name Type Description
ratio System.Single Outer radius as a ratio (0.0 to 1.0)

Returns

ChartGuru.SectorMark

public SectorMark AngularInset(float inset)

Sets the angular inset (gap between slices) for this sector. Swift Charts equivalent: SectorMark(… angularInset: value)

Parameters

Name Type Description
inset System.Single Angular inset in degrees

Returns

ChartGuru.SectorMark

public override (Vector2 source, Vector2 target) GetMorphTargets(ChartType targetType, Rect plotArea)

Projects this mark into plot-space geometry that the morph renderer can interpolate toward the requested chart type.

Parameters

Name Type
targetType ChartGuru.ChartType
plotArea UnityEngine.Rect

Returns

System.ValueTuple{UnityEngine.Vector2,UnityEngine.Vector2}

public override IChartMark Clone()

Creates an independent copy of this Sector Mark; later configuration changes do not affect the original instance.

Returns

ChartGuru.IChartMark

public override ChartType MarkType { get; }

Returns

ChartGuru.ChartType

public float InnerRadiusRatio { get; set; }

Returns

System.Single

public float OuterRadiusRatio { get; set; }

Returns

System.Single

public float StartAngle { get; set; }

Returns

System.Single

public float EndAngle { get; set; }

Returns

System.Single

public float PadAngle { get; set; }

Returns

System.Single

public float CornerRadiusValue { get; set; }

Returns

System.Single

public Color StrokeColor { get; set; }

Returns

UnityEngine.Color

public float StrokeWidth { get; set; }

Returns

System.Single

public float ExplodeOffset { get; set; }

Returns

System.Single

public float AngleSpan { get; }

Returns

System.Single

public float MidAngle { get; }

Returns

System.Single