ChartDirector for ColdFusion is implemented as a Java class library, and requires ColdFusion MX (Ver 6.0) or above. For earlier versions of ColdFusion, it is recommended you use ChartDirector for ASP/COM/VB and access ChartDirector through COM.
ChartDirector for ColdFusion is distributed as a zip file. The distribution contains the ChartDirector for ColdFusion library, comprehensive documentation, and numerous CFM sample scripts.
To install ChartDirector for ColdFusion:
- Extract the files from the ChartDirector distribution to any directory.
- Set up the ColdFusion class path to include the ChartDirector for ColdFusion library, at "ChartDirector/lib/ChartDirectorCF.jar".
For ColdFusion MX 6 or 7 (the latest version as of the writing of this documentation), the method is to open the ColdFusion Administrator, select "Java and JVM" on the left side, and enter "[install_path]/ChartDirector/lib/ChartDirectorCF.jar" in the ColdFusion class path field ([install_path] is the directory which you extract ChartDirector to).
- Restart the ColdFusion server for the modified ColdFusion class path to take effect.
Below is screen shot setting the ColdFusion class path using the ColdFusion Administrator provided for for your reference.
ChartDirector for ColdFusion comes with numerous CFM sample scripts in "ChartDirector/cfdemo". They are excellent examples and tutorials on how to use ChartDirector.
To run the ChartDirector CFM sample scripts, simply copy the entire "cfdemo" subdirectory to the ColdFusion web directory, then access the index page using:
http://server_name/cfdemo/index.htm
If you have purchased a license to use ChartDirector, you should have a license code delivered to your via email and postal mail.
If your license key is for upgrading from a previous version of ChartDirector, you need to append the upgrade license key to the previous version license key, and use the combined license key.
There are two alternative methods to install the license key.
- Create a one-line ASCII file using Notepad or other text editor, and put the license code in that line. The whole file should contain only the license code. Name that file "chartdir.lic" and put the file in the Java class path as visible to ColdFusion. A common location is the "WEB-INF/classes" of the web application that hosts the ColdFusion scripts (eg. "c:\CFusionMX7\wwwroot\WEB-INF\classes" for ColdFusion MX 7 on Windows hosted by the built-in JRun server.).
If the license file appears to have no effect (does not disable the yellow banner line), and you are running on a web server environment, please make sure the web server "anonymous user" has read access to the "chartdir.lic" file. You may copy the file "ChartDirector/cfdemo/cdinfo.cfm" to your web server and access it using a browser. It will display a diagnostic page explaining why the license cannot be loaded.
Make sure your license file is called "chartdir.lic". In particular, Notepad may automatically append ".txt" to the file name when creating a new file. So even if the file is saved as "chartdir.lic", it may end up as "chartdir.lic.txt". If this is the case, please rename the file back to "chartdir.lic".
- An alternative method is to hard code the license key into the source code by using the ChartDirector.CFChart.setLicenseCode API. This method is recommended if your are redistributing ChartDirector, because your customer will then be unable to see the license key (unless your software is open source).
cd = createObject("java", "ChartDirector.CFChart");
cd.setLicenseCode(".....your-license-key.....");
© 2006 Advanced Software Engineering Limited. All rights reserved.