Some basic facts about XML (eXtensible Markup Language)

The external xml file is loaded by the flash chart movie and is used to customize and to manipulate the charts. The xml structure is easy to understand even for absolute beginners after viewing the demo xml file. The specified tags are akin to html.

Here are a few facts:

  • XML documents are simple text files (UTF-8 multilingual fonts are supported) consisting of tags like <chart> and data. The tag <chart> in the chart's xml file is the root tag. It encloses all data stored e.g. in child elements which also are called child nodes like: <set value='21900' />.
     
  • Every opening tag requires a matching closing tag like <name> requires </name>. If an element hasn't got any content but attributes then the opening and closing tags may be combined into a single "shortcut" tag like: <name text='advance-media' link='http://www.advance-media.com' />. "text" and "link" here are two attributes of the tag called "name". Attributes define both cosmetic and functional properties of the chart. Cosmetic properties include properties like background color, font properties and division line properties etc. Functional properties include setting of limits, setting of decimal precision and number formatting etc.
     
  • XML tags are case-sensitive. So <name> should be closed with </name> and not </Name> or </NAME> or any other variant of the same.
     
  • Special characters like ' (quote), " (double quote), % (percentage) etc inside an attribute's value are to be replaced by XML converts respectively. Like, the character " (double quote) inside of a string constant must be denoted as &quot; in case you'd like to use it in an already double-quoted xml string. Of course the value of an attribute itself can be denoted embraced inside either single or double quote. Please have a look at the special character list below.
     
5 xml special characters
special charencodingDescription
<&lt; The less-than character is in use by XML itself as first character of a start-tag or an end-tag. Thus do encode it to render it e.g. as part of a string!
>&gt;The greater-than character is in use by XML to end a start-tag or an end-tag.
&&amp; The ampersand character is in use by XML for entity markup.
"&quot;Use this character sequence to render a double-quote character inside an already double-quoted xml string.
'&apos; or &#39;An apostrophe or single-quote character can be rendered with this character sequence inside an already single-quoted xml string.


The various XML attributes used by the chart's flash movie consist of these types: boolean numeric string and color.

  • boolean

    A Boolean attribute can have one of the two values: 0 or 1. (0 means False and 1 stands for True).
    For example: showLegend='0' or animationWall='1'

     
  • numeric

    A numeric attribute can have any numeric value (positive negative zero float). Some of the numeric values like alpha (transparency) values are bounded by limits (0-100) while others basically have no limits.
    For example: yAxisMaxValue='100', yAxisMinValue='-100' or numDivLines='5'

     
  • string

    A string attribute can have any string char value and may include numbers as well.
    For example: renderAs='Area' or name='Product 3'

     
  • color

    A color attribute is used to specify a color used in the chart. All colors need to be specified in the HEXADECIMAL format without the preceding '#' hash character.
    For example: bgColor='FFFFDD' or baseFontColor='E1F5FF'

     

A lot of properties and values depending on the chart type can be set. However, it is not required to set all attributes available to produce a single chart. If you do not intend to change the default values of the canvas (color alpha etc.) then you don't have to set any attributes of the same - the pre-assigned default attributes will take over automatically. Thus each chart can be generated using only a few attributes without concern for each and every finer detail.

A specific XML structure for each chart movie does exist though:
  • Combi Chart XML

    The Combination Chart XML is used by column cylinder area (floating) and line stepLine bubble and surface colored by series or by region colors (by height) as well as by candlestick and kagi charts. It supports multi and single series data sets.

     
  • Pie/Doughnut XML

    The pie doughnut pyramid cone funnel etc. charts use a single series XML structure only.

     
  • Polar Radar or so called Spider Chart XML

    The XML structure of the Polar and Radar charts available as area as line and as rose type supports multi and single series data sets.

     
Note, no first line like <?xml version="1.0"?> is really needed for the chart's xml file to work properly.