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="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,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="http://www.macromedia.com/go/getflashplayer"> </EMBED> </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.

Archived Comments

Comment 1 by Raymond Camden posted on 1/4/2008 at 6:59 PM

Just a quick comment to my own post. I noticed in Firefox 3, OSX, the chart example above isn't centered right. It worked fine on my local server, and worked fine in the blog admin, so I'm thinking some CSS may be messing with it. The same blog entry works fine in Safari. So blame FF3/my css, not the chart engine.

Comment 2 by todd sharp posted on 1/4/2008 at 7:10 PM

*All* regions are updating every 2 seconds...not just 'C'

Comment 3 by todd sharp posted on 1/4/2008 at 7:11 PM

Nope I lied and shall be banned from all comments on this blog for the rest of the day.

Comment 4 by Andy Matthews posted on 1/4/2008 at 7:41 PM

I found a great set of free Flash charts that I used for a recent app I built. They're XML based and SUPER easy to use:

http://www.fusioncharts.com...

Comment 5 by Gareth posted on 1/4/2008 at 8:09 PM

Wow, those are impressive! Wonder why they're free though...seems like something they could easily charge for.

Comment 6 by David Boyer posted on 1/4/2008 at 8:11 PM

I discovered an open source alternative for flash charts. In my opinion they do look pretty good, plus I'm sure once the developer manages to get a copy of Flash 9, they'll get a whole lot better.

http://teethgrinder.co.uk/o...

Comment 7 by Raymond Camden posted on 1/4/2008 at 8:14 PM

@Gareth: Check the license for XML/SWF. The free version blocks linking, so you can't tie a bar to a url for example. (That's based on my super quick reading.) The 45 dollar version doesn't have this limit.

Comment 8 by Eric Hynds posted on 1/4/2008 at 9:05 PM

If you're already implementing jQuery, take a look a Flot: http://code.google.com/p/flot/

Comment 9 by Darth Sidious posted on 1/4/2008 at 9:55 PM

If you want to see some *AMAZING* charting checkout GlobFX:

http://www.globfx.com/produ...

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/produ...

Comment 10 by Andy Matthews posted on 1/4/2008 at 10:00 PM

Those are freaking amazing!

Comment 11 by Kevin posted on 1/5/2008 at 12:35 AM

I did a project using the XML/SWF charts last year with some nice success (I'd link but the charts are all behind a login). It was easy to use (I was using PHP for that project but it would have been even easier with CF) and the client loved the look of them. Anyhow, it was certainly worth the $45 dollars since it would have taken way more money to build it myself.

Comment 12 by Gary posted on 1/8/2008 at 4:18 AM

We use Kavachart for all our visualization.
They have some good documentation on integrating with CF, and my experience with their support has been great.

http://www.ve.com/kavachart...

Comment 13 by vin45 posted on 6/16/2008 at 3:08 PM

hey guys, I have found a set of open source chart controller called http://visifire.com powered by silverlight just for free

Comment 14 by flicker posted on 8/7/2008 at 4:16 AM

A new version 5 of XML/SWF Charts is now available:
http://www.maani.us/xml_charts

It includes scrolling, streaming, full screen mode, filter effects, and much more!

Comment 15 by Darin posted on 2/26/2009 at 2:50 AM

Has anyone tried to use XML/SWF Charts to connect to a database? I can not get this to work. Their support is not most timely nor precise.

Thanks

Comment 16 by Raymond Camden posted on 2/27/2009 at 12:55 AM

How is it failing for you? The charts don't connect to a DB themselves. You would use live update to hit an XML file generated by CF. So you want ot be sure your code is outputting the right result.

Comment 17 by Meg Stiles posted on 5/22/2009 at 10:52 PM

We've been using XML/SWF Charts in dev in a Mac OSX/Dreamweaver CS3 environment; with our animations embedded in aspx files. Just recently we discovered that the animations fail in IE. The author is not very helpful. Our developers are convinced that it has to do with the versioning scripting in the AC_RunActiveContent.js file. Works perfectly in Safari and Firefox. Sadly, our user base is 99% PC, and I suspect 99% will be using IE. Has anyone else had this problem? Any ideas/workarounds?

Comment 18 by Donny posted on 7/21/2009 at 11:23 AM

Is there license for XML/SWF 5.07?

Comment 19 by sandeep posted on 2/24/2010 at 12:34 PM

Have problems in using xml swf charts through ajax calls.
I am able to get the response from ajax but while executing the script the page is getting re-loaded

Comment 20 by Raymond Camden posted on 2/24/2010 at 5:16 PM

Sounds like maybe a JS error. Is this online where we can see?