To create graphs, charts or pie chats in php is really easy with jpgraphs library available for php. Here’s how you can use this library.
after downloading the zip file, just unzip the file and copy paste the folder to the webroot or the www folder to access it through your localhost or webserver.
open the folder and go to the examples directory, where you can see lots of examples listed for dynamic graphs and chart generation.
select the example that suits best to your requirment and find the code for the example there.
below given are some image examples of how a graph or chart created with jpgraph library looks like: