By far the easiest way is just to make the maximum width of the graph image 100 pixels. Then make the percentage the width of the image. For example, if it is 29%, then the $width would be 29.
<img src="image.gif" width="<?=$width?>" height="10">
To make the maximum width of the graph image something else, just take the new maximum width and subtract the percentage of the poll. Does that make sense? It's getting close to quitting time.