Sunday, 26 July 2009

Using XML/SWF Gauge

I have been looking for flash widgets to show data in a dashboard. The XML/SWF Gauge has become my best choice so far. It only requires one gauge.swf file which takes in a XML configuration file to instruct it what and how to draw the gauge. I used it to implement a Radar View as part of my dashboard.

I like the simplicity of the XML/SWF Gauge when using it. Yet it generates versatile and visually pleasing results. It also supports dynamic data display and scheduled update/refresh.

Since I used it in a ZK web application, naturally I used ZK to generate the input XML file dynamically. By default XML files are not passed to the ZK Loader to handle. To force it to be passed to ZK Loader I had to add a servlet mapping in web.xml file:


I can use the same gauge.swf to generate all sorts of views - radar, meter, dial ... all I needed is to generate the appropriate XML file to feed the gauge.swf as shown in the following ZUL file segment.

        // ...

 if (view.getName().equals(event.getData())) {
  // recalculate view attributes...
  // refresh:

I do have the following complaints on XML/SWF Gauge:
  1. It does not support concurrent/nested animation.
  2. It does not support event-driven updates (vs. scheduled updates).
If you have come across any good flash gauge packages, please leave a comment.

1 comment:

Anonymous said...

From the publisher of XML/SWF Charts, Slideshow, and Gauge:

Introducing the new SlickBoard, a powerful tool for creating unlimited graphics, attractive interface elements (buttons, menus, tabs, drawers, etc.), animated slideshows, live dashboards (dials, gauges, ticker tapes, etc.), interactive presentations (drag, dock, etc.), dynamic web pages, and much more: