here is a link, worked fine for PHP4. which should cover 99% of your needs, don't know about PHP5 New URL: http://www.maani.us/charts4/ it seems that they are forcing an upgrade to XML/SWF for the new version of that lib will try to find the legacy lib URL
Butterfly, thank you. I'll check that. Actually I have found an excellent image library Imagemagick and successfully make it work with linux and c++. Now my website dynamically generates stock charts in .png format. I'm still working on it.