Non-Flash ColdFusion charts are still interactive

This post is more than 2 years old.

So this is news to me. In preparation for talking about the Lemonade Stand results tomorrow, I worked a bit more on the reporting for my simulator. Since I love charts, I plopped a chart down at the end that shows each stand and how it performs over all 50 days. I knew I was going to want to share the complete chart on the blog post, so I switched from the default Flash format to PNG. When I moused over the chart though I noticed the tool tips still worked! Here is an example:

Turns out that for both PNG and JPG formats, the charting engine will actually output an image map and support the same tool tips you get with the Flash version.

Nice to know. I mean, in my case my plan is to save the PNG/JPG, so it won't help, but if you can't use Flash for other reasons, you can still have an interactive chart. (Note - I just tested the URL property and it works fine as well for PNG/JPG.)

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Archived Comments

Comment 1 by Brad Wood posted on 7/14/2008 at 8:10 AM

That's good info. I can't wait to see the results. The suspense is killing me!

Comment 2 by Raul Riera posted on 7/14/2008 at 12:37 PM

They can, but when you have fancy CSS on your page the tooltips go all crazy on you, if there was a way to control de CSS of the tooltip it would be nice.

(I get the width of the tooltop to be LOOOOOONG so I see a huge box and no text)

Comment 3 by Raymond Camden posted on 7/14/2008 at 3:24 PM

I wonder if maybe you could edit the stuff cfchart spits out. Before Adobe released an Active Content fix for IE and cfcharts, folks would wrap the cfchart with cfsavecontent and just modify the HTML there before outputting it to the browser.

Comment 4 by JC posted on 7/15/2008 at 1:06 AM

Pretty sure that's all editable via XML files.
JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfusion\charting

Comment 5 by Raymond Camden posted on 7/15/2008 at 1:19 AM

I'd still probably recommend the cfsavecontent approach. If it does work, it will be better than modifying server files.

Comment 6 by JC posted on 7/15/2008 at 3:32 AM

The server files are <a href="http://livedocs.adobe.com/c...">intended to be modified</a>. Or rather, copied and customized. It's not actually an Adobe product, it's a third party tool they integrated pretty nicely, but not completely, into CF (and CF8 has a more recent version, too... CF7's was a few years old).

If you've never played with the WebCharts interface, it's worth giving it a look, it's kinda fun:
JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfusion\charting\webcharts.bat
JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfusion\charting\userguide.pdf

I haven't played with it lately, but a couple of years ago someone read something in a glossy magazine on an airplane and I spent a month doing all sorts of junk in preparation for a request for executive dashboards, with gauges, which the CFChart tag doesn't support, but which you can actually do <a href="http://www.intersuite.com/c...">with the right code snippet</a>.

Of course, you probably already know all this.. but maybe someone else doesn't. :)

Comment 7 by JC posted on 7/15/2008 at 3:32 AM

oops. :( can you fix that html mess, please? :)

Comment 8 by Raymond Camden posted on 7/15/2008 at 4:23 AM

@JC - Yep, I'm well aware of the charting engine. I've written a few blog posts on using the bat files. What I had meant was that you probably should not edit the server files as it would impact ALL charts, but if you can copy them then never mind then. ;)

I really need to add a note to tell folks not to use HTML since I 'auto link' urls. :)

Comment 9 by Franz Rinkleff posted on 12/1/2009 at 8:27 AM

I just loaded a jpg cfchart via ajax. The tool tips do not appear to work when the jpg cfchart is loaded via ajax. Anyone experience this problem or know of a work around.

Comment 10 by Raymond Camden posted on 12/1/2009 at 9:29 AM

Did you save the binary data of the chart and serve that up, or the normal output which includes the image map?