WebCharts3D with Cold Fusion MX 7 FAQ

Where can I get more information about WebCharts3D styles and properties?

You can obtain it from:

  1. User's Guide
  2. Java Developer's Guide
  3. Online manual
  4. Designer embedded help accessible via Help item of Designer's Help menu.

Can I use WebCharts3D Designer to create custom chart styles?

In many cases you can create your own chart styles by using XML produced by WebCharts3D Designer. You can learn more about it at LiveDocs.

However using this method will allow you to access only a limited subset of the WebCharts3D features. In order to access all functionality you need to use WebCharts3D Java API. Note that while this method will allow you to employ more styles it will require you to produce data in WebCharts3D format.

The first step in creating the chart is to obtain an instance of WebCharts3D run-time chart renderer:

webCharts3DServer = createObject("java","com.gp.api.jsp.MxServerComponent")
		.getDefaultInstance(GetPageContext().getServletContext());

Note. ColdFusion uses lazy initialization for the charting engine and the engine will be fully initialized only after at least one chart was produced using CFCHART tag. If your application does not do so, you might want to insert an empty CFCHART tag:

<cfchart chartwidth="1" chartheight="1"/>

Once the instance of the charting engine is obtained you need to create and fill out chart description:

chart = webCharts3DServer.newImageSpec();
chart.type  = "SWF";
chart.width = 400;
chart.height= 300;
chart.style = ...
chart.model = ...

Instead of specifying xml styles inside CFM file you can use loadStyles function to load styles from a file. Note that since loadStyles is not a part of standard Cold Fusion API the full path to it should be used:

chart.loadStyles(<full path to xml styles file>);

When you create charts using WebCharts3D API you need to provide data (model) in WebCharts3D XML format. The charts formats differ for different types of charts. For more information about chart formats please refer to WebCharts3D Designer embedded Help or to our online manual. WebCharts3D Designer will show XML model inside Model view and you can use this view to experiment with the format. Another option is to use WebCharts3D Java API to create data objects and convert them into XML using toXml() function. Java API Documentation can be downloaded with the full version of WebCharts3D from our site - you can download install.zip and unpack it into any folder in order to access the documentation.

Once the chart description is filled out you can submit it to the charting engine:


WriteOutput(webCharts3DServer.getImageTag(chart,"/CFIDE/GraphData.cfm?graphCache=wc50&graphID="));

The second parameter here points to a pre-defined Cold Fusion module that will actually serve the chart's binary data. It is possible instead to use getImage.jsp file provided with the product (different arguments will need to be specified in this case).

Can I create gauges, maps and some other charts available on your site? Can I upgrade to the latest version of WebCharts3D?

Some of the charts and features available on our site were introduced only recently and are not part of the Cold Fusion MX 7. Upgrading involves downloading and unpacking install.zip from our site. Once it is unpacked locate wc50.jar file and copy it to lib folder of your Cold Fusion MX 7 installation directory. (You will need to stop and restart the server in order to do that).

NOTE. If you download and install a version of the product that is higher than the current version shipped with ColdFusion you will need to obtain a different license for it. Please contact info@gpoint.com for more information.

NOTE. Neither Adobe nor Greenpoint endorse such upgrades. You might not be able to obtain support from Adobe if you replace the original file with the upgrade.

 

   Copyright © 1994-2008 GreenPoint, Inc. All rights reserved.