amBoxplotChart {rAmCharts4} | R Documentation |
HTML widget displaying a boxplot chart
Description
Create a HTML widget displaying a boxplot chart.
Usage
amBoxplotChart(
data,
category,
value,
color = NULL,
hline = NULL,
yLimits = NULL,
expandY = 5,
valueFormatter = "#.",
chartTitle = NULL,
theme = NULL,
animated = TRUE,
tooltip = TRUE,
bullets = NULL,
backgroundColor = NULL,
xAxis = NULL,
yAxis = NULL,
scrollbarX = FALSE,
scrollbarY = FALSE,
caption = NULL,
image = NULL,
cursor = FALSE,
width = NULL,
height = NULL,
export = FALSE,
chartId = NULL,
elementId = NULL
)
Arguments
data |
a dataframe |
category |
name of the column of |
value |
name of the column of |
color |
the color of the boxplots; it can be given by the name of a R
color, the name of a CSS color, e.g. |
hline |
an optional horizontal line to add to the chart; it must be a
named list of the form |
yLimits |
range of the y-axis, a vector of two values specifying
the lower and the upper limits of the y-axis; |
expandY |
if |
valueFormatter |
a
number formatting string;
it is used to format the values displayed in the cursor tooltips,
the labels of the y-axis unless you specify
your own formatter in the |
chartTitle |
chart title, it can be |
theme |
theme, |
animated |
Boolean, whether to animate the rendering of the graphic |
tooltip |
|
bullets |
settings of the bullets representing the outliers;
|
backgroundColor |
a color for the chart background; it can be
given by the name of a R color, the name of a CSS color, e.g.
|
xAxis |
settings of the category axis given as a list, or just a string
for the axis title; the list of settings has four possible fields:
a field |
yAxis |
settings of the value axis given as a list, or just a string
for the axis title; the list of settings has five possible fields:
a field |
scrollbarX |
logical, whether to add a scrollbar for the category axis |
scrollbarY |
logical, whether to add a scrollbar for the value axis |
caption |
|
image |
option to include an image at a corner of the chart;
|
cursor |
option to add a cursor on the chart; |
width |
the width of the chart, e.g. |
height |
the height of the chart, e.g. |
export |
logical, whether to enable the export menu |
chartId |
a HTML id for the chart |
elementId |
a HTML id for the container of the chart; ignored if the chart is displayed in Shiny, in which case the id is given by the Shiny id |
Examples
library(rAmCharts4)
set.seed(666)
dat <- data.frame(
group = gl(4, 50, labels = c("A", "B", "C", "D")),
y = rt(200, df = 3)
)
amBoxplotChart(
dat,
category = "group",
value = "y",
color = "maroon",
valueFormatter = "#.#",
theme = "moonrisekingdom"
)