I have a mysql table like below
buy_trader qty
--------------------
abc 48000
xyz 40000
pqr 35000
Others 88000
You could generate an image of the chart from the command line using sqlchart http://www.sqldashboards.com/sqlchart#example-charts allows generating a pie chart straight from your mysql query like so:
sqlchart --host dbserver --servertype mysql --user ryan --pass 123abc --chart piechart --execute "select * from tbl"
In fact this is how it would look: