Generate graphs

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Generate graphs

Post 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!
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Re: Generate graphs

Post 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
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: Generate graphs

Post 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?
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: Generate graphs

Post by Darhazer »

We are using amcharts
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: Generate graphs

Post by greyhoundcode »

Yes amCharts looks nice.
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Re: Generate graphs

Post 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.
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: Generate graphs

Post 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.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Generate graphs

Post 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.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Generate graphs

Post by Eran »

We use mostly flot and on occasion, raphael
Post Reply