% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ms_funnelchart.R
\name{ms_funnelchart}
\alias{ms_funnelchart}
\title{Funnel chart object}
\usage{
ms_funnelchart(data, x, y)
}
\arguments{
\item{data}{a data.frame.}

\item{x}{category column name (stage label).}

\item{y}{numeric value column name.}
}
\value{
An \code{ms_chart} object (subclass \code{ms_funnelchart}).
}
\description{
Creation of a funnel chart object that can be inserted
in a 'Microsoft' document. Funnel charts use the chartEx pipeline
(Office 2016+); older versions of 'Microsoft Office' will display a
fallback placeholder.

Each row is one stage of the funnel. Values are typically decreasing
(e.g. visitors -> leads -> customers). Bars are centered horizontally
and width is proportional to the value.
}
\examples{
library(officer)

dat <- data.frame(
  stage = c("Visitors", "Leads", "Opportunities", "Quotes", "Customers"),
  count = c(5000, 4000, 3000, 1000, 250),
  stringsAsFactors = FALSE
)
fn <- ms_funnelchart(data = dat, x = "stage", y = "count")

doc <- read_pptx()
doc <- add_slide(doc)
doc <- ph_with(doc, fn, location = ph_location_fullsize())
print(doc, target = tempfile(fileext = ".pptx"))
}
\seealso{
\code{\link[=chart_labels]{chart_labels()}}

Other 'Office' chart objects:
\code{\link[=ms_areachart]{ms_areachart()}},
\code{\link[=ms_barchart]{ms_barchart()}},
\code{\link[=ms_boxplotchart]{ms_boxplotchart()}},
\code{\link[=ms_bubblechart]{ms_bubblechart()}},
\code{\link[=ms_chart_combine]{ms_chart_combine()}},
\code{\link[=ms_histogramchart]{ms_histogramchart()}},
\code{\link[=ms_linechart]{ms_linechart()}},
\code{\link[=ms_paretochart]{ms_paretochart()}},
\code{\link[=ms_piechart]{ms_piechart()}},
\code{\link[=ms_radarchart]{ms_radarchart()}},
\code{\link[=ms_scatterchart]{ms_scatterchart()}},
\code{\link[=ms_stockchart]{ms_stockchart()}},
\code{\link[=ms_sunburstchart]{ms_sunburstchart()}},
\code{\link[=ms_treemapchart]{ms_treemapchart()}},
\code{\link[=ms_waterfallchart]{ms_waterfallchart()}}
}
\concept{'Office' chart objects}
