Drawing 3D bar graphs using PHP?
I'm looking to draw a 3d bar graph similar to the one below开发者_如何学Go
alt text http://techportal.co.za/article_images/image004.png
My problem is that I can't seem to find any useful library that can do this for me, any classes available that can do this for me. I tried pchart but this does not seem to work for this, only for 3d pie charts
Maybe here you can find something suitable? http://jpgraph.net/features/gallery.php#bar1
I assume you want to use PHP for the graphs to ensure that everyone who views the site can see them? Why not use a JS library such as Plotr to create the spangly 3D version, but fall back on CSS for those users without the correct browser support;
http://speckyboy.com/2009/02/04/16-usable-css-graph-and-bar-chart-tutorials-and-techniques/
EDIT
If the graph is being sent via email then you can't use JS, but there's no reason why you can't use CSS. Get PHP to output a list, or a series of inputs (whatever best fit's your purpose), send the email in an HTML format, and use CSS to style the HMTL using one of the techniques illustrated in the link above.
Also, using PHP to generate static images will present other issues, most notably getting through user's spam filters and your own bandwidth, not to mention how much of a waste of CPU cycles it is to process these images when a bit of HTML / CSS trickery would achieve the same effect.
精彩评论