Skip to content

Generates a simple horizontal bar chart using HTML elements.

Usage

bar_chart(
  label,
  width = "100%",
  height = "1rem",
  fill = "#00bfc4",
  background = NULL,
  box
)

Arguments

label

A string. The label text displayed next to the bar.

width

A string. The width of the bar. Defaults to "100%".

height

A string. The height of the bar. Defaults to "1rem".

fill

A string. The fill color of the bar. Defaults to "#00bfc4".

background

A string. The background color of the area around the bar. Defaults to NULL.

box

An integer. The width of the label box in pixels.

Value

An HTML object representing the bar chart, ready to be used in a Shiny UI.