Table of Contents

Class DonutChart

Namespace
PDFjet.NET
Assembly
PDFjet.dll

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

f1 Font

the font for the slice labels.

f2 Font

the font for the percentages drawn inside the slices.

Methods

AddSlice(Slice)

Adds a slice to this chart.

public DonutChart AddSlice(Slice slice)

Parameters

slice Slice

Returns

DonutChart

DrawOn(Page)

Draws this chart on the specified page.

public float[] DrawOn(Page page)

Parameters

page Page

the 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

altDescription string

the 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

x float

the x coordinate of the top left corner.

y float

the y coordinate of the top left corner.

Returns

DonutChart

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)

Parameters

outerRadius float
innerRadius float

Returns

DonutChart