View source: R/barpictograph.R
BarPictograph | R Documentation |
Distribution Chart.
BarPictograph(
x,
image = "Stickman",
custom.image = NULL,
base.image = "",
hide.base.image = !any(nzchar(custom.image)),
base.icon.color = "",
scale = NA,
total.icons = NA,
icon.ncol = NA,
fix.icon.nrow = TRUE,
label.color.asIcon = FALSE,
colors = ChartColors(length(x)),
fill.direction = c("From left", "From right")[1],
global.font.family = "Arial",
global.font.color = rgb(44, 44, 44, maxColorValue = 255),
data.label.show = FALSE,
data.label.position = "No",
data.label.format = "",
data.label.prefix = "",
data.label.suffix = "",
data.label.bigmark = ",",
data.label.font.family = global.font.family,
data.label.font.color = global.font.color,
data.label.font.size = 8,
data.label.align.horizontal = "Default",
categories.tick.show = TRUE,
categories.tick.font.family = global.font.family,
categories.tick.font.color = global.font.color,
categories.tick.font.size = 12,
categories.tick.pad = 5,
categories.tick.align.horizontal = "Default",
categories.tick.align.vertical = "Default",
background.fill.color = "transparent",
pad.row = 2,
pad.col = 2,
pad.icon.row = 0,
pad.icon.col = 0,
graphic.width.inch = NA,
graphic.height.inch = NA,
graphic.resolution = 72,
maximum.number.icons = 10000,
print.config = FALSE
)
x |
A |
image |
Name of icon to use. |
custom.image |
URL of icon to use. If this parameter is supplied |
base.image |
URL of image to use as base image. Only used if |
hide.base.image |
Turns off background image. In general, the base image should only be shown if the input data is a proportion. |
base.icon.color |
Color of base image, supplied as a hex code or string. This is only used if the built-in icons are used. |
scale |
Value of one icon. If |
total.icons |
Maximum number of icons in each table cell. By default, it will be determine based on |
icon.ncol |
Configuration of icons in each table cell. Can be a single value or a vector with length equal to the number of columns. |
fix.icon.nrow |
When |
label.color.asIcon |
When set to |
colors |
Character; a vector containing one or more colors specified as hex codes. |
fill.direction |
Direction in which icons are filled. One of |
global.font.family |
Character; font family for all occurrences of any font attribute for the chart unless specified individually. |
global.font.color |
Global font color as a named color in character format (e.g. "black") or an rgb value (e.g. #' rgb(0, 0, 0, maxColorValue = 255)). |
data.label.show |
Logical; whether to show data labels. |
data.label.position |
When |
data.label.format |
A string representing a d3 formatting code. |
data.label.prefix |
Character; prefix for data values. |
data.label.suffix |
Character; suffix for data values. |
data.label.bigmark |
Option to prettify large numbers. By default a comma is placed after a thousand. |
data.label.font.family |
Character; font family for data label. |
data.label.font.color |
Font color as a named color in character format (e.g. "black") or an a hex code. This can be a single color, a vector of colors (1 for each series/column), or a comma separated list of colors |
data.label.font.size |
Integer; Font size for data label.px. |
data.label.align.horizontal |
Horizontal alignment of data labels labels. One of "left", "right", "middle" or "Default". |
categories.tick.show |
Logical; Whether to show tick labels for each bar (i.e. rownames). |
categories.tick.font.family |
Character; x-axis tick label font family |
categories.tick.font.color |
X-axis tick label font color as a named color in character format (e.g. "black") or an rgb value (e.g. rgb(0, 0, 0, maxColorValue = 255)). |
categories.tick.font.size |
x-axis tick label font size |
categories.tick.pad |
Horizontal space between the row labels and the icons. |
categories.tick.align.horizontal |
Horizontal alignment of tick labels for each bar. One of "left", "right", "middle" or "Default". |
categories.tick.align.vertical |
Vertical alignment of tick labels for each bar. One of "top", "center", "bottom" or "Default". |
background.fill.color |
Background color in character format (e.g. "black") or an rgb value (e.g. rgb(0, 0, 0, maxColorValue = 255)). |
pad.row |
Single numeric specifying vertical spacing between graphic cells in the table. |
pad.col |
Vertical spacing between cells in table. |
pad.icon.row |
Numeric specifying vertical spacing between icons inside each table cell. May be a single value or a numeric matrix of the same dimensions as |
pad.icon.col |
Horizontal spacing between icons inside each table cell. |
graphic.width.inch |
Horizontal dimension of the chart output in inches. If these dimensions are not specified, the width-to-height ratio of the chart output may not match the desired dimensions. |
graphic.height.inch |
Verical dimension of the chart output in inches. |
graphic.resolution |
Number of pixels per inch. Should not have an actual effect but rounding errors sometimes occur if this is chosen poorly. |
maximum.number.icons |
Maximum allowed number of icons. Note that increasing this value may cause the browser to crash. |
print.config |
Print configuration string based to |
A plotly
chart.
BarPictograph(1:5, image = "Sick person")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.