Learn R Programming

rAmCharts (version 2.1.7)

amFunnel: Plotting funnel chart using rAmCharts

Description

amFunnel computes a funnel chart of the given value.

Usage

amFunnel(data, inverse = FALSE, neck_height = NULL, neck_width = NULL,
  depth = 0, label_side = "right", margin_right = 200,
  margin_left = 200, ...)

Arguments

data

data.frame of at least 2 columns : value (numeric, positive), and description (character). You can add a third column "color" (character, colors in hexadecimal) see data_funnel.

inverse

logical, if TRUE, the funnel chart will be inversed.

neck_height

numeric, value between 0 and 100 : if a bottleneck is desired, this value determines its heigh. Default to NULL.

neck_width

numeric, value between 0 and 100 : if a bottleneck is desired, this value determines its witdh. Default to NULL.

depth

numeric, if > 0, chart is displayed in 3D, only for pyramid chart (without a bottleneck). Value between 0 and 100.

label_side

character, label position : "right" or "left".

margin_right

numeric, margin at the right side.

margin_left

numeric, margin at the left side.

...

see amOptions for more options.

See Also

Examples

Run this code
# NOT RUN {
data(data_funnel)
amFunnel(data = data_funnel, inverse = TRUE)

# }
# NOT RUN {
# Other examples available which can be time consuming depending on your configuration.

# Change the orientation and legend side              
amFunnel(data = data_funnel, inverse = FALSE,
         label_side = "left", margin_right = 15, margin_left = 160)

# Basic example : Funnel chart
amFunnel(data = data_funnel, neck_height = 30, neck_width = 40)

# 3D pyramid
amFunnel(data = data_funnel, depth = 50, inverse = TRUE)
# }
# NOT RUN {

# }

Run the code above in your browser using DataLab