Lunarpages Web Hosting Forum

Author Topic: Is php Pie Chart and Bar Graph possible?  (Read 7728 times)

Offline tocccomp

  • Newbie
  • *
  • Posts: 1
Is php Pie Chart and Bar Graph possible?
« on: September 13, 2009, 09:06:03 AM »
I've looked around cPanel...  does anyone know how I can create Pie Charts and Bar Graphs on my php/mysql website?  Do I need to install something?  A link/info would be appreciated.


Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6427
Re: Is php Pie Chart and Bar Graph possible?
« Reply #1 on: September 13, 2009, 11:38:02 AM »
Are you talking about creating graphs on-the-fly, or displaying static graphs that you change only once in a while? PHP has the "GD" graphics library, which can be used to create a picture or graph when the page is displayed. I don't think GD has graphing functions built in; you'll have to find or write a library to take your data and turn it into GD commands.

If this is just updated once in a while, you would probably be best off finding something that runs on a PC (such as a spreadsheet) to create your graphs, capture them as .gif files or .svg files, and upload them to your site. Use an image editor such as GIMP or PhotoShop to embellish the text and labels. For such one-off uses, I wouldn't bother trying to find something that runs on the site -- it's more effort than it's worth.,
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-