File Data Source Form
A file data source specifies the name of a file containing chart data arranged in lines with data in each line separated by a delimiter character such as , or ; or the tab character. The File Data Source form is made up of three pages: Labels, Data and Number Format.
Filename and Delimiters
You specify your filename and the type of delimiter character that it uses.
Sometimes the first line of a spreadsheet contains the names of the series as headings. If so you should check the ignore first line check box.
How to create a text file containing data
You can create a text data file by hand using Notepad or another text file editor or alternatively a text file containing rows and columns of data can be produced from an existing spreadsheet. There are a number of different types of text files you can create using a spreadsheet. The most common types are Text (Tab delimited) and CSV (Comma Delimited). AmiChart supports both these type of delimiters plus semicolon delimited (you can make a semicolon delimited file yourself in a text editor).
You can create a CSV file from a spreadsheet in Microsoft Excel by selecting File|Save As and choosing "CSV (comma delimited)" for the "Save as type" option. When running in a web server environment with a database the CSV can be readily constructed from the result of a database query. Read about the AmiChart Generator product for server side charting solutions. In the AmiChart File Data Source dialog click on the Browse button and select your CSV data file. Click on the 'Comma' radio button to tell AmiChart that the CSV file uses the comma character to delimit fields within each line of the file.
Similarly you can create a Text File (tab delimited) from Excel by choosing the Text (tab delimited) (*.txt) option in the Save As dialog. In the AmiChart File Data Source dialog click on the Browse button and select your text data file. Click on the 'Tab' radio button to tell AmiChart that the text file uses the tab character to delimit fields within each line of the file.
NOTE: For 2 axis chart data: the first field in each row of a CSV file is assumed to represent the x axis of the chart (typically the time values like days, months, quarters etc.,). The fields following this field in a row are assumed to be the the values for each series at the specified time.
NOTE: Only one row is used and no time column is present. This is different to the 2 axis chart example.
Any decimal numbers are expected to use '.' as the decimal separator. Numbers may also contain ',' to separate thousands. This would cause problems if the comma is the delimiter for the file. In this case most spreadsheet applications handling the exporting of values containing commas as thousands separators by enclosing the entire value in double quotes eg., "$54,455.87". AmiChart can handle this format and it can also handle a dollar sign '$' in values.
Number Format Page
The number format page lets you specify formatting for the values displayed. You can specify:
- Number of decimal places
- Use of thousands separator (the character used depends on the locale settings of the PC)
- Bracket negatives values (typically used in accounting charts)
- Scientific - displays the values as a multiplier and of power of 10.
|