You can read the data from your database and build up an image that represents the figure retrieved from your database.
I did one a while ago that rertrieved three firgures which could be anything in the range of 0-100. Then depending on the fugure trieved, I had a bar chart with three bars respectively.
You would need to duplicate the code below for however many bars you had:
[code=php]if ($count1 > 0) {
$count1barwidth = number_format(($count1 / $totalcount) * 100, 2);
$graybarwidth = intval(99 - $count1barwidth);
$count1bar = "<img src=\"images/bars/greenbar.gif\" width=\"" . $count1barwidth . "%\" height=\"8\">";
} else {
$graybarwidth = 99;
$count1barwidth = 0;
}
$count1bar .= "<img src=\"images/bars/graybar.gif\" width=\"" . $graybarwidth . "%\" height=\"8\">";
[/code]
Good luck.