bar: Create a proportion chart

View source: R/bar.R

barR Documentation

Create a proportion chart

Description

Create a proportion chart

Usage

bar(data, colors, width = NULL, height = NULL, elementId = NULL)

Arguments

data

a list with items "name" and "value" or a data.frame with labels in first column and values in second.

colors

Named list with names corresponding to labels and values to colors.

width, height

Width and height for the chart.

elementId

Explicit ID for the widget.

Examples

bar::bar(
  data = list(
    list(name = "A", value = 123),
    list(name = "B", value = 456)
  ),
  colors = list(A = "firebrick", B = "steelblue")
)

dreamRs/bar documentation built on July 5, 2022, 6:36 p.m.