Page 1 of 1

Generate graphs

Posted: Tue Mar 02, 2010 12:12 pm
by greyhoundcode
I wish to generate graphs (bar and pie mostly) on the fly for a project in progress. I am aware of JpGraph and have played about with it - it is impressive, but the end result doesn't quite have the desired finesse (nice anti-aliasing and all that) that I seek.

The eZ Components graphing class is something special, and I have fallen in love with the way its graphs appear when outputted as SVG. Of course the problem with SVG is that it is unsupported by IE ("out of the box" at least).

Does anyone else have any opinions or experiences they might share about this? My dream is SVG smoothness in bitmap form!

Re: Generate graphs

Posted: Tue Mar 02, 2010 1:51 pm
by matthijs
If you wish fine grained control on exactly how everything looks, I'd go for protovis,
http://vis.stanford.edu/protovis/
or possibly one of the other js or flash graph solutions.

There's also the possibility of doing everything with HTML/CSS, but you have to like that

Re: Generate graphs

Posted: Tue Mar 02, 2010 2:15 pm
by greyhoundcode
matthijs wrote:I'd go for protovis,
http://vis.stanford.edu/protovis/
or possibly one of the other js or flash graph solutions.
Seems to generate SVG - but yeah a similar Flash solution could do the trick.
matthijs wrote:There's also the possibility of doing everything with HTML/CSS, but you have to like that
Such as creating, positioning and colouring divs? Or do you mean something else?

Re: Generate graphs

Posted: Tue Mar 02, 2010 2:47 pm
by Darhazer
We are using amcharts

Re: Generate graphs

Posted: Wed Mar 03, 2010 1:34 am
by greyhoundcode
Yes amCharts looks nice.

Re: Generate graphs

Posted: Wed Mar 03, 2010 2:02 am
by matthijs
greyhoundcode wrote:Such as creating, positioning and colouring divs? Or do you mean something else?
Could be divs. Or li's. Or stretching images. There are countless examples if you google css bar charts or graphs. here's a list of some
http://speckyboy.com/2009/02/04/16-usab ... echniques/

The drawack of using CSS is that it can be a bit tricky, depending on your CSS skills. On the other hand, the advantages are:
1) Easy on the server side, you just pull out the raw data
2) Fast. No image drawing either on server or client side
3) Accessible. If you do it right. A screenreader or search machine can perfectly read a list of items but not a single image.

Re: Generate graphs

Posted: Wed Mar 03, 2010 5:33 am
by greyhoundcode
8O

Well I have to admit I hadn't thought of that approach - an interesting idea that I think I will take forward.

For some reason I had let myself become railroaded into thinking the output must be bitmap, Flash or SVG.

And of course the HTML/CSS approach would certainly present some efficiency savings over both creating a graph server side with GD or having to send a Flash object to render the data.

Re: Generate graphs

Posted: Wed Mar 03, 2010 6:01 am
by josh
I've used the CSS technique when displaying survey results. Pretty easy because you just calculate a percentage, and then set the width to that percentage for some div/image. AWstats for one, uses this technique too.

Re: Generate graphs

Posted: Wed Mar 03, 2010 6:06 am
by Eran
We use mostly flot and on occasion, raphael