Table of Contents

Column &Bar chart data

CSV

CSV data comes in the format:

series;value of the first graph;value of the second graph;…;value of the x graph

For example:

1949;2.54;20.21
1950;2.51;19.73
1951;2.53;18.43
1952;2.53;18.08
1953;2.68;19.01
1954;2.78;19.57
1955;2.77;19.58
1956;2.79;19.43
1957;3.09;20.83
1958;3.01;19.73

Each new line determines the new series and values of your graphs, separated by a special character (the semicolon ';' is used by default - you can change it in the settings (<csv_separator>).

Remember, if you are using CSV data, you must tell the software to look for that format. This is done by setting <data_type>csv</data_type> in the settings file. If you load your data from a file, you will probably need to change file name of your data file too.

XML

Here is example of XML data for column chart:

<chart>
 <series>
  <value xid="0">1950</value>
  <value xid="1">1951</value>
  <value xid="2">1952</value>
 </series>
 <graphs>
  <graph gid="1">
   <value xid="0">-0.307</value>
   <value xid="1">-0.168</value>
   <value xid="2">-0.073</value>
  </graph>
  <graph gid="2">
   <value xid="0">-0.171</value>
   <value xid="1">-0.175</value>
   <value xid="2">-0.176</value>
  </graph>
 </graphs>
</chart>

As you can see, the data comes in two parts: series and graphs. Series defines the category axis points. Series values may be numbers or strings. You can even apply some HTML formatting for the series values. The xid attribute is a unique identifier. You can have as many series as you wish.

Graphs defines the graph. Every graph has ID: gid="1". The gid is necessary if the settings for the graph are located in the settings file, and the gid in the data file must match the gid in the settings file. Each graph has values. Value tag has an xid attribute, which matches the xid from series. It is not necessary that every graph has the same number of values as series, the chart will handle missing data.

XML data attributes

XML data format allows you to apply some custom formatting for your columns/bars, have custom series background, indicate which series values should be sown on the axis, etc. These settings are included within <value> tag, for example:

<series>
   .............
   <value xid="138" bg_color="#FF0000" bg_alpha="50" show="true">1988</value>
   .............
</series>

This will make background color of this series to be red with the opacity 50%, and the value of this series will always be shown on the category axis.

Another example:

<graph gid="1">
   .............
   <value xid="100" color="#00FF00" url="http://www.amcharts.com" description="Rainfall in September">-0.307</value>
   .............

This will make the column to be filled with the green color, and to be linked to amcharts.com web site. The discription might be showed when the user rolls-over the column.

Below is the full list of available attributes:

<value> of a <series> can have the following attributes:

bg_colorThe color of the point background (hex color code).
bg_alphaThe opacity of the series background.
showIf this is set to true, the category axis values and grid lines of this series will always be visible.

<value> of a <graph> can have the following attributes:

colorThe color of the column/bar. Use this attribute if you want the column to be different from the main graph color.
gradient_fill_colorsList hex color codes here, separated by a comma. The column will be filled with a gradient transfer between these colors.
startUse this attribute if you want the column to float, instead of standing on the category axis. The base of the column will be shifted by this value along the Y-axis.
urlThe URL that will be opened when the viewer clicks on the column. You can also set the URL as a Javascript command. Because of security restrictions set by the Adobe Flash Player, the URL will not be clickable if you view the chart from a file on your hard drive. It needs to be uploaded to a Web server and then viewed through a browser for the URL to work correctly.
bulletBoth column and line graph types can display bullets. This attribute sets the shape of the bullet - if it is not provided, no bullet is shown. The following values are available: square, round, square_outlined, round_outlined, filename.swf. The filename.swf is the name of Adobe Flash file – you can use a custom Flash object as a bullet. The Flash file must be placed in the folder specified as "path" in the HTML code snippet. Outlined bullets use the plot area color for the outline.
bullet_colorThe color of the bullet. This only affects predefined bullet shapes, not custom Flash bullets.
bullet_sizeThe size of the bullet. This only affects predefined bullet shapes, not custom Flash bullets.
descriptionThe text that will be displayed in a balloon when the viewer rolls over the bullet with the mouse cursor.
patternIf this is set, the columns will be covered with a pattern. The pattern can be provided by a SWF, JPG, GIF or PNG file, and the value must be a path to the file. See the included patterns example for more.
pattern_colorThe color of the pattern (hex color code).