({{, (RefLink[RectangleChart3D, paclet:ref/RectangleChart3D])[{{(Subscript[x, 1]),(Subscript[y, 1]),(Subscript[z, 1])},{(Subscript[x, 2]),(Subscript[y, 2]),(Subscript[z, 2])},…}] 
makes a 3D rectangle chart with bars of width (Subscript[x, i]), depth (Subscript[y, i]), and height (Subscript[z, i]).}, {, (RefLink[RectangleChart3D, paclet:ref/RectangleChart3D])[{…,(Subscript[w, i])[{(Subscript[x, i]),(Subscript[y, i]),(Subscript[z, i])},…],…,(Subscript[w, j])[{(Subscript[x, i]),(Subscript[y, j]),(Subscript[z, j])},…],…}]
makes a 3D rectangle chart with bar features defined by the symbolic wrappers (Subscript[w, k]).}, {, (RefLink[RectangleChart3D, paclet:ref/RectangleChart3D])[{(Subscript[data, 1]),(Subscript[data, 2]),…}]
makes a 3D rectangle chart from multiple datasets (Subscript[data, i]). }})

OpenersNotesSection(Spacer1)Details and Options

Data elements for (RefLink[RectangleChart3D, paclet:ref/RectangleChart3D]) can be given in the following forms:

Data not given in these forms is ignored in forming the 3D rectangle chart.

Datasets for (RefLink[RectangleChart3D, paclet:ref/RectangleChart3D]) can be given in the following forms:

The following wrappers can be used for chart elements:

In (RefLink[RectangleChart3D, paclet:ref/RectangleChart3D]), (RefLink[Labeled, paclet:ref/Labeled]) and (RefLink[Placed, paclet:ref/Placed]) allow the following positions:

(RefLink[RectangleChart3D, paclet:ref/RectangleChart3D]) has the same options as (RefLink[Graphics3D, paclet:ref/Graphics3D]) with the following additions and changes:

Possible settings for (RefLink[ChartLayout, paclet:ref/ChartLayout]) include "Grouped" and "Stepped".

The arguments supplied to (RefLink[ChartElementFunction, paclet:ref/ChartElementFunction]) are the bar region {{(Subscript[x, min]),(Subscript[x, max])},{(Subscript[y, min]),(Subscript[y, max])},{(Subscript[z, min]),(Subscript[z, max])}}, the data values {(Subscript[x, i]),(Subscript[y, i]),(Subscript[z, i])}, and metadata {(Subscript[m, 1]),(Subscript[m, 2]),…} from each level in a nested list of datasets.

A list of built-in settings for (RefLink[ChartElementFunction, paclet:ref/ChartElementFunction]) can be obtained from ChartElementData["RectangleChart3D"].

With the setting (RefLink[ChartElements, paclet:ref/ChartElements])->g, the graphic g will be used to form pictorial bars consisting of stretched versions of g.

The arguments supplied to (RefLink[ColorFunction, paclet:ref/ColorFunction]) consist of (Subscript[x, i]), (Subscript[y, i]), and (Subscript[z, i]).

Style and other specifications from options and other constructs in (RefLink[RectangleChart3D, paclet:ref/RectangleChart3D]) are effectively applied in the order (RefLink[ChartStyle, paclet:ref/ChartStyle]), (RefLink[ColorFunction, paclet:ref/ColorFunction]), (RefLink[Style, paclet:ref/Style]) and other wrappers, (RefLink[ChartElements, paclet:ref/ChartElements]), and (RefLink[ChartElementFunction, paclet:ref/ChartElementFunction]), with later specifications overriding earlier ones.

OpenersPrimaryExamplesSection(Spacer1)Examples  (108)

OpenersExampleSection0(Spacer1)Basic Examples  (4)

Generate a 3D rectangle chart for width, depth, and height values:

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}}]

Multiple datasets:

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}}]

Use categorical labels:

data={{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}};

RectangleChart3D[data,ChartLabels->Placed[{"a","b","c"},Center]]

Categorical legends:

RectangleChart3D[data,ChartLegends->{"a","b","c"}]

Set the style for bars:

RectangleChart3D[Tuples[{1,3},3],ChartStyle->"DarkRainbow"]

Pictorial bars:

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartElements->]

Procedural bars:

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartElementFunction->"ProfileCube"]

OpenersExampleSection1(Spacer1)Scope  (34)

OpenersExampleSubsection0(Spacer1)Data and Layouts  (12)

Items in a dataset are grouped together:

RectangleChart3D[{{{1,1,1},{1,1,1},{1,1,1}},{{2,2,2},{2,2,2},{2,2,2}}}]

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

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}}]

Nonreal data is taken to be missing:

RectangleChart3D[{{{1,1,1},Missing[],{1,1,1}},{1+I,{2,2,2},foo,{2,2,2}}}]

The data may include units:

RectangleChart3D[{{(QuantityUnit[3]),(QuantityUnit[5]),(QuantityUnit[2])},{(QuantityUnit[8]),(QuantityUnit[2]),(QuantityUnit[5])},{(QuantityUnit[2]),(QuantityUnit[1]),(QuantityUnit[3])},{(QuantityUnit[1]),(QuantityUnit[3]),(QuantityUnit[3])},{(QuantityUnit[8]),(QuantityUnit[2]),(QuantityUnit[7])},{(QuantityUnit[7]),(QuantityUnit[3]),(QuantityUnit[1])}},AxesLabel->Automatic,BarSpacing->None]

Specify the units to use:

RectangleChart3D[{{(QuantityUnit[3]),(QuantityUnit[5]),(QuantityUnit[2])},{(QuantityUnit[8]),(QuantityUnit[2]),(QuantityUnit[5])},{(QuantityUnit[2]),(QuantityUnit[1]),(QuantityUnit[3])},{(QuantityUnit[1]),(QuantityUnit[3]),(QuantityUnit[3])},{(QuantityUnit[8]),(QuantityUnit[2]),(QuantityUnit[7])},{(QuantityUnit[7]),(QuantityUnit[3]),(QuantityUnit[1])}},AxesLabel->Automatic,BarSpacing->None,TargetUnits->{"Minutes","Minutes","Feet"}]

The time stamps in (RefLink[TimeSeries, paclet:ref/TimeSeries]), (RefLink[EventSeries, paclet:ref/EventSeries]), and (RefLink[TemporalData, paclet:ref/TemporalData]) are ignored:

RectangleChart3D[TimeSeries[{{19,16,12},{9,8,6},{7,2,15},{17,3,5}},{"May 24, 1982"}]]

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

RectangleChart3D[<|"a"->{1,1,1},"b"->{1,3,2},"c"->{2,1,4},"d"->{2,2,1}|>]

Use the keys as labels:

RectangleChart3D[<|"a"->{1,1,1},"b"->{1,3,2},"c"->{2,1,4},"d"->{2,2,1}|>,ChartLabels->Automatic]

Use the keys as legends:

RectangleChart3D[<|"a"->{1,1,1},"b"->{1,3,2},"c"->{2,1,4},"d"->{2,2,1}|>,ChartLegends->Automatic,ChartStyle->99]

Associations can be nested:

RectangleChart3D[<|"group a"-><|"a"->{1,3,2},"b"->{2,1,4}|>,"group b"-><|"a"->{1,2,1},"b"->{2,3,2}|>|>,ChartLegends->Automatic]

The weights in (RefLink[WeightedData, paclet:ref/WeightedData]) are ignored:

RectangleChart3D[WeightedData[{{1,1,3},{2,1,2},{3,1,2},{3,4,3},{5,2,5}},{0.5,0.2,0.1,0.2,0.3}]]

Use different layouts to display multiple datasets:

Table[RectangleChart3D[{{{1,1,1},{1,1,1},{1,1,1}},{{2,2,2},{2,2,2},{2,2,2}}},ChartLayout->l],{l,{"Grouped","Stepped"}}]

Control the origin of bars:

Table[RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},BarOrigin->o,PlotLabel->o,ImageSize->Tiny,Ticks->None],{o,{Bottom,Left,Top,Right}}]

Adjust the spacing between bars and groups of bars:

Table[RectangleChart3D[{{1,2,3},{2,3,1},{2,2,2}},BarSpacing->s,PlotLabel->s,ChartStyle->Opacity[0.8]],{s,{Automatic,{1,1},{-0.3,1}}}]

OpenersExampleSubsection1(Spacer1)Wrappers  (5)

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

{{d1,d2,d3},{e1,e2}}={{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}};

{RectangleChart3D[{{d1,Style[d2,Red],d3},{e1,e2}}],RectangleChart3D[{Style[{d1,d2,d3},Green],{e1,e2}}],RectangleChart3D[Style[{{d1,d2,d3},{e1,e2}},Blue]]}

Wrappers can be nested:

{{d1,d2,d3},{e1,e2}}={{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}};

{RectangleChart3D[{{d1,Style[d2,Red],d3},{e1,e2}}],RectangleChart3D[{Style[{d1,Style[d2,Red],d3},Green],{e1,e2}}],RectangleChart3D[Style[{{d1,Style[d2,Red],d3},{e1,e2}},Blue]]}

Override the default tooltips:

RectangleChart3D[{{2,3,3},Tooltip[{1,2,2},"median"],{1,1,1}}]

Use (RefLink[PopupWindow, paclet:ref/PopupWindow]) to provide additional drilldown information:

RectangleChart3D[{{1,2,2},PopupWindow[{2,3,3},DateListPlot[FinancialData["MSFT","Jan. 1, 2004"]]],{1,1,1}}]

(RefLink[Button, paclet:ref/Button]) can be used to trigger any action:

RectangleChart3D[{{1,2,2},Button[{2,3,3},Speak[2]],{1,1,1}}]

OpenersExampleSubsection2(Spacer1)Styling and Appearance  (9)

Use an explicit list of styles for the bars:

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartStyle->{Red,Green,Blue}]

Use any gradient or indexed color schemes from (RefLink[ColorData, paclet:ref/ColorData]):

data={{3,4,4},{3,6,3},{4,3,5}};

{RectangleChart3D[data,ChartStyle->"Pastel"],RectangleChart3D[data,ChartStyle->46]}

Use color schemes designed for charting:

ColorData["Charting"]

Table[RectangleChart3D[Tuples[{1,2},3],ChartStyle->i,Axes->None],{i,ColorData["Charting"][[1;;4]]}]

(RefLink[ChartBaseStyle, paclet:ref/ChartBaseStyle]) can be used to set an initial style for all chart elements:

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartBaseStyle->EdgeForm[Dashed],ChartStyle->45]

(RefLink[Style, paclet:ref/Style]) can be used to override styles:

RectangleChart3D[{{1,2,2},{1,1,1},Style[{3,4,1},Red],{2,3,3}},ChartStyle->Gray]

Use any graphic for pictorial bars:

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartElements->Graphics3D[Cylinder[]]]

Use built-in programmatically generated bars:

ChartElementData["RectangleChart3D"]

Table[RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartElementFunction->f,ChartStyle->"Pastel"],{f,{"FadingCube","GradientScaleCube"}}]

For detailed settings use Palettes ▶ ChartElementSchemes:

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartElementFunction->ChartElementDataFunction["SegmentScaleCube","Segments"->7,"ColorScheme"->"SolarColors"]]

Use a theme with detailed frame ticks and grid lines:

RectangleChart3D[{{{1,2,1},{3,1,2},{2,3,4}},{{2,4,4},{1,2,2}}},PlotTheme->"Detailed"]

Use a theme with a high-contrast color scheme and profile 3D rectangles:

RectangleChart3D[{{{1,2,1},{3,1,2},{2,3,4}},{{2,4,4},{1,2,2}}},PlotTheme->"Marketing"]

OpenersExampleSubsection3(Spacer1)Labeling and Legending  (8)

Use (RefLink[Labeled, paclet:ref/Labeled]) to add a label to a bar:

RectangleChart3D[{{1,2,2},Labeled[{2,3,3},"label"],{1,1,1}}]

Use symbolic positions for label placement:

Table[RectangleChart3D[{{1,2,2},Labeled[{2,3,3},"label",p],{1,1,1}},PlotLabel->p,Ticks->None],{p,{Bottom,Center,Top}}]

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

Provide categorical labels for the columns of data:

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},ChartLabels->{"c1","c2","c3"}]

For rows of data:

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},ChartLabels->{{"r1","r2"},None}]

For both:

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},ChartLabels->{{"r1","r2"},{"c1","c2","c3"}}]

Use (RefLink[Placed, paclet:ref/Placed]) to control the positioning of labels, using the same positions as for (RefLink[Labeled, paclet:ref/Labeled]):

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},ChartLabels->{Placed[{"r1","r2"},Above],Placed[{"c1","c2","c3"},Center]}]

Provide value labels for bars by using (RefLink[LabelingFunction, paclet:ref/LabelingFunction]):

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},LabelingFunction->Above]

Use (RefLink[Placed, paclet:ref/Placed]) to control placement and formatting:

labeler[v_,{i_,j_},{ri_,cj_}]:=Placed[Row[{v,ri[[1]],cj[[1]]},","],Tooltip,Rotate[#,Pi/3]&]

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},ChartLabels->{{"r1","r2"},{"c1","c2","c3"}},PlotRange->All,LabelingFunction->labeler]

Add categorical legend entries for the columns of data:

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},ChartLegends->{"ccc1","ccc2","ccc3"},ChartStyle->"Pastel"]

For rows of data:

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},ChartLegends->{{"rr1","rr2"},None},ChartStyle->{"Pastel",None}]

Use (RefLink[Legended, paclet:ref/Legended]) to add additional legend entries:

RectangleChart3D[{{{2,3,3},Legended[Style[{1,2,2},Red],"extra"],{1,1,1}},{{1,3,2},{2,1,1}}},ChartStyle->"Pastel",ChartLegends->{"aaa","bbb","ccc"}]

Use (RefLink[Placed, paclet:ref/Placed]) to affect the positioning of legends:

Table[RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},ChartLegends->Placed[{"ccc1","ccc2","ccc3"},p],ChartStyle->"Pastel"],{p,{Bottom,Top}}]

OpenersExampleSection2(Spacer1)Options  (64)

OpenersExampleSubsection4(Spacer1)BarOrigin  (1)

Change the bar origin:

Table[RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},BarOrigin->o,PlotLabel->o],{o,{Bottom,Top,Left,Right}}]

OpenersExampleSubsection5(Spacer1)BarSpacing  (6)

Use automatically determined spacing between bars:

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},BarSpacing->Automatic]

Use no spacing:

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},BarSpacing->None]

Use symbolic presets:

Table[RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},BarSpacing->s,PlotLabel->s],{s,{Tiny,Small,Medium,Large}}]

Use explicit spacing between bars:

Table[RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},BarSpacing->s,ChartStyle->Opacity[0.8],PlotLabel->s],{s,{Automatic,1,-0.3}}]

Use explicit spacing between bars and groups of bars:

Table[RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},BarSpacing->s,PlotLabel->s],{s,{Automatic,{0,1},{0,0.2}}}]

With no spacing used between bars a quantitative x axis is used:

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},BarSpacing->{0,0}]

OpenersExampleSubsection6(Spacer1)ChartBaseStyle  (5)

Use (RefLink[ChartBaseStyle, paclet:ref/ChartBaseStyle]) to style bars:

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartBaseStyle->EdgeForm[Dashed]]

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},ChartBaseStyle->EdgeForm[Dashed]]

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartBaseStyle->Opacity[0.7]]

(RefLink[ChartBaseStyle, paclet:ref/ChartBaseStyle]) combines with (RefLink[ChartStyle, paclet:ref/ChartStyle]):

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartStyle->24,ChartBaseStyle->EdgeForm[Dashed]]

(RefLink[ChartStyle, paclet:ref/ChartStyle]) may override settings for (RefLink[ChartBaseStyle, paclet:ref/ChartBaseStyle]):

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartStyle->EdgeForm[None],ChartBaseStyle->EdgeForm[Dashed]]

(RefLink[ChartBaseStyle, paclet:ref/ChartBaseStyle]) combines with (RefLink[Style, paclet:ref/Style]):

RectangleChart3D[{{3,4,4},Style[{3,6,3},Yellow],{4,3,5}},ChartBaseStyle->EdgeForm[Dashed]]

(RefLink[Style, paclet:ref/Style]) may override settings for (RefLink[ChartBaseStyle, paclet:ref/ChartBaseStyle]):

RectangleChart3D[{{3,4,4},{3,6,3},Style[{4,3,5},EdgeForm[None]]},ChartBaseStyle->EdgeForm[Dashed]]

(RefLink[ChartBaseStyle, paclet:ref/ChartBaseStyle]) combines with (RefLink[ColorFunction, paclet:ref/ColorFunction]):

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartBaseStyle->EdgeForm[Dashed],ColorFunction->"Pastel"]

(RefLink[ColorFunction, paclet:ref/ColorFunction]) may override settings for (RefLink[ChartBaseStyle, paclet:ref/ChartBaseStyle]):

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartBaseStyle->EdgeForm[Dashed],ColorFunction->(EdgeForm[None]&)]

OpenersExampleSubsection7(Spacer1)ChartElements  (7)

Create a pictorial chart based on any (RefLink[Graphics3D, paclet:ref/Graphics3D]) object:

RectangleChart3D[{{{1,3,2},{2,1,1}},{{2,3,3},{1,2,2},{1,1,1}}},ChartElements->Graphics3D[Cylinder[]]]

Use a different graphic for each column of data:

RectangleChart3D[{{{1,3,2},{2,1,1}},{{2,3,3},{1,2,2},{1,1,1}}},ChartElements->{,,}]

Use a different graphic for each row of data:

RectangleChart3D[{{{1,3,2},{2,1,1}},{{2,3,3},{1,2,2},{1,1,1}}},ChartElements->{{,},None}]

Graphics are used cyclically:

RectangleChart3D[Tuples[{1,2},3],ChartElements->{,}]

Styles are inherited from styles set through (RefLink[ChartStyle, paclet:ref/ChartStyle]) etc.:

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartElements->,ChartStyle->"Pastel"]

Override individual styles by using (RefLink[Style, paclet:ref/Style]):

RectangleChart3D[{{3,4,4},Style[{3,6,3},Red],{4,3,5}},ChartElements->,ChartStyle->"Pastel"]

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

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartElements->,ChartStyle->Black]

OpenersExampleSubsection8(Spacer1)ChartElementFunction  (6)

Get a list of built-in settings for (RefLink[ChartElementFunction, paclet:ref/ChartElementFunction]):

ChartElementData["RectangleChart3D"]

For detailed settings use Palettes ▶ ChartElementSchemes:

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartElementFunction->"Cube",ChartStyle->"DarkRainbow"]

Table[RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartElementFunction->f,ChartStyle->EdgeForm[],ColorFunction->"SandyTerrain",PlotLabel->f,ViewPoint->{2.8,-7.5,6.7}],{f,{"Cone","FadingCube","Cylinder","ProfileCube"}}]

(RefLink[ChartElementFunction, paclet:ref/ChartElementFunction]) is appropriate to show the global scale:

Table[RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartElementFunction->f,PlotLabel->f],{f,{"GradientScaleCube","SegmentScaleCube"}}]

Write a custom (RefLink[ChartElementFunction, paclet:ref/ChartElementFunction]):

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

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartElementFunction->f,ChartStyle->Lighter[Gray,.5]]

Write a custom (RefLink[ChartElementFunction, paclet:ref/ChartElementFunction]) using ChartElementDataFunction:

f[b:{{xmin_,xmax_},{ymin_,ymax_},{zmin_,zmax_}},___]:=ChartElementDataFunction["SegmentScaleCube","Segments"->10,"ColorScheme"->57][b]

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartElementFunction->f,ChartStyle->Gray]

Chart with optional labeled drop planes:

PlaneBar[box:{{xmin_,xmax_},{ymin_,ymax_},{zmin_,zmax_}},y_,{True}]:={PlaneBar[box],EdgeForm[],Opacity[0.5],Polygon[{{-0.1,ymin,zmax},{xmax,ymin,zmax},{xmax,ymax,zmax},{-0.1,ymax,zmax}}]}

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

Setting the metadata to (RefLink[True, paclet:ref/True]) turns on the drop plane:

RectangleChart3D[{{3,4,4},{3,6,3}->True,{4,3,5}->True},ChartElementFunction->PlaneBar, ChartStyle->"DarkRainbow",ViewPoint->{-5.17,-8.34,3.42},FaceGrids->None,Axes->None,ChartLegends->{"Tim","John","Mary"}]

OpenersExampleSubsection9(Spacer1)ChartLabels  (8)

By default, labels are placed in the axis:

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartLabels->{"a","b","c"}]

(RefLink[Labeled, paclet:ref/Labeled]) wrappers in data will place additional labels:

RectangleChart3D[{{3,4,4},{3,6,3},Labeled[{4,3,5},"label",Center]},ChartLabels->{"a","b","c"}]

Use (RefLink[Placed, paclet:ref/Placed]) to control label placement:

Table[RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartLabels->Placed[{"a","b","c"},p],PlotLabel->p,Ticks->None],{p,{Bottom,Center,Top}}]

Symbolic positions outside the bar:

Table[RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartLabels->Placed[{"a","b","c"},p],PlotLabel->p,Ticks->None],{p,{Below,Above}}]

Coordinate-based placement relative to a bar:

Table[RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartLabels->Placed[{"aa","bb","cc"},p],BarSpacing->0.5,Ticks->None,PlotLabel->p],{p,{{0,0,0},{1/2,1/2,1/2},{1,1,1}}}]

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

Table[RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartLabels->Placed[Framed/@{"a","b","c"},{{1,1,1},p}],BarSpacing->0.8,Ticks->None,PlotLabel->p],{p,{{0,0},{.5,.5},{1,1}}}]

Use the third argument to (RefLink[Placed, paclet:ref/Placed]) to control formatting:

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartLabels->Placed[{"aaa","bbb","ccc"},Center,Rotate[#,45Degree]&]]

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartLabels->Placed[{"aaa","bbb","ccc"},Center,Framed[#,FrameMargins->1,Background->LightYellow]&]]

By default, labels are associated with columns of data:

data={{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}};

{RectangleChart3D[data,ChartLabels->{"c1","c2","c3"}],
RectangleChart3D[data,ChartLabels->{None,{"c1","c2","c3"}}]}

Associate labels with rows or datasets:

RectangleChart3D[data,ChartLabels->{{"r1","r2"},None}]

Label both rows and columns:

RectangleChart3D[data,ChartLabels->{{"r1","r2"},{"c1","c2","c3"}}]

Use (RefLink[Placed, paclet:ref/Placed]) to affect placements:

RectangleChart3D[data,ChartLabels->{Placed[{"r1","r2"},Below],Placed[{"c1","c2","c3"},Center]}]

Place multiple labels:

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartLabels->Placed[{{"a","b","c"},{"x","y","z"}},{Top,Bottom}]]

OpenersExampleSubsection10(Spacer1)ChartLegends  (6)

Generate a legend based on chart style:

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartStyle->"SandyTerrain",ChartLegends->{"John","Mary","Bob"}]

Use (RefLink[Legended, paclet:ref/Legended]) to add additional legend entries:

RectangleChart3D[{{{2,3,3},Legended[Style[{1,2,2},Red],"Henry"],{1,1,1}},{{1,3,2},{2,1,1}}},ChartStyle->"SandyTerrain",ChartLegends->{"John","Mary","Bob"}]

Use (RefLink[Legended, paclet:ref/Legended]) to specify individual legend entries:

RectangleChart3D[{{3,4,4},Legended[{3,6,3},"Mary"],{4,3,5}},ChartStyle->"SandyTerrain"]

Generate a legend for datasets:

data={{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}};

RectangleChart3D[data,ChartLegends->{{"Group A","Group B"},None},ChartStyle->{"SandyTerrain",None}]

Unused legend labels are dropped:

RectangleChart3D[data,ChartLegends->{{"Group A","Group B","Group C"},None},ChartStyle->{"SandyTerrain",None}]

Legends can be applied to several dimensions:

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},ChartLegends->{{"Test A","Test B"},{"John","Mary","Bob"}},ChartStyle->{{EdgeForm[Dashed],EdgeForm[Dotted]},"SandyTerrain"}]

Use (RefLink[Placed, paclet:ref/Placed]) to control the placement of legends:

data={{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}};

Table[RectangleChart3D[data,ChartLegends->Placed[{"John","Mary","Bob"},pos],ChartStyle->"SandyTerrain"],{pos,{Below,Above}}]

Table[RectangleChart3D[data,ChartLegends->Placed[{"John","Mary","Bob"},pos],ChartStyle->"SandyTerrain"],{pos,{Left,Right}}]

OpenersExampleSubsection11(Spacer1)ChartStyle  (7)

Use (RefLink[ChartStyle, paclet:ref/ChartStyle]) to set the style:

Table[RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartStyle->s],{s,{Gray,Opacity[0.7],Directive[Gray,Opacity[0.7]]}}]

Give a list of styles:

data={{3,4,4},{3,6,3},{4,3,5}};

RectangleChart3D[data,ChartStyle->{Red,Green,Blue}]

Use "Gradient" colors from (RefLink[ColorData, paclet:ref/ColorData]):

RectangleChart3D[data,ChartStyle->"Pastel"]

Use "Indexed" colors from (RefLink[ColorData, paclet:ref/ColorData]):

RectangleChart3D[data,ChartStyle->24]

Styles are used cyclically:

RectangleChart3D[Tuples[{1,2},3],ChartStyle->{Red,Green}]

Style each column of data:

data={{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}};

RectangleChart3D[data,ChartStyle->{Red,Green,Blue}]

Style each row of data:

RectangleChart3D[data,ChartStyle->{{Red,Green},None}]

Style both rows and columns of data:

RectangleChart3D[data,ChartStyle->{{Directive[{EdgeForm[GrayLevel[0.8]],Opacity[0.5]}],EdgeForm[]},{Red,Green,Blue}}]

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

RectangleChart3D[data,ChartStyle->{{Yellow,Magenta},{Red,Green,Blue}}]

(RefLink[Style, paclet:ref/Style]) overrides settings for (RefLink[ChartStyle, paclet:ref/ChartStyle]):

RectangleChart3D[{{3,4,4},{3,6,3},Style[{4,3,5},Yellow]},ChartStyle->{Red,Green,Blue}]

(RefLink[ColorFunction, paclet:ref/ColorFunction]) overrides settings for (RefLink[ChartStyle, paclet:ref/ChartStyle]):

data={{3,4,4},{3,6,3},{4,3,5}};

RectangleChart3D[data,ChartStyle->{Red,Green,Blue},ColorFunction->"SolarColors"]

With different style effects, the settings combine:

RectangleChart3D[Table[{Exp[-t^2],Exp[-t^2],Exp[-t^2]},{t,-2,2,0.25}],ChartStyle->"SolarColors",ColorFunction->Function[{x,y,z},Opacity[z]]]

(RefLink[ChartElements, paclet:ref/ChartElements]) with explicit style settings overrides settings for (RefLink[ChartStyle, paclet:ref/ChartStyle]):

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},ChartElements->Graphics3D[{Orange,Cylinder[]}],ChartStyle->"Pastel"]

OpenersExampleSubsection12(Spacer1)ColorFunction  (3)

Color by bar width, depth, and height:

RectangleChart3D[Table[{Exp[-t^2],Exp[-t^2],Exp[-t^2]},{t,-2,2,0.25}],ColorFunction->Function[{x,y,z},Hue[x,y,1,z]]]

Use "Gradient" colors from (RefLink[ColorData, paclet:ref/ColorData]):

RectangleChart3D[Table[{Exp[-t^2],Exp[-t^2],Exp[-t^2]},{t,-2,2,0.25}],ColorFunction->"SolarColors"]

Use (RefLink[ColorFunctionScaling, paclet:ref/ColorFunctionScaling])->(RefLink[False, paclet:ref/False]) to get unscaled width, depth, and height values:

RectangleChart3D[{{1,1,1},{2,2,2},{1,2,1}},ColorFunction->(Switch[{#1,#2,#3},{1,1,1},Yellow,{2,2,2},Orange,{1,2,1},Red,_,Blue]&),ColorFunctionScaling->False]

Color by volume:

RectangleChart3D[{{1,1,1},{1,1,2},{1,2,1},{1,2,2},{2,1,1},{2,1,2},{2,2,1},{2,2,2}},ColorFunction->Function[{x,y,z},ColorData["Rainbow"][x y z/8]],ColorFunctionScaling->False]

(RefLink[ColorFunction, paclet:ref/ColorFunction]) overrides settings for (RefLink[ChartStyle, paclet:ref/ChartStyle]):

RectangleChart3D[Tuples[{1,2},3],ChartStyle->{Red,Green,Blue},ColorFunction->(GrayLevel[Mean[{##}]]&)]

OpenersExampleSubsection13(Spacer1)ColorFunctionScaling  (2)

By default, scaled height values are used:

BarChart3D[{{1,2,2},{1,1,1},{2,3,3}},ColorFunction->(Lighter[Brown,0.9#]&)]

Use (RefLink[ColorFunctionScaling, paclet:ref/ColorFunctionScaling])->(RefLink[False, paclet:ref/False]) to get unscaled height values:

RectangleChart3D[{{1,1,1},{2,2,2},{1,2,1}},ColorFunction->(Switch[{#1,#2,#3},{1,1,1},Yellow,{2,2,2},Orange,{1,2,1},Red,_,Blue]&),ColorFunctionScaling->False]

OpenersExampleSubsection14(Spacer1)ChartLayout  (2)

(RefLink[ChartLayout, paclet:ref/ChartLayout]) is "Grouped" by default:

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},ChartLayout->"Grouped"]

Use stepped bars:

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},ChartLayout->"Stepped"]

OpenersExampleSubsection15(Spacer1)LabelingFunction  (7)

Use automatic labeling by values through (RefLink[Tooltip, paclet:ref/Tooltip]) and (RefLink[StatusArea, paclet:ref/StatusArea]):

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},LabelingFunction->Automatic]

Do no automatic labeling:

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},LabelingFunction->None]

Use (RefLink[Placed, paclet:ref/Placed]) to control label placement:

Table[RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},LabelingFunction->p,PlotLabel->p,Ticks->None],{p,{Bottom,Center,Top}}]

Symbolic positions outside the bar:

Table[RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},LabelingFunction->p,PlotLabel->p,Ticks->None],{p,{Below,Above}}]

Coordinate-based placement relative to a bar:

Table[RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},LabelingFunction->p,BarSpacing->0.5,Ticks->None,PlotLabel->p],{p,{{0,0,0},{1/2,1/2,1/2}}}]

Control the formatting of labels:

RectangleChart3D[{{3,4,4},{3,6,3},{4,3,5}},LabelingFunction->(Function[{v},Placed[Style[Grid[{{"w",v[[1]]},{"d",v[[2]]},{"h",v[[3]]}}]],Center]])]

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

labeler=Placed[Row[{#3[[1,1]],#3[[2,1]],#1},","],Tooltip]&;

RectangleChart3D[{{{2,3,3},{1,2,2},{1,1,1}},{{1,3,2},{2,1,1}}},ChartLabels->{Placed[{"r1","r2"},Bottom],Placed[{"c1","c2","c3"},Center]},LabelingFunction->labeler]

OpenersExampleSubsection16(Spacer1)PerformanceGoal  (3)

Generate a bar chart with interactive highlighting:

RectangleChart3D[Tuples[{1,2,3},3],PerformanceGoal->"Quality"]

Emphasize performance by disabling interactive behaviors:

RectangleChart3D[Tuples[{1,2,3},3],PerformanceGoal->"Speed"]

Typically less memory is required for noninteractive charts:

Table[ByteCount@RectangleChart3D[Tuples[{1,2,3},3],PerformanceGoal->p],{p,{"Quality","Speed"}}]

OpenersExampleSubsection17(Spacer1)PlotTheme  (1)

Use a theme with detailed frame ticks and grid lines:

RectangleChart3D[{{5,3,1},{3,4,3},{2,5,4}},PlotTheme->"Detailed"]

Turn off the grid lines:

RectangleChart3D[{{5,3,1},{3,4,3},{2,5,4}},PlotTheme->"Detailed",FaceGrids->None]

OpenersExampleSection3(Spacer1)Applications  (3)

Compare the dollar value produced by each widget maker:

data=({{"Frank", 3, 23, 193}, {"Susan", 17, 14, 78}, {"Peter", 7, 5, 170}, {"Anne", 10, 7, 110}, {"John", 5, 17, 53}});

Mouse over the bars for the employee names:

RectangleChart3D[data[[All,2;;4]],BarSpacing->{0,0},ChartLabels->Placed[data[[All,1]],Tooltip],AxesLabel->{"widgets / hour","hours worked","dollar value per widget"}]

Click on the bars to hear the country name, GDP per capita, poverty fraction, and population:

countries={"Kenya","Peru","Senegal","SriLanka","Zimbabwe"};
properties={"GDPPerCapita","PovertyFraction","Population"};

data=Table[With[{v=cp},Button[v[[2;;4]],Speak[StringJoin[ToString/@{v[[1]],", GDP per capita: $",Round[v[[2]]],", Poverty Fraction: ",v[[3]],", Population: ",Round[v[[4]]10^6]}]]]],{cp,Table[Prepend[Table[CountryData[c,p],{p,properties}]*{1,1,10^(-6)},c],{c,countries}]}];

RectangleChart3D[data,ChartStyle->"Rainbow",BarSpacing->1,ChartLabels->Placed[countries,Tooltip]]

Get the data for G15 countries:

countries=CountryData["G15"];
properties={"FemaleAdultPopulation","TotalFertilityRate","FemaleLifeExpectancy"};
data={#1  10^-6,#2 ,#3}&@@@Table[CountryData[c,p],{c,countries},{p,properties}];

Mouse over the bars to get the name of the country:

RectangleChart3D[data,ChartLabels->Placed[countries,Tooltip],BarSpacing->{0,0},ViewPoint->{3,-9,4},AxesLabel->properties,ChartStyle->24]

OpenersExampleSection4(Spacer1)Properties & Relations  (2)

Use (RefLink[RectangleChart3D, paclet:ref/RectangleChart3D]) to get a 3D rendering of a (RefLink[RectangleChart, paclet:ref/RectangleChart]):

{RectangleChart[{{1,1},{1,2},{2,3}}],RectangleChart3D[{{1,1,1},{1,1,2},{2,1,3}}]}

Use (RefLink[SectorChart3D, paclet:ref/SectorChart3D]) and (RefLink[BubbleChart, paclet:ref/BubbleChart]) as alternative visualizations:

Table[f[{{3,4,4},{3,6,3},{4,3,5}}],{f,{RectangleChart3D,SectorChart3D,BubbleChart}}]

OpenersExampleSection5(Spacer1)Neat Examples  (1)

Chartwork:

RectangleChart3D[RandomReal[1,{30,30,3}],ChartLayout->"Stacked",ChartElementFunction->"Cube",Axes->None,BarSpacing->{0,1},PlotTheme->"Marketing",PerformanceGoal->"Speed",Method->{"Canvas"->None},FaceGrids->None]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[RectangleChart, paclet:ref/RectangleChart])  ▪  (RefLink[BarChart3D, paclet:ref/BarChart3D])  ▪  (RefLink[BarChart, paclet:ref/BarChart])  ▪  (RefLink[SectorChart, paclet:ref/SectorChart])  ▪  (RefLink[SectorChart3D, paclet:ref/SectorChart3D])  ▪  (RefLink[ListPlot3D, paclet:ref/ListPlot3D])  ▪  (RefLink[ListPointPlot3D, paclet:ref/ListPointPlot3D])  ▪  (RefLink[Cuboid, paclet:ref/Cuboid])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Charting and Information Visualization, paclet:guide/ChartingAndInformationVisualization])}})}})