Hi
I want to draw a pichart in moodle's custom developed local plugin. how can i do that?
I recommend you use Javascript.
Choose one javascript charting libraries compatible with jQuery and use that to generate chart.
http://www.sitepoint.com/11-best-jquery-charting-libraries/
If you are developing for Moodle prior to 2.9 than you can also use YUI chart library.