Big Faceless Graph Library 2.3 Tag Documentation - Copyright © 2006 Big Faceless Organization

stackedbarseries

Description

The "stackedbarseries" tag can be used to combine several "barseries" into one vertical stack. Often you will use a Key to describe what each layer means.

Valid Children

barseries+ marker* label* line*

Examples

Example: an example of a stacked bar series
<axesgraph width="300" height="300">
  <stackedbarseries name="Fruit Consumption by Year">
    <barseries name="2001">
      <data x="Apples" y="5" />
      <data x="Oranges" y="7" />
    </barseries>
    <barseries name="2002">
      <data x="Apples" y="8" />
      <data x="Oranges" y="3" />
    </barseries>
  </stackedbarseries>
  <key align="right" />
</axesgraph>

See Also

Attributes

barwidth Real > 0 <= 1 optional XML / Tag Library

Description

The width of a bar. A value of "1" means the bars are so wide they touch each other. Setting the "barwidth" attribute on a "stackedbarseries" is the same as setting it on all its barseries children.
bardepth Real > 0 <= 1 optional XML / Tag Library

Description

The depth of a bar, for when bars are displayed in 3D. A value of "1" means the bars are so deep neighbouring rows touch eachother.
topbarwidth Real >= 0 <= 1 optional XML / Tag Library

Description

The topbarwidth and bottombarwidth attributes can be set to shape the bar into a "pyramid" shape. Both attributes must be specified, and the middlebarwidth may also be specified to create a "funnel" shape. A value of 1 means full width, a value of 0 means the box will taper to a point. This attribute can also be set on the individual barseries used to make up this stackedbarseries.

Examples

Example: Use topbarwidth and bottombarwidth to create a pyramid chart
<axesgraph width="300" height="300">
  <stackedbarseries name="Pyramid" topbarwidth="0" bottombarwidth="1">
   <barseries name="x"><data key="x" value="2" /></barseries>
   <barseries name="x"><data key="x" value="3" /></barseries>
   <barseries name="x"><data key="x" value="4" /></barseries>
  </stackedbarseries>
  <axes pos="bottom" type="null" color="none" />
  <axes pos="left" type="null" color="none" />
</axesgraph>
bottombarwidth Real >= 0 <= 1 optional XML / Tag Library

Description

The topbarwidth and bottombarwidth attributes can be set to shape the bar into a "pyramid" shape. See the topbarwidth attribute for more information and an example.
bargap Real >= 0 optional XML / Tag Library

Description

The bargap attribute can be used to add a gap between the bars placed in a "stackedbarseries". The default value of 0 results in no gap, or this value can be set to the absolute distance between bars.

Examples

Example: Use bargap to space the bars in a stacked bar series
<axesgraph width="300" height="300">
  <stackedbarseries name="Pyramid" topbarwidth="0" bottombarwidth="1" bargap="0.4">
   <barseries name="A"><data key="A" value="2" /></barseries>
   <barseries name="A"><data key="A" value="3" /></barseries>
   <barseries name="A"><data key="A" value="4" /></barseries>
  </stackedbarseries>
</axesgraph>
name String mandatory XML / Tag Library

Description

Every item in the graph may have a "name", which is how it appears in the Key (if listed) and for some items, how it's refered to in JavaScript. The name is required for Series and optional for other items like markers.
pos (top | bottom) (left | right) optional XML / Tag Library

Description

Which axes to plot the series against on an AxesGraph. This attribute has a default value of "bottom left", which means the series is plotted against the bottom and left axis, but other valid values would be "top left", "bottom right" or "top right".

Examples

Example: Plotting dates against the bottom axis and days of week against the top
<axesgraph width="300" height="300">
  <axis pos="bottom" type="date">
    <teeth rotate="90" align="left middle" />
  </axis>
  <axis pos="top" type="bar" />
  <lineseries pos="bottom left" name="Amount over the year">
    <data x="2003-01-01" y="20" />
    ...
    <data x="2003-12-31" y="17" />
  </lineseries>
  <barseries pos="top left" name="Average amount per weekday">
    <data x="Sun" y="18" />
    ...
    <data x="Sat" y="21" />
  </barseries>
</axesgraph>
Big Faceless Graph Library 2.3 Tag Documentation - Copyright © 2006 Big Faceless Organization