---
title: "BarChart3D"
language: "en"
type: "Symbol"
summary: "BarChart3D[{y1, y2, ...}] makes a 3D bar chart with bar lengths y1, y2, ... . BarChart3D[{..., wi[yi, ...], ..., wj[yj, ...], ...}] makes a 3D bar chart with bar features defined by the symbolic wrappers wk. BarChart3D[{data1, data2, ...}] makes a 3D bar chart from multiple datasets datai."
keywords: 
- 3d bar chart
- 3d bar graph
- 3d column chart
- 3d column graph
- bar3h (matlab)
canonical_url: "https://reference.wolfram.com/language/ref/BarChart3D.html"
source: "Wolfram Language Documentation"
related_guides: 
  - 
    title: "Charting and Information Visualization"
    link: "https://reference.wolfram.com/language/guide/ChartingAndInformationVisualization.en.md"
  - 
    title: "Data Visualization"
    link: "https://reference.wolfram.com/language/guide/DataVisualization.en.md"
related_functions: 
  - 
    title: "BarChart"
    link: "https://reference.wolfram.com/language/ref/BarChart.en.md"
  - 
    title: "PieChart"
    link: "https://reference.wolfram.com/language/ref/PieChart.en.md"
  - 
    title: "Histogram3D"
    link: "https://reference.wolfram.com/language/ref/Histogram3D.en.md"
  - 
    title: "RectangleChart3D"
    link: "https://reference.wolfram.com/language/ref/RectangleChart3D.en.md"
  - 
    title: "SectorChart"
    link: "https://reference.wolfram.com/language/ref/SectorChart.en.md"
  - 
    title: "SectorChart3D"
    link: "https://reference.wolfram.com/language/ref/SectorChart3D.en.md"
  - 
    title: "ListPlot3D"
    link: "https://reference.wolfram.com/language/ref/ListPlot3D.en.md"
  - 
    title: "ListPointPlot3D"
    link: "https://reference.wolfram.com/language/ref/ListPointPlot3D.en.md"
  - 
    title: "PairedBarChart"
    link: "https://reference.wolfram.com/language/ref/PairedBarChart.en.md"
---
# BarChart3D

BarChart3D[{y1, y2, …}] makes a 3D bar chart with bar lengths y1, y2, … .

BarChart3D[{…, wi[yi, …], …, wj[yj, …], …}] makes a 3D bar chart with bar features defined by the symbolic wrappers wk.

BarChart3D[{data1, data2, …}] makes a 3D bar chart from multiple datasets datai.

## Details and Options

* Data elements for ``BarChart3D`` 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         |

* Data not given in these forms is taken to be missing, and typically yields a gap in the 3D bar chart.

* Datasets for ``BarChart3D`` can be given in the following forms:

|                                                |                                              |
| ---------------------------------------------- | -------------------------------------------- |
| {e1, e2, …}                                    | list of elements with or without wrappers    |
| <\|k1 -> y1, k2 -> y2, …\|>                      | 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, data1, …}, …]                        | wrapper applied to all datasets              |

* ``BarChart3D[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    |
| 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 ``BarChart3D``, ``Labeled`` and ``Placed`` allow the following positions:

|                                               |                                                                                  |
| --------------------------------------------- | -------------------------------------------------------------------------------- |
| Top, Bottom, Left, Right, Center, Front, Back | positions within bars                                                            |
| Above, Below, Before, After                   | positions outside bars                                                           |
| Axis                                          | on the bar origin axis                                                           |
| {{bx, by, bz}, {lx, ly}}                      | scaled position {lx, ly} in the label at scaled position {bx, by, bz} in the bar |

* ``BarChart3D`` has the same options as ``Graphics3D`` with the following additions and changes: []

|                       |                     |                                                 |
| --------------------- | ------------------- | ----------------------------------------------- |
| Axes                  | True                | whether to draw axes                            |
| BarOrigin             | Bottom              | origin of bars                                  |
| BarSpacing            | Automatic           | spacing between bars                            |
| Boxed                 | False               | whether to draw a bounding box                  |
| ChartBaseStyle        | Automatic           | overall style for bars                          |
| ChartElementFunction  | Automatic           | how to generate raw graphics for bars           |
| ChartElements         | Automatic           | graphics to use for 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 |
| FaceGrids             | Automatic           | grid lines to draw on the bounding box          |
| LabelingFunction      | Automatic           | how to label bars                               |
| LegendAppearance      | Automatic           | overall appearance of legends                   |
| Lighting              | "Neutral"           | simulated light sources to use                  |
| PerformanceGoal       | \$PerformanceGoal   | aspects of performance to try to optimize       |
| PlotInteractivity     | \$PlotInteractivity | whether to allow interactive elements           |
| PlotTheme             | \$PlotTheme         | overall theme for the chart                     |
| ScalingFunctions      | None                | how to scale individual coordinates             |
| TargetUnits           | Automatic           | units to display in the chart                   |
| ViewPoint             | Automatic           | viewing position                                |

* The following settings for ``ChartLayout`` can be used to display multiple sets of data:

|         |              |                                                    |
| ------- | ------------ | -------------------------------------------------- |
| [image] | "Grouped"    | separate the data for each dataset                 |
| [image] | "Stacked"    | accumulate the data for each dataset               |
| [image] | "Stepped"    | accumulate and separate the data for each dataset  |
| [image] | "Percentile" | accumulate and normalize the data for each dataset |

* The arguments supplied to ``ChartElementFunction`` are the bar region ``{{xmin, xmax}, {ymin, ymax}, {zmin, zmax}}``, the data values ``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["BarChart3D"]``.

* The argument supplied to ``ColorFunction`` is ``yi``.

* With the setting ``ChartElements -> g``, the graphic ``g`` will be used to form pictorial bars consisting of stretched versions of ``g``.

* Style and other specifications from options and other constructs in ``BarChart3D`` are effectively applied in the order ``ChartStyle``, ``ColorFunction``, ``Style`` and other wrappers, ``ChartElements``, and ``ChartElementFunction``, with later specifications overriding earlier ones.

### List of all options

|                      |                     |                                                                                    |
| -------------------- | ------------------- | ---------------------------------------------------------------------------------- |
| AlignmentPoint       | Center              | the default point in the graphic to align with                                     |
| AspectRatio          | Automatic           | ratio of height to width                                                           |
| Axes                 | True                | whether to draw axes                                                               |
| AxesEdge             | Automatic           | on which edges to put axes                                                         |
| AxesLabel            | None                | axes labels                                                                        |
| AxesOrigin           | Automatic           | where axes should cross                                                            |
| AxesStyle            | {}                  | graphics directives to specify the style for axes                                  |
| Background           | None                | background color for the plot                                                      |
| BarOrigin            | Bottom              | origin of bars                                                                     |
| BarSpacing           | Automatic           | spacing between bars                                                               |
| BaselinePosition     | Automatic           | how to align with a surrounding text baseline                                      |
| BaseStyle            | {}                  | base style specifications for the graphic                                          |
| Boxed                | False               | whether to draw a bounding box                                                     |
| BoxRatios            | Automatic           | bounding 3D box ratios                                                             |
| BoxStyle             | {}                  | style specifications for the box                                                   |
| ChartBaseStyle       | Automatic           | overall style for bars                                                             |
| ChartElementFunction | Automatic           | how to generate raw graphics for bars                                              |
| ChartElements        | Automatic           | graphics to use for 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                                                                     |
| ClipPlanes           | None                | clipping planes                                                                    |
| ClipPlanesStyle      | Automatic           | style specifications for clipping planes                                           |
| ColorFunction        | Automatic           | how to color bars                                                                  |
| ColorFunctionScaling | True                | whether to normalize arguments to ColorFunction                                    |
| ContentSelectable    | Automatic           | whether to allow contents to be selected                                           |
| ControllerLinking    | False               | when to link to external rotation controllers                                      |
| ControllerPath       | Automatic           | what external controllers to try to use                                            |
| Epilog               | {}                  | 2D graphics primitives to be rendered after the main plot                          |
| FaceGrids            | Automatic           | grid lines to draw on the bounding box                                             |
| FaceGridsStyle       | {}                  | style specifications for face grids                                                |
| FormatType           | TraditionalForm     | default format type for text                                                       |
| ImageMargins         | 0.                  | the margins to leave around the graphic                                            |
| ImagePadding         | All                 | what extra padding to allow for labels, etc.                                       |
| ImageSize            | Automatic           | absolute size at which to render the graphic                                       |
| LabelingFunction     | Automatic           | how to label bars                                                                  |
| LabelStyle           | {}                  | style specifications for labels                                                    |
| LegendAppearance     | Automatic           | overall appearance of legends                                                      |
| Lighting             | "Neutral"           | simulated light sources to use                                                     |
| Method               | Automatic           | details of 3D graphics methods to use                                              |
| PerformanceGoal      | \$PerformanceGoal   | aspects of performance to try to optimize                                          |
| PlotInteractivity    | \$PlotInteractivity | whether to allow interactive elements                                              |
| PlotLabel            | None                | a label for the plot                                                               |
| PlotRange            | All                 | range of values to include                                                         |
| PlotRangePadding     | Automatic           | how much to pad the range of values                                                |
| PlotRegion           | Automatic           | 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               | {}                  | 2D graphics primitives to be rendered before the main plot                         |
| RotationAction       | "Fit"               | how to render after interactive rotation                                           |
| ScalingFunctions     | None                | how to scale individual coordinates                                                |
| SphericalRegion      | Automatic           | whether to make the circumscribing sphere fit in the final display area            |
| TargetUnits          | Automatic           | units to display in the chart                                                      |
| Ticks                | Automatic           | specification for ticks                                                            |
| TicksStyle           | {}                  | style specification for ticks                                                      |
| TouchscreenAutoZoom  | False               | whether to zoom to fullscreen when activated on a touchscreen                      |
| ViewAngle            | Automatic           | angle of the field of view                                                         |
| ViewCenter           | Automatic           | point to display at the center                                                     |
| ViewMatrix           | Automatic           | explicit transformation matrix                                                     |
| ViewPoint            | Automatic           | viewing position                                                                   |
| ViewProjection       | Automatic           | projection method for rendering objects distant from the viewer                    |
| ViewRange            | All                 | range of viewing distances to include                                              |
| ViewVector           | Automatic           | position and direction of a simulated camera                                       |
| ViewVertical         | {0, 0, 1}           | direction to make vertical                                                         |

---

## Examples (148)

### Basic Examples (3)

Generate a 3D bar chart for a list of heights:

```wl
In[1]:= BarChart3D[{1, 2, 3}]

Out[1]= [image]
```

---

Multiple datasets:

```wl
In[1]:= BarChart3D[{{1, 2, 3}, {1, 3, 2}}]

Out[1]= [image]
```

---

Set the style for bars:

```wl
In[1]:= BarChart3D[Range[8], ChartStyle -> "DarkRainbow"]

Out[1]= [image]
```

Pictorial bars:

```wl
In[2]:= BarChart3D[Range[5], ChartElements -> [image]]

Out[2]= [image]
```

Procedural bars:

```wl
In[3]:= BarChart3D[Range[6], ChartElementFunction -> "ProfileCube", ChartStyle -> "Pastel"]

Out[3]= [image]
```

### Scope (38)

#### Data and Layouts (13)

Items in a dataset are grouped together:

```wl
In[1]:= BarChart3D[{{1, 1, 1}, {2, 2, 2}, {3, 3, 3}}]

Out[1]= [image]
```

---

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

```wl
In[1]:= BarChart3D[{{1, 2}, {1, 2, 3}, {1, 2, 3, 4}}]

Out[1]= [image]
```

---

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

```wl
In[1]:= BarChart3D[{{1, Missing[], 3}, {4, 2, 1 + I, 2}, {foo, 2, 4}}]

Out[1]= [image]
```

---

The data may include units:

```wl
In[1]:= BarChart3D[{Quantity[1, "Feet"], Quantity[3, "Feet"], Quantity[2, "Feet"], Quantity[5, "Feet"], Quantity[7, "Feet"], Quantity[6, "Feet"]}, AxesLabel -> Automatic]

Out[1]= [image]
```

---

Specify the units to use:

```wl
In[1]:= BarChart3D[{Quantity[1, "Feet"], Quantity[3, "Feet"], Quantity[2, "Feet"], Quantity[5, "Feet"], Quantity[7, "Feet"], Quantity[6, "Feet"]}, AxesLabel -> Automatic, TargetUnits -> "Meters"]

Out[1]= [image]
```

---

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

```wl
In[1]:= BarChart3D[TimeSeries[{5, 12, 4, 4, 5, 2, 7}, {"April 21, 1981"}]]

Out[1]= [image]
```

---

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

```wl
In[1]:= BarChart3D[<|"a" -> 4, "b" -> 2, "c" -> 6, "d" -> 9, "e" -> 7|>]

Out[1]= [image]
```

Use the keys as labels:

```wl
In[2]:= BarChart3D[<|"a" -> 4, "b" -> 2, "c" -> 6, "d" -> 9, "e" -> 7|>, ChartLabels -> Automatic]

Out[2]= [image]
```

Use the keys as legends:

```wl
In[3]:= BarChart3D[<|"a" -> 4, "b" -> 2, "c" -> 6, "d" -> 9, "e" -> 7|>, ChartStyle -> 91, ChartLegends -> Automatic]

Out[3]= [image]
```

---

Associations can be nested:

```wl
In[1]:= BarChart3D[<|"one" -> <|"a" -> 4, "b" -> 2, "c" -> 6, "d" -> 9, "e" -> 7|>, "two" -> <|"a" -> 2, "b" -> 6, "c" -> 5, "d" -> 6, "e" -> 4|>|>, ChartLegends -> Automatic]

Out[1]= [image]
```

---

The weights in ``WeightedData`` are ignored:

```wl
In[1]:= BarChart3D[WeightedData[{1, 2, 3, 4, 5}, {0.5, 0.8, 0.2, 0.1, 0.2}]]

Out[1]= [image]
```

The censoring and truncation information in ``EventData`` is ignored:

```wl
In[2]:= BarChart3D[EventData[{6, 3, 6, 4, 2}, {0, 1, 0, 1, 1}]]

Out[2]= [image]
```

---

Use different layouts to display multiple datasets:

```wl
In[1]:= Table[BarChart3D[{{1, 2, 3}, {1, 3, 2}}, ChartLayout -> l], {l, {"Grouped", "Stepped"}}]

Out[1]= {[image], [image]}
```

---

Stacked layouts are more compact in the horizontal direction:

```wl
In[1]:= Table[BarChart3D[RandomReal[1, {5, 5}], ChartLayout -> l], {l, {"Stacked", "Percentile"}}]

Out[1]= {[image], [image]}
```

---

Control the origin of bars:

```wl
In[1]:= Table[BarChart3D[Range[5], BarOrigin -> o, PlotLabel -> o, ImageSize -> Small], {o, {Bottom, Left, Top, Right}}]

Out[1]= {[image], [image], [image], [image]}
```

---

Adjust the spacing between bars and groups of bars:

```wl
In[1]:= Table[BarChart3D[{Range[4], Range[4]}, BarSpacing -> s, PlotLabel -> s, ChartStyle -> Opacity[0.8]], {s, {Automatic, {0, 1}, {-0.3, 1}}}]

Out[1]= {[image], [image], [image]}
```

#### Tabular Data (1)

Get tabular data, counted by the "class" and "survived" columns:

```wl
In[1]:= titanic = ResourceData["Sample Tabular Data: Titanic"]

Out[1]=
Tabular[Association["RawSchema" -> Association["ColumnProperties" -> 
     Association["class" -> Association["ElementType" -> TypeSpecifier["CategoricalOrdered"][
          TabularColumn[Association["Data" -> {{3, {0, 3, 6, 9}, "3rd2nd1st"}, {}, N ... HgABYdUNSFKrAHlLgAA5bYnX24hU00v1y+DggQgDqID8BBEAgA\
CCEIOBEBuAtCJYCRCAAnAAAIAhXTAXDwggiMkzAISoCAAQ0g6LfAIIWvp0HM4ngB0EAAAAPCAAggAQAQHhQIACBEFORQDcAIEAE\
EAA="], "Capacity" -> 1309, "BitCount" -> 500}], {}, None}, "ElementType" -> "Boolean"]]}}]]]]
```

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

```wl
In[2]:= AggregateRows[titanic, "count" -> Function[Length[#class]], "class"]

Out[2]=
Tabular[Association["RawSchema" -> Association["ColumnProperties" -> 
     Association["class" -> Association["ElementType" -> TypeSpecifier["CategoricalOrdered"][
          TabularColumn[Association["Data" -> {{3, {0, 3, 6, 9}, "3rd2nd1st"}, {}, N ... ularColumn[Association["Data" -> {
                {3, {0, 3, 6, 9}, "3rd2nd1st"}, {}, None}, "ElementType" -> "String"]]]]], 
        TabularColumn[Association["Data" -> {{323, 277, 709}, {}, None}, 
          "ElementType" -> "Integer64"]]}}]]]]

In[3]:= BarChart3D[% -> "count", ChartLabels -> {"1st", "2nd", "3rd"}]

Out[3]= [image]
```

Show how many passengers survived and how many perished:

```wl
In[4]:= AggregateRows[titanic, "count" -> Function[Length[#class]], "survived"]

Out[4]=
Tabular[Association["RawSchema" -> Association["ColumnProperties" -> 
     Association["survived" -> Association["ElementType" -> "Boolean"], 
      "count" -> Association["ElementType" -> "Integer64"]], "KeyColumns" -> {"survived"}, 
    "Backend" ... ector", 
             {"Data" -> ByteArray["AQ=="], "Capacity" -> 2, "BitCount" -> 1}], {}, None}, 
          "ElementType" -> "Boolean"]], TabularColumn[Association["Data" -> {{500, 809}, {}, None}, 
          "ElementType" -> "Integer64"]]}}]]]]

In[5]:= BarChart3D[% -> "count", ChartLabels -> {"survived", "perished"}]

Out[5]= [image]
```

Display the number of passengers who survived by ticket class:

```wl
In[6]:= pivot = PivotToColumns[AggregateRows[titanic, "count" -> Function[Length[#class]], {"class", "survived"}], "class" -> "count"]

Out[6]=
Tabular[Association["RawSchema" -> Association["ColumnProperties" -> 
     Association["survived" -> Association["ElementType" -> "Boolean"], 
      ExtendedKey["count", "1st"] -> Association["ElementType" -> "Integer64"], 
      ExtendedKey["count ... entType" -> "Integer64"]], TabularColumn[Association[
          "Data" -> {{119, 158}, {}, None}, "ElementType" -> "Integer64"]], 
        TabularColumn[Association["Data" -> {{181, 528}, {}, None}, "ElementType" -> 
           "Integer64"]]}}]]]]

In[7]:= BarChart3D[pivot -> {"1st", "2nd", "3rd"}, ChartLabels -> {{"survived", "perished"}, {"1st", "2nd", "3rd"}}]

Out[7]= [image]
```

Use stacked bars for the display:

```wl
In[8]:= BarChart3D[pivot -> {"1st", "2nd", "3rd"}, ChartLayout -> "Stacked", ChartLabels -> {{"survived", "perished"}, {"1st", "2nd", "3rd"}}]

Out[8]= [image]
```

#### Wrappers (5)

Use wrappers on individual data, datasets, or collections of datasets:

```wl
In[1]:= {BarChart3D[{{1, Style[2, Red], 3}, {4, 5, 6}}], BarChart3D[{Style[{1, 2, 3}, Green], {4, 5, 6}}], BarChart3D[Style[{{1, 2, 3}, {4, 5, 6}}, Blue]]}

Out[1]= {[image], [image], [image]}
```

---

Wrappers can be nested:

```wl
In[1]:= {BarChart3D[{{1, Style[2, Red], 3}, {4, 5, 6}}], BarChart3D[{Style[{1, Style[2, Red], 3}, Green], {4, 5, 6}}], BarChart3D[Style[{Style[{1, Style[2, Red], 3}, Green], {4, 5, 6}}, Blue]]}

Out[1]= {[image], [image], [image]}
```

---

Override the default tooltips:

```wl
In[1]:= BarChart3D[{1, Tooltip[2, "median"], 3}]

Out[1]= [image]
```

Use any object in the tooltip:

```wl
In[2]:= BarChart3D[Table[Tooltip[CountryData[c, "Population"] / 10 ^ 8, CountryData[c, "Flag"]], {c, CountryData["G8"]}]]

Out[2]= [image]
```

---

Use ``PopupWindow`` to provide additional drilldown information:

```wl
In[1]:= BarChart3D[{1, PopupWindow[2, DateListPlot[FinancialData["IBM", "Jan. 1, 2004"]]], 3}]

Out[1]= [image]
```

---

``Button`` can be used to trigger any action:

```wl
In[1]:= BarChart3D[{1, Button[2, Speak[2]], 3}]

Out[1]= [image]
```

#### Styling and Appearance (10)

Use an explicit list of styles for the bars:

```wl
In[1]:= BarChart3D[{1, 2, 3, 4}, ChartStyle -> {Red, Green, Blue, Yellow}]

Out[1]= [image]
```

---

Use any gradient or indexed color schemes from ``ColorData``:

```wl
In[1]:= {BarChart3D[{1, 2, 3, 4}, ChartStyle -> "Pastel"], BarChart3D[{1, 2, 3, 4}, ChartStyle -> 12]}

Out[1]= {[image], [image]}
```

---

Use color schemes designed for charting:

```wl
In[1]:= ColorData["Charting"]

Out[1]= {44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114}

In[2]:= Table[BarChart3D[Range[12], ChartStyle -> i, Axes -> None], {i, Take[ColorData["Charting"], 12]}]

Out[2]= {[image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image], [image]}
```

---

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

```wl
In[1]:= BarChart3D[Range[5], ChartBaseStyle -> EdgeForm[Dashed], ChartStyle -> 45]

Out[1]= [image]
```

---

``Style`` can be used to override styles:

```wl
In[1]:= BarChart3D[{1, 2, Style[3, EdgeForm[Dashed]], 4, 5}, ChartStyle -> EdgeForm[None]]

Out[1]= [image]
```

---

Use any graphic for pictorial bars:

```wl
In[1]:= BarChart3D[{1, 2, 3}, ChartElements -> Graphics3D[Cylinder[]]]

Out[1]= [image]
```

---

Use built-in programmatically generated bars:

```wl
In[1]:= ChartElementData["BarChart3D"]

Out[1]= {"Cone", "Cube", "Cylinder", "DoubleProfileCube", "FadingCube", "GradientScaleCube", "ProfileCube", "SegmentScaleCube", "SquareWaveCube", "TriangleWaveCube"}

In[2]:= Table[BarChart3D[{1, 2, 3, 4, 5}, ChartElementFunction -> f], {f, {"ProfileCube", "GradientScaleCube"}}]

Out[2]= {[image], [image]}
```

For detailed settings use Palettes ▶ ChartElementSchemes :

```wl
In[3]:= BarChart3D[{1, 2, 3, 4, 5}, ChartElementFunction -> ChartElementDataFunction["SegmentScaleCube", "Segments" -> 7, "ColorScheme" -> "SolarColors"]]

Out[3]= [image]
```

---

Turn off canvas:

```wl
In[1]:= BarChart3D[{1, 2, 3, 4, 5}, Method -> {"Canvas" -> None}]

Out[1]= [image]
```

---

Use a theme with simple ticks and grid lines in a high contrast color scheme:

```wl
In[1]:= BarChart3D[{{1, 5, 4, 6}, {4, 3, 2, 6}}, PlotTheme -> "Business"]

Out[1]= [image]
```

---

Use a monochrome theme:

```wl
In[1]:= BarChart3D[{{1, 5, 4, 6}, {4, 3, 2, 6}}, PlotTheme -> "Monochrome"]

Out[1]= [image]
```

#### Labeling and Legending (9)

Use ``Labeled`` to add a label to a bar:

```wl
In[1]:= BarChart3D[{1, Labeled[2, "label"], 3}]

Out[1]= [image]
```

---

Use symbolic positions for label placement:

```wl
In[1]:= Table[BarChart3D[{1, Labeled[2, "label", p], 3}, PlotLabel -> p, Ticks -> None], {p, {Bottom, Center, Top}}]

Out[1]= {[image], [image], [image]}

In[2]:= Table[BarChart3D[{1, Labeled[2, "label", p], 3}, PlotLabel -> p, Ticks -> None], {p, {Left, Center, Right}}]

Out[2]= {[image], [image], [image]}
```

---

Provide categorical labels for the columns of data:

```wl
In[1]:= BarChart3D[{{1, 2, 3}, {4, 5}}, ChartLabels -> {"c1", "c2", "c3"}]

Out[1]= [image]
```

For rows of data:

```wl
In[2]:= BarChart3D[{{1, 2, 3}, {4, 5}}, ChartLabels -> {{"r1", "r2"}, None}]

Out[2]= [image]
```

For both:

```wl
In[3]:= BarChart3D[{{1, 2, 3}, {4, 5}}, ChartLabels -> {{"r1", "r2"}, {"c1", "c2", "c3"}}]

Out[3]= [image]
```

---

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

```wl
In[1]:= BarChart3D[{{1, 2, 3}, {4, 5}}, ChartLabels -> {Placed[{"r1", "r2"}, Above], Placed[{"c1", "c2", "c3"}, Center]}]

Out[1]= [image]
```

---

Use the third argument of ``Placed`` to control formatting of labels:

```wl
In[1]:= BarChart3D[{1, 2, 3}, ChartLabels -> Placed[{"aaa", "bbb", "ccc"}, Center, Framed[#, FrameMargins -> 1, Background -> LightYellow]&]]

Out[1]= [image]
```

---

Provide value labels for bars by using ``LabelingFunction`` :

```wl
In[1]:= BarChart3D[{1, 2, 3}, LabelingFunction -> Above]

Out[1]= [image]
```

Use ``Placed`` to control placement and formatting:

```wl
In[2]:= labeler[v_, {i_, j_}, {ri_, cj_}] := Placed[Row[{v, ri[[1]], cj[[1]]}, ","], Center]

In[3]:= BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartLabels -> {{"r1", "r2"}, {"c1", "c2", "c3"}}, LabelingFunction -> labeler]

Out[3]= [image]
```

---

Add categorical legend entries for the columns of data:

```wl
In[1]:= BarChart3D[{{1, 2, 3}, {4, 5}}, ChartLegends -> {"ccc1", "ccc2", "ccc3"}, ChartStyle -> "Pastel"]

Out[1]= [image]
```

For rows of data:

```wl
In[2]:= BarChart3D[{{1, 2, 3}, {4, 5}}, ChartLegends -> {{"rr1", "rr2"}, None}, ChartStyle -> {"Pastel", None}]

Out[2]= [image]
```

---

Use ``Legended`` to add additional legend entries:

```wl
In[1]:= BarChart3D[{{1, Legended[Style[2, Red], "extra"], 3}, {4, 5}}, ChartStyle -> "Pastel", ChartLegends -> {"aaa", "bbb", "ccc"}]

Out[1]= [image]
```

---

Use ``Placed`` to affect the positioning of legends:

```wl
In[1]:= Table[BarChart3D[{{1, 2, 3}, {4, 5}}, ChartLegends -> Placed[{"ccc1", "ccc2", "ccc3"}, p], ChartStyle -> "Pastel"], {p, {Below, Above}}]

Out[1]= [image]
```

### Options (94)

#### Axes (3)

By default, axes are drawn for ``BarChart3D`` :

```wl
In[1]:= BarChart3D[Range[8, 1, -1], ChartStyle -> "DarkRainbow"]

Out[1]= [image]
```

---

Use ``Axes -> False`` to turn off axes:

```wl
In[1]:= BarChart3D[Range[8, 1, -1], ChartStyle -> "DarkRainbow", Axes -> False]

Out[1]= [image]
```

---

Turn each axis on individually:

```wl
In[1]:= BarChart3D[Range[8, 1, -1], ChartStyle -> "DarkRainbow", Axes -> {False, False, True}]

Out[1]= [image]
```

#### AxesLabel (4)

No axis labels are drawn by default:

```wl
In[1]:= BarChart3D[Range[8, 1, -1]]

Out[1]= [image]
```

---

Place a label on the $z$ axis:

```wl
In[1]:= BarChart3D[Range[8, 1, -1], Axes -> True, AxesLabel -> "Data"]

Out[1]= [image]
```

---

Specify axis labels:

```wl
In[1]:= BarChart3D[Range[8, 1, -1], Axes -> True, AxesLabel -> {x, y, z}]

Out[1]= [image]
```

---

Use units as labels:

```wl
In[1]:= BarChart3D[QuantityArray[Range[8, 1, -1], "Meters"], Axes -> True, AxesLabel -> Automatic]

Out[1]= [image]
```

#### AxesStyle (4)

Change the style for the axes:

```wl
In[1]:= BarChart3D[Range[8, 1, -1], ChartStyle -> "DarkRainbow", Axes -> True, AxesStyle -> Red]

Out[1]= [image]
```

---

Specify the style of each axis:

```wl
In[1]:= BarChart3D[Range[8, 1, -1], ChartStyle -> "DarkRainbow", Axes -> True, AxesStyle -> {Directive[Thick, Brown], Directive[Thick, Blue], Directive[Thick, Purple]}]

Out[1]= [image]
```

---

Use different styles for the ticks and the axes:

```wl
In[1]:= BarChart3D[Range[8, 1, -1], ChartStyle -> "DarkRainbow", Axes -> True, AxesStyle -> Red, TicksStyle -> Black]

Out[1]= [image]
```

---

Use different styles for the labels and the axes:

```wl
In[1]:= BarChart3D[Range[8, 1, -1], ChartStyle -> "DarkRainbow", Axes -> True, AxesStyle -> Red, LabelStyle -> Black]

Out[1]= [image]
```

#### BarOrigin (1)

Change the bar origin:

```wl
In[1]:= Table[BarChart3D[{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}, BarOrigin -> o, PlotLabel -> o], {o, {Bottom, Left, Top, Right}}]

Out[1]= {[image], [image], [image], [image]}
```

#### BarSpacing (6)

Use automatically determined spacing between bars:

```wl
In[1]:= BarChart3D[{{16, 8, 4}, {5, 3, 2}}, BarSpacing -> Automatic]

Out[1]= [image]
```

---

Use no spacing:

```wl
In[1]:= BarChart3D[{{16, 8, 4}, {5, 3, 2}}, BarSpacing -> None]

Out[1]= [image]
```

---

Use symbolic presets:

```wl
In[1]:= Table[BarChart3D[{{16, 8, 4}, {5, 3, 2}}, BarSpacing -> s, PlotLabel -> s], {s, {Tiny, Small, Medium, Large}}]

Out[1]= {[image], [image], [image], [image]}
```

---

Use explicit spacing between bars:

```wl
In[1]:= Table[BarChart3D[{{16, 8, 4}, {5, 3, 2}}, BarSpacing -> s, PlotLabel -> s], {s, {Automatic, 1, -0.3}}]

Out[1]= {[image], [image], [image]}
```

---

Use explicit spacing between bars and groups of bars:

```wl
In[1]:= Table[BarChart3D[{{16, 8, 4}, {5, 3, 2}}, BarSpacing -> s, PlotLabel -> s], {s, {Automatic, {0, 1}, {0, 0.2}}}]

Out[1]= {[image], [image], [image]}
```

---

Position bars within a group, 0.5 bar width apart, and with no space between groups:

```wl
In[1]:= BarChart3D[{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}, BarSpacing -> {0.5, 0}, ChartLayout -> "Grid"]

Out[1]= [image]
```

#### ChartBaseStyle (5)

Use ``ChartBaseStyle`` to style bars:

```wl
In[1]:= BarChart3D[{1, 2, 3}, ChartBaseStyle -> EdgeForm[Dashed]]

Out[1]= [image]

In[2]:= BarChart3D[{{1, 1, 1}, {2, 2, 2}}, ChartBaseStyle -> EdgeForm[Dashed]]

Out[2]= [image]

In[3]:= BarChart3D[{1, 2, 3}, BarSpacing -> -0.3, ChartBaseStyle -> Opacity[0.7]]

Out[3]= [image]
```

---

``ChartBaseStyle`` combines with ``ChartStyle``:

```wl
In[1]:= BarChart3D[{1, 2, 3}, ChartStyle -> 24, ChartBaseStyle -> EdgeForm[Dashed]]

Out[1]= [image]
```

---

``ChartStyle`` may override settings for ``ChartBaseStyle``:

```wl
In[1]:= BarChart3D[{1, 2, 3}, ChartStyle -> EdgeForm[None], ChartBaseStyle -> EdgeForm[Dashed]]

Out[1]= [image]
```

---

``ChartBaseStyle`` combines with ``Style`` :

```wl
In[1]:= BarChart3D[{1, Style[2, Yellow], 3}, ChartBaseStyle -> EdgeForm[Dashed]]

Out[1]= [image]
```

``Style`` may override settings for ``ChartBaseStyle`` :

```wl
In[2]:= BarChart3D[{1, Style[2, EdgeForm[None]], 3}, ChartBaseStyle -> EdgeForm[Dashed]]

Out[2]= [image]
```

---

``ChartBaseStyle`` combines with ``ColorFunction`` :

```wl
In[1]:= BarChart3D[{1, 2, 3}, ChartBaseStyle -> EdgeForm[Dashed], ColorFunction -> ColorData["Pastel"]]

Out[1]= [image]
```

``ColorFunction`` may override settings for ``ChartBaseStyle`` :

```wl
In[2]:= BarChart3D[{1, 2, 3}, ChartBaseStyle -> EdgeForm[Dashed], ColorFunction -> (EdgeForm[None]&)]

Out[2]= [image]
```

#### ChartElementFunction (6)

Get a list of built-in settings for ``ChartElementFunction``:

```wl
In[1]:= ChartElementData["BarChart3D"]

Out[1]= {"Cone", "Cube", "Cylinder", "DoubleProfileCube", "FadingCube", "GradientScaleCube", "ProfileCube", "SegmentScaleCube", "SquareWaveCube", "TriangleWaveCube"}
```

---

For detailed settings, use Palettes ▶ ChartElementSchemes :

```wl
In[1]:= BarChart3D[{1, 2, 3, 4, 5}, ChartElementFunction -> "Cube", ChartStyle -> "DarkRainbow"]

Out[1]= [image]

In[2]:= Table[BarChart3D[{1, 2, 3, 4, 5}, ChartElementFunction -> f, ChartStyle -> EdgeForm[], ColorFunction -> "SandyTerrain", PlotLabel -> f, ViewPoint -> {2.8, -7.5, 6.7}], {f, {"Cone", "FadingCube", "Cylinder", "ProfileCube"}}]

Out[2]= {[image], [image], [image], [image]}
```

---

This ``ChartElementFunction`` is appropriate to show the global scale:

```wl
In[1]:= Table[BarChart3D[{1, 2, 3, 4, 5}, ChartElementFunction -> f, PlotLabel -> f], {f, {"GradientScaleCube", "SegmentScaleCube"}}]

Out[1]= {[image], [image]}

In[2]:= Table[BarChart3D[{1, 2, 3, 4, 5}, ChartElementFunction -> f, ChartStyle -> "Pastel", PlotLabel -> f, ViewPoint -> {4, -8, 3}], {f, {"SquareWaveCube", "TriangleWaveCube"}}]

Out[2]= {[image], [image]}
```

---

Write a custom ``ChartElementFunction``:

```wl
In[1]:= f[{{xmin_, xmax_}, {ymin_, ymax_}, {zmin_, zmax_}}, ___] := Cuboid[{xmin, ymin, zmin}, {xmax, ymax, zmax}]

In[2]:= BarChart3D[{1, 2, 3, 4, 5}, ChartElementFunction -> f, ChartStyle -> LightGray]

Out[2]= [image]
```

---

Write a custom ``ChartElementFunction`` using ``ChartElementDataFunction``:

```wl
In[1]:= f[b : {{xmin_, xmax_}, {ymin_, ymax_}, {zmin_, zmax_}}, ___] := ChartElementDataFunction["ProfileCube", "Profile" -> 2, "TaperRatio" -> 0.6][b]

In[2]:= BarChart3D[{1, 2, 3, 4, 5}, ChartElementFunction -> f, ChartStyle -> Gray]

Out[2]= [image]
```

---

A custom chart element function that draws a drop plane:

```wl
In[1]:=
DropPlanesBar[box : {{xmin_, xmax_}, {ymin_, ymax_}, {zmin_, zmax_}}, y_, {True}] := 
	{DropPlanesBar[box], EdgeForm[], Opacity[0.5], Polygon[{{-0.1, ymin, zmax}, {xmax, ymin, zmax}, {xmax, ymax, zmax}, {-0.1, ymax, zmax}}], Opacity[1], Black, Text[y, {-0.1, ymax, zmax}, {1, 0}]}

In[2]:=
DropPlanesBar[{{xmin_, xmax_}, {ymin_, ymax_}, {zmin_, zmax_}}, ___] := {
	EdgeForm[], Opacity[0.7], Cuboid[{xmin, ymin, zmin}, {xmax, ymax, zmax}]
	}
```

Setting the metadata to ``True`` turns on the drop plane:

```wl
In[3]:= BarChart3D[{23, 71, 42 -> True, 55 -> True}, ChartElementFunction -> DropPlanesBar, ChartStyle -> "DarkRainbow", ViewPoint -> {-5.17, -8.34, 3.42}, FaceGrids -> None, Axes -> None, ChartLegends -> {"Tim", "John", "Mary", "Bob"}]

Out[3]= [image]
```

#### ChartElements (7)

Create a pictorial chart based on any ``Graphics3D`` object:

```wl
In[1]:= BarChart3D[{1, 2, 3, 4}, ChartElements -> Graphics3D[Cylinder[]]]

Out[1]= [image]
```

---

Use a different graphic for each column of data:

```wl
In[1]:= BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartElements -> {[image], [image], [image]}]

Out[1]= [image]
```

---

Use a different graphic for each row of data:

```wl
In[1]:= BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartElements -> {{[image], [image]}, None}]

Out[1]= [image]
```

---

Graphics are used cyclically:

```wl
In[1]:= BarChart3D[{1, 2, 3, 4, 5, 6}, ChartElements -> {[image], [image]}]

Out[1]= [image]
```

---

Styles are inherited from styles set through ``ChartStyle`` etc.:

```wl
In[1]:= BarChart3D[{1, 2, 3, 4, 5, 6}, ChartElements -> [image], ChartStyle -> "Pastel"]

Out[1]= [image]
```

Override individual styles by using ``Style``:

```wl
In[2]:= BarChart3D[{1, 2, Style[3, Red], 4, 5, 6}, ChartElements -> [image], ChartStyle -> "Pastel"]

Out[2]= [image]
```

---

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

```wl
In[1]:= BarChart3D[{1, 2, 3, 4, 5, 6}, ChartElements -> [image], ChartStyle -> "Pastel"]

Out[1]= [image]
```

---

The pictorial graphic is rotated to always start at the setting used for ``BarOrigin``:

```wl
In[1]:= Table[BarChart3D[{1, 2, 3}, ChartElements -> [image], BarOrigin -> o, PlotLabel -> o, ImageSize -> Tiny], {o, {Bottom, Top, Left, Right}}]

Out[1]= {[image], [image], [image], [image]}
```

#### ChartLabels (9)

By default, labels are placed in the axis:

```wl
In[1]:= BarChart3D[{1, 2, 3}, ChartLabels -> {"a", "b", "c"}]

Out[1]= [image]
```

---

``Labeled`` wrappers in data will place additional labels:

```wl
In[1]:= BarChart3D[{1, Labeled[2, "label", Center], 3}, ChartLabels -> {"a", "b", "c"}]

Out[1]= [image]
```

---

Use ``Placed`` to control label placement:

```wl
In[1]:= Table[BarChart3D[{1, 2, 3}, ChartLabels -> Placed[{"a", "b", "c"}, p], PlotLabel -> p, Ticks -> None], {p, {Bottom, Center, Top}}]

Out[1]= {[image], [image], [image]}
```

---

Symbolic positions outside the bar:

```wl
In[1]:= Table[BarChart3D[{1, 2, 3}, ChartLabels -> Placed[{"a", "b", "c"}, p], PlotLabel -> p, Ticks -> None], {p, {Below, Above}}]

Out[1]= {[image], [image]}
```

---

Coordinate-based placement relative to a bar:

```wl
In[1]:= Table[BarChart3D[{1, 2, 3}, ChartLabels -> Placed[{"aaa", "bbb", "ccc"}, p], BarSpacing -> 0.5, Ticks -> None, PlotLabel -> p], {p, {{0, 0, 0}, {.5, .5, .5}, {1, 1, 1}}}]

Out[1]= {[image], [image], [image]}
```

---

Coordinate-based placement relative to a bar at a scaled position in the label:

```wl
In[1]:= Table[BarChart3D[{1, 2, 3}, ChartLabels -> Placed[Framed /@ {"a", "b", "c"}, {{1, 1, 1}, p}], BarSpacing -> 0.8, Ticks -> None, PlotLabel -> p], {p, {{0, 0}, {.5, .5}, {1, 1}}}]

Out[1]= {[image], [image], [image]}
```

---

Use the third argument to ``Placed`` to control formatting:

```wl
In[1]:= BarChart3D[{1, 2, 3}, ChartLabels -> Placed[{"aaa", "bbb", "ccc"}, Center, Rotate[#, 45Degree]&]]

Out[1]= [image]

In[2]:= BarChart3D[{1, 2, 3}, ChartLabels -> Placed[{"aaa", "bbb", "ccc"}, Center, Framed[#, FrameMargins -> 1, Background -> LightYellow]&]]

Out[2]= [image]
```

---

By default, labels are associated with columns of data:

```wl
In[1]:=
{BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartLabels -> {"c1", "c2", "c3"}], 
	BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartLabels -> {None, {"c1", "c2", "c3"}}]}

Out[1]= {[image], [image]}
```

Associate labels with rows or datasets:

```wl
In[2]:= BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartLabels -> {{"r1", "r2"}, None}]

Out[2]= [image]
```

Label both rows and columns:

```wl
In[3]:= BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartLabels -> {Placed[{"r1", "r2"}, Above], Placed[{"c1", "c2", "c3"}, Center]}]

Out[3]= [image]
```

---

Place multiple labels:

```wl
In[1]:= BarChart3D[{1, 2, 3}, ChartLabels -> Placed[{{"a", "b", "c"}, {"x", "y", "z"}}, {Top, Bottom}]]

Out[1]= [image]
```

#### ChartLayout (4)

``BarChart`` uses a grouped layout by default:

```wl
In[1]:= BarChart3D[{{16, 8, 4, 2, 1}, {5, 3, 2, 1, 1}}, ChartLayout -> "Grouped"]

Out[1]= [image]
```

---

Use stepped bars:

```wl
In[1]:= BarChart3D[{{16, 8, 4, 2, 1}, {5, 3, 2, 1, 1}}, ChartLayout -> "Stepped"]

Out[1]= [image]
```

---

Use stacked bars:

```wl
In[1]:= BarChart3D[{{16, 8, 4, 2, 1}, {5, 3, 2, 1, 1}}, ChartLayout -> "Stacked"]

Out[1]= [image]
```

The stacked layout can effectively display many datasets:

```wl
In[2]:= BarChart3D[RandomReal[1, {10, 5}], ChartLayout -> "Stacked"]

Out[2]= [image]
```

---

Use a percentile stacked layout:

```wl
In[1]:= BarChart3D[{{16, 8, 4, 2, 1}, {5, 3, 2, 1, 1}}, ChartLayout -> "Percentile"]

Out[1]= [image]
```

#### ChartLegends (7)

Generate a legend based on chart style:

```wl
In[1]:= BarChart3D[{1, 2, 3}, ChartStyle -> "SandyTerrain", ChartLegends -> {"John", "Mary", "Bob"}]

Out[1]= [image]
```

---

Use ``Legended`` to add additional legend entries:

```wl
In[1]:= BarChart3D[{{1, Legended[Style[2, Red], "Henry"], 3}, {4, 2}}, ChartStyle -> "SandyTerrain", ChartLegends -> {"John", "Mary", "Bob"}]

Out[1]= [image]
```

---

Use ``Legended`` to specify a few legend entries:

```wl
In[1]:= BarChart3D[{1, Legended[2, "Mary"], 3, 4, Legended[5, "Joe"], 6}, ChartStyle -> "SandyTerrain"]

Out[1]= [image]
```

---

Generate a legend for datasets:

```wl
In[1]:= BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartLegends -> {{"Group A", "Group B"}, None}, ChartStyle -> {"SandyTerrain", None}]

Out[1]= [image]
```

---

Unused legend labels are dropped:

```wl
In[1]:= BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartLegends -> {{"Group A", "Group B", "Group C"}, None}, ChartStyle -> {"SandyTerrain", None}]

Out[1]= [image]
```

---

Legends can be applied to several dimensions:

```wl
In[1]:= BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartLegends -> {{"Test A", "Test B"}, {"John", "Mary", "Bob"}}, ChartStyle -> {{EdgeForm[{Thick, Red}], EdgeForm[{Thick, Blue}]}, "SandyTerrain"}]

Out[1]= [image]
```

---

Use ``Placed`` to control the placement of legends:

```wl
In[1]:= Table[BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartLegends -> Placed[{"John", "Mary", "Bob"}, pos], ChartStyle -> "SandyTerrain"], {pos, {Below, Above}}]

Out[1]= [image]

In[2]:= Table[BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartLegends -> Placed[{"John", "Mary", "Bob"}, pos], ChartStyle -> "SandyTerrain"], {pos, {Before, After}}]

Out[2]= [image]
```

#### ChartStyle (8)

Use ``ChartStyle`` to set the style for all bars:

```wl
In[1]:= Table[BarChart3D[{1, 2, 3}, ChartStyle -> s], {s, {Gray, Opacity[0.7], Directive[Gray, Opacity[0.7]]}}]

Out[1]= {[image], [image], [image]}
```

---

Give a list of styles:

```wl
In[1]:= BarChart3D[{1, 2, 3, 4}, ChartStyle -> {Red, Green, Blue, Yellow}]

Out[1]= [image]
```

Use the ``"Gradients"`` color scheme from ``ColorData`` :

```wl
In[2]:= BarChart3D[{1, 2, 3, 4}, ChartStyle -> "Pastel"]

Out[2]= [image]
```

Use the ``"Indexed"`` color scheme from ``ColorData``:

```wl
In[3]:= BarChart3D[{1, 2, 3, 4}, ChartStyle -> 44]

Out[3]= [image]
```

---

Styles are used cyclically:

```wl
In[1]:= BarChart3D[{1, 2, 3, 4}, ChartStyle -> {Red, Green}]

Out[1]= [image]
```

---

Style each column of data:

```wl
In[1]:= BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartStyle -> {Red, Green, Blue}]

Out[1]= [image]
```

Style each row of data:

```wl
In[2]:= BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartStyle -> {{Red, Green}, None}]

Out[2]= [image]
```

Style both rows and columns of data:

```wl
In[3]:= BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartStyle -> {{Directive[{EdgeForm[GrayLevel[0.8]], Opacity[0.5]}], EdgeForm[]}, {Red, Green, Blue}}]

Out[3]= [image]
```

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

```wl
In[4]:= BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartStyle -> {{Yellow, Magenta}, {Red, Green, Blue}}]

Out[4]= [image]
```

---

``Style`` may override settings for ``ChartStyle``:

```wl
In[1]:= BarChart3D[{1, Style[2, Yellow], 3}, ChartStyle -> {Red, Green, Blue}]

Out[1]= [image]
```

---

``ColorFunction`` may override settings for ``ChartStyle``:

```wl
In[1]:= BarChart3D[{1, 2, 3}, ChartStyle -> {Red, Green, Blue}, ColorFunction -> ColorData["SolarColors"]]

Out[1]= [image]
```

---

Use ``ColorFunction`` to combine different style effects:

```wl
In[1]:= BarChart3D[Table[Exp[-t ^ 2], {t, -2, 2, 0.25}], ChartStyle -> "SolarColors", ColorFunction -> Function[{height}, Opacity[height]]]

Out[1]= [image]

In[2]:= BarChart3D[Partition[Range[24], 8], ChartStyle -> "Rainbow", ChartLayout -> "Grid", ColorFunction -> Function[{height}, Opacity[height]]]

Out[2]= [image]
```

---

``ChartElements`` with explicit style settings may override settings for ``ChartStyle``:

```wl
In[1]:= BarChart3D[{1, 2, 3}, ChartElements -> [image], ChartStyle -> "Pastel"]

Out[1]= [image]
```

#### ColorFunction (3)

Color by bar height:

```wl
In[1]:= BarChart3D[Table[Exp[-t ^ 2], {t, -2, 2, 0.25}], ColorFunction -> Function[{height}, ColorData["Rainbow"][height]]]

Out[1]= [image]
```

Use the ``"Gradients"`` color strings from ``ColorData`` :

```wl
In[2]:= BarChart3D[{1, 2, 3}, ColorFunction -> "SolarColors"]

Out[2]= [image]
```

---

Use ``ColorFunctionScaling -> False`` to get unscaled height values:

```wl
In[1]:= BarChart3D[{1, 2, 3}, ColorFunction -> (Switch[#, 1, Yellow, 2, Orange, 3, Red]&), ColorFunctionScaling -> False]

Out[1]= [image]
```

---

``ColorFunction`` may override settings for ``ChartStyle``:

```wl
In[1]:= BarChart3D[{1, 2, 3}, ChartStyle -> {Red, Green, Blue}, ColorFunction -> ColorData["SolarColors"]]

Out[1]= [image]
```

Use ``ColorFunction`` to combine different style effects:

```wl
In[2]:= BarChart3D[{1, 2, 3}, ChartStyle -> "SolarColors", ColorFunction -> Opacity]

Out[2]= [image]

In[3]:= BarChart3D[{1, 2, 3}, ChartStyle -> "SolarColors", ColorFunction -> (EdgeForm[]&)]

Out[3]= [image]
```

#### ColorFunctionScaling (2)

By default, scaled height values are used:

```wl
In[1]:= BarChart3D[{1, 2, 3}, ColorFunction -> (Lighter[Brown, 0.9#]&)]

Out[1]= [image]
```

---

Use ``ColorFunctionScaling -> False`` to get unscaled height values:

```wl
In[1]:= BarChart3D[{1, 2, 3}, ColorFunction -> (Switch[#, 1, Yellow, 2, Orange, 3, Red]&), ColorFunctionScaling -> False]

Out[1]= [image]
```

#### LabelingFunction (8)

Use automatic labeling by values through ``Tooltip`` and ``StatusArea``:

```wl
In[1]:= BarChart3D[{1, 2, 3}, LabelingFunction -> Automatic]

Out[1]= [image]
```

---

Do no automatic labeling:

```wl
In[1]:= BarChart3D[{1, 2, 3}, LabelingFunction -> None]

Out[1]= [image]
```

---

Use symbolic positions to control label placement:

```wl
In[1]:= Table[BarChart3D[{1, 2, 3}, LabelingFunction -> p, PlotLabel -> p, Ticks -> None], {p, {Bottom, Center, Top}}]

Out[1]= {[image], [image], [image]}
```

---

Symbolic positions outside the bar:

```wl
In[1]:= Table[BarChart3D[{1, 2, 3}, LabelingFunction -> p, PlotLabel -> p, Ticks -> None], {p, {Below, Above}}]

Out[1]= {[image], [image]}
```

---

Coordinate-based placement relative to a bar:

```wl
In[1]:= Table[BarChart3D[{1, 2, 3}, LabelingFunction -> p, BarSpacing -> 0.5, Ticks -> None, PlotLabel -> p], {p, {{0, 0, 0}, {0.5, 0.5, 0.5}, {1, 1, 1}}}]

Out[1]= {[image], [image], [image]}
```

---

Control the formatting of labels:

```wl
In[1]:= BarChart3D[{10, 20, 30}, LabelingFunction -> (Placed[Style[Row[{#, "%"}], Bold, FontSize -> 12, FontFamily -> "Helvetica"], Above]&)]

Out[1]= [image]

In[2]:= BarChart3D[{10, 20, 30}, LabelingFunction -> (Placed[#, Bottom, Function[l, Framed[l, FrameMargins -> 1, Background -> LightYellow]]]&)]

Out[2]= [image]
```

---

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

```wl
In[1]:= BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartLabels -> {{"r1", "r2"}, {"c1", "c2", "c3"}}, LabelingFunction -> (Placed[Row[{#3[[1, 1]], #3[[2, 1]], #1}, ","], Center]&), ImageSize -> Medium]

Out[1]= [image]
```

---

Place row, column, and value labels in a ``Tooltip`` :

```wl
In[1]:= TooltipLabel[value_, {row_, column_}, {{rowLabel_}, {columnLabel_}}] := Placed[Row[{rowLabel, columnLabel, value}, ","], Tooltip]

In[2]:= BarChart3D[{{1, 2, 3}, {4, 5, 6}}, ChartLabels -> {Placed[{"r1", "r2"}, Axis], Placed[{"c1", "c2", "c3"}, Bottom]}, LabelingFunction -> TooltipLabel]

Out[2]= [image]
```

#### PerformanceGoal (3)

Generate a bar chart with interactive highlighting:

```wl
In[1]:= BarChart3D[Range[10], PerformanceGoal -> "Quality"]

Out[1]= [image]
```

---

Emphasize performance by disabling interactive behaviors:

```wl
In[1]:= BarChart3D[Range[10], PerformanceGoal -> "Speed"]

Out[1]= [image]
```

---

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

```wl
In[1]:= Table[ByteCount@BarChart3D[Range[10], PerformanceGoal -> p], {p, {"Quality", "Speed"}}]

Out[1]= {100856, 89656}
```

#### PlotInteractivity (4)

Charts with a moderate number of bars automatically have tooltips:

```wl
In[1]:= BarChart3D[Range[5]]

Out[1]= [image]
```

---

Turn off all the interactive elements:

```wl
In[1]:= BarChart3D[Range[5], PlotInteractivity -> False]

Out[1]= [image]
```

---

Interactive elements provided as part of the input are disabled:

```wl
In[1]:= BarChart3D[{1, 2, Tooltip[3, "Hello"]}, PlotInteractivity -> False]

Out[1]= [image]
```

---

Allow provided interactive elements and disable automatic ones:

```wl
In[1]:= BarChart3D[{1, 2, Tooltip[3, "Hello"]}, PlotInteractivity -> <|"User" -> True, "System" -> False|>]

Out[1]= [image]
```

#### PlotTheme (2)

Use a theme with simple ticks and dark background in a high contrast color scheme:

```wl
In[1]:= BarChart3D[{8, 3, 7, 5, 2, 4}, PlotTheme -> "Marketing"]

Out[1]= [image]
```

---

Change the chart style:

```wl
In[1]:= BarChart3D[{8, 3, 7, 5, 2, 4}, PlotTheme -> "Marketing", ChartStyle -> 96]

Out[1]= [image]
```

#### Ticks (6)

Ticks are placed automatically in each plot:

```wl
In[1]:= BarChart3D[{20, 5, 10, 35, 60, 75, 140}]

Out[1]= [image]
```

---

Use ``Ticks -> None`` to not draw any tick marks:

```wl
In[1]:= BarChart3D[{20, 5, 10, 35, 60, 75, 140}, Ticks -> None]

Out[1]= [image]
```

---

Place tick marks at specific positions:

```wl
In[1]:= BarChart3D[{20, 5, 10, 35, 60, 75, 140}, Ticks -> {None, None, {60, 80, 120}}]

Out[1]= [image]
```

---

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

```wl
In[1]:= BarChart3D[{20, 5, 10, 35, 60, 75, 140}, Ticks -> {None, None, {{60, a}, {80, b}, {120, c}}}]

Out[1]= [image]
```

---

Specify tick marks with scaled lengths:

```wl
In[1]:= BarChart3D[{20, 5, 10, 35, 60, 75, 140}, Ticks -> {None, None, {{5, "min", .07}, {80, b, .07}, {140, "max", .47}}}]

Out[1]= [image]
```

---

Customize each tick with position, length, labeling and styling:

```wl
In[1]:= BarChart3D[{20, 5, 10, 35, 60, 75, 140}, Ticks -> {None, None, {{5, "min", .07, Directive[Thick, Blue]}, {80, b, .07, Directive[Thick, Black]}, {140, "max", .47, Directive[Thick, Red]}}}]

Out[1]= [image]
```

#### TicksStyle (2)

Specify overall ticks style, including the tick labels:

```wl
In[1]:= BarChart3D[{20, 5, 10, 35, 60, 75, 140}, TicksStyle -> Directive[Red, Bold]]

Out[1]= [image]
```

---

Specify tick style for each of the axes:

```wl
In[1]:= BarChart3D[{20, 5, 10, 35, 60, 75, 140}, TicksStyle -> {Directive[Thick, Blue], Directive[Thick, Green], Directive[Red, Red]}]

Out[1]= [image]
```

### Applications (5)

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

```wl
In[1]:=
countries = CountryData["G8"];
data = Table[With[{country = c, v = Round@CountryData[c, "GDPPerCapita"]}, Button[v, Speak[StringJoin[country, ", $", ToString[v]]]]], {c, countries}];

In[2]:= BarChart3D[data, PlotLabel -> "GDP Per Capita", ChartLabels -> Placed[countries, Center, Rotate[#, Pi / 2]&]]

Out[2]= [image]
```

---

Create a 3D bar chart of the mean monthly temperature of Chicago between 2001 and 2007:

```wl
In[1]:= data = Table[WeatherData["KORD", "MeanTemperature", {{i, 1, 1}, {i, 12, 31}, "Month"}], {i, 2001, 2007, 1}];

In[2]:= BarChart3D[data, ChartLayout -> "Grid", ChartLabels -> {Range[2001, 2007], Table[DateString[{2001, m}, "MonthNameShort"], {m, 1, 12}]}, ViewPoint -> {3.33, -8.26, 5.36}, ColorFunction -> "TemperatureMap", LabelingFunction -> (Row[{#, "°C"}]&), PlotLabel -> Style["Chicago Mean Temperature (2001-2007)", "Title", 14]]

Out[2]= [image]
```

---

Compare molecular mass of commonly used chemicals:

```wl
In[1]:=
chemicals = {"Methane", "Ethane", "Ethanol", "HydrogenPeroxide", "Propane", "Urea", "Acetone", "CarbonDioxide", "Butane", "Water"};
chemIcons = Show[ChemicalData[#, "MoleculePlot"], ImageSize -> 50]& /@ chemicals;
chemMolecularMass = ChemicalData[#, "MolecularMass"]& /@ chemicals;
chemicalLabel = Style[Rotate[#, Pi / 2], 11, Bold, FontFamily -> "Helvetica", Darker[Brown]]& /@ chemicals;

In[2]:= BarChart3D[chemMolecularMass, ChartLabels -> Placed[{chemIcons, chemicalLabel}, {Above, Center}], ChartStyle -> 2, LabelingFunction -> (Placed[Style[Row[{Style["Molecular Mass : ", Bold], NumberForm[#, {3, 2}], " amu"}], 12, FontFamily -> "Helvetica"], Tooltip]&), PlotRange -> {All, 70}]

Out[2]= [image]
```

---

Create a 3D periodic table of elements, where the bar height represents the atomic weight:

```wl
In[1]:= data = ColorData["Atoms", "Panel"][[1, 1, 1, 2]] /. {{color_, EventHandler[{Rectangle[__], Inset[Style[element_, __], __]}, _]} :> Labeled[Style[ElementData[element, "AtomicWeight"], color], element, Above], {} -> None};

In[2]:= BarChart3D[Reverse /@ data, ChartLayout -> "Grid", ImageSize -> 530, BoxRatios -> {18, 10, 5}, Method -> {"Canvas" -> None}, Boxed -> True, Ticks -> {None, None, Automatic}, ViewPoint -> {6.3, -4.8, 6.6}]

Out[2]= [image]
```

---

Get price data for a portfolio of companies:

```wl
In[1]:=
companies = {"PG", "MCD", "GS", "C", "AAPL"};
companyNames = FinancialData[#, "Name"]& /@ companies;
data = Transpose[FinancialData[#, "Price", {{2000, 10, 1}, {2008, 10, 1}, "Year"}]["Values"]& /@ companies];
```

Create a labeling function:

```wl
In[2]:= tooltipLabel[price_, {row_, col_}, ___] := Row[{"$", price, " ", companyNames[[col]]}]
```

Mouse over the bars to get price information:

```wl
In[3]:= BarChart3D[Labeled[#, Style[Total@#, 12, Bold], Above]& /@ data, ChartLayout -> "Stacked", ChartStyle -> "Rainbow", ChartLegends -> Placed[companyNames, Below], ChartLabels -> {Placed[Range[2000, 2008], Below, "Framed"], None}, AxesLabel -> Style["$US", 12], LabelingFunction -> tooltipLabel, PlotLabel -> Style["Portfolio Value (2000-2008)", 16], ImageSize -> 500]

Out[3]= [image]
```

### Properties & Relations (5)

Use ``BarChart`` to get a 2D rendering of bar charts:

```wl
In[1]:= BarChart[{1, 2, 3, 4}]

Out[1]= [image]
```

---

``BarChart3D`` is a special case of ``RectangleChart3D``:

```wl
In[1]:= {BarChart3D[{1, 2, 3}], RectangleChart3D[{{1, 1, 1}, {1, 1, 2}, {1, 1, 3}}]}

Out[1]= {[image], [image]}
```

---

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

```wl
In[1]:= {PieChart[{1, 2, 3, 4}], PieChart3D[{1, 2, 3, 4}]}

Out[1]= {[image], [image]}
```

---

Use ``ListPlot`` and ``ListLinePlot`` to produce line graphs:

```wl
In[1]:= {ListPlot[{1, 2, 3, 4}, Filling -> Axis], ListLinePlot[{1, 2, 3, 4}]}

Out[1]= {[image], [image]}
```

---

Use ``Histogram`` to automatically compute binning and draw histograms:

```wl
In[1]:= Histogram[RandomReal[NormalDistribution[0, 1], 200]]

Out[1]= [image]
```

### Neat Examples (3)

Pictorial bars:

```wl
In[1]:= g = ExampleData[{"Geometry3D", "Cow"}];

In[2]:= BarChart3D[Range[5], ChartElements -> g, ChartStyle -> "Pastel"]

Out[2]= [image]
```

---

```wl
In[1]:= BarChart3D[RandomReal[1, {5, 5}], ChartElementFunction -> "Cylinder", ChartLayout -> "Stacked", ChartStyle -> "SolarColors", ChartBaseStyle -> Directive[Opacity[0.6], Specularity[White, 30]]]

Out[1]= [image]
```

---

```wl
In[1]:= BarChart3D[Range[-5, 5], ChartStyle -> 53, ChartElementFunction -> "ProfileCube", ChartBaseStyle -> Directive[EdgeForm[Gray], Opacity[0.8], Specularity[White, 30]]]

Out[1]= [image]
```

## See Also

* [`BarChart`](https://reference.wolfram.com/language/ref/BarChart.en.md)
* [`PieChart`](https://reference.wolfram.com/language/ref/PieChart.en.md)
* [`Histogram3D`](https://reference.wolfram.com/language/ref/Histogram3D.en.md)
* [`RectangleChart3D`](https://reference.wolfram.com/language/ref/RectangleChart3D.en.md)
* [`SectorChart`](https://reference.wolfram.com/language/ref/SectorChart.en.md)
* [`SectorChart3D`](https://reference.wolfram.com/language/ref/SectorChart3D.en.md)
* [`ListPlot3D`](https://reference.wolfram.com/language/ref/ListPlot3D.en.md)
* [`ListPointPlot3D`](https://reference.wolfram.com/language/ref/ListPointPlot3D.en.md)
* [`PairedBarChart`](https://reference.wolfram.com/language/ref/PairedBarChart.en.md)

## Related Guides

* [Charting and Information Visualization](https://reference.wolfram.com/language/guide/ChartingAndInformationVisualization.en.md)
* [Data Visualization](https://reference.wolfram.com/language/guide/DataVisualization.en.md)

## Related Links

* [An Elementary Introduction to the Wolfram Language: More Forms of Visualization](https://www.wolfram.com/language/elementary-introduction/24-more-forms-of-visualization.html)

## History

* [Introduced in 2008 (7.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn70.en.md) \| [Updated in 2010 (8.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn80.en.md) ▪ [2012 (9.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn90.en.md) ▪ [2014 (10.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn100.en.md) ▪ [2025 (14.2)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn142.en.md) ▪ [2025 (14.3)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn143.en.md)