Visualization - Pies - Pie

From Q
Jump to navigation Jump to search

VizIcon Pie Chart.svg

A pie chart divides a circle into slices so that each part represents a proportion of the whole

A Pie Chart divides a circle into slices so that each part represents a proportion of the whole.

Example

The following examples show the distribution of age and gender among survey respondents.

Single variable pie chart

A single variable pie chart takes in values from one variable and shows the breakdown among each category.

Create a Single Variable Pie Chart in Displayr

1. Go to Insert > Visualization > Pie Chart
2. Under Inputs > DATA SOURCE > Variables in ‘Data’, select the variable you want to visualize.

Pie Chart with an Outer Ring

Pie charts can have another dimension of data added by including an outer ring. The following table is a crosstab of the age and gender makeup of respondents.

Age vs gender.png

The columns (age variable) make up the foundation of the pie chart, just like in the first example. The rows (gender variable) are added to the outer ring for another layer of information.

Create a Pie Chart with an Outer Ring in Displayr

1. Go to Insert > Visualization > Pie Chart
2. Under Inputs > DATA SOURCE > Output in ‘Pages’, select your table from the dropdown menu

Object Inspector Options

The following is an explanation of the options available in the Object Inspector for this specific visualization. Refer to Visualization Options for general chart formatting options.

Chart

APPEARANCE
Radius of pie groupings % Radius of the pie groupings, as a percentage of the radius of the pie chart.
DATA SERIES
Color palette of outer ring Color scheme for the outter ring of the pie chart. By default this is set to Group colors so that the colors of the outer ring match the slices of the inner ring.

More Information

How to create a pie chart in Displayr
How to create a pie chart in Excel
How to make a pie chart in R
Why pie charts are better than bar charts

Code

Visualization - Area - Area

{
    "formChartType": "Pie",
    "formStackSeries": false,
    "formSmallMultiples": false,
    "formAsPercentages": false,
    "formScatterLabelType": "As hover text"
}