amCharts Documentation
Search:     Advanced search
Browse by category:

Getting Started

Views: 4808

Getting Started with amPie

AmPie is a piece of software that lets you have good-looking and functional pie charts on your website. It uses Adobe Flash technology for a compelling online experience. AmPie charts can be simple and very quick to create, but they can also be elaborate and beautiful. You can use an amPie chart in any HTML page (web page), or inside another Flash movie. You can also use an amPie chart in a PowerPoint presentation.

You can download amPie by clicking here. Save the ZIP file to your hard drive, then use WinZIP (or your favourite archive software) to extract the contents into a new folder.

Adding charts to a web page is done by manually inserting an HTML code snippet in the right place. Most content management systems, blog engines, etc. have a way for you to paste HTML code into the page. If you are not using a content management system, you probably know enough about HTML to have no problem with adding the code snippet.

You don't need any special tools to work with amPie, but we recommend that you download and install PSPad for Windows or Smultron for Mac OS X. They are free and convenient. You can use Notepad instead, though. To keep things simple, these help files will just refer to Notepad - you can use PSPad or your favourite plain text editor instead of it in all cases.

You will also need a Web browser. Visitors to your website will need the Adobe Flash Player 8 to view the charts. Almost everyone has it.

PLEASE NOTE: Most of the file and folder names in this tutorial refer to the contents of the distribution package. This allows you to set up a chart quickly. You can rename every file and folder, as long as you edit the HTML code accordingly.


What's Inside

When you extract the ZIP file into a folder, you will notice that there are a lot of files and folders there. Most of these are optional, examples you can use to quickly build an elaborate chart.

You will need to upload the ampie folder to your web host. It must be placed in an online folder, so all the files inside can be accessed by a browser. The recommended place is the same folder where your Web page is; or if you will be using the same chart in multiple pages, the main folder of your Web server. For example, if you are adding the chart to the main page of your website, which is contained in the file index.html in the folder public_html, then you must make sure that all the contents of the ampie folder on your hard drive are place in the public_html/ampie folder on your web server. (This allows the sample code in the distribution to work correctly. If you want to use a different folder structure, you will need to replace the path in the HTML code.)

You can rename the ampie folder, if you wish. You will then need to change the HTML code snippet accordingly. For the first examples, we will assume that the file and folder names are the same as they are in the download package.

PLEASE NOTE: You will be manipulating the data files inside the ampie folder to add your own data to the chart. It is far easier to do this while all the files are still on your hard drive, so you don't have to re-upload every time you change something. You can use the ampie.html file that you extracted to check the look of the chart without uploading anything. (This file also contains an example of the code that you will be inserting into your web page.) However, some advanced functions will not work if you test them on your hard drive. This is mentioned in the parts of the tutorial dealing with those functions.

Below is a list of all the files and what they are for:

File
Description
ampie.html
An HTML file that displays a sample pie chart.
license.txt
The license text of free version
examples/
A folder with some examples of how to customize the chart (HTML files + data and settings files). You don‘t need to upload this folder to your server. Instead, you can look at the examples and use the data and settings files of the example you like (modified for your own chart) to get the result you want more quickly and easily.
ampie/ampie.swf
The main chart file. This is the actual Flash object that is displayed on a page.
ampie/ampie_data.txt
Sample data in CSV format. You can delete this file if you are using XML data.
ampie/ampie_data.xml
Sample data in XML format. You can delete this file if you are using CSV data.
ampie/ampie_settings.xml
An amPie settings file with all available settings.
ampie/export.php
This file is used to export a chart as an image, on a PHP-enabled web server. You can delete this file if you are not using this function.
ampie/export.aspx
ampie/export.cs
These files are used to export the chart as an image on a .NET-enabled web server. You can delete this file if you are not using this function.
ampie/swfobject.js
This file is used to embed the Flash object inside an HTML page. It must be uploaded.

Others in this Category
document Adding the Chart to a Page
document Troubleshooting
document Charts in PowerPoint
document Examples