What have you tried? Did it work? Did you take my advice up top and research the object model? Based on the Chart / Graph info I provided and a little reading, you should be able to figure this out. Even Google can be your friend. I read the second link (which gave me some ideas about ADSI and perl, btw) and found it interesting and helpful and David Wagner bubbled some of Jan DuBois' code up to top a while back here. Give these a read and give it a try.
Let us know how it goes.
Flex the Geek