Sector3DMark
public class Sector3DMark : ChartMark3D, IChart3DMark, IChart3DDataMark, IChartMarkExtruded annular sector of 3D pie and donut charts, a Chart Guru extension: Swift Charts 3D has no sector mark.
Angles are in degrees from the top of the flat chart, clockwise as 2D pies run, and the pie lies around the plot
center, resting on the plot's floor in 3D. Its sizes are shares, so a pie fits any plot as a 2D pie fits its plot area: the outer radius, height and
explode distance of the plot's polar radius (Chart3DMeshContext takes half the shorter side of the
plot's footprint), and the inner radius of the outer radius, like Swift Charts' innerRadius: .ratio(...).
Fields
Section titled “Fields”
DefaultOuterRadius
Section titled “DefaultOuterRadius”public const float DefaultOuterRadius = 0.9The default outer radius: 0.9 of the plot’s polar radius, which leaves room for leader labels.
Returns
System.Single
DefaultHeight
Section titled “DefaultHeight”public const float DefaultHeight = 0.24The default height of the slab: 0.24 of the plot’s polar radius.
Returns
System.Single
Constructors
Section titled “Constructors”
Sector3DMark(float, float, float)
Section titled “Sector3DMark(float, float, float)”public Sector3DMark(float startAngle, float endAngle, float value)Creates a slice from startAngle to endAngle, in degrees clockwise from the
top of the flat chart, whose tooltip and data label report value. The angles alone set its
span, so derive them from each value’s share of the total.
Parameters
| Name | Type |
|---|---|
startAngle | System.Single |
endAngle | System.Single |
value | System.Single |
Methods
Section titled “Methods”
InnerRadius(float)
Section titled “InnerRadius(float)”public Sector3DMark InnerRadius(float ratio)Sets the hole’s radius as a share of the outer radius, from 0 for a pie slice to 0.99.
Parameters
| Name | Type |
|---|---|
ratio | System.Single |
Returns
ChartGuru.Sector3DMark
OuterRadius(float)
Section titled “OuterRadius(float)”public Sector3DMark OuterRadius(float ratio)Sets the outer radius as a share of the plot’s polar radius; 1 reaches the edge of the plot’s footprint.
Parameters
| Name | Type |
|---|---|
ratio | System.Single |
Returns
ChartGuru.Sector3DMark
Height(float)
Section titled “Height(float)”public Sector3DMark Height(float ratio)Sets the slab’s height as a share of the plot’s polar radius.
Parameters
| Name | Type |
|---|---|
ratio | System.Single |
Returns
ChartGuru.Sector3DMark
AngularSegments(int)
Section titled “AngularSegments(int)”public Sector3DMark AngularSegments(int s)Sets how many segments a full turn of the slice’s arcs would use, at least 6 and 48 by default; the slice takes its share of them, at least 2, so higher counts draw smoother arcs with more vertices.
Parameters
| Name | Type |
|---|---|
s | System.Int32 |
Returns
ChartGuru.Sector3DMark
Explode(float)
Section titled “Explode(float)”public Sector3DMark Explode(float share)Moves the slice out from the pie’s center along its middle angle by share of the plot’s polar radius.
Parameters
| Name | Type |
|---|---|
share | System.Single |
Returns
ChartGuru.Sector3DMark
BuildMesh(Chart3DMeshContext)
Section titled “BuildMesh(Chart3DMeshContext)”public override void BuildMesh(Chart3DMeshContext ctx)Write triangles / instanced draws for this mark into the context registry.
Parameters
| Name | Type |
|---|---|
ctx | ChartGuru.Chart3DMeshContext |
Clone()
Section titled “Clone()”public override IChartMark Clone()Creates an independent copy of this slice with its angles, value, radii, height, segments, explode distance and style; later changes to either mark do not affect the other.
Returns
ChartGuru.IChartMark
CopySector3DStateTo(Sector3DMark)
Section titled “CopySector3DStateTo(Sector3DMark)”protected void CopySector3DStateTo(Sector3DMark target)Copies what ChartMark3D.CopyCommon3DStateTo(ChartMark3D) copies plus the angles, radii, height, angular segments
and explode distance onto target, for ChartMark.Clone() in derived marks.
Parameters
| Name | Type |
|---|---|
target | ChartGuru.Sector3DMark |
Properties
Section titled “Properties”
StartAngle
Section titled “StartAngle”public float StartAngle { get; }Returns
System.Single
EndAngle
Section titled “EndAngle”public float EndAngle { get; }Returns
System.Single
InnerRadiusValue
Section titled “InnerRadiusValue”public float InnerRadiusValue { get; }The hole’s radius as a share of the outer radius: 0 for a pie slice, at most 0.99.
Returns
System.Single
OuterRadiusValue
Section titled “OuterRadiusValue”public float OuterRadiusValue { get; }The outer radius as a share of the plot’s polar radius.
Returns
System.Single
HeightValue
Section titled “HeightValue”public float HeightValue { get; }The slab’s height as a share of the plot’s polar radius; the slab rests on the plot’s floor.
Returns
System.Single
ExplodeValue
Section titled “ExplodeValue”public float ExplodeValue { get; }How far the slice moves out from the pie’s center along its middle angle, as a share of the plot’s polar radius.
Returns
System.Single
MarkType
Section titled “MarkType”public override ChartType MarkType { get; }Returns
ChartGuru.ChartType