Table of Contents

Pie & Donut chart data

CSV

The CSV file is actually plain text. Each slice is on a new row. The parameters and value are separated by a special character. By default, this is the semicolon, but you can change it to a different character using the chart settings. The slice information is in the following order:

title;value;pull_out;color;url;description;alpha;label_radius

If you are only using the first two or more, you don't have to specify the rest. If you are skipping some parameters, but using a later one, you must use a semicolon for each skipped parameter.

Example:

China;1314.4;;;http://www.interactivemaps.org
India;1120.4 
United States;300.38
Indonesia;233.52 
Brazil;187.67 
Pakistan;158.85 
Bangladesh;148.9
Other Countries;3007.5;true;;http://www.amcharts.com;Click to find out more

Each new line determines a new slice. Its attributes are separated by a special character (the semicolon ';' is used by default - you can change it in the settings).

The sequential order of the slices in the file is the same as their order on the chart, clockwise from the top.

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 pie chart:

<pie>
  <slice title="Twice a day" pull_out="true">358</slice>
  <slice title="Once a day">258</slice>
  <slice title="Once a week">154</slice>
  <slice title="Never" url="http://www.interactivemaps.org" description="Click on the slice to find more information" alpha="50">114</slice>
</pie>

You can have any number of slices in your pie, simply add or delete <slice …></slice> rows.

<slice> can have the following attributes: