Syntax graph.LoadFile(FileName [,method [,HTMLTable]])
Description Instructs PopChart Server to import data from a tab delimited data file, comma separated value file, xml database file, or a table in an HTML file. This file or web page must be accessible to the machine running PopChart Server.
By default, this command replaces all existing data in the graph. However, if you want to append the data from the file to the existing data, you can use the append parameter.
PopChart Server automatically detects the format of the file that you load. For more information on these data formats, refer to "Importing Data from Data Files" in Chapter 6 of the PopChart Server User Guide.
Note: You must add PopUp text, Notes, or Drill-down effects to your graph after you use this command, as otherwise PopChart Server will be unable to associate the special effect with the corresponding data item.
Important: Your path.xml file must grant PopChart Server permission to read files from the location that you specify. Otherwise, it will be unable to load the data. For more information, see "Setting Path Permissions" in Chapter 3 of the PopChart Server User Guide.
Note: This command provides the same functionality as the loadData(String,String,String,String) PopChart Embedder method.
Parameters Graph.LoadFile accepts the following parameters.
The path to and file name of the file or web page from which the data will be retrieved. This path will be relative to PopChart Server's document root. You can also use an absolute path or a URL. Make sure that your path.xml file permits PopChart Server to read from this path (see "Setting Path Permissions" in Chapter 3 of the PopChart Server User Guide).
Indicates the method for importing the data. If method is set to replace, all data currently in the graph will be replaced. If it is set to append, the imported data will be appended to any data already in the graph, including data from the appearance file.
If this parameter is not set, it is assumed to be replace. It must always be set when importing data from HTML tables.
The title or number of the table that should be loaded from the web page. If this parameter is a title, be sure that the title corresponds to the value of the title attribute of your <table> tag. If it is a number, PopChart Server will import data from the nth table in the web page, where n is the number you specify.
Example 5.22 illustrates how this parameter is used. The first line of code imports data from the table titled pricing on the web page stats.html. The second line of code imports data from the 11th table on the web page morestats.html.
This parameter must always be set when you import data from HTML tables.