How do I set up an iCharts Data API Connector?

The iCharts Data API connector is specified in the form of a URL, which is used as a data source in a chart. At run time, when the chart is rendered, it calls the URL and uses the data returned by the connector to plot the data points.

There are two methods for the chart to access the data:

  1. By creating a tab separated value file (TSV) which will be placed on a server. The file can be created manually or as output by your application or a script. In all cases the URL for this file location becomes the data source and will be specified in the studio while creating the chart. Because the interactive chart will always pick the most recent data, the chart will be always be up to date, even if the data file is continuously updated by your application or a script. The filename convention is “filename.csv” for convenience reasons but the separator type in the file has to be “tab."
  2. By creating a jsp,asp or php program. This method is similar to the first one, but the TSV file as data source is replaced by a jsp, asp or php file located on any web server and containing a program which is executed at run time and which includes a data query. The data query must return TSV formatted data exactly in the same way as the source file in the first method  would do. The filename conventions is e.g. “filename.jsp” and the files can use frameworks like struts or .net.  

The format of the TSV output must adhere to the following format:

  1. The first row should always be of tab separated values which name the series used in the chart.
  2. No value should be blank in the first row.
  3. Rows should contain the tab separated values for the series defined in the first row.
  4. There can be as many columns of data series as required. The chart will only use the data series that has been selected in the studio.

Below is an example of a TSV Output.

The iCharts Data API connector is typically created by the IT team that manages the database.

Please note: To use the iCharts Data API feature, an XML file called the cross domain file needs to be placed in the root directory of your server. The Cross Domain policy standard is defined for Adobe flash player and the security related to it.

The file should be named crossdomain.xml and the contents are as follows:

<?xml version="1.0"?>

<!DOCTYPE cross-domain-policy SYSTEM



                <allow-access-from domain="*" secure="false"/>

                <allow-http-request-headers-from domain="*" headers="*"/>


Save the file as a text file and place it in the root folder of the server where the server resides.

The following parameters can be set in the cross-domain file:

  1. Allow access from domain - The “allow-access-from domain“ attribute tells the flash player that the site from where it accesses the cross domain policy, allows the flash application to access files from the domain, which is mentioned as value for “allow-access-from domain “.
  2. Secure=”false” - This parameter specifies whether the server, from where the Cross Domain policy is being read, allows access only through SSL connection, or not. False means without SSL is allowed. If a user wants to allow only SSL access, the value can be changed to “true”.
  3. Allow-http-request-headers-from domain="*" headers="*"  - This parameter decides whether the flash application can pass parameters to the target files (jsp, asp etc) through headers. As the API is designed to do so the statement is required. If you do not want to allow this please remove the statement from the Crossdomain.xml file.