homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Open Source Graph and Chart Class

 6:54 am on Jan 22, 2013 (gmt 0)

Does anyone have any good freely distributable open source graph and chart classes they could recommend that aren't abandoned projects?

pChart on Source Forge seemed to be OK but it also appears to have been abandoned in 2008.

Something more currently maintained with that kind of functionality would be nice.


* Server-side graphs and charts created in PHP
* No AJAX or HMTL5 solutions
* No Flash solutions. Sadly, I've got a killer Flash graphing package but that doesn't cut it if you want it to work on mobile devices.

I've also looked at Google's graph stuff, works just fine except on mobile, so yet again, a dead end. You would think at least that would all work on Android but think again. At least it didn't a few months back when I tried it.

Any suggestions?



 12:37 am on Jan 27, 2013 (gmt 0)

I dabbled with pChart long enough to know it works well enough but has some issues.

The fonts included with the project were copyrighted so I had to track down a freely redistributable true type font, more fun.

The other problem is the calculations that generate the Y axis labels generates long floating point decimals under odd circumstances, looks like I need to make some adjustments.

Anyone got any better recommendations out there?

brotherhood of LAN

 12:54 pm on Jan 27, 2013 (gmt 0)

>Flash graphing package

Fusioncharts? Used them for a while but the Flash tended to be too 'heavy' for a page if you had dozens of charts. I think HTML5 shifted the market massively for them.


it seems client side generation of charts is preferred when available because it can be quite server intensive so better to give the load to the user(s)

The last PHP package I used was JPGraph to create graphs en masse for a reporting cron and managed to create up to 30 a second. It seems fairly comprehensive and may be worth a go.


 2:34 am on Jan 28, 2013 (gmt 0)

I think HTML5 shifted the market massively for them.

Yes, and I may shift my criteria to HTML 5 graphs as the PHP stuff isn't documented well and you kind of have to stumble thru it and look at the source code to see what it can and can't actually do.

The other advantage the HTML 5 stuff gives me, besides client side rendering, is being able to easily hyperlink graphics elements without creating imagemaps, which isn't supported by this pChart class and I'd have to add it.


My main criteria for server side graphs in PNG format was that they simply worked everywhere in all browsers without issue.

When it comes to free HTML 5 graph and chart libraries not all of them work on smartphones, but the Flotr2 library does seem to work fine in Android in testing so far.

brotherhood of LAN

 1:33 pm on Jan 28, 2013 (gmt 0)

Depends what you're after tbh. If it's liberal usage in a high traffic environment I'd say the JS route works out better, anything client side at least.

I've tried flot but it seems incomplete compared to other packages, and I had some issues with axis labelling (iirc I wanted the labels tilted)

The last package I used was highcharts, which is JS driven. I visited their site just now and coincidentally they have an elaborate server side solution using a headless browser. hmm. PHP would seem simpler and more server friendly I would have thought.

fwiw they're all using <canvas> and SVG so a custom workaround may suit you.


 4:45 pm on Jan 28, 2013 (gmt 0)

My criteria is low volume usage, maybe a couple of times a day tops on an admin dashboard and maybe on an analytics report.

Functioning in any environment is preferred for low maintenance reasons obviously.

I only need two basic charts ATM, a stacked bar chart and a pie chart, so the overall complexity of the library isn't a deal breaker at the moment and both pChart and Flotr2 seems to work but they both have issues.

Flotr2 has some sort of rendering problem with the legend box on stacked charts and everything is kind of washed out with the selected background color while the pie charts and others don't have this particular ailment.

Looking at some lesser known stuff but at this point I'm almost tempted to either write my own, done it before, to avoid having to debug someone else's mess and/or drop a couple of dollars on a commercial library.

Just wish Flash was still a consideration because the free FusionCharts just rocked and the Google charts were easy but didn't work on Andoid when I tried them but maybe it would in the more current browsers and I haven't retested in a while.

I'm starting to think I might just use the pChart stuff as-is in the short term since I have a functioning prototype and revisit it later when I want to add advanced functionality but I hate taking shortcuts.


 12:47 am on Jan 29, 2013 (gmt 0)

use perl and GD::Graph to generate the charts.


 4:52 am on Jan 29, 2013 (gmt 0)

use perl and GD::Graph to generate the charts.

PHP uses GD and Perl is not an option.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved