Thursday, September 10, 2009

- "I want charts!" -"Flash, image or canvas?" -"Say again?!"



CDF's primary rendering engine for charts is JFreeChart, and there are a lot of reasons for that:
  • Pentaho supports it
  • We have a very good level of technical interaction with it, allowing us to do drill through, etc
  • By generating an image, we can use it in static reports, print it, etc
  • JFreeChart is really, really good. Does it's job. Period.
It has it's disadvantages, though:
  • It's hard to interact with it. Being an image, all it can do is render image maps, so sometimes we have an hard time finding a particular value
  • It's ugly.
I'm not very sensible to the second argument. I'm a fierce defender that a dashboard shouldn't have elements that distract you from what's really important - the numbers. But it's also true that users (and sales people ;) ) love eye candy. And the business users always like to do some show off, nothing wrong with that.

The first point concerns me, though. Should be easy to read information out of the charts, and sometimes that's not the case. Sometimes we need interaction with the data at a level that a PNG file can't give us.

On a recent team Mozilla metrics team meeting where I was showing a dashboard our team developed, I did a test to measure the reaction to find out exactly how important this issue is. I showed them the new dashboard using standard jfreechart components and near the end of the meeting I quickly swapped to the open flash charts version of them. The result was worst than I expected..

- Oh, WOW, this looks awsome!
- Hum... well, it's really the same thing, the information is identical
- I don't care! It's prettier. And look, there are popups with the numbers. I want this!
It's undeniable. It has a great impact. Since I work on both sides - developing the framework AND doing actual implementations, instead of fighting it, I can try to build the tools in order to allow the best of both worlds.

Working on a new charting engine for CDF has always been one of my objectives. After this meeting, it has become one of the short time objectives. This is a challenging task; Ideally, the framework developer part of me wants a layer that is independent of the rendering engine. That has a major problem - by doing so I'll probably have to settle with the least common denominator of all engine's functionalities, something that the other me - the one that has to implement each and every one of my client's requests - absolutely don't want to happen.

So I'll probably start by focusing on a good charting engine to pose as an alternative to jfreechart. Sure, there's support to open flash charts, but it's functionality is yet a bit limited. It just doesn't do what I want/need it to do.

I'm more inclined into one of this options (suggestions are welcome here):
I would love NOT to use a flash-based solution. I'd rather use a canvas-based solution. But I won't even think about any of this technical constraints if I need to loose anything in the functionality side...


Cya in Barcelona next week!

8 comments:

Andy Grohe said...

Pedro,

YUI has a nice charts module worth looking at. It is flash based.
http://developer.yahoo.com/yui/examples/charts/charts-skins.html

It integrates nicely with Pentaho.

I also like InfoVis and Raphael. They are canvas based.
http://thejit.org/demos/
http://raphaeljs.com/

tdido said...

Pedro, according to Taqua, now that FusionCharts is going open, Pentaho Reporting is going to implement them (http://www.sherito.org/?p=96). I was thinking it could be a good idea for you guys to coordinate efforts so there are not a gazillion different charting engines in the platform.

Cheers!

Pedro Alves said...

That's absolutely the ideal scenario... I hope they read my blog, cause that's really hard :D

Nick said...

FusionCharts going GPL is promising, along with the others mentioned above.

Also, check out TibcoGI a BSD licensed AJAX framework that has pretty good charting. In general, you'll never get the slick animations you'll get in flash.

Might I suggest that you consider simply implementing new "Pentaho chart beans" implementations. Best I can tell, Pentaho Chart Beans is the best chance to make a general purpose API/framework that allow relatively swappable chart engines underneath.

Ingo said...

Aren't Pentaho's chart beans exactly what you are after? From what I understood the chart beans are an abstraction layer for various charting engines and I'm sure Taqua will use them, too, when implementing the Fusion charts.

Ingo said...

Ups, I should have read the last part of Nick's comment, too. ;-)

Tom Barber said...

We don't even have flash installed on peoples machines at work and people still want flashcharts.... sigh

Roland Bouman said...

Hi!

there are a number of non-flash solutions out there.
for example:

http://www.filamentgroup.com/lab/jquery_visualize_plugin_accessible_charts_graphs_from_tables_html5_canvas/

http://code.google.com/p/gchart/

http://thejit.org/

Post a Comment