amFunnel: Plotting funnel chart using rAmCharts

View source: R/chart_amFunnel.R

amFunnelR Documentation

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.

References

See online documentation https://datastorm-open.github.io/introduction_ramcharts/ and amChartsAPI

See Also

amOptions, amBarplot, amBoxplot, amHist, amPie, amPlot, amTimeSeries, amStockMultiSet, amBullet, amRadar, amWind, amFunnel, amAngularGauge, amSolidGauge, amMekko, amCandlestick, amFloatingBar, amOHLC, amWaterfall

Examples

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)

## End(Not run)




datastorm-open/rAmCharts documentation built on Oct. 4, 2022, 7:07 p.m.