Another charting option: XML/SWF Charts

A few weeks ago I blogged about an alternative to ColdFusion’s built in charts, Google’s Chart API. This week I discovered another alternative, XML/SWF Charts. This isn’t a free option, but they have a free license with limitations and the price for a “full” copy is only 45 bucks for a single domain. It works pretty easy too. You basically drop in a set of SWF files and then call the SWF and point to a XML file:

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=",0,0,0" WIDTH="400" HEIGHT="250" id="charts" ALIGN=""> <PARAM NAME=movie VALUE="charts.swf?library_path=charts_library&xml_source=sample.xml"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#666666>

<EMBED src=”charts.swf?library_path=charts_library&xml_source=sample.xml” quality=high bgcolor=#666666
WIDTH=”400” HEIGHT=”250” NAME=”charts” ALIGN=”” swLiveConnect=”true” TYPE=”application/x-shockwave-flash” PLUGINSPAGE=””> </EMBED> </OBJECT> </code>

Your XML file has all the data and options to drive the chart. You can point to a ColdFusion file as well to have dynamic data. The set of chart types is pretty impressive, as is all the options you can use, including funky animations and layout. See the gallery for examples.

Probably the coolest option they have though is their live update option. This lets you point to XML data and automatically refresh every N seconds. Here is an example that points to a CFM on my server. Region C will change every 2 seconds.

<PARAM NAME=movie VALUE="/demos/swfchart/charts.swf?library_path=/demos/swfchart/charts_library&xml_source=/demos/swfchart/sample.cfm"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#666666> <EMBED src="/demos/swfchart/charts.swf?library_path=/demos/swfchart/charts_library&xml_source=/demos/swfchart/sample.cfm" quality=high bgcolor=#666666 WIDTH="400" HEIGHT="250" NAME="charts" ALIGN="" swLiveConnect="true" TYPE="application/x-shockwave-flash" PLUGINSPAGE=""> </EMBED>
Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate for Extend by Auth0. He focuses on serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support.

Lafayette, LA