## The Pie Chart

The pie chart is an alternative to the one-variable bar chart. Each pie slice reflects a frequency of occurrence, analogous to a bar in a bar chart. A more readable version of a pie chart is a ring chart, a type of pie chart with no hole in the middle.

For a general presentation of using `R` and `lessR`, including examples of bar charts, select one or both of the following sources.

- online book chapter
- within a working `R` session, enter `browseVignettes("lessR")`, then select the `Bar Chart, Pie Chart` vignette
- within a working `R` session, enter `?PieChart` to access the manual that describes the `PieChart()` function

### Palettes Addressed to Color-Blindness

Typical color palettes are not designed to account for color-blindness. Two palettes included in `lessR` do permit more sensitivity to differentiate among objects with various types of color blindness: `Okabe-Ito` and `viridis`. These are qualitative palettes, which means that the hue varies across the plotted objects, here slices of a pie. Specify these, or other palettes, as the value for the `fill` parameter, available both by entering a function call in the R console or via the interactive analysis.

### Parameters

For the full list of `PieChart)` parameters, see the manual obtained by entering `?PieChart`. These listed parameters are those provided in the interactive session from `interact("PieChart")`.

#### Colors

fill
  interior color of a bar
color
  exterior color of a bar, i.e., its border
transparency
  transparency level of `0` (none) to `1` (completely transparent)

#### Hole

hole
  size of the hole, from `0` (none) up to `1` (no plot, nothing left)
hole_fill
  color of the hole

#### Values

values
  type of value displayed, "%" for percent, "input" for entered data values, "off" for none
values_color
  color of displayed values
values_position
  position of displayed values, "in" the object or "out", on top
values_size
  size of the displayed values

#### Save

width
  width of saved pdf file, in inches
height
  height of saved pdf file, in inches