Learn R Programming

rAmCharts (version 2.0.2)

amPie: Plotting pie chart using rAmCharts

Description

amPie computes a pie chart of the given value.

Usage

amPie(data, show_values = TRUE, depth = 0, inner_radius = 0, ...)

Arguments

data
data.frame, dataframe with at least 2 columns : label (character), value (numeric). See data_pie You can add a third column "color" (character, colors in hexadecimal).
show_values
logical, TRUE to display values.
depth
numeric, if > 0, chart is displayed in 3D, value between 0 and 100
inner_radius
numeric, value between 0 and 100
...
see amOptions for more options.

See Also

Examples

Run this code
data("data_pie")
amPie(data = data_pie)


# Other examples available which can be time consuming depending on your configuration.

# Don't display values
amPie(data = data_pie, show_values = FALSE)

# 3D pie
amPie(data = data_pie, depth = 10)

# Donut chart
amPie(data = data_pie, inner_radius = 50)

# All parameters
amPie(data = data_pie, inner_radius = 50, depth = 10, show_values = FALSE)

Run the code above in your browser using DataLab