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:1 <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
2 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
3 WIDTH="400"
4 HEIGHT="250"
5 id="charts"
6 ALIGN="">
7 <PARAM NAME=movie VALUE="charts.swf?library_path=charts_library&xml_source=sample.xml">
8 <PARAM NAME=quality VALUE=high>
9 <PARAM NAME=bgcolor VALUE=#666666>
10
11 <EMBED src="charts.swf?library_path=charts_library&xml_source=sample.xml"
12 quality=high
13 bgcolor=#666666
14 WIDTH="400"
15 HEIGHT="250"
16 NAME="charts"
17 ALIGN=""
18 swLiveConnect="true"
19 TYPE="application/x-shockwave-flash"
20 PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
21 </EMBED>
22 </OBJECT>
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.
2 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
3 WIDTH="400"
4 HEIGHT="250"
5 id="charts"
6 ALIGN="">
7 <PARAM NAME=movie VALUE="charts.swf?library_path=charts_library&xml_source=sample.xml">
8 <PARAM NAME=quality VALUE=high>
9 <PARAM NAME=bgcolor VALUE=#666666>
10
11 <EMBED src="charts.swf?library_path=charts_library&xml_source=sample.xml"
12 quality=high
13 bgcolor=#666666
14 WIDTH="400"
15 HEIGHT="250"
16 NAME="charts"
17 ALIGN=""
18 swLiveConnect="true"
19 TYPE="application/x-shockwave-flash"
20 PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
21 </EMBED>
22 </OBJECT>
Comment 1 written by Raymond Camden on 4 January 2008, at 7:59 AM
Comment 2 written by todd sharp on 4 January 2008, at 8:10 AM
Comment 3 written by todd sharp on 4 January 2008, at 8:11 AM
Comment 4 written by Andy Matthews on 4 January 2008, at 8:41 AM
http://www.fusioncharts.com/free/
Comment 5 written by Gareth on 4 January 2008, at 9:09 AM
Comment 6 written by David Boyer on 4 January 2008, at 9:11 AM
http://teethgrinder.co.uk/open-flash-chart/
Comment 7 written by Raymond Camden on 4 January 2008, at 9:14 AM
Comment 8 written by Eric Hynds on 4 January 2008, at 10:05 AM
Comment 9 written by Darth Sidious on 4 January 2008, at 10:55 AM
http://www.globfx.com/products/swfchart/samples.ph...
What's awesome about it is they use a CSS concept for the styling, so the design and logic are completely separate. Want to change your chart from a stacked area to a column series? No problem, just update your chart style sheet.
And the Stylesheet granularity is crazy. The level of minute detail that you can control. But here's the best part - creating these style sheets is done in a style sheet tool that non developers can use, so you can let your marketing or project management team set up the style that they want and then they just hand over the style sheet to you and you're done. The tool let's you punch in some mock data so that you can see what the style is going to look like without having to plug it into a back end.
They have Coldfusion samples available.
Check out the gallery:
http://www.globfx.com/products/swfchart/samples.ph...
Comment 10 written by Andy Matthews on 4 January 2008, at 11:00 AM
Comment 11 written by Kevin on 4 January 2008, at 1:35 PM
Comment 12 written by Gary on 7 January 2008, at 5:18 PM
They have some good documentation on integrating with CF, and my experience with their support has been great.
http://www.ve.com/kavachart/gallery.html
Comment 13 written by vin45 on 16 June 2008, at 6:08 AM
Comment 14 written by flicker on 6 August 2008, at 7:16 PM
http://www.maani.us/xml_charts
It includes scrolling, streaming, full screen mode, filter effects, and much more!
Comment 15 written by Darin on 25 February 2009, at 3:50 PM
Thanks
Comment 16 written by Raymond Camden on 26 February 2009, at 1:55 PM
Comment 17 written by Meg Stiles on 22 May 2009, at 1:52 PM
Comment 18 written by Donny on 21 July 2009, at 2:23 AM
Comment 19 written by sandeep on 24 February 2010, at 1:34 AM
I am able to get the response from ajax but while executing the script the page is getting re-loaded
Comment 20 written by Raymond Camden on 24 February 2010, at 6:16 AM
[Add Comment] [Subscribe to Comments]