Class DonutChart
A donut or pie chart: each slice is its value's share of the sum of the values, with a label next to it and its percentage inside it. A chart with an inner radius of 0 is a pie chart. See Example_28.
public class DonutChart : IDrawable
- Inheritance
-
DonutChart
- Implements
- Inherited Members
Constructors
DonutChart(Font, Font)
Creates a donut chart. With an inner radius of 0 it is a pie chart.
public DonutChart(Font f1, Font f2)
Parameters
f1Fontthe font for the slice labels.
f2Fontthe font for the percentages drawn inside the slices.
Methods
AddSlice(Slice)
Adds a slice to this chart.
public DonutChart AddSlice(Slice slice)
Parameters
sliceSlice
Returns
DrawOn(Page)
Draws this chart on the specified page.
public float[] DrawOn(Page page)
Parameters
pagePagethe page to draw on.
Returns
- float[]
x and y coordinates of the bottom right corner of the outer circle of this chart. The slice labels can extend past it.
SetAltDescription(string)
Sets the alternate description of the chart, which a screen reader reads in a PDF/UA document, where the chart is a figure. The default lists the label and the percentage of each slice.
public DonutChart SetAltDescription(string altDescription)
Parameters
altDescriptionstringthe alternate description.
Returns
- DonutChart
this DonutChart object.
SetLocation(float, float)
Sets the top left corner of the outer circle of this chart. The center is one outer radius to the right of it and one below. The slice labels can extend past the circle.
public DonutChart SetLocation(float x, float y)
Parameters
Returns
SetRadii(float, float)
Sets the outer and inner radius of this chart; an inner radius of 0 makes a pie chart.
public DonutChart SetRadii(float outerRadius, float innerRadius)