FusionCharts for Flex > XML Reference > Pyramid Chart

Pyramid Chart Specification Sheet

SWF: Pyramid.swf

Quick Links (within this page)
 Chart  Data  Others
 Chart Image
 Chart Objects
 Functional Attributes
 Chart Captions
 Chart Labels & Values
 Legend properties
 Chart Cosmetics
 Sample XML Data
 Pyramid functional properties
 Pyramid cosmetic properties
 <set> element
 Number Formatting
 Font Properties
 Tooltip
 Paddings and Margins
Pyramid Chart
Pyramid Chart
 Sample XML for Pyramid Chart

<chart caption='Sales distribution by Employee' subCaption='Jan 07 - Jul 07' numberPrefix='$' isSliced='1'>
   <set label='Buchanan' value='20000' />
   <set label='Callahan' value='49000' />
   <set label='Davolio' value='63000' />
   <set label='Dodsworth' value='41000' />
   <set label='Fuller' value='74000' />
   <set label='King' value='49000' />
   <set label='Leverling' value='77000' />
   <set label='Peacock' value='54000' />
   <set label='Suyama' value='14000' />
   <styles>
      <definition>
         <style type='font' name='captionFont' size='15' />
      </definition>
      <application>
         <apply toObject='CAPTION' styles='captionFont' />
      </application>
   </styles>
</chart>

Chart Objects

Custom defined Styles can be applied to the chart objects listed below. The table contains the names of the chart objects, short descriptions, list of supported Styles and list of supported animation parameters.
Object Name Description Features Supported Animation Parameters Supported
BACKGROUND Background refers to the background for entire chart.
  • Animation
  • Shadow
  • Glow
  • Bevel
  • Blur
  • _alpha
  • _x
  • _y
  • _xScale
  • _yScale
CANVAS The entire area inside which the chart is plotted.
  • Animation
  • Shadow
  • Glow
  • Bevel
  • Blur
  • _alpha
  • _x
  • _y
  • _xScale
  • _yScale
  • CAPTION CAPTION refers to the heading of the chart.
  • Animation
  • Font
  • Shadow
  • Glow
  • Bevel
  • Blur
  • _alpha
  • _x
  • _y
  • SUBCAPTION Sub-caption of the chart.
  • Animation
  • Font
  • Shadow
  • Glow
  • Bevel
  • Blur
  • _alpha
  • _x
  • _y
  • DATALABELS Funnel labels.
    • Font
     
    DATAPLOT Funnel Slices.
  • Animation
  • Shadow
  • Glow
  • Bevel
  • Blur
  • _alpha
  • _x
  • _y
  • _xScale
  • _yScale
  • TOOLTIP Tooltip for the chart.
    • Font
     
    Back to top Back to Top

    <chart> element Attributes

    Functional Attributes
    These attributes let you control a variety of functional elements on the chart. For example, you can opt to show/hide data labels, data values, y-axis values. You can also set chart limits and extended properties.
    Attribute Name Type / Range Description
    animation Boolean (0/1) This attribute lets you set the configuration whether the chart should appear in an animated fashion. If you do not want to animate any part of the chart, set this as 0.
    defaultAnimation Boolean (0/1) By default, each chart animates some of its elements. If you wish to switch off the default animation patterns, you can set this attribute to 0. It can be particularly useful when you want to define your own animation patterns using STYLE feature.
    clickURL URL in FusionCharts format The entire chart can now act as a hotspot. Use this URL to define the hotspot link for the chart. The link can be specified in FusionCharts Link Format.
    palette Number (1-5) Each chart has 5 pre-defined color palettes which you can choose from. Each palette renders the chart in a different color theme. Valid values are 1-5.
    paletteThemeColor Color Code If you want your own palette derived from a particular hex color, you an specify the same here. All other colors on the chart would automatically derive from that palette.
    annRenderDelay Number (seconds) If you've defined any annotation groups over chart, using this attribute you can set the duration after which they'll render on the chart. The timer starts from the time the chart has initialized.
    showPrintMenuItem Boolean (0/1) Whether to show "Print Chart" item in the context menu of the chart? Even if you opt to hide the item in context menu, you can still opt to invoke print() method of the chart to print the same.
    showAboutMenuItem Boolean (0/1) Setting this to 1 shows up a custom context menu in the chart, which can be customized to show your text and can be linked to your URL. For e.g., you can set the context menu of the chart to include "About your company name" and then link to your company home page. By default, the chart shows "About FusionCharts" when right clicked.
    aboutMenuItemLabel String The menu item label for the custom context menu item.
    aboutMenuItemLink String Link for the custom context menu item. You can specify the link in FusionCharts link format to be able to open the same in new window, pop-ups, frames or as JavaScript links.
    manageResize
    Since v1.3
    Boolean (0/1) Setting this attribute to 1, you can allow the chart to automatically resize itself when the parent container of the chart is resized.
    useEllipsesWhenOverflow
    Since v1.3
    Boolean (0/1) When enabled in AUTO mode, long data labels are truncated by adding ellipses to prevent them from overflowing the chart background. The default value is 1.
    Back to top Back to Top

    Chart captions
    Using these attributes, you can set the various headings and titles of chart like caption, sub-caption.
    Attribute Name Type / Range Description
    caption String Caption of the chart.
    subCaption String Sub-caption of the chart.
    Back to top Back to Top

    Chart Labels & Values
    Data labels refer to the names for the data points which appear on the x-axis and data values refer to the plot values.
    Attribute Name Type / Range Description
    showLabels Boolean (0/1) It sets the configuration whether the pyramid labels will be displayed or not.
    showLabelsAtCenter Boolean (0/1) Whether to show the labels of each pyramid at its side or at the center?
    labelDistance Number (Pixels) Lets you set the horizontal distance between the data labels & pyramid slices.
    labelSepChar String If you've opted to show both pyramid label & value, this attribute lets you specify the character using which they'll be separated.
    enableSmartLabels Boolean (0/1) Whether to use smart lines & labels for the pyramid chart?
    smartLineColor Color Code If you've opted to use smart lines, this attribute lets you define the color for the same.
    smartLineThickness Number (Pixels) Thickness of smart lines (label).
    smartLineAlpha Number (0-100) Alpha of the smart lines.
    showValues Boolean (0/1) Sets the configuration whether data values would be displayed along with the pyramid slices on chart.
    showPercentValues Boolean (0/1) Whether to show the values as percentage or as absolute values?
    Back to top Back to Top

    Number Formatting Properties
     

    Using the attributes below, you can control a myriad of options like:

    • Formatting of commas and decimals
    • Number prefixes and suffixes
    • Decimal places to which the numbers will round to
    • Scaling of numbers based on a user defined scale
    • Custom number input formats

    Attribute Name Type / Range Description
    formatNumber Boolean (0/1) This configuration determines whether the numbers displayed on the chart will be formatted using commas, e.g., 40,000 if formatNumber='1' and 40000 if formatNumber='0'
    numberPrefix String Using this attribute, you could add prefix to all the numbers visible on the graph. For example, to represent all dollars figure on the chart, you could specify this attribute to ' $' to show like $40000, $50000. For more details, please see Advanced Number Formatting section.
    numberSuffix String Using this attribute, you could add suffix to all the numbers visible on the graph. For example, to represent all figure quantified as per annum on the chart, you could specify this attribute to ' /a' to show like 40000/a, 50000/a. For more details, please see Advanced Number Formatting section.
    decimals Number Number of decimal places to which all numbers on the chart would be rounded to.
    forceDecimals Boolean (0/1) Whether to add 0 padding at the end of decimal numbers? For example, if you set decimals as 2 and a number is 23.4. If forceDecimals is set to 1, FusionCharts will convert the number to 23.40 (note the extra 0 at the end)
    formatNumberScale Boolean (0/1) Configuration whether to add K (thousands) and M (millions) to a number after truncating and rounding it - e.g., if formatNumberScale is set to 1, 1043 would become 1.04K (with decimals set to 2 places). Same with numbers in millions - an M will added at the end. For more details, please see Advanced Number Formatting section.
    defaultNumberScale String The default unit of the numbers that you're providing to the chart. For more details, please see Advanced Number Formatting section.
    numberScaleUnit String Unit of each block of the scale. For more details, please see Advanced Number Formatting section.
    numberScaleValue String Range of the various blocks that constitute the scale. For more details, please see Advanced Number Formatting section.
    scaleRecursively Boolean (0/1) Whether to scale the number recursively? For more details, please see Advanced Number Formatting section.
    maxScaleRecursion Number How many recursions to complete during recursive scaling? -1 completes the entire set of recursion.
    scaleSeparator String What character to use to separte the scales that generated after recursion?
    decimalSeparator String This option helps you specify the character to be used as the decimal separator in a number. For more details, please see Advanced Number Formatting section.
    thousandSeparator String This option helps you specify the character to be used as the thousands separator in a number. For more details, please see Advanced Number Formatting section.
    inDecimalSeparator String In some countries, commas are used as decimal separators and dots as thousand separators. In XML, if you specify such values, it will give a error while converting to number. So, FusionCharts accepts the input decimal and thousand separator from user, so that it can covert it accordingly into the required format. This attribute lets you input the decimal separator. For more details, please see Advanced Number Formatting section.
    inThousandSeparator String In some countries, commas are used as decimal separators and dots as thousand separators. In XML, if you specify such values, it will give a error while converting to number. So, FusionCharts accepts the input decimal and thousand separator from user, so that it can covert it accordingly into the required format. This attribute lets you input the thousand separator. For more details, please see Advanced Number Formatting section.
    Back to top Back to Top

    Pyramid Functional Properties
    The following attributes are used to customize the functional properties of the pyramid.
    Attribute Name Type / Range Description
    is2D Boolean (0/1) Whether the chart will render as 2D?
    isSliced Boolean (0/1) Whether all pyramid slices will be sliced out?
    pyramidYScale Number (0-40) Lets you set the 3D perspective of the pyramid. You'll need to restrict your values to a value between 0 and 40 (depending on your pyramid chart dimensions) to get a proper drawing.
    Back to top Back to Top

    Pyramid Cosmetic properties
     
    The following attributes are used to customize the appearance of the pyramid.
    Attribute Name Type / Range Description
    showPlotBorder Boolean (0/1) If you've rendered the pyramid chart in 2D mode, you can opt to show or hide the pyramid border using this attribute.
    plotBorderColor Color Code Border color for pyramid (only when rendered in 2D mode).
    plotBorderThickness Number (pixels) Border thickness for pyramid (only when rendered in 2D mode).
    plotBorderAlpha Number (0-100) Border alpha of pyramid slices (only when rendered in 2D mode).
    plotFillAlpha Number (0-100) Fill alpha for the pyramid slices.
    Back to top Back to Top

    Chart Cosmetics
    The following attributes let you configure chart cosmetics like background color, background alpha, canvas color & alpha etc.
    Attribute Name Type / Range Description
    bgColor Color Code This attribute sets the background color for the chart. You can set any hex color code as the value of this attribute. To specify a gradient as background color, separate the hex color codes of each color in the gradient using comma. Example: FF5904,FFFFFF. Remember to remove # and any spaces in between. See the gradient specification page for more details.
    bgAlpha Number (0-100) Sets the alpha (transparency) for the background. If you've opted for gradient background, you need to set a list of alpha(s) separated by comma. See the gradient specification page for more details.
    bgRatio Numbers separated by comma If you've opted for a gradient background, this attribute lets you set the ratio of each color constituent. See the gradient specification page for more details.
    bgAngle Number (0-360) Angle of the background color, in case of a gradient. See the gradient specification page for more details.
    showBorder Boolean (0/1) Whether to show a border around the chart or not?
    borderColor Color Code Border color of the chart.
    borderThickness Number (Pixels) Border thickness of the chart.
    borderAlpha Number (0-100) Border alpha of the chart.
    bgImage

    or

    bgSWF - deprecated
    String To place any image (JPG/PNG/GIF) or Flash movie (SWF) as background of the chart, enter the (path and) name of the background image or SWF file. It should be in the same domain as the chart.
    bgImageAlpha

    or

    bgSWFAlpha - deprecated
    Number (0-100) Helps you specify the opacity for the loaded background image or Flash movie.
    bgImageDisplayMode
    Since v1.3
    String (stretch, tile, fit, fill, center, none) Helps you specify the mode in which the background image is to be displayed.
    • Stretch - expands the image to fit the entire chart area, without maintaining original image constraints
    • Tile - the image is repeated as a pattern on the entire chart area
    • Fit - fits the image proportionately on the chart area
    • Fill -proportionately fills the entire chart area with the image
    • Center - the image is positioned at the center of the chart area
    • None - Default mode. None of the above modes are applied
    For more details click here.
    bgImageVAlign
    Since v1.3
    String (top, middle, bottom) Helps you to vertically align the background image.
    bgImageHAlign
    Since v1.3
    String (left, middle, right) Helps you to horizontally align the background image.
    bgImageScale
    Since v1.3
    Number (0-300) Helps you magnify the background image.This attribute will only work when the attribute bgImageDisplayMode is set to none, center or tile.
    logoURL String You can load an external logo (JPEG/PNG/SWF) on the chart once it has rendered. This attribute lets you specify the URL of the same. Owing to Flash Player security settings, you can only specify logo that are on the sub-domain as the SWF file of the chart.
    logoPosition String ( TL, TR, BL, BR, CC )

    Where to position the logo on the chart:

    • TL - Top-left
    • TR - Top-right
    • BR - Bottom right
    • BL - Bottom left
    • CC - Center of screen
    logoAlpha Number (0-100) Once the logo has loaded on the chart, you can configure its opacity using this atribute.
    logoScale Number (0-100) You can also change the scale of externally loaded logo at run-time by specifying a value for this parameter.
    logoLink String If you want to link the logo to an external URL, specify the link in this attribute. The link can be in FusionCharts link format, allowing you to link to new windows, pop-ups, frames etc.
    Back to top Back to Top

    Font Properties
     

    Using the attributes below, you can define the generic font properties for all the text on the chart. These attributes allow you a high level control over font properties.

    If you intend to specify font properties for individual chart elements (like Caption, sub-caption etc.), you'll need to use the Styles feature. Using Styles, you can also specify advanced font properties like Bold, Italics, HTML Mode etc. Using Styles you can also configure real-time values.

    Attribute Name Type / Range Description
    baseFont Font Name This attribute lets you set the font face (family) of all the text (data labels, values etc.) on chart. If you specify outCnvBaseFont attribute also, then this attribute controls only the font face of text within the chart canvas bounds.
    baseFontSize Number This attribute sets the base font size of the chart i.e., all the values and the names in the chart which lie on the canvas will be displayed using the font size provided here.
    baseFontColor Color Code This attribute sets the base font color of the chart i.e., all the values and the names in the chart which lie on the canvas will be displayed using the font color provided here.
    Back to top Back to Top

    Legend Properties

    In pyramid chart the name of each dataplot shows up in the legend of the chart. If you do not need the legend, you can opt to hide the same.

    Also, the legend can be placed at the bottom of the chart or to the right of the chart.

    Using the attributes below, you can configure the functional and cosmetic properties of the legend.

    Attribute Name Type / Range Description
    showLegend
    Since v1.3
    Boolean (0/1) Whether to show legend on the chart.
    legendPosition
    Since v1.3
    String (BOTTOM or
    RIGHT)
    The legend can be plotted at two positions on the chart - below the chart (BOTTOM) and on the RIGHT side of the chart.
    legendCaption
    Since v1.3
    String You can add a caption for the entire legend by setting the same here.
    legendIconScale
    Since v1.3
    Number (Greater than 0 and less than equal to 5) Scaling of legend icon is possible starting FusionWidgets XT. This attribute lets you control the size of the legend icon.

    The default scale value is 1. Anything less than 1 reduces the size of the legend-icons on the chart. Any value bigger than 1 enlarges the icons. e.g., 0.5 means half the size, where as, 2 means twice the size.
    legendBgColor
    Since v1.3
    Color (Hex Code) Background color for the legend.
    legendBgAlpha
    Since v1.3
    Number (0-100) Background alpha for the legend.
    legendBorderColor
    Since v1.3
    Color (Hex Code) Border Color for the legend.
    legendBorderThickness
    Since v1.3
    Number (In Pixels) Border thickness for the legend.
    legendBorderAlpha
    Since v1.3
    Number (0-100) Border alpha for the legend.
    legendShadow
    Since v1.3
    Boolean (0/1) Whether to show a shadow for legend.
    legendAllowDrag
    Since v1.3
    Boolean (0/1) The legend can be made drag-able by setting this attribute to 1. End viewers of the chart can drag the legend around on the chart.
    legendScrollBgColor
    Since v1.3
    Color (Hex Code) If you've too many items on the legend, a scroll bar shows up on the same. This attribute lets you configure the background color of the scroll bar.
    legendScrollBarColor
    Since v1.3
    Color (Hex Code) If you've too many items on the legend, a scroll bar shows up on the same. This attribute lets you configure the bar color of the scroll bar.
    legendScrollBtnColor
    Since v1.3
    Color (Hex Code) If you've too many items on the legend, a scroll bar shows up on the same. This attribute lets you configure the color of buttons of the scroll bar.
    reverseLegend
    Since v1.3
    Boolean (0/1) You can reverse the ordering of datasets in the legend by setting this attribute to 1.
    interactiveLegend
    Since v1.3
    Boolean (0/1) This attribute lets you interact with the legend in your chart. When you click a particular legend key, the associated slice slides out from the chart. Re-clicking the key causes the slice to slide in.
    legendNumColumns
    Since v1.3
    Number (Zero and Positive Integers) The legend items are arranged in columns. Using this attribute, you can propose the number of columns. This value undergoes internal checking on judicious use of white-space. In case, the value is found improper, the chart auto-calculates the number of columns. When set to 0, the chart automatically decides the number of columns.

    The above is applicable when legendPosition is set to BOTTOM. If the legendPosition is set to RIGHT , the number of columns is always set to 1.
    minimiseWrappingInLegend
    Since v1.3
    Boolean (0/1) Whether to minimize legend item text wrapping.
    Back to top Back to Top

    Tooltip properties
    These attributes let you control the tooltip. You can set the background color, border color, separator character and few other details.
    Attribute Name Type / Range Description
    showToolTip Boolean (0/1) Whether to show tool tip on chart?
    showPercentInToolTip Boolean (0/1) Whether to show percent values in tool tip? If not, the actual values would be shown.
    toolTipBgColor Color Code Background Color for tool tip.
    toolTipBorderColor Color Code Border Color for tool tip.
    toolTipSepChar String The character specified as the value of this attribute separates the name and value displayed in tool tip.
    showToolTipShadow Boolean (0/1) Whether to show shadow for tool-tips on the chart.
    Back to top Back to Top

    Chart Paddings & Margins

    The following attributes help you control chart margins and paddings.

    FusionWidgets allows you manually customize the padding of various elements on the chart to allow advanced manipulation and control over chart visualization. Padding in FusionWidgets is always defined in pixels, unless the attribute itself suggests some other scale (like plotSpacePercent).

    You can also define the chart margins. Chart Margins refer to the empty space left on the top, bottom, left and right of the chart.

    It's not necessary for you to specify any padding/margin values. FusionWidgets automatically assumes the best values for the same, if you do not specify the same.

    Attribute Name Type / Range Description
    captionPadding Number (Pixels) This attribute lets you control the space (in pixels) between the sub-caption and top of the chart canvas. If the sub-caption is not defined, it controls the space between caption and top of chart canvas. If neither caption, nor sub-caption is defined, this padding does not come into play.
    chartLeftMargin Number (Pixels) Amount of empty space that you want to put on the left side of your chart. Nothing is rendered in this space.
    chartRightMargin Number (Pixels) Amount of empty space that you want to put on the right side of your chart. Nothing is rendered in this space.
    chartTopMargin Number (Pixels) Amount of empty space that you want to put on the top of your chart. Nothing is rendered in this space.
    chartBottomMargin Number (Pixels) Amount of empty space that you want to put on the bottom of your chart. Nothing is rendered in this space.
    Back to top Back to Top

    <set>element
    Each <set> element (child of <chart>element) represents a set of data which is to be plotted on the chart and determines a set of data which will appear on the chart.
    Attribute Name Type / Range Description
    label String Label for the pyramid slice.
    value Number Numerical value for the pyramid slice. This value would be plotted on the chart.
    link String You can define links for individual data items. That enables the end user to click on data items (columns, lines, bars etc.) and drill down to other pages. To define the link for data items, use the link attribute. You can define links that open in same window, new window, pop-up window or frames. Please see "Drill Down Charts" section for more information. Also, you'll need to URL Encode all the special characters (like ? and &) present in the link.
    toolText String By default, FusionCharts shows the Name, value as tool tip text for that data item. But, if you want to display more information for the data item as tool tip, you can use this attribute to specify the same.
    color Color Code Color for pyramid slice.
    alpha Number (0-100) Alpha for pyramid slice.
    showValue Boolean (0/1) You can individually opt to show/hide values of individual data items using this attribute. This value over-rides the data-set level value.
    bordercolor Color Code Border Color for the pyramid slice.
    borderalpha Color Code Border Alpha for the slice.
    issliced Boolean (0/1) Whether this pyramid slice would be sliced out?
    Back to top Back to Top


    The chart also accepts the following XML elements, which have not been discussed here:

    • <annotations> - Discussed in the section Annotations
    • <styles> - Discussed in the section STYLEs