BarChart
✖
BarChart
Details and Options




- BarChart is also known as a bar graph or column graph.
- A bar chart shows the values in a dataset as equal-width rectangular bars with lengths corresponding to the values. By default, the bars are vertical, but horizontal bars can also be used. Bar charts are typically used when the data is relatively small.
- Data elements for BarChart can be given in the following forms:
-
yi a pure bar value Quantity[yi,unit] bar value with a unit wi[yi,…] a bar with value yi and wrapper wi formi->mi a bar form with metadata mi Around[xi,ei] value xi with uncertainty ei - Data not given in these forms is taken to be missing, and typically yields a gap in the bar chart.
- Datasets for BarChart can be given in the following forms:
-
{e1,e2,…} list of elements with or without wrappers <k1e1,k2e2,… > association of keys and lengths TimeSeries[…],EventSeries[…],TemporalData[…] time series, event series, and temporal data WeightedData[…],EventData[…] augmented datasets w[{e1,e2,…},…] wrapper applied to a whole dataset w[{data1,data2,…},…] wrapper applied to all datasets - BarChart[Tabular[…]cspec] extracts and plots values from the tabular object using the column specification cspec.
- The following forms of column specifications cspec are allowed for plotting tabular data:
-
col plot values from column col {col1,col2,…,coln} plot columns {col1, …, coln} as a group of values - The following wrappers can be used for chart elements:
-
Annotation[e,label] provide an annotation Button[e,action] define an action to execute when the element is clicked Callout[e,label] display the element with a callout EventHandler[e,…] define a general event handler for the element Hyperlink[e,uri] make the element act as a hyperlink Labeled[e,…] display the element with labeling Legended[e,…] include features of the element in a chart legend Mouseover[e,over] make the element show a mouseover form PopupWindow[e,cont] attach a popup window to the element StatusArea[e,label] display in the status area when the element is moused over Style[e,opts] show the element using the specified styles Tooltip[e,label] attach an arbitrary tooltip to the element - In BarChart, Labeled, Callout and Placed allow the following positions:
-
Top inside the top edge of the bar Bottom inside the bottom edge of the bar Above outside the top edge of the bar Below outside the bottom edge of the bar Center centered in the bar Left inside the left edge of the bar Right inside the right edge of the bar Before outside the left edge of the bar After outside the right edge of the bar Axis on the axis "Outside" outside the bar {{bx,by},{lx,ly}} scaled position {lx,ly} in the label at scaled position {bx,by} in the bar - BarChart has the same options as Graphics, with the following additions and changes: [List of all options]
-
AspectRatio 1/GoldenRatio ratio of height to width Axes True whether to draw axes BarOrigin Bottom origin placement for bars BarSpacing Automatic fractional spacing between bars ChartBaseStyle Automatic overall style for bars ChartElementFunction Automatic how to generate raw graphics for bars ChartElements Automatic graphics to use in each of the bars ChartLabels None labels for data elements and datasets ChartLayout Automatic overall layout to use ChartLegends None legends for data elements and datasets ChartStyle Automatic style for bars ColorFunction Automatic how to color bars ColorFunctionScaling True whether to normalize arguments to ColorFunction IntervalMarkers Automatic how to render uncertainties IntervalMarkersStyle Automatic style for uncertainty elements Joined False whether to join bars LabelingFunction Automatic how to label bars LabelingSize Automatic maximum size of callouts and labels LegendAppearance Automatic overall appearance of legends PerformanceGoal $PerformanceGoal aspects of performance to try to optimize PlotTheme $PlotTheme overall theme for the chart ScalingFunctions None how to scale individual coordinates TargetUnits Automatic units to display in the chart - Possible settings for ChartLayout that show multiple datasets in a single display panel include:
-
"Grouped" separate the data for each dataset "Stacked" accumulate the data for each dataset "Stepped" accumulate and separate the data for each dataset "Percentile" accumulate and normalize the data for each dataset "Overlapped" overlap the data for each dataset - Possible settings for ChartLayout that show individual datasets in different panels include:
-
"Column" use separate charts in a column of panels "Row" use separate charts in a row of panels {"Column",k},{"Row",k} use k columns or rows {"Column",UpTo[k]},{"Row",UpTo[k]} use at most k columns or rows - The arguments supplied to ChartElementFunction are the bar region {{xmin,xmax},{ymin,ymax}}, the data value yi, and metadata {m1,m2,…} from each level in a nested list of datasets.
- A list of built-in settings for ChartElementFunction can be obtained from ChartElementData["BarChart"].
- The argument supplied to ColorFunction is yi.
- Style and other specifications from options and other constructs in BarChart are effectively applied in the order ChartStyle, ColorFunction, Style and other wrappers, ChartElements, and ChartElementFunction, with later specifications overriding earlier ones.
-
AlignmentPoint Center the default point in the graphic to align with AspectRatio 1/GoldenRatio ratio of height to width Axes True whether to draw axes AxesLabel None axes labels AxesOrigin Automatic where axes should cross AxesStyle {} style specifications for the axes Background None background color for the plot BarOrigin Bottom origin placement for bars BarSpacing Automatic fractional spacing between bars BaselinePosition Automatic how to align with a surrounding text baseline BaseStyle {} base style specifications for the graphic ChartBaseStyle Automatic overall style for bars ChartElementFunction Automatic how to generate raw graphics for bars ChartElements Automatic graphics to use in each of the bars ChartLabels None labels for data elements and datasets ChartLayout Automatic overall layout to use ChartLegends None legends for data elements and datasets ChartStyle Automatic style for bars ColorFunction Automatic how to color bars ColorFunctionScaling True whether to normalize arguments to ColorFunction ContentSelectable Automatic whether to allow contents to be selected CoordinatesToolOptions Automatic detailed behavior of the coordinates tool Epilog {} primitives rendered after the main plot FormatType TraditionalForm the default format type for text Frame False whether to put a frame around the plot FrameLabel None frame labels FrameStyle {} style specifications for the frame FrameTicks Automatic frame ticks FrameTicksStyle {} style specifications for frame ticks GridLines None grid lines to draw GridLinesStyle {} style specifications for grid lines ImageMargins 0. the margins to leave around the graphic ImagePadding All what extra padding to allow for labels etc. ImageSize Automatic the absolute size at which to render the graphic IntervalMarkers Automatic how to render uncertainties IntervalMarkersStyle Automatic style for uncertainty elements Joined False whether to join bars LabelingFunction Automatic how to label bars LabelingSize Automatic maximum size of callouts and labels LabelStyle {} style specifications for labels LegendAppearance Automatic overall appearance of legends Method Automatic details of graphics methods to use PerformanceGoal $PerformanceGoal aspects of performance to try to optimize PlotLabel None an overall label for the plot PlotRange All range of values to include PlotRangeClipping False whether to clip at the plot range PlotRangePadding Automatic how much to pad the range of values PlotRegion Automatic the final display region to be filled PlotTheme $PlotTheme overall theme for the chart PreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic Prolog {} primitives rendered before the main plot RotateLabel True whether to rotate y labels on the frame ScalingFunctions None how to scale individual coordinates TargetUnits Automatic units to display in the chart Ticks Automatic axes ticks TicksStyle {} style specifications for axes ticks


List of all options




Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Generate a bar chart for a list of heights:

https://wolfram.com/xid/0cq0nbvj-em9h6k


https://wolfram.com/xid/0cq0nbvj-84qozl


https://wolfram.com/xid/0cq0nbvj-g1a1u5


https://wolfram.com/xid/0cq0nbvj-1kyn8


https://wolfram.com/xid/0cq0nbvj-e2us0c


https://wolfram.com/xid/0cq0nbvj-dn2ge5

Scope (42)Survey of the scope of standard use cases
Data and Layouts (15)
Items in a dataset are grouped together:

https://wolfram.com/xid/0cq0nbvj-j213wq

Datasets do not need to have the same number of items:

https://wolfram.com/xid/0cq0nbvj-4nweqa

Nonreal data is taken to be missing and typically yields a gap in the bar chart:

https://wolfram.com/xid/0cq0nbvj-bibvmw


https://wolfram.com/xid/0cq0nbvj-7bo8p2


https://wolfram.com/xid/0cq0nbvj-c1j6si

The time stamps in TimeSeries, EventSeries, and TemporalData are ignored:

https://wolfram.com/xid/0cq0nbvj-erdnh4

The values in associations are taken as the heights of the bars:

https://wolfram.com/xid/0cq0nbvj-fapjdf


https://wolfram.com/xid/0cq0nbvj-berasr


https://wolfram.com/xid/0cq0nbvj-tjqoa8


https://wolfram.com/xid/0cq0nbvj-laiqvh


https://wolfram.com/xid/0cq0nbvj-3hzlhk

The weights in WeightedData are ignored:

https://wolfram.com/xid/0cq0nbvj-8nlbze

The censoring and truncation information in EventData is ignored:

https://wolfram.com/xid/0cq0nbvj-78g22i

Use different layouts to display multiple datasets:

https://wolfram.com/xid/0cq0nbvj-jem942

Stacked layouts are more compact in the horizontal direction:

https://wolfram.com/xid/0cq0nbvj-kgsnxd

Use Joined to indicate connections between data points:

https://wolfram.com/xid/0cq0nbvj-cbsjoy


https://wolfram.com/xid/0cq0nbvj-ve6gpg

Use a column of charts instead:

https://wolfram.com/xid/0cq0nbvj-201zui


https://wolfram.com/xid/0cq0nbvj-ox57jm


https://wolfram.com/xid/0cq0nbvj-dd123g

Adjust the spacing between bars and groups of bars:

https://wolfram.com/xid/0cq0nbvj-ire63a


https://wolfram.com/xid/0cq0nbvj-vx4nl

Tabular Data (1)
Get tabular data, counted by the "class" and "survived" columns:

https://wolfram.com/xid/0cq0nbvj-0og8bm

Create a chart of how many passengers were in each ticket class:

https://wolfram.com/xid/0cq0nbvj-q7iydl


https://wolfram.com/xid/0cq0nbvj-n5slo8

Show how many passengers survived and how many perished:

https://wolfram.com/xid/0cq0nbvj-mg8iiy


https://wolfram.com/xid/0cq0nbvj-f7dh60

Display the number of passengers who survived by ticket class:

https://wolfram.com/xid/0cq0nbvj-cjoxrq


https://wolfram.com/xid/0cq0nbvj-zw9gne

Use stacked bars for the display:

https://wolfram.com/xid/0cq0nbvj-h3d3i4

Wrappers (5)
Use wrappers on individual data, datasets, or collections of datasets:

https://wolfram.com/xid/0cq0nbvj-fv6xu4


https://wolfram.com/xid/0cq0nbvj-d78b5k

Override the default tooltips:

https://wolfram.com/xid/0cq0nbvj-dw7akx

Use any object in the tooltip:

https://wolfram.com/xid/0cq0nbvj-bshk9y

Use PopupWindow to provide additional drilldown information:

https://wolfram.com/xid/0cq0nbvj-9oa0q

Button can be used to trigger any action:

https://wolfram.com/xid/0cq0nbvj-j1231b

Styling and Appearance (8)
Use an explicit list of styles for the bars:

https://wolfram.com/xid/0cq0nbvj-fihngk

Use any gradient or indexed color schemes from ColorData:

https://wolfram.com/xid/0cq0nbvj-gp1e

Use color schemes designed for charting:

https://wolfram.com/xid/0cq0nbvj-c4f5rf


https://wolfram.com/xid/0cq0nbvj-fchssf

ChartBaseStyle can be used to set an initial style for all chart elements:

https://wolfram.com/xid/0cq0nbvj-prid3j

Style can be used to override styles:

https://wolfram.com/xid/0cq0nbvj-o2q0l

Use any graphic for pictorial bars:

https://wolfram.com/xid/0cq0nbvj-qm4zqe

Use built-in programmatically generated bars:

https://wolfram.com/xid/0cq0nbvj-wvz8c


https://wolfram.com/xid/0cq0nbvj-f2wd4m

For detailed settings use Palettes ▶ ChartElementSchemes:

https://wolfram.com/xid/0cq0nbvj-fhi6g2

Use a theme with detailed frame ticks and grid lines:

https://wolfram.com/xid/0cq0nbvj-zay8qf

Use a theme with a high-contrast color scheme and edge-fading rectangles:

https://wolfram.com/xid/0cq0nbvj-hcb53c

Labeling and Legending (13)
Use Labeled to add a label to a bar:

https://wolfram.com/xid/0cq0nbvj-keu5cx

Use symbolic positions for label placement:

https://wolfram.com/xid/0cq0nbvj-dknv2m


https://wolfram.com/xid/0cq0nbvj-hkqmb4

Provide categorical labels for the columns of data:

https://wolfram.com/xid/0cq0nbvj-xqnad


https://wolfram.com/xid/0cq0nbvj-lqpe2a


https://wolfram.com/xid/0cq0nbvj-jvgfhd

Use Placed to control the positioning of labels, using the same positions as for Labeled:

https://wolfram.com/xid/0cq0nbvj-ocux9

Use Callout to add a label to a bar:

https://wolfram.com/xid/0cq0nbvj-hrgnu6

Change the appearance of the callout:

https://wolfram.com/xid/0cq0nbvj-pmmdcv

Automatically position callouts:

https://wolfram.com/xid/0cq0nbvj-63kw3n

Use callouts with stacked bars:

https://wolfram.com/xid/0cq0nbvj-zf7gtv

Provide value labels for bars by using LabelingFunction:

https://wolfram.com/xid/0cq0nbvj-ci7n67

Use Placed to control placement and formatting:

https://wolfram.com/xid/0cq0nbvj-gujlfe

https://wolfram.com/xid/0cq0nbvj-ew8542

Use Callout to create callouts:

https://wolfram.com/xid/0cq0nbvj-1l8t7w

Add categorical legend entries for the columns of data:

https://wolfram.com/xid/0cq0nbvj-dnvp16


https://wolfram.com/xid/0cq0nbvj-b2cb3h

Use Legended to add additional legend entries:

https://wolfram.com/xid/0cq0nbvj-mpyvi

Use Placed to affect the positioning of legends:

https://wolfram.com/xid/0cq0nbvj-gizo69

Options (133)Common values & functionality for each option
AspectRatio (3)
By default, BarChart uses a fixed ratio of height to width for the chart:

https://wolfram.com/xid/0cq0nbvj-voh55

The ratio is not affected when the bars are horizontal:

https://wolfram.com/xid/0cq0nbvj-h1yg79

Make the height the same as the width with AspectRatio1:

https://wolfram.com/xid/0cq0nbvj-dwpyw7

AspectRatioFull adjusts the height and width to tightly fit inside other constructs:

https://wolfram.com/xid/0cq0nbvj-bgv2

https://wolfram.com/xid/0cq0nbvj-bjbt0v

Axes (3)

https://wolfram.com/xid/0cq0nbvj-b12w2d

Use AxesFalse to turn off axes:

https://wolfram.com/xid/0cq0nbvj-ba9fxu

Use AxesOrigin to specify where the axes intersect:

https://wolfram.com/xid/0cq0nbvj-f3tcov

AxesLabel (4)
AxesOrigin (2)
AxesStyle (4)
Change the style for the axes:

https://wolfram.com/xid/0cq0nbvj-l2bg9w

Specify the style of each axis:

https://wolfram.com/xid/0cq0nbvj-gxcjsc

Use different styles for the ticks and the axes:

https://wolfram.com/xid/0cq0nbvj-b8q2ak

Use different styles for the labels and the axes:

https://wolfram.com/xid/0cq0nbvj-fekjn9

BarSpacing (5)
Use automatically determined spacing between bars:

https://wolfram.com/xid/0cq0nbvj-gbo7on


https://wolfram.com/xid/0cq0nbvj-bhqoh0


https://wolfram.com/xid/0cq0nbvj-cyfias

Use explicit spacing between bars:

https://wolfram.com/xid/0cq0nbvj-vppz2r

Use explicit spacing between bars and groups of bars:

https://wolfram.com/xid/0cq0nbvj-99aub

ChartBaseStyle (5)
Use ChartBaseStyle to style bars:

https://wolfram.com/xid/0cq0nbvj-gkdy1d


https://wolfram.com/xid/0cq0nbvj-go00dd


https://wolfram.com/xid/0cq0nbvj-gvfx7p

ChartBaseStyle combines with ChartStyle:

https://wolfram.com/xid/0cq0nbvj-hilrob

ChartStyle may override settings for ChartBaseStyle:

https://wolfram.com/xid/0cq0nbvj-nykrk

ChartBaseStyle combines with Style:

https://wolfram.com/xid/0cq0nbvj-e8vs4c

Style may override settings for ChartBaseStyle:

https://wolfram.com/xid/0cq0nbvj-njm38a

ChartBaseStyle combines with ColorFunction:

https://wolfram.com/xid/0cq0nbvj-mgk40x

ColorFunction may override settings for ChartBaseStyle:

https://wolfram.com/xid/0cq0nbvj-gx8lzq

ChartElementFunction (6)
Get a list of built-in settings for ChartElementFunction:

https://wolfram.com/xid/0cq0nbvj-iuo5q3

For detailed settings, use Palettes ▶ ChartElementSchemes:

https://wolfram.com/xid/0cq0nbvj-enr6pq


https://wolfram.com/xid/0cq0nbvj-xnv5t

This ChartElementFunction is appropriate to show the global scale:

https://wolfram.com/xid/0cq0nbvj-cxoj1e

Write a custom ChartElementFunction:

https://wolfram.com/xid/0cq0nbvj-dh5in

https://wolfram.com/xid/0cq0nbvj-irvh9i


https://wolfram.com/xid/0cq0nbvj-f8fo72

https://wolfram.com/xid/0cq0nbvj-iwghyt

Use metadata passed on from the input, in this case charting the data:

https://wolfram.com/xid/0cq0nbvj-fvk48j

https://wolfram.com/xid/0cq0nbvj-c5ph2v

https://wolfram.com/xid/0cq0nbvj-raamjl

Built-in element functions may have options; use Palettes ▶ ChartElementSchemes to set them:

https://wolfram.com/xid/0cq0nbvj-fjaidg


https://wolfram.com/xid/0cq0nbvj-eqia3q

ChartElements (9)
Create a pictorial chart based on any Graphics object:

https://wolfram.com/xid/0cq0nbvj-cai6u1


https://wolfram.com/xid/0cq0nbvj-b5wkc7


https://wolfram.com/xid/0cq0nbvj-m68y40

Use a stretched version of the graphic:

https://wolfram.com/xid/0cq0nbvj-gzqary

Use explicit sizes for width and height:

https://wolfram.com/xid/0cq0nbvj-cryqz1

Without AspectRatio->Full, the original aspect ratio is preserved:

https://wolfram.com/xid/0cq0nbvj-hz7v0

Using All for width or height causes that direction to stretch to the full size of the bar:

https://wolfram.com/xid/0cq0nbvj-i3lnix

Use a different graphic for each column of data:

https://wolfram.com/xid/0cq0nbvj-boo0ra

Use a different graphic for each row of data:

https://wolfram.com/xid/0cq0nbvj-ghv35b


https://wolfram.com/xid/0cq0nbvj-zsl9w

Styles are inherited from styles set through ChartStyle etc.:

https://wolfram.com/xid/0cq0nbvj-m7u2g

Explicit styles set in the graphic will override other style settings:

https://wolfram.com/xid/0cq0nbvj-cbi1qa

The orientation of the pictorial graphic is unaffected by BarOrigin:

https://wolfram.com/xid/0cq0nbvj-e8tk3


https://wolfram.com/xid/0cq0nbvj-fwjzhx

https://wolfram.com/xid/0cq0nbvj-1fj5p

ChartLabels (10)
By default, labels are placed in the axis:

https://wolfram.com/xid/0cq0nbvj-b6vqtn

Labeled wrappers in data will place additional labels:

https://wolfram.com/xid/0cq0nbvj-h3lfo1

Use Placed to control label placement:

https://wolfram.com/xid/0cq0nbvj-jtjhg1

Symbolic positions outside the bar:

https://wolfram.com/xid/0cq0nbvj-40261


https://wolfram.com/xid/0cq0nbvj-c4m8tn

Coordinate-based placement relative to a bar:

https://wolfram.com/xid/0cq0nbvj-w3f0f

Place all labels at the upper-right corner and vary the coordinates within the label:

https://wolfram.com/xid/0cq0nbvj-jwrro6

Use the third argument to Placed to control formatting:

https://wolfram.com/xid/0cq0nbvj-jpbwst


https://wolfram.com/xid/0cq0nbvj-ofibw3


https://wolfram.com/xid/0cq0nbvj-eme0ru


https://wolfram.com/xid/0cq0nbvj-baun2i

By default, labels are associated with columns of data:

https://wolfram.com/xid/0cq0nbvj-c41xrn

Associate labels with rows or datasets:

https://wolfram.com/xid/0cq0nbvj-bxwbr9


https://wolfram.com/xid/0cq0nbvj-brr87x

Use Placed to affect placements:

https://wolfram.com/xid/0cq0nbvj-do9c6b

Use Callout to connect the labels to the bars:

https://wolfram.com/xid/0cq0nbvj-xgj9b7


https://wolfram.com/xid/0cq0nbvj-ctd6wo

ChartLayout (5)
ChartLayout is grouped by default:

https://wolfram.com/xid/0cq0nbvj-3dudlu


https://wolfram.com/xid/0cq0nbvj-jhvx5w


https://wolfram.com/xid/0cq0nbvj-lott74

The stacked layout can effectively display many datasets:

https://wolfram.com/xid/0cq0nbvj-cce7z5

Show changes for different categories by setting Joined->True:

https://wolfram.com/xid/0cq0nbvj-krffbj

Place individual charts in a column:

https://wolfram.com/xid/0cq0nbvj-fr91sq

Use a row instead of a column:

https://wolfram.com/xid/0cq0nbvj-je1a7p


https://wolfram.com/xid/0cq0nbvj-3dcjh


https://wolfram.com/xid/0cq0nbvj-cimn11

ChartLegends (8)
Generate a legend based on chart style:

https://wolfram.com/xid/0cq0nbvj-bijdk9

Use Legended to add additional legend entries:

https://wolfram.com/xid/0cq0nbvj-nsr5vg

Use Legended to specify individual legend entries:

https://wolfram.com/xid/0cq0nbvj-c901ne

Legended adds additional legend entries:

https://wolfram.com/xid/0cq0nbvj-bv8j7g

Generate a legend for datasets:

https://wolfram.com/xid/0cq0nbvj-bwg6ep

Unused legend labels are dropped:

https://wolfram.com/xid/0cq0nbvj-gsg25

Legends can be applied to several dimensions:

https://wolfram.com/xid/0cq0nbvj-biznmd

Use Placed to control the placement of legends:

https://wolfram.com/xid/0cq0nbvj-f9lydj

ChartStyle (8)
Use ChartStyle to style bars:

https://wolfram.com/xid/0cq0nbvj-m5lye


https://wolfram.com/xid/0cq0nbvj-e6xe38

Use the "Gradients" color scheme from ColorData:

https://wolfram.com/xid/0cq0nbvj-4cjhr

Use the "Indexed" color scheme from ColorData:

https://wolfram.com/xid/0cq0nbvj-iclxc4

Use indexed colors optimized for charting:

https://wolfram.com/xid/0cq0nbvj-cfbyi5


https://wolfram.com/xid/0cq0nbvj-ejbsca


https://wolfram.com/xid/0cq0nbvj-cm40br


https://wolfram.com/xid/0cq0nbvj-da9kf2


https://wolfram.com/xid/0cq0nbvj-dwlbwl

Style both rows and columns of data:

https://wolfram.com/xid/0cq0nbvj-gcadcd

With both row and column styles, the last style may override earlier ones:

https://wolfram.com/xid/0cq0nbvj-etkt60

Style overrides settings for ChartStyle:

https://wolfram.com/xid/0cq0nbvj-r2mo0


https://wolfram.com/xid/0cq0nbvj-pb2ycl

ColorFunction overrides settings for ChartStyle:

https://wolfram.com/xid/0cq0nbvj-4do26


https://wolfram.com/xid/0cq0nbvj-j4ek6q

ChartElements may override settings for ChartStyle:

https://wolfram.com/xid/0cq0nbvj-hohnim

ColorFunction (3)

https://wolfram.com/xid/0cq0nbvj-d3hk7z

Use ColorFunctionScaling->False to get unscaled height values:

https://wolfram.com/xid/0cq0nbvj-kqwxgj

ColorFunction overrides styles in ChartStyle:

https://wolfram.com/xid/0cq0nbvj-k6tybo

Use ColorFunction to combine different style effects:

https://wolfram.com/xid/0cq0nbvj-4lgu4v

ColorFunctionScaling (2)
By default, scaled height values are used:

https://wolfram.com/xid/0cq0nbvj-csyn1w

Use ColorFunctionScaling->False to get unscaled height values:

https://wolfram.com/xid/0cq0nbvj-4vis1

Frame (4)
BarChart does not use a frame by default:

https://wolfram.com/xid/0cq0nbvj-f9g7dz

Use FrameTrue to turn on the frame:

https://wolfram.com/xid/0cq0nbvj-z2nq9q

Draw a frame on the left and right edges:

https://wolfram.com/xid/0cq0nbvj-iq179t

Draw a frame on the left and top edges:

https://wolfram.com/xid/0cq0nbvj-xvbaae

FrameLabel (3)
Place a label along the bottom of a chart:

https://wolfram.com/xid/0cq0nbvj-0wr1wg

Frame labels are placed on the bottom and left frame edges by default:

https://wolfram.com/xid/0cq0nbvj-jadvea

Place labels on each of the edges in the frame:

https://wolfram.com/xid/0cq0nbvj-nrdftv

FrameStyle (2)
FrameTicks (8)
Frame ticks are placed automatically by default:

https://wolfram.com/xid/0cq0nbvj-6x0zkb

Use All to include tick labels on all edges:

https://wolfram.com/xid/0cq0nbvj-y3s7fh

Place tick marks at specified positions:

https://wolfram.com/xid/0cq0nbvj-6yz0nq

Draw frame tick marks at the specified positions with specific labels:

https://wolfram.com/xid/0cq0nbvj-g7cyc4

Specify the lengths for tick marks as a fraction of the graphics size:

https://wolfram.com/xid/0cq0nbvj-49ra0z

Use different sizes in the positive and negative directions for each tick mark:

https://wolfram.com/xid/0cq0nbvj-bpc6mk

Specify a style for each frame tick:

https://wolfram.com/xid/0cq0nbvj-jc675t

Construct a function that places frame ticks at the midpoint and extremes of the frame edge:

https://wolfram.com/xid/0cq0nbvj-fwo008

https://wolfram.com/xid/0cq0nbvj-urdv4x

FrameTicksStyle (3)
By default, the frame ticks and frame tick labels use the same styles as the frame:

https://wolfram.com/xid/0cq0nbvj-nhgic9

Specify an overall style for the ticks, including the labels:

https://wolfram.com/xid/0cq0nbvj-sqhuew

Use different style for each frame edge:

https://wolfram.com/xid/0cq0nbvj-dzuevm

ImageSize (7)
Use named sizes such as Tiny, Small, Medium and Large:

https://wolfram.com/xid/0cq0nbvj-ybza6

Specify the width of the plot:

https://wolfram.com/xid/0cq0nbvj-e1f4wq

Specify the height of the plot:

https://wolfram.com/xid/0cq0nbvj-lta0n4

Allow the width and height to be up to a certain size:

https://wolfram.com/xid/0cq0nbvj-bch6s7

Specify the width and height for a graphic, padding with space if necessary:

https://wolfram.com/xid/0cq0nbvj-bwvnev

Setting AspectRatioFull will fill the available space:

https://wolfram.com/xid/0cq0nbvj-jtj1a4

Use maximum sizes for the width and height:

https://wolfram.com/xid/0cq0nbvj-lw8tkd

Use ImageSizeFull to fill the available space in an object:

https://wolfram.com/xid/0cq0nbvj-xi5rj

Specify the image size as a fraction of the available space:

https://wolfram.com/xid/0cq0nbvj-bvq9yl

IntervalMarkers (2)
IntervalMarkersStyle (2)
Joined (3)
By default, bars are not joined:

https://wolfram.com/xid/0cq0nbvj-5l6jal

Join the centers of the tops of the bars:

https://wolfram.com/xid/0cq0nbvj-12iue6


https://wolfram.com/xid/0cq0nbvj-udrt0y


https://wolfram.com/xid/0cq0nbvj-xqqz4v

LabelingFunction (8)
Use automatic labeling by values through Tooltip and StatusArea:

https://wolfram.com/xid/0cq0nbvj-o9zqx5


https://wolfram.com/xid/0cq0nbvj-8yasi

Use symbolic positions to control label placement:

https://wolfram.com/xid/0cq0nbvj-gl2ad7

Symbolic positions outside the bar:

https://wolfram.com/xid/0cq0nbvj-eyt0bn


https://wolfram.com/xid/0cq0nbvj-cfa0f

Coordinate-based placement relative to a bar:

https://wolfram.com/xid/0cq0nbvj-b11rh3

Use Callout to place labels automatically:

https://wolfram.com/xid/0cq0nbvj-ocffyd

Use symbolic positions to place Callout labels:

https://wolfram.com/xid/0cq0nbvj-djgsdw

Control the formatting of labels:

https://wolfram.com/xid/0cq0nbvj-cxc7ri

Use the given chart labels as arguments to the labeling function:

https://wolfram.com/xid/0cq0nbvj-n9xh0i

Place complete labels as tooltips:

https://wolfram.com/xid/0cq0nbvj-ci9a41

LabelingSize (4)
Textual labels are shown at their actual sizes:

https://wolfram.com/xid/0cq0nbvj-t7qmke

Image labels are automatically resized:

https://wolfram.com/xid/0cq0nbvj-vny20w

Specify a maximum size for textual labels:

https://wolfram.com/xid/0cq0nbvj-bz8jld

Specify a maximum size for image labels:

https://wolfram.com/xid/0cq0nbvj-hy9uc7

Show image labels at their natural sizes:

https://wolfram.com/xid/0cq0nbvj-4rxwe0

PerformanceGoal (3)
Generate a bar chart with interactive highlighting:

https://wolfram.com/xid/0cq0nbvj-e280bs

Emphasize performance by disabling interactive behaviors:

https://wolfram.com/xid/0cq0nbvj-bu9b2g

Typically, less memory is required for non-interactive charts:

https://wolfram.com/xid/0cq0nbvj-1eytp

PlotTheme (2)
ScalingFunctions (4)
By default, plots have linear scales in each direction:

https://wolfram.com/xid/0cq0nbvj-s1th8c

Use a log scale in the direction:

https://wolfram.com/xid/0cq0nbvj-yuq0eb

Use a scale defined by a function and its inverse:

https://wolfram.com/xid/0cq0nbvj-la5w7q

Positions in Ticks and GridLines are automatically scaled:

https://wolfram.com/xid/0cq0nbvj-m8z0wd

Applications (11)Sample problems that can be solved with this function
Create a bar chart of the frequency of characters in the Declaration of Independence:

https://wolfram.com/xid/0cq0nbvj-kq28jp

Apply labels at multiple levels:

https://wolfram.com/xid/0cq0nbvj-cpvmq7

https://wolfram.com/xid/0cq0nbvj-gvmuyc

Click the color selector and see the bar chart of updated color components:

https://wolfram.com/xid/0cq0nbvj-o8m10h

Click the bars to hear the name of the country and its GDP per capita:

https://wolfram.com/xid/0cq0nbvj-g97wzu

https://wolfram.com/xid/0cq0nbvj-hmm98

Create a progressive bar chart:

https://wolfram.com/xid/0cq0nbvj-insvxl

https://wolfram.com/xid/0cq0nbvj-bane2

Create a progressive column graph:

https://wolfram.com/xid/0cq0nbvj-oxjhl8

https://wolfram.com/xid/0cq0nbvj-k2sbcn

https://wolfram.com/xid/0cq0nbvj-23nc2

https://wolfram.com/xid/0cq0nbvj-2gian

Create a Gantt chart of employees' holidays in January:

https://wolfram.com/xid/0cq0nbvj-fm2b3q

https://wolfram.com/xid/0cq0nbvj-gmipnh

https://wolfram.com/xid/0cq0nbvj-ep4hzd
Mouse over the bars and grid lines for the number of days:

https://wolfram.com/xid/0cq0nbvj-g9j7f

Use images of textures from ExampleData as pictorial bars:

https://wolfram.com/xid/0cq0nbvj-gko2t

https://wolfram.com/xid/0cq0nbvj-nwholu

https://wolfram.com/xid/0cq0nbvj-rgefq

https://wolfram.com/xid/0cq0nbvj-bjyj2b

Create a bar chart with textured bars:

https://wolfram.com/xid/0cq0nbvj-leoiwx

Acoustically compare the percentage price change of a list of companies:

https://wolfram.com/xid/0cq0nbvj-o413i

https://wolfram.com/xid/0cq0nbvj-54kzgf
Click a dataset in the bar chart to hear an acoustic representation of the values:

https://wolfram.com/xid/0cq0nbvj-o0qcx1

Compare price trends for a portfolio of companies:

https://wolfram.com/xid/0cq0nbvj-f5q2w

https://wolfram.com/xid/0cq0nbvj-b1khae
Mouse over the bars to get price information:

https://wolfram.com/xid/0cq0nbvj-fvyj4n

Compare common length measures in centimeters:

https://wolfram.com/xid/0cq0nbvj-9m923q

Properties & Relations (6)Properties of the function, and connections to other functions
Use BarChart3D to get a 3D rendering of bar charts:

https://wolfram.com/xid/0cq0nbvj-egmcnq

BarChart is a special case of RectangleChart:

https://wolfram.com/xid/0cq0nbvj-bnrexr

Use PieChart and PieChart3D to visualize a list of data as sectors:

https://wolfram.com/xid/0cq0nbvj-gm7141

Use ListPlot and ListLinePlot to produce line graphs:

https://wolfram.com/xid/0cq0nbvj-e6grf

Use Histogram to automatically compute binning and draw histograms:

https://wolfram.com/xid/0cq0nbvj-cntsf0

Use PairedBarChart to create bilateral bar charts:

https://wolfram.com/xid/0cq0nbvj-8xoi

Neat Examples (3)Surprising or curious use cases
Wolfram Research (2008), BarChart, Wolfram Language function, https://reference.wolfram.com/language/ref/BarChart.html (updated 2025).
Text
Wolfram Research (2008), BarChart, Wolfram Language function, https://reference.wolfram.com/language/ref/BarChart.html (updated 2025).
Wolfram Research (2008), BarChart, Wolfram Language function, https://reference.wolfram.com/language/ref/BarChart.html (updated 2025).
CMS
Wolfram Language. 2008. "BarChart." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/BarChart.html.
Wolfram Language. 2008. "BarChart." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/BarChart.html.
APA
Wolfram Language. (2008). BarChart. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BarChart.html
Wolfram Language. (2008). BarChart. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BarChart.html
BibTeX
@misc{reference.wolfram_2025_barchart, author="Wolfram Research", title="{BarChart}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/BarChart.html}", note=[Accessed: 26-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_barchart, organization={Wolfram Research}, title={BarChart}, year={2025}, url={https://reference.wolfram.com/language/ref/BarChart.html}, note=[Accessed: 26-March-2025
]}