ChartElements

ChartElements

is an option to charting functions such as BarChart that specifies the graphics to use as the basis for bars or other chart elements.

Details

  • Elements in charts can be based on any Graphics, Graphics3D, or 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 ChartElements can be used:
  • Noneleave chart elements blank
    Automaticuse a preset default graphic
    gfill chart elements with copies of g
    {g,All}stretch a single g to fill each chart element
    {g,{w,h}}use copies of g with width w and height h
    {g1,g2,}use gi for the i^(th) element in each dataset
    {spec1,spec2,}use different specifications for different data dimensions
  • With a chart element specification of the form {g,{w,h}}, the following width and height specifications can be given:
  • sexplicit size in ordinary plot coordinates
    Scaled[s]size given as a fraction of the chart element region
    Automaticsize determined by the original aspect ratio of g
    Allsize that fills the chart element region
  • Settings for ImageSize and AspectRatio in g are ignored when rendering chart elements, except when w or h is Automatic.
  • When objects g are rendered for chart elements, their base styles are inherited from the styles defined for each chart element.
  • Settings for 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 ChartElements->{g1,g2,}, the gi are used cyclically to render the chart elements for successive elements in each dataset.
  • With ChartElements->{spec1,spec2,}, the speci are used as chart element specifications for successive dimensions in nested lists of datasets.
  • ChartElements->{g1,g2,} is effectively taken to give a specification for the innermost dimension of nested lists of datasets.

Examples

Basic Examples  (2)

Create a pictorial chart based on any Graphics object:

Graphics3D:

Image:

Create 3D pictorial bars:

Wolfram Research (2008), ChartElements, Wolfram Language function, https://reference.wolfram.com/language/ref/ChartElements.html.

Text

Wolfram Research (2008), ChartElements, Wolfram Language function, https://reference.wolfram.com/language/ref/ChartElements.html.

CMS

Wolfram Language. 2008. "ChartElements." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ChartElements.html.

APA

Wolfram Language. (2008). ChartElements. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ChartElements.html

BibTeX

@misc{reference.wolfram_2024_chartelements, author="Wolfram Research", title="{ChartElements}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/ChartElements.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_chartelements, organization={Wolfram Research}, title={ChartElements}, year={2008}, url={https://reference.wolfram.com/language/ref/ChartElements.html}, note=[Accessed: 21-November-2024 ]}