I would love to completely skip integration between a database (not .csv or .sql) and chart for something like this: http://phpdatagrid.com/examples/phpgrid_phpchart_integration.... As you can see, it's the most tedious task combing server and client side scripts. However, it also the most flexible. So the important question is how flexible is to create complex charts that have many different attributes.
If it already supports CSV then hacking in a working MySQL backend might not be too difficult. I've gotten a lot of mileage out of `ssh dbserver mysql -b -e \'select * from pants where ...\'` in nagios and munin scripts.