I am creating charts(pie chart) with my php code which gets data from database and chart the respective values .

I want to export these charts , or to create this chart in Excel by Clicking a button from web .

I have seen it done on some website which I dont remember .

Can anyone suggest what will be the best solution for it ?