({{, (RefLink[ChartElements, paclet:ref/ChartElements]) 
is an option to charting functions such as (RefLink[BarChart, paclet:ref/BarChart]) that specifies the graphics to use as the basis for bars or other chart elements. }})

OpenersNotesSection(Spacer1)Details

Elements in charts can be based on any (RefLink[Graphics, paclet:ref/Graphics]), (RefLink[Graphics3D, paclet:ref/Graphics3D]), or (RefLink[Image, paclet:ref/Image]) object.

The final rendered form of each chart element is obtained by replicating or stretching copies of the base object so as to fill the necessary shape or region.

The following settings for (RefLink[ChartElements, paclet:ref/ChartElements]) can be used:

With a chart element specification of the form {g,{w,h}}, the following width and height specifications can be given:

Settings for (RefLink[ImageSize, paclet:ref/ImageSize]) and (RefLink[AspectRatio, paclet:ref/AspectRatio]) in g are ignored when rendering chart elements, except when w or h is (RefLink[Automatic, paclet:ref/Automatic]).

When objects g are rendered for chart elements, their base styles are inherited from the styles defined for each chart element.

Settings for (RefLink[BarOrigin, paclet:ref/BarOrigin]) and similar options do not affect either the orientation in which objects g are rendered or the identification of w and h as width and height.

With (RefLink[ChartElements, paclet:ref/ChartElements])->{(Subscript[g, 1]),(Subscript[g, 2]),…}, the (Subscript[g, i]) are used cyclically to render the chart elements for successive elements in each dataset.

With (RefLink[ChartElements, paclet:ref/ChartElements])->{(Subscript[spec, 1]),(Subscript[spec, 2]),…}, the (Subscript[spec, i]) are used as chart element specifications for successive dimensions in nested lists of datasets.

(RefLink[ChartElements, paclet:ref/ChartElements])->{(Subscript[g, 1]),(Subscript[g, 2]),…} is effectively taken to give a specification for the innermost dimension of nested lists of datasets.

OpenersPrimaryExamplesSection(Spacer1)Examples  (2)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

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

BarChart[{1,2,3,4},ChartElements->Graphics[Disk[]]]

(RefLink[Graphics3D, paclet:ref/Graphics3D]):

BarChart[{1,2,3},ChartElements->Graphics3D[Sphere[]]]

(RefLink[Image, paclet:ref/Image]):

BarChart[{1,2,3},ChartElements->ExampleData[{"TestImage","House"}]]

Create 3D pictorial bars:

BarChart3D[{1,2,3,4},ChartElements->Graphics3D[Sphere[]]]

g=ExampleData[{"Geometry3D","Cow"}];

BarChart3D[Range[5],ChartElements->g,ChartStyle->"Pastel"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ChartElementFunction, paclet:ref/ChartElementFunction])  ▪  (RefLink[ChartStyle, paclet:ref/ChartStyle])  ▪  (RefLink[ChartLayout, paclet:ref/ChartLayout])  ▪  (RefLink[BarChart, paclet:ref/BarChart])  ▪  (RefLink[BarChart3D, paclet:ref/BarChart3D])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Chart Styling & Layout, paclet:guide/ChartLayoutAndStyling])}, {▪(RefLinkPlain[Charting and Information Visualization, paclet:guide/ChartingAndInformationVisualization])}, {▪(RefLinkPlain[Chart Labeling, Legending & Annotation, paclet:guide/ChartLabelingLegendingAndAnnotation])}})}})