Flash Charts

Here you can find all the available options/attributes for customizing the animated Flash charts that are generated as part of each calculator web service.

CalcXML's calculators have the ability to create charts either as image files or as Flash animated files. You can specify which type of chart you would like created by setting the chartLibrary attribute of the root <calcxmlRequest> element. The two valid values for this attribute are "image" and "flash". This documentation discusses the options available to you when using the "flash" option.

You can control the "look-and-feel" of the Flash chart by passing in some information as part of your <calcxmlRequest>. <calcxmlRequest> has a child element called <flashChart>. You can review the schema of this child element here - <flashChart> schema.

Attributes are passed in as name/value pairs. You can include as many attributes as you would like. Here is a simple example of a <flashChart> element.

<calcxmlRequest>
. . .
  <flashChart>
    <threeD>1</threeD>
    <chartWidth>500</chartWidth>
    <chartHeight>300</chartHeight>
    <chartAttributes>
      <attribute name="caption" value="My Chart Title"/>
      <attribute name="showBorder" value="1"/>
      <attribute name="borderColor" value="CCCCCC"/>
    </chartAttributes>
  </flashChart>
. . .
</calcxmlRequest>

Notice the <chartAttributes> element has three child <attribute> elements and each of these <attribute> elements specifies a name and a value. The available names and values are shown in the tables below.

The Flash charts already have many of the attributes set by default. It is suggested that prior to passing in your own attributes, you first see how the default chart is rendered. If there is something that you would like changed in the default chart, then go ahead and pass in the appropriate attributes and values to make the change.


 Flash Chart 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.
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.
showZeroPies Boolean 0/1 Configuration whether to show pies with 0 values (and their values). Otherwise, they won't show up in the chart.
showPercentValues Boolean 0/1 Whether to show percentage values in labels of the chart?
showPercentInToolTip Boolean 0/1 Whether to show percentage values in tool tip?
showLabels Boolean 0/1 Whether to show labels on the chart?
showValues Boolean 0/1 Whether to show values on the chart?
labelSepChar String Character The character to separate the data label and data values on the chart.
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 String The entire chart can now act as a hotspot. Use this URL to define the hotspot link for the chart.
Back to Top


Chart Titles and Axis Names
Using these attributes, you can set the various headings and titles of chart like caption, sub-caption, x-axis and y-axis names etc.

Attribute Name Type Description
caption String Caption of the chart.
subCaption String Sub-caption of the chart.
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
showBorder Boolean 0/1 Whether to show a border around the chart or not?
borderColor Color Border color of the chart.
borderThickness Number In Pixels Border thickness of the chart.
borderAlpha Number 0-100 Border alpha of the chart.
bgColor Color 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 Number 0-100 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.
bgSWF String To place any Flash movie as background of the chart, enter the (path and) name of the background SWF. It should be in the same domain as the chart.
bgSWFAlpha Number 0-100 Helps you specify alpha for the loaded background SWF.
Back to Top


Data Plot Cosmetics
These attributes let you configure how your plot (colums, lines, area, pie or any data that you're plotting) would appear on the chart.

If the plots can show borders, you can control the border properties using the attributes listed below. Or, if they support gradient fills, you can again configure various properties of the gradient using these attributes.

Various other controls over plot cosmetics can be attained using this set of attributes.

Attribute Name Type Range Description
showPlotBorder Boolean 0/1 Whether the column, area, pie etc. border would show up.
plotBorderColor Color Color for column, area, pie border
plotBorderThickness Number 0-5 (Pixels) Thickness for column, area, pie border
plotBorderAlpha Number 0-100 Alpha for column, area, pie border
plotFillAlpha Number 0-100 This attribute lets you set the fill alpha for plot.
use3DLighting Boolean 0/1 Whether to use advanced gradients and shadow effects to create better looking 3D charts?
Back to Top


Pie / Doughnut Properties
The following attributes let you control various functionalities of pie/doughnut chart.

Attribute Name Type Range Description
slicingDistance Number In Pixels If you've opted to slice a particular pie/doughnut slice, using this attribute you can control the distance between the slice and the center of chart.
pieRadius Number In Pixels This attribute lets you explicitly set the outer radius of the chart. The Flash chart automatically calculates the best fit pie radius for the chart. This attribute is useful if you want to enforce one of your own values.
startingAngle Number 0-360 By default, the pie chart starts from angle 0 i.e., the first pie starts plotting from 0 angle. If you want to change the starting angle of the chart, use this attribute.
enableRotation Boolean 0/1 The doughnut/pie charts have three modes: Slicing, Rotation and Link. If any links are defined, the chart works in Link mode. Otherwise, it starts in Slicing mode. If you need to enable rotation by default, set this attribute to 1.
pieInnerFaceAlpha Number 0-100 Alpha of the pie inner face
pieOuterFaceAlpha Number 0-100 Alpha of the pie outer face
pieYScale Number 30-80 This attribute alters the y-perspective of the pie in percentage figures. 100 percent means the full pie face is visible and 0 percent means only the side face is visible.
pieSliceDepth Number In Pixels This attribute controls the pie 3D Depth.
Back to Top


Smart Lines & Labels
The pie and doughnut charts can now have smart labels and lines.

Smart labels/lines are data connector lines which connect the pie/doughnut slices to their respective labels without over-lapping even in cases where there are lots of labels located near each other.

You can configure the smart labels/lines properties using the attributes below.

Attribute Name Type Range Description
enableSmartLabels Boolean 0/1 Whether to use smart labels or not?
skipOverlapLabels Boolean 0/1 Whether to skip labels that are overlapping even when using smart labels? If not, they might overlap if there are too many labels.
isSmartLineSlanted Boolean 0/1 The smart lines (smart label connector lines) can appear in two ways: Slanted or Straight. This attribute lets you choose between them.
smartLineColor Color Hex Code Color of smart label connector lines.
smartLineThickness Number In Pixels Thickness of smart label connector lines.
smartLineAlpha Number 0-100 Alpha of smart label connector lines.
labelDistance Number In Pixels This attribute helps you set the distance of the label/value text boxes from the pie/doughnut edge.
smartLabelClearance Number In Pixels Clearance distance of a label (for sliced-in pies) from an adjacent sliced out pies.
Back to Top


Number Formatting
Many options are offered to format your numbers on the chart.

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 would 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 '
    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 - a 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.
    numberPrefix String Character 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 Character 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.
    decimalSeparator String Character 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 Character 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 Character 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, Flash charts 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 Character 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, Flash charts 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.
    decimals Number 0-10 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, Flash charts will convert the number to 23.40 (note the extra 0 at the end)
    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.


    Attribute Name Type Range Description
    baseFont String 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 0-72 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 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


    Tool-tip
    These attributes let you control the tool tip. 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?
    toolTipBgColor Color Background Color for tool tip.
    toolTipBorderColor Color 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.
    Back to Top


    Chart Padding & Margins
    The following attributes help you control chart margins and paddings.

    You can manually customize the padding of various elements on the chart to allow advanced manipulation and control over chart visualization. Padding 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. That means, Flash charts wouldn't plot anything in that space.

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

    Attribute Name Type Range Description
    captionPadding Number In 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 In 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 In 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 In Pixels Amount of empty space that you want to put on the top of your chart. Nothing is rendered in this space.
    chartBottomMargin Number In 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