thumb|upright=1.4|Example of a grouped (clustered) bar chart, one with horizontal bars|alt=Bar chart comparing human losses of World War Two by country; for each country, a red bar represents the country's human loss in millions, and a blue bar represents the country's human loss as a percentage of its total population.
A bar chart or bar graph is a chart or graph that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. The bars can be plotted vertically or horizontally. A vertical bar chart is sometimes called a column chart and has been identified as the prototype of charts.
A bar graph shows comparisons among discrete categories. One axis of the chart shows the specific categories being compared, and the other axis represents a measured value. Some bar graphs present bars clustered or stacked in groups of more than one, showing the values of more than one measured variable.
History
Many sources consider William Playfair (1759–1824) to have invented the bar chart and the Exports and Imports of Scotland to and from different parts for one Year from Christmas 1780 to Christmas 1781 graph from his The Commercial and Political Atlas to be the first bar chart in history. Diagrams of the velocity of a constantly accelerating object against time published in The Latitude of Forms (attributed to Jacobus de Sancto Martino or, perhaps, to Nicole Oresme) about 300 years before can be interpreted as "proto bar charts".
Usage
Bar graphs/charts provide a visual presentation of categorical data. Categorical data is a grouping of data into discrete groups, such as months of the year, age group, shoe sizes, and animals. These categories are usually qualitative. In a column (vertical) bar chart, categories appear along the horizontal axis and the height of the bar corresponds to the value of each category.
Bar charts have a discrete domain of categories, and are usually scaled so that all the data can fit on the chart. When there is no natural ordering of the categories being compared, bars on the chart may be arranged in any order. Bar charts arranged from highest to lowest incidence are called Pareto charts.
In many cases it is considered correct to use zero as the value at the end of each bar opposite to the end that indicates the data value, because using a non-zero value can make values that are relatively similar have deceptively different bar lengths. However, sometimes this approach is not appropriate or not feasible, such as with temperatures in Celsius or Fahrenheit where zero is a somewhat arbitrary value, and with logarithmic charts where "" would be infinitely far away.
Grouped (clustered) and stacked
Bar graphs can also be used for more complex comparisons of data with grouped (or "clustered") bar charts, and stacked bar charts.
