Top  | Previous | Next

Pie Chart

charts_PieChart

Description

The Pie Chart component displays a familiar-looking pie chart. A Pie Chart displays a list of named items, each of which has a value that is part of a total. The total is the sum of the value of each item. The key to the Pie Chart component is the Data property, which contains the items that will be displayed as pie wedges. Typically, this dataset will be bound to a SQL Query Binding to pull dynamic data out of an external database.

 

Extract Order

Similar to other charts, the pie chart can actually accept data in two formats. You can tell the pie chart which format to use via its Extract Order property. The two extract orders are By Column or By Row. The following table shows the two styles for the data that created the pie chart in the screenshot.

By Column

By Row

Label

Value

Grapefruit

7

Apples

15

Bananas

56

Kiwis

19

Grapefruit

Apples

Bananas

Kiwis

7

15

56

19

 

Labels

In addition to the color-coded legend, the pie chart can annotate each wedge with a label. The format of the label is controlled via the Label Format property. For example, the format string used in the screenshot is "{0} = {2} ({3})"

This is a pattern string that uses the following placeholders:

{0} - the item label
{1} - the item value
{2} - the item percentage

 

Properties

Appearance

Chart Title

An optional title that will appear at the top of the chart.

Scripting name

title

Data type

String

Plot Background

The background color for all plots, unless they override it

Scripting name

plotBackground

Data type

Color

Section Colors

The colors to use for the pie wedge fills.

Scripting name

sectionColors

Data type

Color[]

Outline Colors

The colors to use for the pie wedge outlines.

Scripting name

outlineColors

Data type

Color[]

Outline Stroke

The width for the section outline stroke.

Scripting name

outlineStroke

Data type

float

Legend?

Should there be an item legend below the chart?

Scripting name

legend

Data type

boolean

Labels?

Should labels be displayed near sections?

Scripting name

labels

Data type

boolean

Label Format

Formatting String. '{0}' is the wedge name, '{1}' is the value, '{2}' is the percent.

Scripting name

labelFormat

Data type

String

Tooltip Format

Formatting String. '{0}' is the wedge name, '{1}' is the value, '{2}' is the percent.

Scripting name

tooltipFormat

Data type

String

Legend Font

The font for legend items, if there is a legend.

Scripting name

legendFont

Data type

Font

Label Font

The font for labels items, if there are labels.

Scripting name

labelFont

Data type

Font

Title Font

The font for the chart's title.

Scripting name

titleFont

Data type

Font

Antialias

Draw with antialias on? Makes text smoother

Scripting name

antialias

Data type

boolean

Flags

expert

Starting Angle

The start angle to draw the pie wedges.

Scripting name

startAngle

Data type

int

Rotation

Draw the wedges clockwise or counter-clockwise from the starting angle?

Scripting name

rotation

Data type

int

Values

0

Clockwise

1

Counter-Clockwise

Enforce Circularity?

If true, the pie cannot be an oval, even if the overall chart is.

Scripting name

circular

Data type

boolean

Style

Style of pie chart, standard, 3D, or ring.

Scripting name

style

Data type

int

Values

0

Pie

1

3D Pie

2

Ring

3D?

Deprecated. Use Style property instead.

Scripting name

threeDimensional

Data type

boolean

Flags

expert

Foreground Transparency

The transparency of the pie (useful for 3D pies)

Scripting name

foregroundAlpha

Data type

double

3D Depth Factor

The depth of a 3D pie as a factor of the chart height

Scripting name

depthFactor

Data type

double

Selection Highlight Color

The color of the selection highlight

Scripting name

selectionHighlightColor

Data type

Color

Flags

expert

Selection Highlight Width

The line width of the selection highlight

Scripting name

selectionHighlightWidth

Data type

float

Flags

expert

Behavior

Tooltips?

Should tooltips be displayed when the mouse hovers over sections?

Scripting name

tooltips

Data type

boolean

Selection Enabled?

If true, the user will be able to select wedges on the chart. The selected wedge will be highlighted, and the "selectedData" property will reflect it.

Scripting name

selectionEnabled

Data type

boolean

Common

Name

The name of this component.

Scripting name

name

Data type

String

Flags

bindable

Visible

If disabled, the component will be hidden.

Scripting name

visible

Data type

boolean

Flags

bindable

Border

The border surrounding this component. NOTE that the border is unaffected by rotation.

Scripting name

border

Data type

Border

Mouseover Text

The text that is displayed in the tooltip which pops up on mouseover of this component.

Scripting name

toolTipText

Data type

String

Cursor

The mouse cursor to use when hovering over this component.

Scripting name

cursorCode

Data type

int

Flags

expert

Values

0

Default

1

Crosshair

2

Text

3

Wait

12

Hand

13

Move

4

SW Resize

5

SE Resize

6

NW Resize

7

NE Resize

8

N Resize

9

S Resize

10

W Resize

11

E Resize

Data

Data

The data driving the chart.

Scripting name

data

Data type

Dataset

Flags

bindable

Extract Order

Controls whether or not a pie plot views columns as pies, or rows.

Scripting name

extractOrder

Data type

int

Values

0

By Column

1

By Row

Selected Wedge

The currently selected wedge

Scripting name

selectedData

Data type

String

Flags

bindable | read-only

Data Quality

The data quality code for any tag bindings on this component.

Scripting name

dataQuality

Data type

int

Flags

bindable | expert

Scripting

Events

The following event sets are fired by this component. See Component Event Handlers to learn more.

mouse
mouseMotion
propertyChange

 

Scripting Functions

This component has no special scripting functions.