Spread Windows Forms 6.0 Product Documentation
HoleSize Property
See Also  Example Support Options
FarPoint.Win.Chart Assembly > FarPoint.Win.Chart Namespace > PiePlotArea Class : HoleSize Property


Glossary Item Box

Gets or sets the size of the hole in the middle of the pie.

Syntax

Visual Basic (Declaration) 
Public Property HoleSize As Single
Visual Basic (Usage)Copy Code
Dim instance As PiePlotArea
Dim value As Single
 
instance.HoleSize = value
 
value = instance.HoleSize
C# 
public float HoleSize {get; set;}

Exceptions

ExceptionDescription
System.ArgumentOutOfRangeException value is less than zero or is greater than or equal to one.

Remarks

Hole size is measured relative to the pie radius (0 = no hole, 1 = full pie radius).

Example

This example sets the HoleSize property.
C#Copy Code
FarPoint.Win.Chart.PieSeries series = new FarPoint.Win.Chart.PieSeries(); 
series.SeriesName = "Series 0"; 
series.Values.Add(1.0); 
series.Values.Add(2.0); 
series.Values.Add(4.0); 
series.Values.Add(8.0); 
series.CategoryNames.Add("alpha"); 
series.CategoryNames.Add("beta"); 
series.CategoryNames.Add("gamma"); 
series.CategoryNames.Add("delta"); 
series.PieDetachments.Add(0.5f); 
FarPoint.Win.Chart.PiePlotArea plotArea = new FarPoint.Win.Chart.PiePlotArea(); 
plotArea.Location = new PointF(0.2f, 0.2f); 
plotArea.Size = new SizeF(0.6f, 0.6f); 
plotArea.HoleSize = 0.5;
// elevation and rotation are useful with 3D charts
plotArea.Elevation = 15;
plotArea.Rotation = 20;
plotArea.Series.Add(series); 
FarPoint.Win.Chart.LabelArea label = new FarPoint.Win.Chart.LabelArea(); 
label.Text = "Exploded Pie Chart"; 
label.Location = new PointF(0.5f, 0.02f); 
label.AlignmentX = 0.5f; 
label.AlignmentY = 0.0f; 
FarPoint.Win.Chart.LegendArea legend = new FarPoint.Win.Chart.LegendArea(); 
legend.Location = new PointF(0.98f, 0.5f); 
legend.AlignmentX = 1.0f; 
legend.AlignmentY = 0.5f; 
FarPoint.Win.Chart.ChartModel model = new FarPoint.Win.Chart.ChartModel(); 
model.LabelAreas.Add(label); 
model.LegendAreas.Add(legend); 
model.PlotAreas.Add(plotArea); 
fpChart1.Model = model;
Visual BasicCopy Code
Dim series As New FarPoint.Win.Chart.PieSeries()
series.SeriesName = "Series 0"
series.Values.Add(1.0)
series.Values.Add(2.0)
series.Values.Add(4.0)
series.Values.Add(8.0)
series.CategoryNames.Add("alpha")
series.CategoryNames.Add("beta")
series.CategoryNames.Add("gamma")
series.CategoryNames.Add("delta")
series.PieDetachments.Add(0.5f)
Dim plotArea As New FarPoint.Win.Chart.PiePlotArea()
plotArea.Location = New PointF(0.2f, 0.2f)
plotArea.Size = New SizeF(0.6f, 0.6f)
plotArea.HoleSize = 0.5
'elevation and rotation are useful with 3D charts
plotArea.Elevation = 15
plotArea.Rotation = 20
plotArea.Series.Add(series)
Dim label As New FarPoint.Win.Chart.LabelArea()
label.Text = "Exploded Pie Chart"
label.Location = New PointF(0.5f, 0.02f)
label.AlignmentX = 0.5f
label.AlignmentY = 0.0f
Dim legend As New FarPoint.Win.Chart.LegendArea()
legend.Location = new PointF(0.98f, 0.5f)
legend.AlignmentX = 1.0f
legend.AlignmentY = 0.5f
Dim model As New FarPoint.Win.Chart.ChartModel()
model.LabelAreas.Add(label)
model.LegendAreas.Add(legend)
model.PlotAreas.Add(plotArea)
fpChart1.Model = model

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.