Bar Chart

A bar chart is a statistical chart that uses horizontal rectangular bars to compare numerical values across different categories. Unlike column charts, bar chart bars are arranged from left to right rather than from bottom to top. A bar chart also requires a categorical variable and a numerical variable. In a bar chart, each entity of the categorical variable is represented as a horizontal rectangular bar, and the numerical value determines the length of the bar.

Use Cases

  • Bar charts are suitable for comparing categorical data, especially when category names are long or when there are many categories, as the horizontal arrangement of bar charts makes it easier to display these categories
  • Additionally, bar charts are better suited for horizontal comparison

Visual Examples

2024 Global Programming Language Popularity

Five Industries Quarterly Revenue Comparison, Custom Colors

Regional Product Line Sales, Custom Palette

Options

Configuration Options

PropertyTypeRequiredDescription
typestringrequiredValue must be "bar".
dataObject[]requiredChart data.
data.categorystring | numberrequiredCategory name.
data.valuenumberrequiredCategory value.
data.groupstringoptionalGroup name. Required when grouping or stacking is enabled.
groupbooleanoptionalWhether to enable grouping.
stackbooleanoptionalWhether to enable stacking.
titlestringoptionalChart title.
axisXTitlestringoptionalX-axis title.
axisYTitlestringoptionalY-axis title.
theme'default' | 'dark' | 'academy'optionalChart theme, default is "default".
styleObjectoptionalChart style.
style.backgroundColorstringoptionalMust be a valid color value.
style.palettestring[]optionalMust be an array of valid color values.