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 than the opening and closing tags may be combined into a single "shortcut" tag like: <name value='advance-media' link='http://www.advance-media.com' />. "value" 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 div 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 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 inside an already double-quoted xml string. 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 animationWalls='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 value.
    For example: renderAs='Area'

     
  • 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'

     

There are a lot of properties and values depending on the chart type that one can set. However, it is not necessary to set all the possible attributes for a single chart. If you do not intend to change the default values of the canvas (color alpha etc.) than you don't need to set any attributes for the canvas - 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.

There are specific XML structures for each chart. We define the XML structure into two types depending on the chart type:
  • Combi Chart XML

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

     
  • Pie/Doughnut XML

    The pie and the doughnut charts use a different single series XML structure.

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