This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

RectangleChart

RectangleChart
makes a rectangle chart with bars of width and height .
RectangleChart
makes a rectangle chart with bar features defined by the symbolic wrappers .
RectangleChart
makes a rectangle chart from multiple datasets .
{xi,yi}pure bar width and height
wi[{xi,yi},...]a bar with size and wrapper
formi->mia bar form with metadata
  • Data not given in these forms is ignored in forming the rectangle chart.
{e1,e2,...}list of elements with or without wrappers
w[{e1,e2,...},...]wrapper applied to a whole dataset
w[{data1,data1,...},...]wrapper applied to all datasets
  • 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
Top,Bottom,Left,Right,Centerpositions within bars
Above,Below, Before, Afterpositions outside bars
Axison the bar origin axis
{{bx,by},{lx,ly}}scaled position in the label at scaled position in the bar
AspectRatio1/GoldenRatiooverall ratio of width to height
AxesTruewhether to draw axes
BarOriginBottomorigin of bars
BarSpacingAutomaticspacing between bars
ChartBaseStyleAutomaticoverall style for bars
ChartElementsAutomaticgraphics to use for each of the bars
ChartElementFunctionAutomatichow to generate raw graphics for bars
ChartLabelsNonelabels for data elements and datasets
ChartLayoutAutomaticoverall layout to use
ChartLegendsNonelegends for data elements and datasets
ChartStyleAutomaticstyle for bars
ColorFunctionAutomatichow to color bars
ColorFunctionScalingTruewhether to normalize arguments to ColorFunction
LabelingFunctionAutomatichow to label bars
LegendAppearanceAutomaticoverall appearance of legends
PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
  • The arguments supplied to ChartElementFunction are the bar region , the data value , and metadata from each level in a nested list of datasets.
Generate a rectangle chart for a list of width and height pairs:
Multiple datasets:
Use categorical labels:
Categorical legends:
Set the style for bars:
Pictorial bars:
Procedural bars:
Generate a rectangle chart for a list of width and height pairs:
In[1]:=
Click for copyable input
Out[1]=
 
Multiple datasets:
In[1]:=
Click for copyable input
Out[1]=
 
Use categorical labels:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
Categorical legends:
In[3]:=
Click for copyable input
Out[3]=
 
Set the style for bars:
In[1]:=
Click for copyable input
Out[1]=
Pictorial bars:
In[2]:=
Click for copyable input
Out[2]=
Procedural bars:
In[3]:=
Click for copyable input
Out[3]=
Items in a dataset are grouped together:
Datasets do not need to have the same number of items:
Non-real data is taken to be missing:
Use different layouts to display multiple datasets:
Control the origin of bars:
Adjust the spacing between bars and groups of bars:
Use wrappers on individual data, datasets, or collections of datasets:
Wrappers can be nested:
Override the default tooltips:
Use any object in the tooltip:
Use PopupWindow to provide additional drilldown information:
Button can be used to trigger any action:
Use an explicit list of styles for the bars:
Use any gradient or indexed color schemes from ColorData:
Use color schemes designed for charting:
ChartBaseStyle can be used to set an initial style for all chart elements:
Style can be used to override styles:
Use any graphic for pictorial bars:
Use built-in programmatically generated bars:
For detailed settings use PalettesChartElementSchemes:
Use Labeled to add a label to a bar:
Use symbolic positions for label placement:
Provide categorical labels for the columns of data:
For rows of data:
For both:
Use Placed to control the positioning of labels, using the same positions as for Labeled:
Provide value labels for bars by using LabelingFunction:
Use Placed to control placement and formatting:
Add categorical legend entries for the columns of data:
For rows of data:
Use Legended to add additional legend entries:
Use Placed to affect the positioning of legends:
Change the bar origin:
Use automatically determined spacing between bars:
Use no spacing:
Use symbolic presets:
Use explicit spacing between bars:
Use explicit spacing between bars and groups of bars:
Use ChartBaseStyle to style all bars:
ChartBaseStyle combines with ChartStyle:
ChartStyle may override settings for ChartBaseStyle:
ChartBaseStyle combines with Style:
Style may override settings for ChartBaseStyle:
ColorFunction may override settings for ChartBaseStyle:
Create a pictorial chart based on any Graphics object:
Use a stretched version of the graphic:
Use explicit sizes for width and height:
Without AspectRatio->Full, the original aspect ratio is preserved:
Using All for width or height causes that direction to stretch to the full size of the bar:
Use a different graphic for each column of data:
Use a different graphic for each row of data:
Graphics are used cyclically:
Styles are inherited from styles set through ChartStyle etc:
Explicit styles set in the graphic will override other style settings:
The orientation of the pictorial graphic is unaffected by BarOrigin:
Create true 3D shaded bars:
Get a list of built-in settings for ChartElementFunction:
For detailed settings use PalettesChartElementSchemes:
Here is a ChartElementFunction appropriate to show the global scale:
Write a custom ChartElementFunction:
Use metadata passed on from the input, in this case charting the data:
By default labels are placed in the axis:
Labeled wrappers in data will place additional labels:
Use Placed to control label placement:
Positions outside the bar:
Coordinate-based placement relative to a bar:
Place all labels at the upper-right corner and vary the coordinates within the label:
Use the third argument to Placed to control formatting:
Use a hyperlink label:
Rotate the labels:
By default labels are associated with columns of data:
Associate labels with rows or datasets:
Label both rows and columns:
Use Placed to affect placements:
Place multiple labels:
ChartLayout is grouped by default:
Use stepped bars:
Generate a legend based on chart style:
Use Legended to add additional legend entries:
Or to specify individual legend entries:
Generate a legend for datasets:
Unused legend labels are dropped:
Legends can be applied to several dimensions:
Use Placed to control the placement of legends:
Use ChartStyle to style bars:
Give a list of styles:
Use "Gradient" colors from ColorData:
Use "Indexed" colors from ColorData:
Styles are used cyclically:
Style each column of data:
Style each row of data:
Style both rows and columns of data:
With both row and column styles the last style may override earlier ones:
Style overrides settings for ChartStyle:
ColorFunction overrides settings for ChartStyle:
ChartElements with explicit style settings override settings for ChartStyle:
Color by bar height:
Use ColorFunctionScaling->False to get unscaled height values:
Color by area:
ColorFunction overrides styles in ChartStyle:
Use ColorFunction to combine different style effects:
Use ColorFunctionScaling->False to get unscaled height values:
Color by area:
Use automatic labeling by values through Tooltip and StatusArea:
Do no labeling:
Use Placed to control label placement:
Symbolic positions outside the bar:
Coordinate-based placement relative to a bar:
Control the formatting of labels:
Use the given chart labels as arguments to the labeling function:
Place complete labels as tooltips:
Generate a bar chart with interactive highlighting:
Emphasize performance by disabling interactive behaviors:
Typically less memory is required for non-interactive charts:
Move the slider to see how the left Riemann sum of in approaches :
Create an overlapped proportional area chart:
Create a rectangle chart of the atomic weight and abundance of elements in the Earth's crust:
Mouse over the bars to get the element names:
Compare sales and profitability:
Label the exact values on the axis:
Click the bars to hear the name of the country, its GDP per capita, and population:
Compare e reduction potential against the cost of various technologies:
Mouse over the bars for the corresponding technology name:
Create a rectangle chart of average hourly earnings of persons employed on works projects:
Create a chart of the proportion of the working population covered by insurance:
Visualize units sold and where they were sold:
Compare GDP per capita to population among a list of European countries:
Mouse over the rectangles to get a summary for each country:
Mouse over the rectangles to get a summary for each country:
Visually screen companies by comparing forward earnings and PE ratios:
Define a labeling function to place company information in a tooltip:
Mouse over the bars to get company information:
Create bar codes:
Use RectangleChart3D to get a 3D rendering of a RectangleChart:
BarChart is a special case of RectangleChart:
Use SectorChart to visualize a list of data as sectors:
Use Histogram3D to automatically compute binning and draw histograms:
Chartwork:
New in 7