There are two ways:
1. by using google API for charts
In this you just have to pass value through URL and google will return you a Graph Image, Then you can use it easily.
2. Another way is to use Graphics Methods
I have an example for the same....
get it frm HERE.