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

NameType
valueSystem.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

NameTypeDescription
valueSystem.SingleThe angle Value (proportion)
innerRadiusSystem.SingleInner radius ratio (0 = pie, >0 = donut)
angularInsetSystem.SingleGap 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

NameType
angleChartGuru.PlottableValueRef
categoryChartGuru.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

NameType
angleChartGuru.PlottableValueRef
innerRadiusSystem.Single
angularInsetSystem.Single
categoryChartGuru.PlottableValueRef
public SectorMark(DataPoint point)

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

Parameters

NameType
pointChartGuru.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

NameTypeDescription
startAngleSystem.SingleStart angle in degrees
endAngleSystem.SingleEnd 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

NameType
radiusSystem.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

NameTypeDescription
ratioSystem.SingleInner 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

NameTypeDescription
ratioSystem.SingleOuter 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

NameTypeDescription
insetSystem.SingleAngular 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

NameType
targetTypeChartGuru.ChartType
plotAreaUnityEngine.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; }

How far the slice moves out from the pie’s center along its middle angle, in layout pixels like SectorMark.CornerRadiusValue. The pie shrinks by the largest offset so exploded slices stay inside the plot, and a slice moves at most half the pie’s radius. Hit testing and data labels follow the moved slice.

Returns

System.Single

public float AngleSpan { get; }

Returns

System.Single

public float MidAngle { get; }

Returns

System.Single